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