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: ed5b9291ffad776f8757a916e1726ad0
12 Patch0: %{name}-win.patch
13 URL: http://www.boost.org/
14 BuildRequires: boost-jam
15 BuildRequires: crossmingw32-bzip2
16 BuildRequires: crossmingw32-gcc-c++
17 BuildRequires: crossmingw32-runtime
18 BuildRequires: crossmingw32-w32api
19 BuildRequires: crossmingw32-zlib
20 BuildRequires: libtool >= 2:1.4d
21 BuildRequires: perl-base
22 Requires: crossmingw32-bzip2
23 Requires: crossmingw32-runtime
24 Requires: crossmingw32-zlib
25 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
27 %define no_install_post_strip 1
29 %define target i386-mingw32
30 %define target_platform i386-pc-mingw32
31 %define arch %{_prefix}/%{target}
32 %define gccarch %{_prefix}/lib/gcc-lib/%{target}
33 %define gcclib %{_prefix}/lib/gcc-lib/%{target}/%{version}
35 %define __cc %{target}-gcc
36 %define __cxx %{target}-g++
38 %ifarch alpha sparc sparc64 sparcv9
39 # alpha's -mieee and sparc's -mtune=* are not valid for target's gcc
44 The Boost web site provides free peer-reviewed portable C++ source
45 libraries. The emphasis is on libraries which work well with the C++
46 Standard Library. One goal is to establish "existing practice" and
47 provide reference implementations so that the Boost libraries are
48 suitable for eventual standardization. Some of the libraries have
49 already been proposed for inclusion in the C++ Standards Committee's
50 upcoming C++ Standard Library Technical Report.
52 %description -l pl.UTF-8
53 Strona http://www.boost.org/ dostarcza darmowe biblioteki C++ wraz z
54 kodem źródłowym. Nacisk położono na biblioteki, które dobrze
55 współpracują ze standardową biblioteką C++. Celem jest ustanowienie
56 "istniejącej praktyki" i dostarczenie implementacji, tak że biblioteki
57 "Boost" nadają się do ewentualnej standaryzacji. Niektóre z bibliotek
58 już zostały zgłoszone do komitetu standaryzacyjnego C++ w nadchodzącym
59 Raporcie Technicznym Biblioteki Standardowej C++
62 Summary: %{realname} - DLL libraries for Windows
63 Summary(pl.UTF-8): %{realname} - biblioteki DLL dla Windows
64 Group: Applications/Emulators
67 %{realname} - DLL libraries for Windows.
69 %description dll -l pl.UTF-8
70 %{realname} - biblioteki DLL dla Windows.
73 %setup -q -n %{realname}_%{_fver}
76 # - don't know how to pass it through (b)jam -s (no way?)
77 # due to oversophisticated build flags system.
78 %{__perl} -pi -e 's/ -O3 / %{rpmcxxflags} /' tools/build/v2/tools/gcc.jam
80 find . -type f -exec sed -e 's/#error "wide char i\/o not supported on this platform"//' -i \{\} \;
83 CC=%{target}-gcc ; export CC
84 CXX=%{target}-g++ ; export CXX
85 LD=%{target}-ld ; export LD
86 AR=%{target}-ar ; export AR
87 AS=%{target}-as ; export AS
88 CROSS_COMPILE=1 ; export CROSS_COMPILE
89 CPPFLAGS="-I%{arch}/include" ; export CPPFLAGS
90 RANLIB=%{target}-ranlib ; export RANLIB
91 LDSHARED="%{target}-gcc -shared" ; export LDSHARED
92 TARGET="%{target}" ; export TARGET
95 -q -d2 --toolset=gcc \
96 --without-python --without-serialization --without-test \
97 variant=release threading=multi inlining=on debug-symbols=on \
106 $AR cru ../../../../../../../../../../wlib/libboost_$i.a *\.o
107 $RANLIB ../../../../../../../../../../wlib/libboost_$i.a
111 # if there is threading-multi dir
112 # it's content is used for dll and implib
113 dll_dir='link-static/*'
115 if [ -d threading-multi ]; then
116 dll_dir='threading-multi'
122 # libboost_iostreams requires additional
124 additional_so_params=
125 if [ $i = "iostreams" ]; then
126 additional_so_params="-lz.dll -lbzip2.dll"
129 # there are some issuses with dynamic libboost_wave
130 if [ $i != "wave" ]; then
131 $CXX --shared *\.o $additional_so_params \
132 -Wl,--enable-auto-image-base \
133 -o $up_dir/../../../../../../../../wlib/boost_$i.dll \
134 -Wl,--out-implib,libboost_$i.dll.a
135 mv libboost_$i.dll.a $up_dir/../../../../../../../../wlib/
138 cd $up_dir/../../../../../..
143 %{target}-strip wlib/*.dll
144 %{target}-strip -g -R.comment -R.note wlib/*.a
148 rm -rf $RPM_BUILD_ROOT
149 install -d $RPM_BUILD_ROOT%{arch}/{include,lib}
150 install -d $RPM_BUILD_ROOT%{_datadir}/wine/windows/system
152 cp -r boost $RPM_BUILD_ROOT%{arch}/include
153 install wlib/*.a $RPM_BUILD_ROOT%{arch}/lib
154 install wlib/*.dll $RPM_BUILD_ROOT%{_datadir}/wine/windows/system/
157 rm -rf $RPM_BUILD_ROOT
160 %defattr(644,root,root,755)
161 %{arch}/include/boost
165 %defattr(644,root,root,755)
166 %{_datadir}/wine/windows/system/*