]> git.saurik.com Git - wxWidgets.git/blame_incremental - wxX11.spec
support for @2x notation for wxBITMAP_TYPE_PNG (non-resource) on retina displays
[wxWidgets.git] / wxX11.spec
... / ...
CommitLineData
1%define pref /usr
2%define ver 2.9.5
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/compiler.h
137wx/confbase.h
138wx/config.h
139wx/convauto.h
140wx/containr.h
141wx/cpp.h
142wx/crt.h
143wx/datetime.h
144wx/datstrm.h
145wx/dde.h
146wx/debug.h
147wx/defs.h
148wx/dir.h
149wx/dlimpexp.h
150wx/dlist.h
151wx/dynarray.h
152wx/dynlib.h
153wx/dynload.h
154wx/encconv.h
155wx/event.h
156wx/eventfilter.h
157wx/evtloop.h
158wx/except.h
159wx/features.h
160wx/flags.h
161wx/ffile.h
162wx/file.h
163wx/fileconf.h
164wx/filefn.h
165wx/filename.h
166wx/filesys.h
167wx/fontenc.h
168wx/fontmap.h
169wx/fs_arc.h
170wx/fs_filter.h
171wx/fs_mem.h
172wx/fs_zip.h
173wx/hash.h
174wx/hashmap.h
175wx/hashset.h
176wx/html/forcelnk.h
177wx/iconloc.h
178wx/init.h
179wx/intl.h
180wx/iosfwrap.h
181wx/ioswrap.h
182wx/ipc.h
183wx/ipcbase.h
184wx/kbdstate.h
185wx/language.h
186wx/link.h
187wx/list.h
188wx/listimpl.cpp
189wx/log.h
190wx/longlong.h
191wx/math.h
192wx/memconf.h
193wx/memory.h
194wx/memtext.h
195wx/mimetype.h
196wx/module.h
197wx/mousestate.h
198wx/msgout.h
199wx/msgqueue.h
200wx/mstream.h
201wx/numformatter.h
202wx/object.h
203wx/platform.h
204wx/platinfo.h
205wx/power.h
206wx/process.h
207wx/ptr_scpd.h
208wx/ptr_shrd.h
209wx/recguard.h
210wx/regex.h
211wx/rtti.h
212wx/scopedarray.h
213wx/scopedptr.h
214wx/scopeguard.h
215wx/sharedptr.h
216wx/snglinst.h
217wx/sstream.h
218wx/stack.h
219wx/stackwalk.h
220wx/stdpaths.h
221wx/stdstream.h
222wx/stockitem.h
223wx/stopwatch.h
224wx/strconv.h
225wx/stream.h
226wx/string.h
227wx/stringimpl.h
228wx/stringops.h
229wx/strvararg.h
230wx/sysopt.h
231wx/tarstrm.h
232wx/textbuf.h
233wx/textfile.h
234wx/thread.h
235wx/thrimpl.cpp
236wx/time.h
237wx/timer.h
238wx/tls.h
239wx/tokenzr.h
240wx/tracker.h
241wx/translation.h
242wx/txtstrm.h
243wx/typeinfo.h
244wx/types.h
245wx/unichar.h
246wx/uri.h
247wx/ustring.h
248wx/utils.h
249wx/variant.h
250wx/vector.h
251wx/version.h
252wx/versioninfo.h
253wx/volume.h
254wx/weakref.h
255wx/wfstream.h
256wx/wx.h
257wx/wxchar.h
258wx/wxcrt.h
259wx/wxcrtbase.h
260wx/wxcrtvararg.h
261wx/wxprec.h
262wx/xlocale.h
263wx/xti.h
264wx/xti2.h
265wx/xtistrm.h
266wx/xtictor.h
267wx/xtihandler.h
268wx/xtiprop.h
269wx/xtitypes.h
270wx/zipstrm.h
271wx/zstream.h
272wx/meta/convertible.h
273wx/meta/if.h
274wx/meta/implicitconversion.h
275wx/meta/int2type.h
276wx/meta/movable.h
277wx/meta/pod.h
278wx/meta/removeref.h
279wx/fswatcher.h
280wx/generic/fswatcher.h
281wx/unix/app.h
282wx/unix/apptbase.h
283wx/unix/apptrait.h
284wx/unix/chkconf.h
285wx/unix/evtloop.h
286wx/unix/evtloopsrc.h
287wx/unix/pipe.h
288wx/unix/stdpaths.h
289wx/unix/stackwalk.h
290wx/unix/tls.h
291wx/unix/fswatcher_kqueue.h
292wx/unix/execute.h
293wx/unix/mimetype.h
294wx/unix/fswatcher_inotify.h
295wx/fs_inet.h
296wx/protocol/file.h
297wx/protocol/ftp.h
298wx/protocol/http.h
299wx/protocol/log.h
300wx/protocol/protocol.h
301wx/sckaddr.h
302wx/sckipc.h
303wx/sckstrm.h
304wx/socket.h
305wx/url.h
306wx/xml/xml.h
307wx/xtixml.h
308EOF
309# --- wxBase headers list ends here ---
310for f in `cat wxbase-headers-list` ; do
311 rm -f $RPM_BUILD_ROOT%{_includedir}/wx-%{ver2}/$f
312done
313
314# list of all core headers:
315find $RPM_BUILD_ROOT%{_includedir}/wx-%{ver2} -type f | sed -e "s,$RPM_BUILD_ROOT,,g" >core-headers.files
316
317# remove wxBase files so that RPM doesn't complain about unpackaged files:
318rm -f $RPM_BUILD_ROOT%{_libdir}/libwx_base*
319%if %{unicode}
320 rm -f $RPM_BUILD_ROOT%{_libdir}/libwxregexu-%{ver2}.a
321%endif
322rm -f $RPM_BUILD_ROOT%{_datadir}/aclocal/*
323rm -f $RPM_BUILD_ROOT%{_datadir}/locale/*/*/*
324
325%clean
326rm -rf $RPM_BUILD_ROOT
327
328%post
329/sbin/ldconfig
330
331%postun
332/sbin/ldconfig
333
334%post devel
335# link wx-config when you install RPM.
336ln -sf %{_libdir}/wx/config/%{wxconfig} %{_bindir}/wx-config
337# link wx-config with explicit name.
338ln -sf %{_libdir}/wx/config/%{wxconfig} %{_bindir}/%{wxconfiglink}
339/sbin/ldconfig
340
341%postun devel
342/sbin/ldconfig
343
344%preun devel
345if test -f %{_bindir}/wx-config -a -f /usr/bin/md5sum ; then
346 SUM1=`md5sum %{_libdir}/wx/config/%{wxconfig} | cut -c 0-32`
347 SUM2=`md5sum %{_bindir}/wx-config | cut -c 0-32`
348 if test "x$SUM1" = "x$SUM2" ; then
349 rm -f %{_bindir}/wx-config
350 fi
351fi
352rm -f %{_bindir}/%{wxconfiglink}
353
354%post gl
355/sbin/ldconfig
356
357%postun gl
358/sbin/ldconfig
359
360%files
361%defattr(-,root,root)
362%doc COPYING.LIB *.txt
363%{_libdir}/libwx_%{portname}*_adv-%{ver2}.so.*
364%{_libdir}/libwx_%{portname}*_core-%{ver2}.so.*
365%{_libdir}/libwx_%{portname}*_html-%{ver2}.so.*
366%{_libdir}/libwx_%{portname}*_media-%{ver2}.so.*
367%{_libdir}/libwx_%{portname}*_qa-%{ver2}.so.*
368%{_libdir}/libwx_%{portname}*_xrc-%{ver2}.so.*
369
370
371%files devel -f core-headers.files
372%defattr(-,root,root)
373%{_libdir}/libwx_%{portname}*_adv-%{ver2}.so
374%{_libdir}/libwx_%{portname}*_core-%{ver2}.so
375%{_libdir}/libwx_%{portname}*_gl-%{ver2}.so
376%{_libdir}/libwx_%{portname}*_html-%{ver2}.so
377%{_libdir}/libwx_%{portname}*_media-%{ver2}.so
378%{_libdir}/libwx_%{portname}*_qa-%{ver2}.so
379%{_libdir}/libwx_%{portname}*_xrc-%{ver2}.so
380%dir %{_libdir}/wx
381%{_libdir}/wx/*
382%{_bindir}/wxrc*
383
384%files gl
385%defattr(-,root,root)
386%{_libdir}/libwx_%{portname}*_gl-%{ver2}.so.*
387
388%files static
389%defattr (-,root,root)
390%{_libdir}/libwx_%{portname}*_*-%{ver2}.a
391