]> git.saurik.com Git - wxWidgets.git/blob - wxGTK.spec
fix a bunch of warnings in unicode build
[wxWidgets.git] / wxGTK.spec
1 %define pref /usr
2 %define ver 2.5.3
3 %define ver2 2.5
4 %define rel 1
5
6 # Configurable settings (use --with(out) {unicode,gtk2} 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 gtk2 0
12 %{?_with_gtk2: %{expand: %%define gtk2 1}}
13 %{?_without_gtk2: %{expand: %%define gtk2 0}}
14
15 %if %{gtk2}
16 %define gtkver 2
17 %define portname gtk2
18 %else
19 %define gtkver 1.2
20 %define portname gtk
21 %endif
22
23 %if %{unicode}
24 %define name wx-%{portname}-unicode
25 %define wxbasename wx-base-unicode
26 %else
27 %define name wx-%{portname}
28 %define wxbasename wx-base
29 %endif
30
31 %if %{unicode}
32 %define wxconfigname wx%{portname}u-%{ver2}-config
33 %else
34 %define wxconfigname wx%{portname}-%{ver2}-config
35 %endif
36
37 Name: %{name}
38 Summary: The GTK+ %{gtkver} port of the wxWindows library
39 Version: %{ver}
40 Release: %{rel}
41 License: wxWindows Licence
42 Group: X11/Libraries
43 Source: wxGTK-%{ver}.tar.bz2
44 URL: http://www.wxwindows.org
45 Packager: Vadim Zeitlin <vadim@wxwindows.org>
46 Prefix: %{pref}
47 BuildRoot: /var/tmp/%{name}-root
48
49 # all packages providing an implementation of wxWindows library (regardless of
50 # the toolkit used) should provide the (virtual) wxwin package, this makes it
51 # possible to require wxwin instead of requiring "wxgtk or wxmotif or wxuniv..."
52 Provides: wxwin
53 Provides: wxGTK
54
55 # in addition, we should provide libwx_gtk as automatic generator only notices
56 # libwx_gtk-%{ver}-%{rel}
57 Provides: libwx_gtk.so
58 Provides: libwx_gtk-%{ver2}.so
59
60 Requires: %{wxbasename} = %{ver}
61
62 %description
63 wxWindows is a free C++ library for cross-platform GUI development.
64 With wxWindows, you can create applications for different GUIs (GTK+,
65 Motif/LessTif, MS Windows, Mac) from the same source code.
66
67 %package devel
68 Summary: The GTK+ %{gtkver} port of the wxWindows library
69 Group: X11/Libraries
70 Requires: %{name} = %{ver}
71 Requires: %{wxbasename}-devel = %{ver}
72 Provides: wxGTK-devel
73
74 %description devel
75 Header files for wxGTK, the GTK+ %{gtkver} port of the wxWindows library.
76
77 %package gl
78 Summary: The GTK+ %{gtkver} port of the wxWindows library, OpenGL add-on.
79 Group: X11/Libraries
80 Requires: %{name} = %{ver}
81
82 %description gl
83 OpenGL add-on library for wxGTK, the GTK+ %{gtkver} port of the wxWindows library.
84
85 %package static
86 Summary: wxGTK static libraries
87 Group: Development/Libraries
88 Requires: %{wxbasename}-static
89
90 %description static
91 Static libraries for wxGTK. You need them if you want to link statically against wxGTK.
92
93 %package contrib
94 Summary: The GTK+ %{gtkver} port of the wxWindows library, contributed libraries.
95 Group: X11/Libraries
96 Requires: %{name} = %{ver}
97
98 %description contrib
99 Contributed libraries for wxGTK, the GTK+ %{gtkver} port of the wxWindows library.
100
101 %package contrib-devel
102 Summary: The GTK+ %{gtkver} port of the wxWindows library
103 Group: X11/Libraries
104 Requires: %{name}-contrib = %{ver}
105 Requires: %{name}-devel = %{ver}
106
107 %description contrib-devel
108 Header files for contributed libraries for wxGTK, the GTK+ %{gtkver} port of the wxWindows library.
109
110 %prep
111 %setup -q -n wxGTK-%{ver}
112
113 %build
114 if [ "$SMP" != "" ]; then
115 export MAKE="make -j$SMP"
116 else
117 export MAKE="make"
118 fi
119
120 mkdir obj-shared
121 cd obj-shared
122 ../configure --prefix=%{pref} \
123 %if %{unicode}
124 --enable-unicode \
125 %else
126 --with-odbc \
127 %endif
128 %if %{gtk2}
129 --enable-gtk2 \
130 %endif
131 --with-opengl
132 $MAKE
133 cd contrib/src
134 $MAKE
135 cd ../../..
136
137 mkdir obj-static
138 cd obj-static
139 ../configure --prefix=%{pref} --disable-shared \
140 %if %{unicode}
141 --enable-unicode \
142 %else
143 --with-odbc \
144 %endif
145 %if %{gtk2}
146 --enable-gtk2 \
147 %endif
148 --with-opengl
149 $MAKE
150 cd ..
151
152 %install
153 rm -rf $RPM_BUILD_ROOT
154 (cd obj-static; make prefix=$RPM_BUILD_ROOT%{pref} install)
155 (cd obj-shared; make prefix=$RPM_BUILD_ROOT%{pref} install)
156
157 # Remove headers that are part of wx-base-devel:
158
159 # --- wxBase headers list begins here ---
160 cat <<EOF >wxbase-headers-list
161 wx/afterstd.h
162 wx/app.h
163 wx/apptrait.h
164 wx/arrimpl.cpp
165 wx/arrstr.h
166 wx/beforestd.h
167 wx/buffer.h
168 wx/build.h
169 wx/chkconf.h
170 wx/clntdata.h
171 wx/cmdline.h
172 wx/confbase.h
173 wx/config.h
174 wx/containr.h
175 wx/datetime.h
176 wx/datetime.inl
177 wx/datstrm.h
178 wx/dde.h
179 wx/debug.h
180 wx/defs.h
181 wx/dir.h
182 wx/dlimpexp.h
183 wx/dynarray.h
184 wx/dynlib.h
185 wx/dynload.h
186 wx/encconv.h
187 wx/event.h
188 wx/except.h
189 wx/features.h
190 wx/ffile.h
191 wx/file.h
192 wx/fileconf.h
193 wx/filefn.h
194 wx/filename.h
195 wx/filesys.h
196 wx/fontenc.h
197 wx/fontmap.h
198 wx/fs_mem.h
199 wx/fs_zip.h
200 wx/hash.h
201 wx/hashmap.h
202 wx/hashset.h
203 wx/iconloc.h
204 wx/init.h
205 wx/intl.h
206 wx/iosfwrap.h
207 wx/ioswrap.h
208 wx/ipc.h
209 wx/ipcbase.h
210 wx/isql.h
211 wx/isqlext.h
212 wx/list.h
213 wx/listimpl.cpp
214 wx/log.h
215 wx/longlong.h
216 wx/math.h
217 wx/memconf.h
218 wx/memory.h
219 wx/memtext.h
220 wx/mimetype.h
221 wx/module.h
222 wx/msgout.h
223 wx/msgout.h
224 wx/mstream.h
225 wx/object.h
226 wx/platform.h
227 wx/process.h
228 wx/ptr_scpd.h
229 wx/regex.h
230 wx/scopeguard.h
231 wx/snglinst.h
232 wx/sstream.h
233 wx/stack.h
234 wx/stockitem.h
235 wx/stopwatch.h
236 wx/strconv.h
237 wx/stream.h
238 wx/string.h
239 wx/sysopt.h
240 wx/textbuf.h
241 wx/textfile.h
242 wx/thread.h
243 wx/thrimpl.cpp
244 wx/timer.h
245 wx/tokenzr.h
246 wx/txtstrm.h
247 wx/types.h
248 wx/utils.h
249 wx/variant.h
250 wx/vector.h
251 wx/version.h
252 wx/volume.h
253 wx/wfstream.h
254 wx/wx.h
255 wx/wxchar.h
256 wx/wxprec.h
257 wx/xti.h
258 wx/xtistrm.h
259 wx/zipstrm.h
260 wx/zstream.h
261 wx/msw/apptrait.h
262 wx/msw/apptbase.h
263 wx/msw/chkconf.h
264 wx/msw/crashrpt.h
265 wx/msw/dde.h
266 wx/msw/gccpriv.h
267 wx/msw/mimetype.h
268 wx/msw/winundef.h
269 wx/msw/wrapcctl.h
270 wx/msw/wrapwin.h
271 wx/fs_inet.h
272 wx/gsocket.h
273 wx/protocol/file.h
274 wx/protocol/ftp.h
275 wx/protocol/http.h
276 wx/protocol/protocol.h
277 wx/sckaddr.h
278 wx/sckipc.h
279 wx/sckstrm.h
280 wx/socket.h
281 wx/url.h
282 wx/msw/gsockmsw.h
283 wx/xml/xml.h
284 wx/xtixml.h
285 wx/db.h
286 wx/dbkeyg.h
287 wx/dbtable.h
288 EOF
289 # --- wxBase headers list ends here ---
290 for f in `cat wxbase-headers-list` ; do
291 rm -f $RPM_BUILD_ROOT%{_includedir}/wx-*/$f
292 done
293
294 # list of all core headers:
295 find $RPM_BUILD_ROOT/usr/include/wx -type f | sed -e "s,$RPM_BUILD_ROOT,,g" >core-headers.files
296
297 # contrib stuff:
298 (cd obj-shared/contrib/src; make prefix=$RPM_BUILD_ROOT%{pref} install)
299 (cd obj-shared/contrib/utils/wxrc; make prefix=$RPM_BUILD_ROOT%{pref} install)
300
301 # remove wxBase files so that RPM doesn't complain about unpackaged files:
302 rm -f $RPM_BUILD_ROOT%{_libdir}/libwx_base*
303 rm -f $RPM_BUILD_ROOT%{_datadir}/aclocal/*
304 rm -f $RPM_BUILD_ROOT%{_datadir}/locale/*/*/*
305
306 %clean
307 rm -rf $RPM_BUILD_ROOT
308
309 %post
310 /sbin/ldconfig
311
312 %postun
313 /sbin/ldconfig
314
315 %post gl
316 /sbin/ldconfig
317
318 %postun gl
319 /sbin/ldconfig
320
321
322 %files
323 %defattr(-,root,root)
324 %doc COPYING.LIB *.txt
325 %dir %{_datadir}/wx
326 %{_datadir}/wx/*
327 %{_libdir}/libwx_%{portname}*_core*.so.*
328 %{_libdir}/libwx_%{portname}*_html*.so.*
329 %{_libdir}/libwx_%{portname}*_adv*.so.*
330 %if !%{unicode}
331 %{_libdir}/libwx_%{portname}*_dbgrid*.so.*
332 %endif
333
334 %files devel -f core-headers.files
335 %defattr(-,root,root)
336 %{_libdir}/libwx_%{portname}*_core*.so
337 %{_libdir}/libwx_%{portname}*_html*.so
338 %{_libdir}/libwx_%{portname}*_adv*.so
339 %if !%{unicode}
340 %{_libdir}/libwx_%{portname}*_dbgrid*.so
341 %endif
342 %{_libdir}/libwx_%{portname}*_gl*.so
343 %dir %{_libdir}/wx
344 %{_libdir}/wx/*
345 %{_bindir}/%{wxconfigname}
346
347 %files gl
348 %defattr(-,root,root)
349 %{_libdir}/libwx_%{portname}*_gl*.so.*
350
351 %files static
352 %defattr (-,root,root)
353 %{_libdir}/libwx_gtk*.a
354
355 %files contrib
356 %defattr(-,root,root)
357 %{_libdir}/libwx_%{portname}*_animate*.so.*
358 %{_libdir}/libwx_%{portname}*_deprecated*.so.*
359 %{_libdir}/libwx_%{portname}*_fl*.so.*
360 %{_libdir}/libwx_%{portname}*_gizmos*.so.*
361 %{_libdir}/libwx_%{portname}*_mmedia*.so.*
362 %{_libdir}/libwx_%{portname}*_ogl*.so.*
363 %{_libdir}/libwx_%{portname}*_plot*.so.*
364 %{_libdir}/libwx_%{portname}*_stc*.so.*
365 %{_libdir}/libwx_%{portname}*_svg*.so.*
366 %{_libdir}/libwx_%{portname}*_xrc*.so.*
367
368 %files contrib-devel
369 %defattr(-,root,root)
370 %{_bindir}/wxrc
371 %dir %{_includedir}/wx-*/wx/animate
372 %{_includedir}/wx-*/wx/animate/*
373 %{_libdir}/libwx_%{portname}*_animate*.so
374
375 %dir %{_includedir}/wx-*/wx/deprecated
376 %{_includedir}/wx-*/wx/deprecated/*
377 %{_libdir}/libwx_%{portname}*_deprecated*.so
378
379 %dir %{_includedir}/wx-*/wx/fl
380 %{_includedir}/wx-*/wx/fl/*
381 %{_libdir}/libwx_%{portname}*_fl*.so
382
383 %dir %{_includedir}/wx-*/wx/gizmos
384 %{_includedir}/wx-*/wx/gizmos/*
385 %{_libdir}/libwx_%{portname}*_gizmos*.so
386
387 %dir %{_includedir}/wx-*/wx/mmedia
388 %{_includedir}/wx-*/wx/mmedia/*
389 %{_libdir}/libwx_%{portname}*_mmedia*.so
390
391 %dir %{_includedir}/wx-*/wx/ogl
392 %{_includedir}/wx-*/wx/ogl/*
393 %{_libdir}/libwx_%{portname}*_ogl*.so
394
395 %dir %{_includedir}/wx-*/wx/plot
396 %{_includedir}/wx-*/wx/plot/*
397 %{_libdir}/libwx_%{portname}*_plot*.so
398
399 %dir %{_includedir}/wx-*/wx/stc
400 %{_includedir}/wx-*/wx/stc/*
401 %{_libdir}/libwx_%{portname}*_stc*.so
402
403 %dir %{_includedir}/wx-*/wx/svg
404 %{_includedir}/wx-*/wx/svg/*
405 %{_libdir}/libwx_%{portname}*_svg*.so
406
407 %dir %{_includedir}/wx-*/wx/xrc
408 %{_includedir}/wx-*/wx/xrc/*
409 %{_libdir}/libwx_%{portname}*_xrc*.so