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