1 %define realname wxWidgets
2 Summary: wxWidgets library - Mingw32 cross version
3 Summary(pl): Biblioteka wxWidgets - wersja skro¶na dla Mingw32
4 Name: crossmingw32-%{realname}
7 License: wxWidgets Licence (LGPL with exception)
8 Group: Development/Libraries
9 Source0: http://dl.sourceforge.net/wxwindows/%{realname}-%{version}.tar.bz2
10 # Source0-md5: 33994e85efc06307977d2ddb9cbd91a1
11 Patch0: %{realname}-samples.patch
12 Patch1: %{realname}-ac.patch
13 Patch2: %{realname}-gif0delay.patch
14 URL: http://www.wxWidgets.org/
15 BuildRequires: autoconf >= 2.58
16 BuildRequires: automake
17 BuildRequires: bakefile >= 0.1.8
18 BuildRequires: crossmingw32-gcc-c++
19 BuildRequires: crossmingw32-libjpeg
20 BuildRequires: crossmingw32-libpng
21 BuildRequires: crossmingw32-runtime
22 BuildRequires: libtool
23 Requires: crossmingw32-libjpeg
24 Requires: crossmingw32-libpng
25 Requires: crossmingw32-runtime
26 Obsoletes: crossmingw32-wxMSW
27 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29 %define no_install_post_strip 1
31 %define target i386-mingw32
32 %define target_platform i386-pc-mingw32
33 %define arch %{_prefix}/%{target}
34 %define gccarch %{_prefix}/lib/gcc-lib/%{target}
35 %define gcclib %{_prefix}/lib/gcc-lib/%{target}/%{version}
37 %define __cc %{target}-gcc
38 %define __cxx %{target}-g++
40 %ifarch alpha sparc sparc64 sparcv9
44 %define rpmcxxflags "%{rpmcflags}"
47 wxWidgets is a free C++ library for cross-platform GUI development.
48 With wxWidgets, you can create applications for different GUIs (GTK+,
49 Motif/LessTif, MS Windows, Mac) from the same source code.
52 wxWidgets to wolnodostêpna biblioteka napisana w C++ umo¿liwiaj±ca
53 rozwijanie wieloplatformowych programów GUI. Przy u¿yciu wxWidgets
54 mo¿na tworzyæ aplikacje dla ró¿nych GUI (GTK+, Motif/LessTif, MS
55 Windows, Mac) z tego samego kodu ¼ród³owego.
58 Summary: %{realname} - DLL library for Windows
59 Summary(pl): %{realname} - biblioteka DLL dla Windows
60 Group: Applications/Emulators
63 %{realname} - DLL libraries for Windows.
65 %description dll -l pl
66 %{realname} - biblioteki DLL dla Windows.
69 %setup -q -n %{realname}-%{version}
74 echo 'AC_DEFUN([AM_PATH_GTK],[:])' > fake-am_path_gtk.m4
76 # bakefile.m4 from 0.1.8
77 tail -n +1518 aclocal.m4 | head -n 1397 > bakefile.m4
78 # AC_BAKEFILE_PROG_* macros
79 tail -n +721 aclocal.m4 | head -n 142 >> bakefile.m4
82 CC=%{target}-gcc ; export CC
83 CXX=%{target}-g++ ; export CXX
84 LD=%{target}-ld ; export LD
85 AR=%{target}-ar ; export AR
86 AS=%{target}-as ; export AS
87 CROSS_COMPILE=1 ; export CROSS_COMPILE
88 CPPFLAGS="-I%{arch}/include" ; export CPPFLAGS
89 RANLIB=%{target}-ranlib ; export RANLIB
90 LDSHARED="%{target}-gcc -shared" ; export LDSHARED
91 TARGET="%{target}" ; export TARGET
93 cp -f /usr/share/automake/config.sub .
100 --enable-official-build \
101 --enable-std-iostreams \
110 rm -rf $RPM_BUILD_ROOT
111 install -d $RPM_BUILD_ROOT{%{arch}/{bin,include,lib},%{_datadir}/wine/windows/system}
113 %{__make} install DESTDIR=$RPM_BUILD_ROOT
115 sed -i -e 's@includedir="/usr/include"@includedir="%{arch}/include"@' \
116 -e 's@libdir="/usr/lib"@libdir="%{arch}/lib"@' \
117 $RPM_BUILD_ROOT%{_libdir}/wx/config/*
120 %{target}-strip $RPM_BUILD_ROOT%{_libdir}/*.dll
121 %{target}-strip -g -R.comment -R.note $RPM_BUILD_ROOT%{_libdir}/*.a
124 cp -r $RPM_BUILD_ROOT%{_libdir}/*.a $RPM_BUILD_ROOT%{arch}/lib
125 cp -r $RPM_BUILD_ROOT%{_libdir}/*.dll $RPM_BUILD_ROOT%{_datadir}/wine/windows/system
126 cp -r $RPM_BUILD_ROOT%{_libdir}/wx $RPM_BUILD_ROOT%{arch}/lib/
127 cp -r $RPM_BUILD_ROOT%{_includedir} $RPM_BUILD_ROOT%{arch}
129 ln -s %{arch}/lib/wx/config/i386-mingw32-msw-ansi-release-2.6 $RPM_BUILD_ROOT%{_bindir}
131 rm $RPM_BUILD_ROOT/%{_bindir}/wx-config
134 rm -rf $RPM_BUILD_ROOT
137 %defattr(644,root,root,755)
138 %attr(755,root,root) %{_bindir}/i386-mingw32-*
141 %dir %{arch}/lib/wx/config
142 %attr(755,root,root) %{arch}/lib/wx/config/*
143 %{arch}/lib/wx/include
147 %defattr(644,root,root,755)
148 %{_datadir}/wine/windows/system/*