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