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
9 Group: Development/Libraries
10 Source0: http://dl.sourceforge.net/boost/%{realname}_%{fver}.tar.bz2
11 # Source0-md5: 328bfec66c312150e4c2a78dcecb504b
12 Patch0: %{name}-win.patch
13 URL: http://www.boost.org/
14 BuildRequires: boost-jam >= 3.1.12
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
32 %define _sysprefix /usr
33 %define _prefix %{_sysprefix}/%{target}
34 %define _libdir %{_prefix}/lib
35 %define _dlldir /usr/share/wine/windows/system
37 %define __cc %{target}-gcc
38 %define __cxx %{target}-g++
41 # arch-specific flags (like alpha's -mieee) are not valid for i386 gcc
46 The Boost web site provides free peer-reviewed portable C++ source
47 libraries. The emphasis is on libraries which work well with the C++
48 Standard Library. One goal is to establish "existing practice" and
49 provide reference implementations so that the Boost libraries are
50 suitable for eventual standardization. Some of the libraries have
51 already been proposed for inclusion in the C++ Standards Committee's
52 upcoming C++ Standard Library Technical Report.
54 %description -l pl.UTF-8
55 Strona http://www.boost.org/ dostarcza darmowe biblioteki C++ wraz z
56 kodem źródłowym. Nacisk położono na biblioteki, które dobrze
57 współpracują ze standardową biblioteką C++. Celem jest ustanowienie
58 "istniejącej praktyki" i dostarczenie implementacji, tak że biblioteki
59 "Boost" nadają się do ewentualnej standaryzacji. Niektóre z bibliotek
60 już zostały zgłoszone do komitetu standaryzacyjnego C++ w nadchodzącym
61 Raporcie Technicznym Biblioteki Standardowej C++
64 Summary: Boost - DLL libraries for Windows
65 Summary(pl.UTF-8): Boost - biblioteki DLL dla Windows
66 Group: Applications/Emulators
67 Requires: crossmingw32-bzip2-dll
68 Requires: crossmingw32-zlib-dll
72 Boost - DLL libraries for Windows.
74 %description dll -l pl.UTF-8
75 Boost - biblioteki DLL dla Windows.
78 %setup -q -n %{realname}_%{fver}
81 # - don't know how to pass it through (b)jam -s (no way?)
82 # due to oversophisticated build flags system.
83 %{__perl} -pi -e 's/ -O3 / %{rpmcxxflags} /' tools/build/v2/tools/gcc.jam
85 sed -i -e 's/#error "wide char i\/o not supported on this platform"//' \
87 libs/serialization/src/*.cpp \
88 libs/serialization/test/*.hpp
91 CC=%{__cc} ; export CC
92 CXX=%{__cxx} ; export CXX
93 LD=%{target}-ld ; export LD
94 AR=%{target}-ar ; export AR
95 AS=%{target}-as ; export AS
96 CROSS_COMPILE=1 ; export CROSS_COMPILE
97 RANLIB=%{target}-ranlib ; export RANLIB
98 LDSHARED="%{__cc} -shared" ; export LDSHARED
99 TARGET="%{target}" ; export TARGET
103 -sBZIP2_BINARY=bzip2 \
106 --without-serialization \
119 cd $i/build/gcc-mingw-*/release/debug-symbols-on/inlining-on
120 cd link-static/threadapi-win32/threading-multi
121 $AR cru ../../../../../../../../../../../wlib/libboost_$i.a *.o
122 $RANLIB ../../../../../../../../../../../wlib/libboost_$i.a
126 # if there is threading-multi dir
127 # it's content is used for dll and implib
128 dll_dir='link-static/threadapi-win32/threading-multi'
130 if [ -d threading-multi ]; then
131 dll_dir='threadapi-win32/threading-multi'
137 # libboost_iostreams requires additional
139 additional_so_params=
140 if [ $i = "iostreams" ]; then
141 additional_so_params="-lz.dll -lbzip2.dll"
144 # there are some issuses with dynamic libboost_wave
145 if [ $i != "wave" ]; then
146 $CXX --shared *.o $additional_so_params \
147 -Wl,--enable-auto-image-base \
148 -o $up_dir/../../../../../../../../wlib/boost_$i.dll \
149 -Wl,--out-implib,libboost_$i.dll.a
150 mv libboost_$i.dll.a $up_dir/../../../../../../../../wlib/
153 cd $up_dir/../../../../../..
158 %{target}-strip wlib/*.dll
159 %{target}-strip -g -R.comment -R.note wlib/*.a
163 rm -rf $RPM_BUILD_ROOT
164 install -d $RPM_BUILD_ROOT{%{_includedir},%{_libdir},%{_dlldir}}
166 cp -r boost $RPM_BUILD_ROOT%{_includedir}
167 install wlib/*.a $RPM_BUILD_ROOT%{_libdir}
168 install wlib/*.dll $RPM_BUILD_ROOT%{_dlldir}
171 rm -rf $RPM_BUILD_ROOT
174 %defattr(644,root,root,755)
179 %defattr(644,root,root,755)