]>
Commit | Line | Data |
---|---|---|
fd8baf2d | 1 | %define realname wxWidgets |
2 | Summary: wxWidgets library - Mingw32 cross version | |
c8d76d75 | 3 | Summary(pl.UTF-8): Biblioteka wxWidgets - wersja skrośna dla Mingw32 |
fd8baf2d | 4 | Name: crossmingw32-%{realname} |
e77e000d | 5 | Version: 2.8.7 |
fd8baf2d | 6 | Release: 1 |
7 | License: wxWidgets Licence (LGPL with exception) | |
8 | Group: Development/Libraries | |
c4fef24c | 9 | Source0: http://ftp.wxwidgets.org/pub/%{version}/%{realname}-%{version}.tar.bz2 |
e77e000d | 10 | # Source0-md5: e3455083afdf6404a569a8bf0701cf13 |
fd8baf2d | 11 | Patch0: %{realname}-samples.patch |
87144d8f | 12 | Patch1: %{realname}-ac.patch |
13 | Patch2: %{realname}-gif0delay.patch | |
fd8baf2d | 14 | URL: http://www.wxWidgets.org/ |
87144d8f | 15 | BuildRequires: autoconf >= 2.58 |
fd8baf2d | 16 | BuildRequires: automake |
73e1d714 | 17 | #BuildRequires: bakefile >= 0.1.9 |
fd8baf2d | 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) | |
28 | ||
29 | %define no_install_post_strip 1 | |
30 | ||
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} | |
36 | ||
37 | %define __cc %{target}-gcc | |
38 | %define __cxx %{target}-g++ | |
39 | ||
40 | %ifarch alpha sparc sparc64 sparcv9 | |
41 | %define optflags -O2 | |
42 | %endif | |
43 | ||
fd8baf2d | 44 | %description |
45 | wxWidgets is a free C++ library for cross-platform GUI development. | |
46 | With wxWidgets, you can create applications for different GUIs (GTK+, | |
47 | Motif/LessTif, MS Windows, Mac) from the same source code. | |
48 | ||
b35f38d5 JR |
49 | %description -l pl.UTF-8 |
50 | wxWidgets to wolnodostępna biblioteka napisana w C++ umożliwiająca | |
51 | rozwijanie wieloplatformowych programów GUI. Przy użyciu wxWidgets | |
52 | można tworzyć aplikacje dla różnych GUI (GTK+, Motif/LessTif, MS | |
53 | Windows, Mac) z tego samego kodu źródłowego. | |
fd8baf2d | 54 | |
55 | %package dll | |
56 | Summary: %{realname} - DLL library for Windows | |
c8d76d75 | 57 | Summary(pl.UTF-8): %{realname} - biblioteka DLL dla Windows |
fd8baf2d | 58 | Group: Applications/Emulators |
59 | ||
60 | %description dll | |
61 | %{realname} - DLL libraries for Windows. | |
62 | ||
b35f38d5 | 63 | %description dll -l pl.UTF-8 |
fd8baf2d | 64 | %{realname} - biblioteki DLL dla Windows. |
65 | ||
66 | %prep | |
67 | %setup -q -n %{realname}-%{version} | |
68 | %patch0 -p1 | |
69 | %patch1 -p1 | |
70 | %patch2 -p1 | |
71 | ||
72 | %build | |
73 | CC=%{target}-gcc ; export CC | |
74 | CXX=%{target}-g++ ; export CXX | |
75 | LD=%{target}-ld ; export LD | |
76 | AR=%{target}-ar ; export AR | |
77 | AS=%{target}-as ; export AS | |
78 | CROSS_COMPILE=1 ; export CROSS_COMPILE | |
79 | CPPFLAGS="-I%{arch}/include" ; export CPPFLAGS | |
80 | RANLIB=%{target}-ranlib ; export RANLIB | |
81 | LDSHARED="%{target}-gcc -shared" ; export LDSHARED | |
82 | TARGET="%{target}" ; export TARGET | |
83 | ||
87144d8f | 84 | cp -f /usr/share/automake/config.sub . |
73e1d714 | 85 | %{__aclocal} -I build/aclocal |
fd8baf2d | 86 | %{__autoconf} |
87 | ||
88 | %configure \ | |
89 | --with-msw \ | |
90 | --with-opengl \ | |
73e1d714 | 91 | --disable-precomp-headers \ |
fd8baf2d | 92 | --enable-official-build \ |
93 | --enable-std-iostreams \ | |
94 | --enable-controls \ | |
95 | --enable-tabdialog \ | |
96 | --host=%{target} \ | |
97 | --target=%{target} | |
98 | ||
99 | %{__make} | |
100 | ||
101 | %install | |
102 | rm -rf $RPM_BUILD_ROOT | |
103 | install -d $RPM_BUILD_ROOT{%{arch}/{bin,include,lib},%{_datadir}/wine/windows/system} | |
104 | ||
73e1d714 JB |
105 | %{__make} install \ |
106 | DESTDIR=$RPM_BUILD_ROOT | |
fd8baf2d | 107 | |
108 | sed -i -e 's@includedir="/usr/include"@includedir="%{arch}/include"@' \ | |
109 | -e 's@libdir="/usr/lib"@libdir="%{arch}/lib"@' \ | |
110 | $RPM_BUILD_ROOT%{_libdir}/wx/config/* | |
111 | ||
112 | %if 0%{!?debug:1} | |
113 | %{target}-strip $RPM_BUILD_ROOT%{_libdir}/*.dll | |
114 | %{target}-strip -g -R.comment -R.note $RPM_BUILD_ROOT%{_libdir}/*.a | |
115 | %endif | |
116 | ||
117 | cp -r $RPM_BUILD_ROOT%{_libdir}/*.a $RPM_BUILD_ROOT%{arch}/lib | |
118 | cp -r $RPM_BUILD_ROOT%{_libdir}/*.dll $RPM_BUILD_ROOT%{_datadir}/wine/windows/system | |
119 | cp -r $RPM_BUILD_ROOT%{_libdir}/wx $RPM_BUILD_ROOT%{arch}/lib/ | |
120 | cp -r $RPM_BUILD_ROOT%{_includedir} $RPM_BUILD_ROOT%{arch} | |
121 | ||
830a4943 | 122 | ln -s %{arch}/lib/wx/config/i386-mingw32-msw-ansi-release-2.8 $RPM_BUILD_ROOT%{_bindir} |
fd8baf2d | 123 | |
14604964 | 124 | rm $RPM_BUILD_ROOT%{_bindir}/wx-config |
fd8baf2d | 125 | |
126 | %clean | |
127 | rm -rf $RPM_BUILD_ROOT | |
128 | ||
129 | %files | |
130 | %defattr(644,root,root,755) | |
131 | %attr(755,root,root) %{_bindir}/i386-mingw32-* | |
132 | %{arch}/lib/*.a | |
133 | %dir %{arch}/lib/wx | |
134 | %dir %{arch}/lib/wx/config | |
135 | %attr(755,root,root) %{arch}/lib/wx/config/* | |
136 | %{arch}/lib/wx/include | |
137 | %{arch}/include/* | |
138 | ||
139 | %files dll | |
140 | %defattr(644,root,root,755) | |
141 | %{_datadir}/wine/windows/system/* |