]> git.saurik.com Git - wxWidgets.git/blame_incremental - wxGTK.spec
Reworked wxSystemColourProperty::StringToValue() to use wxColour::Set() instead of...
[wxWidgets.git] / wxGTK.spec
... / ...
CommitLineData
1%define _prefix /usr
2%define ver 2.9.2
3%define ver2 2.9
4%define rel 1
5
6# Configurable settings (use --with(out) {unicode,gtk2} on rpmbuild cmd line):
7%define unicode 1
8%{?_with_unicode: %{expand: %%define unicode 1}}
9%{?_without_unicode: %{expand: %%define unicode 0}}
10
11%define gtk2 1
12%{?_with_gtk2: %{expand: %%define gtk2 1}}
13%{?_without_gtk2: %{expand: %%define gtk2 0}}
14
15# "buildname" needs to be e.g. gtk2ud for debug builds
16%if %{gtk2}
17 %define gtkver 2
18 %define portname gtk2
19%if %{unicode}
20 %define buildname gtk2u
21%else
22 %define buildname gtk2
23%endif
24%else
25 %define gtkver 1.2
26 %define portname gtk
27 %define buildname gtk
28%endif
29
30%if %{unicode}
31 %define name wx-%{portname}-unicode
32 %define wxconfig %{portname}-unicode-%{ver2}
33 %define wxconfigstatic %{portname}-unicode-static-%{ver2}
34 %define wxconfiglink wx%{portname}u-%{ver2}-config
35%else
36 %define name wx-%{portname}-ansi
37 %define wxconfig %{portname}-ansi-%{ver2}
38 %define wxconfigstatic %{portname}-ansi-static-%{ver2}
39 %define wxconfiglink wx%{portname}-%{ver2}-config
40%endif
41
42%if %{unicode}
43 %define wxbasename wx-base-unicode
44 %define wxbaseconfig base-unicode-%{ver2}
45 %define wxbaseconfiglink wxbaseu-%{ver2}-config
46%else
47 %define wxbasename wx-base-ansi
48 %define wxbaseconfig base-ansi-%{ver2}
49 %define wxbaseconfiglink wxbase-%{ver2}-config
50%endif
51
52Summary: The GTK+ %{gtkver} port of the wxWidgets library
53Name: %{name}
54Version: %{ver}
55Release: %{rel}
56License: wxWindows Licence
57Group: X11/Libraries
58Source: wxGTK-%{ver}.tar.bz2
59URL: http://www.wxwidgets.org
60Packager: Vadim Zeitlin <vadim@wxwindows.org>
61Prefix: %{_prefix}
62BuildRoot: %{_tmppath}/%{name}-root
63Requires: %{wxbasename} = %{ver}
64%if %{portname} == gtk2
65BuildRequires: gtk2-devel
66%else
67BuildRequires: gtk+-devel >= 1.2.0
68%endif
69
70BuildRequires: zlib-devel, libjpeg-devel, libpng-devel, libtiff-devel
71
72# all packages providing an implementation of wxWidgets library (regardless of
73# the toolkit used) should provide the (virtual) wxwin package, this makes it
74# possible to require wxwin instead of requiring "wxgtk or wxmotif or wxuniv..."
75Provides: wxwin
76Provides: wxGTK
77
78%description
79wxWidgets is a free C++ library for cross-platform GUI development.
80With wxWidgets, you can create applications for different GUIs (GTK+,
81Motif, MS Windows, MacOS X, Windows CE, GPE) from the same source code.
82
83%package -n wx-i18n
84Summary: The translations for the wxWidgets library.
85Group: X11/Libraries
86
87%description -n wx-i18n
88The translations files for the wxWidgets library.
89
90%package devel
91Summary: The GTK+ %{gtkver} port of the wxWidgets library
92Group: X11/Libraries
93Requires: %{name} = %{ver}
94Requires: %{wxbasename}-devel = %{ver}
95Provides: wxGTK-devel
96
97%description devel
98The GTK+ %{gtkver} port of the wxWidgets library, header files.
99
100%package gl
101Summary: The GTK+ %{gtkver} port of the wxWidgets library, OpenGL add-on.
102Group: X11/Libraries
103Requires: %{name} = %{ver}
104Provides: wxGTK-gl
105
106%description gl
107OpenGL add-on library for wxGTK, the GTK+ %{gtkver} port of the wxWidgets library.
108
109%package -n %{wxbasename}
110Summary: wxBase library - non-GUI support classes of the wxWidgets toolkit
111Group: Development/Libraries
112Provides: wxBase
113
114%description -n %{wxbasename}
115wxBase is a collection of C++ classes providing basic data structures (strings,
116lists, arrays), portable wrappers around many OS-specific funstions (file
117operations, time/date manipulations, threads, processes, sockets, shared
118library loading) as well as other utility classes (streams, archive and
119compression). wxBase currently supports Win32, most Unix variants (Linux,
120FreeBSD, Solaris, HP-UX) and MacOS X (Carbon and Mach-0).
121
122%package -n %{wxbasename}-devel
123Summary: wxBase library, header files.
124Group: Development/Libraries
125Provides: wxBase-devel
126
127%description -n %{wxbasename}-devel
128wxBase library - non-GUI support classes of the wxWidgets toolkit,
129header files.
130
131%prep
132%setup -q -n wxGTK-%{ver}
133
134%build
135if [ "$SMP" != "" ]; then
136 export MAKE="make -j$SMP"
137else
138 export MAKE="make"
139fi
140
141mkdir obj-shared
142cd obj-shared
143../configure --prefix=%{_prefix} --libdir=%{_libdir} \
144%if ! %{gtk2}
145 --with-gtk=1 \
146%else
147 --with-gtk=2 \
148%endif
149%if %{unicode}
150 --enable-unicode \
151%else
152 --disable-unicode \
153%endif
154 --with-opengl \
155 --with-gnomeprint \
156 --enable-mediactrl
157$MAKE
158
159cd ..
160
161mkdir obj-static
162cd obj-static
163../configure --prefix=%{_prefix} --libdir=%{_libdir} \
164%if ! %{gtk2}
165 --with-gtk=1 \
166%else
167 --with-gtk=2 \
168%endif
169 --disable-shared \
170%if %{unicode}
171 --enable-unicode \
172%else
173 --disable-unicode \
174%endif
175 --with-opengl \
176 --with-gnomeprint \
177 --enable-mediactrl
178$MAKE
179
180cd ..
181
182make -C locale allmo
183
184%install
185rm -rf $RPM_BUILD_ROOT
186(cd obj-static; make DESTDIR=$RPM_BUILD_ROOT prefix=%{_prefix} install)
187(cd obj-shared; make DESTDIR=$RPM_BUILD_ROOT prefix=%{_prefix} install)
188
189# --- wxBase headers list begins here ---
190cat <<EOF >wxbase-headers.files
191wx/afterstd.h
192wx/any.h
193wx/anystr.h
194wx/app.h
195wx/apptrait.h
196wx/archive.h
197wx/arrimpl.cpp
198wx/arrstr.h
199wx/atomic.h
200wx/base64.h
201wx/beforestd.h
202wx/buffer.h
203wx/build.h
204wx/chartype.h
205wx/checkeddelete.h
206wx/chkconf.h
207wx/clntdata.h
208wx/cmdargs.h
209wx/cmdline.h
210wx/confbase.h
211wx/config.h
212wx/convauto.h
213wx/containr.h
214wx/cpp.h
215wx/crt.h
216wx/datetime.h
217wx/datstrm.h
218wx/dde.h
219wx/debug.h
220wx/defs.h
221wx/dir.h
222wx/dlimpexp.h
223wx/dlist.h
224wx/dynarray.h
225wx/dynlib.h
226wx/dynload.h
227wx/encconv.h
228wx/event.h
229wx/evtloop.h
230wx/except.h
231wx/features.h
232wx/flags.h
233wx/ffile.h
234wx/file.h
235wx/fileconf.h
236wx/filefn.h
237wx/filename.h
238wx/filesys.h
239wx/fontenc.h
240wx/fontmap.h
241wx/fs_arc.h
242wx/fs_filter.h
243wx/fs_mem.h
244wx/fs_zip.h
245wx/hash.h
246wx/hashmap.h
247wx/hashset.h
248wx/html/forcelnk.h
249wx/iconloc.h
250wx/init.h
251wx/intl.h
252wx/iosfwrap.h
253wx/ioswrap.h
254wx/ipc.h
255wx/ipcbase.h
256wx/kbdstate.h
257wx/language.h
258wx/link.h
259wx/list.h
260wx/listimpl.cpp
261wx/log.h
262wx/longlong.h
263wx/math.h
264wx/memconf.h
265wx/memory.h
266wx/memtext.h
267wx/mimetype.h
268wx/module.h
269wx/mousestate.h
270wx/msgout.h
271wx/msgqueue.h
272wx/mstream.h
273wx/object.h
274wx/platform.h
275wx/platinfo.h
276wx/power.h
277wx/process.h
278wx/ptr_scpd.h
279wx/ptr_shrd.h
280wx/recguard.h
281wx/regex.h
282wx/scopedarray.h
283wx/scopedptr.h
284wx/scopeguard.h
285wx/sharedptr.h
286wx/snglinst.h
287wx/sstream.h
288wx/stack.h
289wx/stackwalk.h
290wx/stdpaths.h
291wx/stdstream.h
292wx/stockitem.h
293wx/stopwatch.h
294wx/strconv.h
295wx/stream.h
296wx/string.h
297wx/stringimpl.h
298wx/stringops.h
299wx/strvararg.h
300wx/sysopt.h
301wx/tarstrm.h
302wx/textbuf.h
303wx/textfile.h
304wx/thread.h
305wx/thrimpl.cpp
306wx/timer.h
307wx/tls.h
308wx/tokenzr.h
309wx/tracker.h
310wx/translation.h
311wx/txtstrm.h
312wx/typeinfo.h
313wx/types.h
314wx/unichar.h
315wx/uri.h
316wx/ustring.h
317wx/utils.h
318wx/variant.h
319wx/vector.h
320wx/version.h
321wx/volume.h
322wx/weakref.h
323wx/wfstream.h
324wx/wx.h
325wx/wxchar.h
326wx/wxcrt.h
327wx/wxcrtbase.h
328wx/wxcrtvararg.h
329wx/wxprec.h
330wx/xlocale.h
331wx/xti.h
332wx/xtistrm.h
333wx/zipstrm.h
334wx/zstream.h
335wx/meta/convertible.h
336wx/meta/if.h
337wx/meta/implicitconversion.h
338wx/meta/int2type.h
339wx/meta/movable.h
340wx/meta/pod.h
341wx/fswatcher.h
342wx/generic/fswatcher.h
343wx/unix/app.h
344wx/unix/apptbase.h
345wx/unix/apptrait.h
346wx/unix/chkconf.h
347wx/unix/evtloop.h
348wx/unix/evtloopsrc.h
349wx/unix/pipe.h
350wx/unix/stdpaths.h
351wx/unix/stackwalk.h
352wx/unix/tls.h
353wx/unix/fswatcher_kqueue.h
354wx/unix/execute.h
355wx/unix/mimetype.h
356wx/unix/fswatcher_inotify.h
357wx/fs_inet.h
358wx/protocol/file.h
359wx/protocol/ftp.h
360wx/protocol/http.h
361wx/protocol/log.h
362wx/protocol/protocol.h
363wx/sckaddr.h
364wx/sckipc.h
365wx/sckstrm.h
366wx/socket.h
367wx/url.h
368wx/xml/xml.h
369wx/xtixml.h
370EOF
371# --- wxBase headers list ends here ---
372
373# --- wxBase headers list with paths ---
374sed -e 's@^@%{_includedir}/wx-%{ver2}/@' wxbase-headers.files > wxbase-headers.paths
375
376
377# temporarily remove base headers
378mkdir $RPM_BUILD_ROOT/_save_dir
379cp -r $RPM_BUILD_ROOT%{_includedir}/wx-%{ver2} $RPM_BUILD_ROOT/_save_dir
380for f in `cat wxbase-headers.files` ; do
381 rm -f $RPM_BUILD_ROOT%{_includedir}/wx-%{ver2}/$f
382done
383# list of all core headers:
384find $RPM_BUILD_ROOT%{_includedir}/wx-%{ver2} -type f | sed -e "s,$RPM_BUILD_ROOT,,g" >core-headers.files
385# move base headers (actually all headers) back again
386cp -f -r $RPM_BUILD_ROOT/_save_dir/* $RPM_BUILD_ROOT%{_includedir}
387rm -rf $RPM_BUILD_ROOT/_save_dir
388
389# utils:
390(cd obj-shared/utils/wxrc; make DESTDIR=$RPM_BUILD_ROOT prefix=%{_prefix} install)
391
392# wx-config link is created during package installation, remove it for now
393rm -f $RPM_BUILD_ROOT%{_bindir}/wx-config
394
395%clean
396rm -rf $RPM_BUILD_ROOT
397
398%post
399/sbin/ldconfig
400
401%postun
402/sbin/ldconfig
403
404%post devel
405# link wx-config when you install RPM.
406%if %{unicode}
407 ln -sf %{_libdir}/wx/config/%{wxconfig} %{_bindir}/wx-config
408%endif
409# link wx-config with explicit name.
410ln -sf %{_libdir}/wx/config/%{wxconfig} %{_bindir}/%{wxconfiglink}
411/sbin/ldconfig
412
413%postun devel
414/sbin/ldconfig
415
416%preun devel
417%if %{unicode}
418 rm -f %{_bindir}/wx-config
419%endif
420rm -f %{_bindir}/%{wxconfiglink}
421
422%post -n %{wxbasename}
423/sbin/ldconfig
424
425%postun -n %{wxbasename}
426/sbin/ldconfig
427
428%post -n %{wxbasename}-devel
429# link wx-config with explicit name.
430ln -sf %{_libdir}/wx/config/%{wxbaseconfig} %{_bindir}/%{wxbaseconfiglink}
431/sbin/ldconfig
432
433%postun -n %{wxbasename}-devel
434/sbin/ldconfig
435
436%preun -n %{wxbasename}-devel
437rm -f %{_bindir}/%{wxbaseconfiglink}
438
439%post gl
440/sbin/ldconfig
441
442%postun gl
443/sbin/ldconfig
444
445%files
446%defattr(-,root,root)
447%doc COPYING.LIB *.txt
448%{_libdir}/libwx_%{buildname}_adv-%{ver2}.so.*
449%{_libdir}/libwx_%{buildname}_aui-%{ver2}.so.*
450%{_libdir}/libwx_%{buildname}_core-%{ver2}.so.*
451%{_libdir}/libwx_%{buildname}_html-%{ver2}.so.*
452%{_libdir}/libwx_%{buildname}_media-%{ver2}.so.*
453%{_libdir}/libwx_%{buildname}_propgrid-%{ver2}.so.*
454%{_libdir}/libwx_%{buildname}_qa-%{ver2}.so.*
455%{_libdir}/libwx_%{buildname}_ribbon-%{ver2}.so.*
456%{_libdir}/libwx_%{buildname}_richtext-%{ver2}.so.*
457%{_libdir}/libwx_%{buildname}_stc-%{ver2}.so.*
458%{_libdir}/libwx_%{buildname}_xrc-%{ver2}.so.*
459
460%files -n wx-i18n
461%defattr(-,root,root)
462%{_datadir}/locale/*/LC_MESSAGES/*.mo
463
464%files devel -f core-headers.files
465%defattr(-,root,root)
466# shared libs
467%{_libdir}/libwx_%{buildname}_adv-%{ver2}.so
468%{_libdir}/libwx_%{buildname}_aui-%{ver2}.so
469%{_libdir}/libwx_%{buildname}_core-%{ver2}.so
470%{_libdir}/libwx_%{buildname}_gl-%{ver2}.so
471%{_libdir}/libwx_%{buildname}_html-%{ver2}.so
472%{_libdir}/libwx_%{buildname}_media-%{ver2}.so
473%{_libdir}/libwx_%{buildname}_propgrid-%{ver2}.so
474%{_libdir}/libwx_%{buildname}_qa-%{ver2}.so
475%{_libdir}/libwx_%{buildname}_ribbon-%{ver2}.so
476%{_libdir}/libwx_%{buildname}_richtext-%{ver2}.so
477%{_libdir}/libwx_%{buildname}_stc-%{ver2}.so
478%{_libdir}/libwx_%{buildname}_xrc-%{ver2}.so
479# static libs
480%{_libdir}/libwx_%{buildname}_adv-%{ver2}.a
481%{_libdir}/libwx_%{buildname}_aui-%{ver2}.a
482%{_libdir}/libwx_%{buildname}_core-%{ver2}.a
483%{_libdir}/libwx_%{buildname}_gl-%{ver2}.a
484%{_libdir}/libwx_%{buildname}_html-%{ver2}.a
485%{_libdir}/libwx_%{buildname}_media-%{ver2}.a
486%{_libdir}/libwx_%{buildname}_propgrid-%{ver2}.a
487%{_libdir}/libwx_%{buildname}_qa-%{ver2}.a
488%{_libdir}/libwx_%{buildname}_ribbon-%{ver2}.a
489%{_libdir}/libwx_%{buildname}_richtext-%{ver2}.a
490%{_libdir}/libwx_%{buildname}_stc-%{ver2}.a
491%{_libdir}/libwx_%{buildname}_xrc-%{ver2}.a
492%dir %{_libdir}/wx
493%{_libdir}/wx/config/%{wxconfig}
494%{_libdir}/wx/include/%{wxconfig}/wx/setup.h
495%{_libdir}/wx/config/%{wxconfigstatic}
496%{_libdir}/wx/include/%{wxconfigstatic}/wx/setup.h
497%{_bindir}/wxrc*
498
499%files -n %{wxbasename}
500%defattr(-,root,root)
501%{_libdir}/libwx_base*-%{ver2}.so.*
502
503%files -n %{wxbasename}-devel -f wxbase-headers.paths
504%defattr (-,root,root)
505%dir %{_includedir}/wx-%{ver2}
506%{_libdir}/libwx_base*-%{ver2}.so
507%{_libdir}/libwx_base*-%{ver2}.a
508%if %{unicode}
509 %{_libdir}/libwxregexu-%{ver2}.a
510%endif
511%{_libdir}/libwxscintilla-%{ver2}.a
512%dir %{_libdir}/wx
513%{_datadir}/aclocal/*.m4
514%{_datadir}/bakefile/presets/*
515
516%files gl
517%defattr(-,root,root)
518%{_libdir}/libwx_%{buildname}_gl-%{ver2}.so.*