]> git.pld-linux.org Git - packages/crossmingw32-wxWidgets.git/blob - crossmingw32-wxWidgets.spec
- 2.6.1
[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.6.1
6 Release:        1
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)
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 %define         rpmcxxflags     "%{rpmcflags}"
45
46 %description
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.
50
51 %description -l pl
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.
56
57 %package dll
58 Summary:        %{realname} - DLL library for Windows
59 Summary(pl):    %{realname} - biblioteka DLL dla Windows
60 Group:          Applications/Emulators
61
62 %description dll
63 %{realname} - DLL libraries for Windows.
64
65 %description dll -l pl
66 %{realname} - biblioteki DLL dla Windows.
67
68 %prep
69 %setup -q -n %{realname}-%{version}
70 %patch0 -p1
71 %patch1 -p1
72 %patch2 -p1
73
74 echo 'AC_DEFUN([AM_PATH_GTK],[:])' > fake-am_path_gtk.m4
75
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
80
81 %build
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
92
93 cp -f /usr/share/automake/config.sub .
94 %{__aclocal} -I .
95 %{__autoconf}
96
97 %configure \
98         --with-msw \
99         --with-opengl \
100         --enable-official-build \
101         --enable-std-iostreams \
102         --enable-controls \
103         --enable-tabdialog \
104         --host=%{target} \
105         --target=%{target}
106
107 %{__make}
108
109 %install
110 rm -rf $RPM_BUILD_ROOT
111 install -d $RPM_BUILD_ROOT{%{arch}/{bin,include,lib},%{_datadir}/wine/windows/system}
112
113 %{__make} install DESTDIR=$RPM_BUILD_ROOT
114
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/*
118
119 %if 0%{!?debug:1}
120 %{target}-strip $RPM_BUILD_ROOT%{_libdir}/*.dll
121 %{target}-strip -g -R.comment -R.note $RPM_BUILD_ROOT%{_libdir}/*.a
122 %endif
123
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}
128
129 ln -s %{arch}/lib/wx/config/i386-mingw32-msw-ansi-release-2.6 $RPM_BUILD_ROOT%{_bindir}
130
131 rm $RPM_BUILD_ROOT/%{_bindir}/wx-config
132
133 %clean
134 rm -rf $RPM_BUILD_ROOT
135
136 %files
137 %defattr(644,root,root,755)
138 %attr(755,root,root) %{_bindir}/i386-mingw32-*
139 %{arch}/lib/*.a
140 %dir %{arch}/lib/wx
141 %dir %{arch}/lib/wx/config
142 %attr(755,root,root) %{arch}/lib/wx/config/*
143 %{arch}/lib/wx/include
144 %{arch}/include/*
145
146 %files dll
147 %defattr(644,root,root,755)
148 %{_datadir}/wine/windows/system/*
This page took 0.10694 seconds and 3 git commands to generate.