2 Summary: The Boost C++ Libraries - Mingw32 cross version
3 Summary(pl.UTF-8): Biblioteki C++ "Boost" - wersja skrośna dla Mingw32
4 Name: crossmingw32-%{realname}
6 %define _fver %(echo %{version} | tr . _)
8 License: Boost Software License and others
10 Source0: http://dl.sourceforge.net/boost/%{realname}_%{_fver}.tar.bz2
11 # Source0-md5: e1d1fc7b8fc8c51df4564c2188ca51cb
12 Patch0: %{name}-win.patch
13 URL: http://www.boost.org/
14 Requires: crossmingw32-runtime
15 BuildRequires: crossmingw32-gcc-c++
16 BuildRequires: crossmingw32-runtime
17 BuildRequires: crossmingw32-w32api
18 BuildRequires: boost-jam
19 BuildRequires: libtool >= 2:1.4d
20 BuildRequires: perl-base
21 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
23 %define no_install_post_strip 1
25 %define target i386-mingw32
26 %define target_platform i386-pc-mingw32
27 %define arch %{_prefix}/%{target}
28 %define gccarch %{_prefix}/lib/gcc-lib/%{target}
29 %define gcclib %{_prefix}/lib/gcc-lib/%{target}/%{version}
31 %define __cc %{target}-gcc
32 %define __cxx %{target}-g++
34 %ifarch alpha sparc sparc64 sparcv9
35 # alpha's -mieee and sparc's -mtune=* are not valid for target's gcc
40 The Boost web site provides free peer-reviewed portable C++ source
41 libraries. The emphasis is on libraries which work well with the C++
42 Standard Library. One goal is to establish "existing practice" and
43 provide reference implementations so that the Boost libraries are
44 suitable for eventual standardization. Some of the libraries have
45 already been proposed for inclusion in the C++ Standards Committee's
46 upcoming C++ Standard Library Technical Report.
48 %description -l pl.UTF-8
49 Strona http://www.boost.org/ dostarcza darmowe biblioteki C++ wraz z
50 kodem źródłowym. Nacisk położono na biblioteki, które dobrze
51 współpracują ze standardową biblioteką C++. Celem jest ustanowienie
52 "istniejącej praktyki" i dostarczenie implementacji, tak że biblioteki
53 "Boost" nadają się do ewentualnej standaryzacji. Niektóre z bibliotek
54 już zostały zgłoszone do komitetu standaryzacyjnego C++ w nadchodzącym
55 Raporcie Technicznym Biblioteki Standardowej C++
58 Summary: %{realname} - DLL libraries for Windows
59 Summary(pl.UTF-8): %{realname} - biblioteki DLL dla Windows
60 Group: Applications/Emulators
63 %{realname} - DLL libraries for Windows.
65 %description dll -l pl.UTF-8
66 %{realname} - biblioteki DLL dla Windows.
69 %setup -q -n %{realname}_%{_fver}
72 # don't know how to pass it through (b)jam -s (no way?)
73 # due to oversophisticated build flags system
74 %{__perl} -pi -e 's/ -O3 / %{rpmcflags} /' tools/build/v1/gcc-tools.jam
77 # -pthread gcc parameter doesn't add _REENTRANT to cpp macros on alpha (only)
78 # don't know, is it gcc bug or intentional omission?
79 # anyway, boost check of -D_REENTRANT in its headers, so it's needed here
80 %{__perl} -pi -e 's/(CFLAGS.*-pthread)/$1 -D_REENTRANT/' tools/build/v1/gcc-tools.jam
83 find . -type f -exec sed -e 's/#error "wide char i\/o not supported on this platform"//' -i \{\} \;
86 CC=%{target}-gcc ; export CC
87 CXX=%{target}-g++ ; export CXX
88 LD=%{target}-ld ; export LD
89 AR=%{target}-ar ; export AR
90 AS=%{target}-as ; export AS
91 CROSS_COMPILE=1 ; export CROSS_COMPILE
92 CPPFLAGS="-I%{arch}/include" ; export CPPFLAGS
93 RANLIB=%{target}-ranlib ; export RANLIB
94 LDSHARED="%{target}-gcc -shared" ; export LDSHARED
95 TARGET="%{target}" ; export TARGET
102 -sBUILD="release <threading>multi" \
103 -sPYTHON_ROOT=$PYTHON_ROOT \
104 -sPYTHON_VERSION=$PYTHON_VERSION \
115 lib=`echo lib*so|sed -e 's/\.so//'`
116 blib=`echo $lib|sed -e 's/^lib//'`
119 find -type f -exec mv \{\} . \;
120 $AR cru ../../../../../../wlib/$lib.a *\.o
121 $RANLIB ../../../../../../wlib/$lib.a
125 find -type f -exec mv \{\} . \;
126 %{__cxx} --shared *\.o \
127 -Wl,--enable-auto-image-base \
128 -o ../../../../../../wlib/$blib.dll \
129 -Wl,--out-implib,$lib.dll.a
130 mv $lib.dll.a ../../../../../../wlib/
138 %{target}-strip wlib/*.dll
139 %{target}-strip -g -R.comment -R.note wlib/*.a
143 rm -rf $RPM_BUILD_ROOT
144 install -d $RPM_BUILD_ROOT%{arch}/{include,lib}
145 install -d $RPM_BUILD_ROOT%{_datadir}/wine/windows/system
147 cp -r boost $RPM_BUILD_ROOT%{arch}/include
148 install wlib/*.a $RPM_BUILD_ROOT%{arch}/lib
149 install wlib/*.dll $RPM_BUILD_ROOT%{_datadir}/wine/windows/system/
152 rm -rf $RPM_BUILD_ROOT
155 %defattr(644,root,root,755)
156 %{arch}/include/boost
160 %defattr(644,root,root,755)
161 %{_datadir}/wine/windows/system/*