]>
Commit | Line | Data |
---|---|---|
fd8baf2d | 1 | %define realname wxWidgets |
420fdfd4 JB |
2 | Summary: wxWidgets library - MinGW32 cross version |
3 | Summary(pl.UTF-8): Biblioteka wxWidgets - wersja skrośna dla MinGW32 | |
fd8baf2d | 4 | Name: crossmingw32-%{realname} |
420fdfd4 | 5 | Version: 2.8.11 |
fd8baf2d | 6 | Release: 1 |
777cad41 | 7 | License: wxWidgets Licence (LGPL v2+ with exception) |
fd8baf2d | 8 | Group: Development/Libraries |
c4fef24c | 9 | Source0: http://ftp.wxwidgets.org/pub/%{version}/%{realname}-%{version}.tar.bz2 |
420fdfd4 | 10 | # Source0-md5: 303a2d5aeb6c79460c8088193d799147 |
fd8baf2d | 11 | Patch0: %{realname}-samples.patch |
87144d8f | 12 | Patch1: %{realname}-ac.patch |
420fdfd4 | 13 | Patch2: %{realname}-msw.patch |
fd8baf2d | 14 | URL: http://www.wxWidgets.org/ |
87144d8f | 15 | BuildRequires: autoconf >= 2.58 |
fd8baf2d | 16 | BuildRequires: automake |
420fdfd4 | 17 | #BuildRequires: bakefile >= 0.2.1 |
fd8baf2d | 18 | BuildRequires: crossmingw32-gcc-c++ |
19 | BuildRequires: crossmingw32-libjpeg | |
20 | BuildRequires: crossmingw32-libpng | |
420fdfd4 | 21 | BuildRequires: crossmingw32-libtiff |
fd8baf2d | 22 | BuildRequires: crossmingw32-runtime |
23 | BuildRequires: libtool | |
24 | Requires: crossmingw32-libjpeg | |
25 | Requires: crossmingw32-libpng | |
420fdfd4 | 26 | Requires: crossmingw32-libtiff |
fd8baf2d | 27 | Requires: crossmingw32-runtime |
28 | Obsoletes: crossmingw32-wxMSW | |
29 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
30 | ||
31 | %define no_install_post_strip 1 | |
32 | ||
777cad41 JB |
33 | %define target i386-mingw32 |
34 | %define target_platform i386-pc-mingw32 | |
fd8baf2d | 35 | |
777cad41 JB |
36 | %define _sysprefix /usr |
37 | %define _sysbindir %{_sysprefix}/bin | |
38 | %define _prefix %{_sysprefix}/%{target} | |
bd25379e | 39 | %define _libdir %{_prefix}/lib |
777cad41 JB |
40 | %define _pkgconfigdir %{_prefix}/lib/pkgconfig |
41 | %define _dlldir /usr/share/wine/windows/system | |
42 | %define __cc %{target}-gcc | |
43 | %define __cxx %{target}-g++ | |
fd8baf2d | 44 | |
777cad41 JB |
45 | %ifnarch %{ix86} |
46 | # arch-specific flags (like alpha's -mieee) are not valid for i386 gcc | |
fd8baf2d | 47 | %define optflags -O2 |
48 | %endif | |
420fdfd4 JB |
49 | # -z options are invalid for mingw linker |
50 | %define filterout_ld -Wl,-z,.* | |
fd8baf2d | 51 | |
fd8baf2d | 52 | %description |
53 | wxWidgets is a free C++ library for cross-platform GUI development. | |
54 | With wxWidgets, you can create applications for different GUIs (GTK+, | |
55 | Motif/LessTif, MS Windows, Mac) from the same source code. | |
56 | ||
b35f38d5 JR |
57 | %description -l pl.UTF-8 |
58 | wxWidgets to wolnodostępna biblioteka napisana w C++ umożliwiająca | |
59 | rozwijanie wieloplatformowych programów GUI. Przy użyciu wxWidgets | |
60 | można tworzyć aplikacje dla różnych GUI (GTK+, Motif/LessTif, MS | |
61 | Windows, Mac) z tego samego kodu źródłowego. | |
fd8baf2d | 62 | |
63 | %package dll | |
64 | Summary: %{realname} - DLL library for Windows | |
c8d76d75 | 65 | Summary(pl.UTF-8): %{realname} - biblioteka DLL dla Windows |
fd8baf2d | 66 | Group: Applications/Emulators |
420fdfd4 JB |
67 | Requires: crossmingw32-libjpeg-dll |
68 | Requires: crossmingw32-libpng-dll | |
69 | Requires: crossmingw32-libtiff-dll | |
fd8baf2d | 70 | |
71 | %description dll | |
72 | %{realname} - DLL libraries for Windows. | |
73 | ||
b35f38d5 | 74 | %description dll -l pl.UTF-8 |
fd8baf2d | 75 | %{realname} - biblioteki DLL dla Windows. |
76 | ||
77 | %prep | |
78 | %setup -q -n %{realname}-%{version} | |
79 | %patch0 -p1 | |
80 | %patch1 -p1 | |
81 | %patch2 -p1 | |
82 | ||
83 | %build | |
87144d8f | 84 | cp -f /usr/share/automake/config.sub . |
73e1d714 | 85 | %{__aclocal} -I build/aclocal |
fd8baf2d | 86 | %{__autoconf} |
87 | ||
420fdfd4 JB |
88 | # use hack to get GCC=yes (needed not to disable OLE support) |
89 | # because AC_PROG_CC has been replaced by AC_BAKEFILE_PROG_CC, which doesn't set appropriate vars | |
fd8baf2d | 90 | %configure \ |
420fdfd4 JB |
91 | ac_cv_c_compiler_gnu=yes \ |
92 | --host=%{target} \ | |
93 | --target=%{target} \ | |
fd8baf2d | 94 | --with-msw \ |
95 | --with-opengl \ | |
73e1d714 | 96 | --disable-precomp-headers \ |
420fdfd4 | 97 | --enable-controls \ |
fd8baf2d | 98 | --enable-official-build \ |
99 | --enable-std-iostreams \ | |
420fdfd4 | 100 | --enable-tabdialog |
fd8baf2d | 101 | |
102 | %{__make} | |
103 | ||
104 | %install | |
105 | rm -rf $RPM_BUILD_ROOT | |
420fdfd4 | 106 | install -d $RPM_BUILD_ROOT{%{_dlldir},%{_sysbindir}} |
fd8baf2d | 107 | |
73e1d714 JB |
108 | %{__make} install \ |
109 | DESTDIR=$RPM_BUILD_ROOT | |
fd8baf2d | 110 | |
777cad41 | 111 | mv -f $RPM_BUILD_ROOT%{_libdir}/*.dll $RPM_BUILD_ROOT%{_dlldir} |
fd8baf2d | 112 | |
113 | %if 0%{!?debug:1} | |
777cad41 | 114 | %{target}-strip --strip-unneeded -R.comment -R.note $RPM_BUILD_ROOT%{_dlldir}/*.dll |
fd8baf2d | 115 | %{target}-strip -g -R.comment -R.note $RPM_BUILD_ROOT%{_libdir}/*.a |
116 | %endif | |
117 | ||
420fdfd4 | 118 | ln -sf %{_libdir}/wx/config/i386-mingw32-msw-ansi-release-2.8 $RPM_BUILD_ROOT%{_sysbindir} |
fd8baf2d | 119 | |
120 | %clean | |
121 | rm -rf $RPM_BUILD_ROOT | |
122 | ||
123 | %files | |
124 | %defattr(644,root,root,755) | |
777cad41 JB |
125 | %attr(755,root,root) %{_sysbindir}/i386-mingw32-msw-ansi-release-* |
126 | %{_libdir}/libwx_*.dll.a | |
127 | %dir %{_libdir}/wx | |
128 | %dir %{_libdir}/wx/config | |
129 | %attr(755,root,root) %{_libdir}/wx/config/* | |
130 | %{_libdir}/wx/include | |
131 | %{_includedir}/wx-* | |
fd8baf2d | 132 | |
133 | %files dll | |
134 | %defattr(644,root,root,755) | |
777cad41 | 135 | %{_dlldir}/wx*_gcc.dll |