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