]> git.saurik.com Git - wxWidgets.git/blame_incremental - wxX11.spec
Don't use deprecated gtk_widget_ref().
[wxWidgets.git] / wxX11.spec
... / ...
CommitLineData
1%define pref /usr
2%define ver 2.9.2
3%define ver2 2.9
4%define rel 1
5
6# Configurable settings (use --with(out) unicode on rpmbuild cmd line):
7%define unicode 0
8%{?_with_unicode: %{expand: %%define unicode 1}}
9%{?_without_unicode: %{expand: %%define unicode 0}}
10
11%define portname x11univ
12
13%if %{unicode}
14 %define wxbasename wx-base-unicode
15 %define name wx-%{portname}-unicode
16 %define wxconfig %{portname}-unicode-%{ver2}
17 %define wxconfiglink wx%{portname}u-%{ver2}-config
18%else
19 %define wxbasename wx-base
20 %define name wx-%{portname}
21 %define wxconfig %{portname}-ansi-%{ver2}
22 %define wxconfiglink wx%{portname}-%{ver2}-config
23%endif
24
25Summary: The X11 port of the wxWidgets library
26Name: %{name}
27Version: %{ver}
28Release: %{rel}
29License: wxWindows Licence
30Group: X11/Libraries
31Source: wxX11-%{ver}.tar.bz2
32URL: http://www.wxwidgets.org
33Packager: Vadim Zeitlin <vadim@wxwindows.org>
34Prefix: %{pref}
35BuildRoot: %{_tmppath}/%{name}-root
36Requires: %{wxbasename} = %{ver}
37
38# all packages providing an implementation of wxWidgets library (regardless of
39# the toolkit used) should provide the (virtual) wxwin package, this makes it
40# possible to require wxwin instead of requiring "wxgtk or wxmotif or wxuniv..."
41Provides: wxwin
42Provides: wxX11
43
44%description
45wxWidgets is a free C++ library for cross-platform GUI development.
46With wxWidgets, you can create applications for different GUIs (GTK+,
47Motif/LessTif, MS Windows, Mac) from the same source code.
48
49%package devel
50Summary: The X11 port of the wxWidgets library
51Group: X11/Libraries
52Requires: %{name} = %{ver}
53Requires: %{wxbasename}-devel = %{ver}
54
55%description devel
56Header files for wxX11, the X11 port of the wxWidgets library.
57
58%package gl
59Summary: The X11 port of the wxWidgets library, OpenGL add-on.
60Group: X11/Libraries
61Requires: %{name} = %{ver}
62
63%description gl
64OpenGL add-on library for wxX11, the X11 port of the wxWidgets library.
65
66%package static
67Summary: wxX11 static libraries
68Group: Development/Libraries
69Requires: %{wxbasename}-static
70Requires: %{name}-devel = %{ver}
71
72%description static
73Static libraries for wxX11. You need them if you want to link statically against wxX11.
74
75%prep
76%setup -q -n wxX11-%{ver}
77
78%build
79if [ "$SMP" != "" ]; then
80 export MAKE="make -j$SMP"
81else
82 export MAKE="make"
83fi
84
85mkdir obj-shared
86cd obj-shared
87../configure --prefix=%{pref} --with-x11 \
88%if %{unicode}
89 --enable-unicode \
90%else
91 --disable-unicode \
92%endif
93$MAKE
94cd ..
95
96mkdir obj-static
97cd obj-static
98../configure --prefix=%{pref} --with-x11 --disable-shared \
99%if %{unicode}
100 --enable-unicode \
101%else
102 --disable-unicode \
103%endif
104 --with-opengl
105$MAKE
106cd ..
107
108%install
109rm -rf $RPM_BUILD_ROOT
110(cd obj-static; make prefix=$RPM_BUILD_ROOT%{pref} install)
111(cd obj-shared; make prefix=$RPM_BUILD_ROOT%{pref} install)
112
113# Remove headers that are part of wx-base-devel:
114
115# --- wxBase headers list begins here ---
116cat <<EOF >wxbase-headers.files
117wx/afterstd.h
118wx/any.h
119wx/anystr.h
120wx/app.h
121wx/apptrait.h
122wx/archive.h
123wx/arrimpl.cpp
124wx/arrstr.h
125wx/atomic.h
126wx/base64.h
127wx/beforestd.h
128wx/buffer.h
129wx/build.h
130wx/chartype.h
131wx/checkeddelete.h
132wx/chkconf.h
133wx/clntdata.h
134wx/cmdargs.h
135wx/cmdline.h
136wx/confbase.h
137wx/config.h
138wx/convauto.h
139wx/containr.h
140wx/cpp.h
141wx/crt.h
142wx/datetime.h
143wx/datstrm.h
144wx/dde.h
145wx/debug.h
146wx/defs.h
147wx/dir.h
148wx/dlimpexp.h
149wx/dlist.h
150wx/dynarray.h
151wx/dynlib.h
152wx/dynload.h
153wx/encconv.h
154wx/event.h
155wx/evtloop.h
156wx/except.h
157wx/features.h
158wx/flags.h
159wx/ffile.h
160wx/file.h
161wx/fileconf.h
162wx/filefn.h
163wx/filename.h
164wx/filesys.h
165wx/fontenc.h
166wx/fontmap.h
167wx/fs_arc.h
168wx/fs_filter.h
169wx/fs_mem.h
170wx/fs_zip.h
171wx/hash.h
172wx/hashmap.h
173wx/hashset.h
174wx/html/forcelnk.h
175wx/iconloc.h
176wx/init.h
177wx/intl.h
178wx/iosfwrap.h
179wx/ioswrap.h
180wx/ipc.h
181wx/ipcbase.h
182wx/kbdstate.h
183wx/language.h
184wx/link.h
185wx/list.h
186wx/listimpl.cpp
187wx/log.h
188wx/longlong.h
189wx/math.h
190wx/memconf.h
191wx/memory.h
192wx/memtext.h
193wx/mimetype.h
194wx/module.h
195wx/mousestate.h
196wx/msgout.h
197wx/msgqueue.h
198wx/mstream.h
199wx/numformatter.h
200wx/object.h
201wx/platform.h
202wx/platinfo.h
203wx/power.h
204wx/process.h
205wx/ptr_scpd.h
206wx/ptr_shrd.h
207wx/recguard.h
208wx/regex.h
209wx/rtti.h
210wx/scopedarray.h
211wx/scopedptr.h
212wx/scopeguard.h
213wx/sharedptr.h
214wx/snglinst.h
215wx/sstream.h
216wx/stack.h
217wx/stackwalk.h
218wx/stdpaths.h
219wx/stdstream.h
220wx/stockitem.h
221wx/stopwatch.h
222wx/strconv.h
223wx/stream.h
224wx/string.h
225wx/stringimpl.h
226wx/stringops.h
227wx/strvararg.h
228wx/sysopt.h
229wx/tarstrm.h
230wx/textbuf.h
231wx/textfile.h
232wx/thread.h
233wx/thrimpl.cpp
234wx/timer.h
235wx/tls.h
236wx/tokenzr.h
237wx/tracker.h
238wx/translation.h
239wx/txtstrm.h
240wx/typeinfo.h
241wx/types.h
242wx/unichar.h
243wx/uri.h
244wx/ustring.h
245wx/utils.h
246wx/variant.h
247wx/vector.h
248wx/version.h
249wx/versioninfo.h
250wx/volume.h
251wx/weakref.h
252wx/wfstream.h
253wx/wx.h
254wx/wxchar.h
255wx/wxcrt.h
256wx/wxcrtbase.h
257wx/wxcrtvararg.h
258wx/wxprec.h
259wx/xlocale.h
260wx/xti.h
261wx/xti2.h
262wx/xtistrm.h
263wx/xtictor.h
264wx/xtihandler.h
265wx/xtiprop.h
266wx/xtitypes.h
267wx/zipstrm.h
268wx/zstream.h
269wx/meta/convertible.h
270wx/meta/if.h
271wx/meta/implicitconversion.h
272wx/meta/int2type.h
273wx/meta/movable.h
274wx/meta/pod.h
275wx/fswatcher.h
276wx/generic/fswatcher.h
277wx/unix/app.h
278wx/unix/apptbase.h
279wx/unix/apptrait.h
280wx/unix/chkconf.h
281wx/unix/evtloop.h
282wx/unix/evtloopsrc.h
283wx/unix/pipe.h
284wx/unix/stdpaths.h
285wx/unix/stackwalk.h
286wx/unix/tls.h
287wx/unix/fswatcher_kqueue.h
288wx/unix/execute.h
289wx/unix/mimetype.h
290wx/unix/fswatcher_inotify.h
291wx/fs_inet.h
292wx/protocol/file.h
293wx/protocol/ftp.h
294wx/protocol/http.h
295wx/protocol/log.h
296wx/protocol/protocol.h
297wx/sckaddr.h
298wx/sckipc.h
299wx/sckstrm.h
300wx/socket.h
301wx/url.h
302wx/xml/xml.h
303wx/xtixml.h
304EOF
305# --- wxBase headers list ends here ---
306for f in `cat wxbase-headers-list` ; do
307 rm -f $RPM_BUILD_ROOT%{_includedir}/wx-%{ver2}/$f
308done
309
310# list of all core headers:
311find $RPM_BUILD_ROOT%{_includedir}/wx-%{ver2} -type f | sed -e "s,$RPM_BUILD_ROOT,,g" >core-headers.files
312
313# remove wxBase files so that RPM doesn't complain about unpackaged files:
314rm -f $RPM_BUILD_ROOT%{_libdir}/libwx_base*
315%if %{unicode}
316 rm -f $RPM_BUILD_ROOT%{_libdir}/libwxregexu-%{ver2}.a
317%endif
318rm -f $RPM_BUILD_ROOT%{_datadir}/aclocal/*
319rm -f $RPM_BUILD_ROOT%{_datadir}/locale/*/*/*
320
321%clean
322rm -rf $RPM_BUILD_ROOT
323
324%post
325/sbin/ldconfig
326
327%postun
328/sbin/ldconfig
329
330%post devel
331# link wx-config when you install RPM.
332ln -sf %{_libdir}/wx/config/%{wxconfig} %{_bindir}/wx-config
333# link wx-config with explicit name.
334ln -sf %{_libdir}/wx/config/%{wxconfig} %{_bindir}/%{wxconfiglink}
335/sbin/ldconfig
336
337%postun devel
338/sbin/ldconfig
339
340%preun devel
341if test -f %{_bindir}/wx-config -a -f /usr/bin/md5sum ; then
342 SUM1=`md5sum %{_libdir}/wx/config/%{wxconfig} | cut -c 0-32`
343 SUM2=`md5sum %{_bindir}/wx-config | cut -c 0-32`
344 if test "x$SUM1" = "x$SUM2" ; then
345 rm -f %{_bindir}/wx-config
346 fi
347fi
348rm -f %{_bindir}/%{wxconfiglink}
349
350%post gl
351/sbin/ldconfig
352
353%postun gl
354/sbin/ldconfig
355
356%files
357%defattr(-,root,root)
358%doc COPYING.LIB *.txt
359%{_libdir}/libwx_%{portname}*_adv-%{ver2}.so.*
360%{_libdir}/libwx_%{portname}*_core-%{ver2}.so.*
361%{_libdir}/libwx_%{portname}*_html-%{ver2}.so.*
362%{_libdir}/libwx_%{portname}*_media-%{ver2}.so.*
363%{_libdir}/libwx_%{portname}*_qa-%{ver2}.so.*
364%{_libdir}/libwx_%{portname}*_xrc-%{ver2}.so.*
365
366
367%files devel -f core-headers.files
368%defattr(-,root,root)
369%{_libdir}/libwx_%{portname}*_adv-%{ver2}.so
370%{_libdir}/libwx_%{portname}*_core-%{ver2}.so
371%{_libdir}/libwx_%{portname}*_gl-%{ver2}.so
372%{_libdir}/libwx_%{portname}*_html-%{ver2}.so
373%{_libdir}/libwx_%{portname}*_media-%{ver2}.so
374%{_libdir}/libwx_%{portname}*_qa-%{ver2}.so
375%{_libdir}/libwx_%{portname}*_xrc-%{ver2}.so
376%dir %{_libdir}/wx
377%{_libdir}/wx/*
378%{_bindir}/wxrc*
379
380%files gl
381%defattr(-,root,root)
382%{_libdir}/libwx_%{portname}*_gl-%{ver2}.so.*
383
384%files static
385%defattr (-,root,root)
386%{_libdir}/libwx_%{portname}*_*-%{ver2}.a
387