]> git.pld-linux.org Git - packages/crossmingw32-wxWidgets.git/blob - crossmingw32-wxWidgets.spec
- use the same Source0 as wxWidgets.spec, fixed md5
[packages/crossmingw32-wxWidgets.git] / crossmingw32-wxWidgets.spec
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}
5 Version:        2.8.0
6 Release:        1
7 License:        wxWidgets Licence (LGPL with exception)
8 Group:          Development/Libraries
9 Source0:        http://ftp.wxwidgets.org/pub/%{version}/%{realname}-%{version}.tar.bz2
10 # Source0-md5:  4bf9c66cdb7cda1d2fe51376c211b9e1
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.9
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
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
49 %description -l pl
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.
54
55 %package dll
56 Summary:        %{realname} - DLL library for Windows
57 Summary(pl):    %{realname} - biblioteka DLL dla Windows
58 Group:          Applications/Emulators
59
60 %description dll
61 %{realname} - DLL libraries for Windows.
62
63 %description dll -l pl
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
84 cp -f /usr/share/automake/config.sub .
85 %{__aclocal} -I build/aclocal
86 %{__autoconf}
87
88 %configure \
89         --with-msw \
90         --with-opengl \
91         --disable-precomp-headers \
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
105 %{__make} install \
106         DESTDIR=$RPM_BUILD_ROOT
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
122 ln -s %{arch}/lib/wx/config/i386-mingw32-msw-ansi-release-2.8 $RPM_BUILD_ROOT%{_bindir}
123
124 rm $RPM_BUILD_ROOT%{_bindir}/wx-config
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/*
This page took 0.124779 seconds and 3 git commands to generate.