%define realname boost
Summary: The Boost C++ Libraries - Mingw32 cross version
-Summary(pl.UTF-8): Biblioteki C++ "Boost" - wersja skrośna dla Mingw32
+Summary(pl.UTF-8): Biblioteki C++ "Boost" - wersja skrośna dla Mingw32
Name: crossmingw32-%{realname}
-Version: 1.32.0
-%define _fver %(echo %{version} | tr . _)
-Release: 1
+Version: 1.35.0
+%define fver %(echo %{version} | tr . _)
+Release: 0.1
License: Boost Software License and others
-Group: Libraries
-Source0: http://dl.sourceforge.net/boost/%{realname}_%{_fver}.tar.bz2
-# Source0-md5: e1d1fc7b8fc8c51df4564c2188ca51cb
+Group: Development/Libraries
+Source0: http://dl.sourceforge.net/boost/%{realname}_%{fver}.tar.bz2
+# Source0-md5: dce952a7214e72d6597516bcac84048b
Patch0: %{name}-win.patch
URL: http://www.boost.org/
-Requires: crossmingw32-runtime
+BuildRequires: boost-jam
+BuildRequires: crossmingw32-bzip2
BuildRequires: crossmingw32-gcc-c++
BuildRequires: crossmingw32-runtime
BuildRequires: crossmingw32-w32api
-BuildRequires: boost-jam
+BuildRequires: crossmingw32-zlib
BuildRequires: libtool >= 2:1.4d
BuildRequires: perl-base
+Requires: crossmingw32-bzip2
+Requires: crossmingw32-runtime
+Requires: crossmingw32-zlib
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%define no_install_post_strip 1
%define target i386-mingw32
%define target_platform i386-pc-mingw32
-%define arch %{_prefix}/%{target}
-%define gccarch %{_prefix}/lib/gcc-lib/%{target}
-%define gcclib %{_prefix}/lib/gcc-lib/%{target}/%{version}
+
+%define _sysprefix /usr
+%define _prefix %{_sysprefix}/%{target}
+%define _libdir %{_prefix}/lib
+%define _dlldir /usr/share/wine/windows/system
%define __cc %{target}-gcc
%define __cxx %{target}-g++
-%ifarch alpha sparc sparc64 sparcv9
-# alpha's -mieee and sparc's -mtune=* are not valid for target's gcc
+%ifnarch %{ix86}
+# arch-specific flags (like alpha's -mieee) are not valid for i386 gcc
%define optflags -O2
%endif
Raporcie Technicznym Biblioteki Standardowej C++
%package dll
-Summary: %{realname} - DLL libraries for Windows
-Summary(pl.UTF-8): %{realname} - biblioteki DLL dla Windows
+Summary: Boost - DLL libraries for Windows
+Summary(pl.UTF-8): Boost - biblioteki DLL dla Windows
Group: Applications/Emulators
+Requires: crossmingw32-bzip2-dll
+Requires: crossmingw32-zlib-dll
+Requires: wine
%description dll
-%{realname} - DLL libraries for Windows.
+Boost - DLL libraries for Windows.
%description dll -l pl.UTF-8
-%{realname} - biblioteki DLL dla Windows.
+Boost - biblioteki DLL dla Windows.
%prep
-%setup -q -n %{realname}_%{_fver}
+%setup -q -n %{realname}_%{fver}
%patch0 -p1
-# don't know how to pass it through (b)jam -s (no way?)
-# due to oversophisticated build flags system
-%{__perl} -pi -e 's/ -O3 / %{rpmcflags} /' tools/build/v1/gcc-tools.jam
-
-%ifarch alpha
-# -pthread gcc parameter doesn't add _REENTRANT to cpp macros on alpha (only)
-# don't know, is it gcc bug or intentional omission?
-# anyway, boost check of -D_REENTRANT in its headers, so it's needed here
-%{__perl} -pi -e 's/(CFLAGS.*-pthread)/$1 -D_REENTRANT/' tools/build/v1/gcc-tools.jam
-%endif
+# - don't know how to pass it through (b)jam -s (no way?)
+# due to oversophisticated build flags system.
+%{__perl} -pi -e 's/ -O3 / %{rpmcxxflags} /' tools/build/v2/tools/gcc.jam
-find . -type f -exec sed -e 's/#error "wide char i\/o not supported on this platform"//' -i \{\} \;
+sed -i -e 's/#error "wide char i\/o not supported on this platform"//' \
+ boost/archive/*.hpp \
+ libs/serialization/src/*.cpp \
+ libs/serialization/test/*.hpp
%build
-CC=%{target}-gcc ; export CC
-CXX=%{target}-g++ ; export CXX
+CC=%{__cc} ; export CC
+CXX=%{__cxx} ; export CXX
LD=%{target}-ld ; export LD
AR=%{target}-ar ; export AR
AS=%{target}-as ; export AS
CROSS_COMPILE=1 ; export CROSS_COMPILE
-CPPFLAGS="-I%{arch}/include" ; export CPPFLAGS
RANLIB=%{target}-ranlib ; export RANLIB
-LDSHARED="%{target}-gcc -shared" ; export LDSHARED
+LDSHARED="%{__cc} -shared" ; export LDSHARED
TARGET="%{target}" ; export TARGET
-PYTHON_ROOT=
-PYTHON_VERSION=
-
bjam \
- -d2 \
- -sBUILD="release <threading>multi" \
- -sPYTHON_ROOT=$PYTHON_ROOT \
- -sPYTHON_VERSION=$PYTHON_VERSION \
- -sGXX="$CXX" \
- -sGCC="$CC"
+ -q -d2 --toolset=gcc \
+ --without-python --without-serialization --without-test \
+ variant=release threading=multi inlining=on debug-symbols=on \
+ -sBZIP2_BINARY=bzip2
mkdir wlib
-cd bin/*/*
-rm -rf test
-rm -rf serialization
+cd bin.v2/*
for i in *
do
- cd $i/*
- lib=`echo lib*so|sed -e 's/\.so//'`
- blib=`echo $lib|sed -e 's/^lib//'`
-
- cd $lib.a
- find -type f -exec mv \{\} . \;
- $AR cru ../../../../../../wlib/$lib.a *\.o
- $RANLIB ../../../../../../wlib/$lib.a
- cd ..
-
- cd $lib.so
- find -type f -exec mv \{\} . \;
- %{__cxx} --shared *\.o \
- -Wl,--enable-auto-image-base \
- -o ../../../../../../wlib/$blib.dll \
- -Wl,--out-implib,$lib.dll.a
- mv $lib.dll.a ../../../../../../wlib/
- cd ..
-
- cd ../..
+ cd $i/*/*/*/*/*
+ cd link-static/*
+ $AR cru ../../../../../../../../../../wlib/libboost_$i.a *\.o
+ $RANLIB ../../../../../../../../../../wlib/libboost_$i.a
+
+ cd ../..
+
+ # if there is threading-multi dir
+ # it's content is used for dll and implib
+ dll_dir='link-static/*'
+ up_dir='../..'
+ if [ -d threading-multi ]; then
+ dll_dir='threading-multi'
+ up_dir='./..'
+ fi
+
+ cd $dll_dir
+
+ # libboost_iostreams requires additional
+ # libraries
+ additional_so_params=
+ if [ $i = "iostreams" ]; then
+ additional_so_params="-lz.dll -lbzip2.dll"
+ fi
+
+ # there are some issuses with dynamic libboost_wave
+ if [ $i != "wave" ]; then
+ $CXX --shared *\.o $additional_so_params \
+ -Wl,--enable-auto-image-base \
+ -o $up_dir/../../../../../../../../wlib/boost_$i.dll \
+ -Wl,--out-implib,libboost_$i.dll.a
+ mv libboost_$i.dll.a $up_dir/../../../../../../../../wlib/
+ fi
+
+ cd $up_dir/../../../../../..
done
-cd ../../..
+cd ../..
%if 0%{!?debug:1}
%{target}-strip wlib/*.dll
%install
rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT%{arch}/{include,lib}
-install -d $RPM_BUILD_ROOT%{_datadir}/wine/windows/system
+install -d $RPM_BUILD_ROOT{%{_includedir},%{_libdir},%{_dlldir}}
-cp -r boost $RPM_BUILD_ROOT%{arch}/include
-install wlib/*.a $RPM_BUILD_ROOT%{arch}/lib
-install wlib/*.dll $RPM_BUILD_ROOT%{_datadir}/wine/windows/system/
+cp -r boost $RPM_BUILD_ROOT%{_includedir}
+install wlib/*.a $RPM_BUILD_ROOT%{_libdir}
+install wlib/*.dll $RPM_BUILD_ROOT%{_dlldir}
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(644,root,root,755)
-%{arch}/include/boost
-%{arch}/lib/*
+%{_includedir}/boost
+%{_libdir}/*.a
%files dll
%defattr(644,root,root,755)
-%{_datadir}/wine/windows/system/*
+%{_dlldir}/*.dll