]>
Commit | Line | Data |
---|---|---|
1 | %define realname wxWidgets | |
2 | Summary: wxWidgets library - MinGW32 cross version | |
3 | Summary(pl.UTF-8): Biblioteka wxWidgets - wersja skrośna dla MinGW32 | |
4 | Name: crossmingw32-%{realname} | |
5 | Version: 3.0.2 | |
6 | Release: 1 | |
7 | License: wxWidgets Library Licence 3.1 (LGPL v2+ with exception) | |
8 | Group: Development/Libraries | |
9 | Source0: http://downloads.sourceforge.net/wxwindows/%{realname}-%{version}.tar.bz2 | |
10 | # Source0-md5: ba4cd1f3853d0cd49134c5ae028ad080 | |
11 | Patch0: %{realname}-samples.patch | |
12 | Patch1: %{realname}-ac.patch | |
13 | Patch2: %{realname}-gifdelay.patch | |
14 | URL: http://www.wxWidgets.org/ | |
15 | BuildRequires: autoconf >= 2.58 | |
16 | BuildRequires: automake | |
17 | #BuildRequires: bakefile >= 0.2.9 | |
18 | BuildRequires: crossmingw32-expat | |
19 | BuildRequires: crossmingw32-gcc-c++ | |
20 | BuildRequires: crossmingw32-libjpeg | |
21 | BuildRequires: crossmingw32-libpng | |
22 | BuildRequires: crossmingw32-libtiff | |
23 | BuildRequires: crossmingw32-w32api | |
24 | BuildRequires: crossmingw32-zlib >= 1.1.4 | |
25 | BuildRequires: libtool | |
26 | Requires: crossmingw32-expat | |
27 | Requires: crossmingw32-libjpeg | |
28 | Requires: crossmingw32-libpng | |
29 | Requires: crossmingw32-libtiff | |
30 | Requires: crossmingw32-w32api | |
31 | Obsoletes: crossmingw32-wxMSW | |
32 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
33 | ||
34 | %define no_install_post_strip 1 | |
35 | ||
36 | %define target i386-mingw32 | |
37 | %define target_platform i386-pc-mingw32 | |
38 | ||
39 | %define _sysprefix /usr | |
40 | %define _sysbindir %{_sysprefix}/bin | |
41 | %define _prefix %{_sysprefix}/%{target} | |
42 | %define _libdir %{_prefix}/lib | |
43 | %define _pkgconfigdir %{_prefix}/lib/pkgconfig | |
44 | %define _dlldir /usr/share/wine/windows/system | |
45 | %define __cc %{target}-gcc | |
46 | %define __cxx %{target}-g++ | |
47 | ||
48 | %ifnarch %{ix86} | |
49 | # arch-specific flags (like alpha's -mieee) are not valid for i386 gcc | |
50 | %define optflags -O2 | |
51 | %endif | |
52 | # -z options are invalid for mingw linker, most of -f options are Linux-specific | |
53 | %define filterout_ld -Wl,-z,.* | |
54 | %define filterout_c -f[-a-z0-9=]* | |
55 | %define filterout_cxx -f[-a-z0-9=]* | |
56 | ||
57 | %description | |
58 | wxWidgets is a free C++ library for cross-platform GUI development. | |
59 | With wxWidgets, you can create applications for different GUIs (GTK+, | |
60 | Motif/LessTif, MS Windows, Mac) from the same source code. | |
61 | ||
62 | %description -l pl.UTF-8 | |
63 | wxWidgets to wolnodostępna biblioteka napisana w C++ umożliwiająca | |
64 | rozwijanie wieloplatformowych programów GUI. Przy użyciu wxWidgets | |
65 | można tworzyć aplikacje dla różnych GUI (GTK+, Motif/LessTif, MS | |
66 | Windows, Mac) z tego samego kodu źródłowego. | |
67 | ||
68 | %package dll | |
69 | Summary: %{realname} - DLL library for Windows | |
70 | Summary(pl.UTF-8): %{realname} - biblioteka DLL dla Windows | |
71 | Group: Applications/Emulators | |
72 | Requires: crossmingw32-expat-dll | |
73 | Requires: crossmingw32-libjpeg-dll | |
74 | Requires: crossmingw32-libpng-dll | |
75 | Requires: crossmingw32-libtiff-dll | |
76 | Requires: crossmingw32-zlib-dll >= 1.1.4 | |
77 | ||
78 | %description dll | |
79 | %{realname} - DLL libraries for Windows. | |
80 | ||
81 | %description dll -l pl.UTF-8 | |
82 | %{realname} - biblioteki DLL dla Windows. | |
83 | ||
84 | %prep | |
85 | %setup -q -n %{realname}-%{version} | |
86 | %patch0 -p1 | |
87 | %patch1 -p1 | |
88 | %patch2 -p1 | |
89 | ||
90 | %build | |
91 | cp -f /usr/share/automake/config.sub . | |
92 | %{__aclocal} -I build/aclocal | |
93 | %{__autoconf} | |
94 | ||
95 | %configure \ | |
96 | --host=%{target} \ | |
97 | --target=%{target} \ | |
98 | --disable-precomp-headers \ | |
99 | --enable-calendar \ | |
100 | --enable-controls \ | |
101 | --enable-plugins \ | |
102 | --enable-std-iostreams \ | |
103 | --enable-tabdialog \ | |
104 | --enable-vendor=pld \ | |
105 | --with-msw \ | |
106 | --with-opengl | |
107 | ||
108 | %{__make} | |
109 | ||
110 | %install | |
111 | rm -rf $RPM_BUILD_ROOT | |
112 | install -d $RPM_BUILD_ROOT{%{_dlldir},%{_sysbindir}} | |
113 | ||
114 | %{__make} install \ | |
115 | DESTDIR=$RPM_BUILD_ROOT | |
116 | ||
117 | mv -f $RPM_BUILD_ROOT%{_libdir}/*.dll $RPM_BUILD_ROOT%{_dlldir} | |
118 | ||
119 | %if 0%{!?debug:1} | |
120 | %{target}-strip --strip-unneeded -R.comment -R.note $RPM_BUILD_ROOT%{_dlldir}/*.dll | |
121 | %{target}-strip -g -R.comment -R.note $RPM_BUILD_ROOT%{_libdir}/*.a | |
122 | %endif | |
123 | ||
124 | ln -sf %{_libdir}/wx/config/i386-mingw32-msw-unicode-3.0 $RPM_BUILD_ROOT%{_sysbindir}/i386-mingw32-wx-msw-unicode-config | |
125 | ||
126 | # use from native wxWidgets if needed | |
127 | %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/{aclocal,bakefile,locale} | |
128 | ||
129 | %clean | |
130 | rm -rf $RPM_BUILD_ROOT | |
131 | ||
132 | %files | |
133 | %defattr(644,root,root,755) | |
134 | %attr(755,root,root) %{_sysbindir}/i386-mingw32-wx-msw-unicode-config | |
135 | %{_libdir}/libwx_baseu-3.0-i386-mingw32.dll.a | |
136 | %{_libdir}/libwx_baseu_net-3.0-i386-mingw32.dll.a | |
137 | %{_libdir}/libwx_baseu_xml-3.0-i386-mingw32.dll.a | |
138 | %{_libdir}/libwx_mswu_adv-3.0-i386-mingw32.dll.a | |
139 | %{_libdir}/libwx_mswu_aui-3.0-i386-mingw32.dll.a | |
140 | %{_libdir}/libwx_mswu_core-3.0-i386-mingw32.dll.a | |
141 | %{_libdir}/libwx_mswu_gl-3.0-i386-mingw32.dll.a | |
142 | %{_libdir}/libwx_mswu_html-3.0-i386-mingw32.dll.a | |
143 | %{_libdir}/libwx_mswu_media-3.0-i386-mingw32.dll.a | |
144 | %{_libdir}/libwx_mswu_propgrid-3.0-i386-mingw32.dll.a | |
145 | %{_libdir}/libwx_mswu_qa-3.0-i386-mingw32.dll.a | |
146 | %{_libdir}/libwx_mswu_ribbon-3.0-i386-mingw32.dll.a | |
147 | %{_libdir}/libwx_mswu_richtext-3.0-i386-mingw32.dll.a | |
148 | %{_libdir}/libwx_mswu_stc-3.0-i386-mingw32.dll.a | |
149 | %{_libdir}/libwx_mswu_webview-3.0-i386-mingw32.dll.a | |
150 | %{_libdir}/libwx_mswu_xrc-3.0-i386-mingw32.dll.a | |
151 | %dir %{_libdir}/wx | |
152 | %dir %{_libdir}/wx/config | |
153 | %attr(755,root,root) %{_libdir}/wx/config/i386-mingw32-msw-unicode-3.0 | |
154 | %{_libdir}/wx/include | |
155 | %{_includedir}/wx-3.0 | |
156 | ||
157 | %files dll | |
158 | %defattr(644,root,root,755) | |
159 | %{_dlldir}/wxbase30u_gcc_pld.dll | |
160 | %{_dlldir}/wxbase30u_net_gcc_pld.dll | |
161 | %{_dlldir}/wxbase30u_xml_gcc_pld.dll | |
162 | %{_dlldir}/wxmsw30u_adv_gcc_pld.dll | |
163 | %{_dlldir}/wxmsw30u_aui_gcc_pld.dll | |
164 | %{_dlldir}/wxmsw30u_core_gcc_pld.dll | |
165 | %{_dlldir}/wxmsw30u_gl_gcc_pld.dll | |
166 | %{_dlldir}/wxmsw30u_html_gcc_pld.dll | |
167 | %{_dlldir}/wxmsw30u_media_gcc_pld.dll | |
168 | %{_dlldir}/wxmsw30u_propgrid_gcc_pld.dll | |
169 | %{_dlldir}/wxmsw30u_qa_gcc_pld.dll | |
170 | %{_dlldir}/wxmsw30u_ribbon_gcc_pld.dll | |
171 | %{_dlldir}/wxmsw30u_richtext_gcc_pld.dll | |
172 | %{_dlldir}/wxmsw30u_stc_gcc_pld.dll | |
173 | %{_dlldir}/wxmsw30u_webview_gcc_pld.dll | |
174 | %{_dlldir}/wxmsw30u_xrc_gcc_pld.dll |