+# TODO: fix serialization
#
# Conditional build:
-%bcond_with serialization # enable Boost Serialization
+%bcond_without context # Boost Context and dependent modules [gas+PE not supported by upstream]
+%bcond_with serialization # Boost Serialization [broken for MinGW in 1.61: https://svn.boost.org/trac/boost/ticket/12205]
#
%define realname boost
Summary: The Boost C++ Libraries - MinGW32 cross version
Summary(pl.UTF-8): Biblioteki C++ "Boost" - wersja skrośna dla MinGW32
Name: crossmingw32-%{realname}
-Version: 1.44.0
+Version: 1.61.0
%define fver %(echo %{version} | tr . _)
Release: 1
License: Boost Software License and others
Group: Development/Libraries
Source0: http://downloads.sourceforge.net/boost/%{realname}_%{fver}.tar.bz2
-# Source0-md5: f02578f5218f217a9f20e9c30e119c6a
+# Source0-md5: 6095876341956f65f9d35939ccea1a9f
+Patch0: boost-windows-decl.patch
URL: http://www.boost.org/
-BuildRequires: boost-jam >= 3.1.12
BuildRequires: crossmingw32-bzip2
BuildRequires: crossmingw32-gcc-c++
BuildRequires: crossmingw32-runtime
BuildRequires: crossmingw32-w32api
BuildRequires: crossmingw32-zlib
-%{?with_serialization:BuildRequires: wine-programs}
Requires: crossmingw32-bzip2
Requires: crossmingw32-runtime
Requires: crossmingw32-zlib
# arch-specific flags (like alpha's -mieee) are not valid for i386 gcc
%define optflags -O2
%endif
+# -z options are invalid for mingw linker, most of -f options are Linux-specific
+%define filterout_ld -Wl,-z,.*
+%define filterout_c -f[-a-z0-9=]*
+%define filterout_cxx -f[-a-z0-9=]*
+
+%define abi_tag 1_61
%description
The Boost web site provides free peer-reviewed portable C++ source
%prep
%setup -q -n %{realname}_%{fver}
+%patch0 -p1
-echo 'using gcc : : %{target}-g++ : <cxxflags>"%{rpmcxxflags}"' \
- '<archiver>%{target}-ar ;' >tools/build/v2/user-config.jam
+echo 'using gcc : : %{target}-g++ : ' \
+ '<cxxflags>"%{rpmcxxflags}"' \
+ '<archiver>%{target}-ar' \
+ '<rc>%{target}-windres ;' >tools/build/src/user-config.jam
-%build
-%if %{with serialization}
-export WINEPREFIX=`pwd`/wineprefix
-install -d wineprefix/drive_c/windows/system32
-install %{_prefix}/bin/mingwm10.dll wineprefix/drive_c/windows/system32/
-%endif
+# use Windows Message Compiler, not Midnight Commander
+%{__sed} -i -e 's,mc $(MCFLAGS),%{target}-windmc $(MCFLAGS),' tools/build/src/tools/mc.jam
-bjam \
+%build
+./bootstrap.sh --prefix=%{_prefix}
+./b2 \
-d2 \
- --layout=versioned \
+ %{_smp_mflags} \
-sBZIP2_BINARY=bzip2 \
- --toolset=gcc \
+ --layout=versioned \
+ %{!?with_context:--without-context --without-coroutine --without-coroutine2} \
--without-python \
%{!?with_serialization:--without-serialization} \
--without-test \
- variant=release \
+ abi=ms \
+ binary-format=pe \
debug-symbols=on \
inlining=on \
link=static,shared \
target-os=windows \
+ threadapi=win32 \
threading=multi \
- threadapi=win32
+ toolset=gcc \
+ variant=release
%if 0%{!?debug:1}
%{target}-strip stage/lib/*.dll
%files
%defattr(644,root,root,755)
-%{_libdir}/libboost_*-mgw*-mt-1_44.dll.a
-%{_libdir}/libboost_*-mgw*-mt.dll.a
+%{_libdir}/libboost_atomic-mgw*-mt-%{abi_tag}.dll.a
+%{_libdir}/libboost_chrono-mgw*-mt-%{abi_tag}.dll.a
+%{_libdir}/libboost_container-mgw*-mt-%{abi_tag}.dll.a
+%{?with_context:%{_libdir}/libboost_context-mgw*-mt-%{abi_tag}.dll.a}
+%{?with_context:%{_libdir}/libboost_coroutine-mgw*-mt-%{abi_tag}.dll.a}
+%{_libdir}/libboost_date_time-mgw*-mt-%{abi_tag}.dll.a
+%{_libdir}/libboost_filesystem-mgw*-mt-%{abi_tag}.dll.a
+%{_libdir}/libboost_graph-mgw*-mt-%{abi_tag}.dll.a
+%{_libdir}/libboost_iostreams-mgw*-mt-%{abi_tag}.dll.a
+%{_libdir}/libboost_locale-mgw*-mt-%{abi_tag}.dll.a
+%{_libdir}/libboost_log-mgw*-mt-%{abi_tag}.dll.a
+%{_libdir}/libboost_log_setup-mgw*-mt-%{abi_tag}.dll.a
+%{_libdir}/libboost_math_c99-mgw*-mt-%{abi_tag}.dll.a
+%{_libdir}/libboost_math_c99f-mgw*-mt-%{abi_tag}.dll.a
+%{_libdir}/libboost_math_c99l-mgw*-mt-%{abi_tag}.dll.a
+%{_libdir}/libboost_math_tr1-mgw*-mt-%{abi_tag}.dll.a
+%{_libdir}/libboost_math_tr1f-mgw*-mt-%{abi_tag}.dll.a
+%{_libdir}/libboost_math_tr1l-mgw*-mt-%{abi_tag}.dll.a
+%{_libdir}/libboost_program_options-mgw*-mt-%{abi_tag}.dll.a
+%{_libdir}/libboost_random-mgw*-mt-%{abi_tag}.dll.a
+%{_libdir}/libboost_regex-mgw*-mt-%{abi_tag}.dll.a
+%{?with_serialization:%{_libdir}/libboost_serialization-mgw*-mt-%{abi_tag}.dll.a}
+%{_libdir}/libboost_signals-mgw*-mt-%{abi_tag}.dll.a
+%{_libdir}/libboost_system-mgw*-mt-%{abi_tag}.dll.a
+%{_libdir}/libboost_thread_win32-mgw*-mt-%{abi_tag}.dll.a
+%{_libdir}/libboost_timer-mgw*-mt-%{abi_tag}.dll.a
+%{_libdir}/libboost_type_erasure-mgw*-mt-%{abi_tag}.dll.a
+%{_libdir}/libboost_wave-mgw*-mt-%{abi_tag}.dll.a
+%{?with_serialization:%{_libdir}/libboost_wserialization-mgw*-mt-%{abi_tag}.dll.a}
+# static-only
+%{_libdir}/libboost_exception-mgw*-mt-%{abi_tag}.a
+%{_libdir}/libboost_unit_test_framework-mgw*-mt-%{abi_tag}.a
%{_includedir}/boost
%files static
%defattr(644,root,root,755)
-%{_libdir}/libboost_*-mgw*-mt-1_44.a
-%{_libdir}/libboost_*-mgw*-mt.a
+%{_libdir}/libboost_atomic-mgw*-mt-%{abi_tag}.a
+%{_libdir}/libboost_chrono-mgw*-mt-%{abi_tag}.a
+%{_libdir}/libboost_container-mgw*-mt-%{abi_tag}.a
+%{?with_context:%{_libdir}/libboost_context-mgw*-mt-%{abi_tag}.a}
+%{?with_context:%{_libdir}/libboost_coroutine-mgw*-mt-%{abi_tag}.a}
+%{_libdir}/libboost_date_time-mgw*-mt-%{abi_tag}.a
+%{_libdir}/libboost_filesystem-mgw*-mt-%{abi_tag}.a
+%{_libdir}/libboost_graph-mgw*-mt-%{abi_tag}.a
+%{_libdir}/libboost_iostreams-mgw*-mt-%{abi_tag}.a
+%{_libdir}/libboost_locale-mgw*-mt-%{abi_tag}.a
+%{_libdir}/libboost_log-mgw*-mt-%{abi_tag}.a
+%{_libdir}/libboost_log_setup-mgw*-mt-%{abi_tag}.a
+%{_libdir}/libboost_math_c99-mgw*-mt-%{abi_tag}.a
+%{_libdir}/libboost_math_c99f-mgw*-mt-%{abi_tag}.a
+%{_libdir}/libboost_math_c99l-mgw*-mt-%{abi_tag}.a
+%{_libdir}/libboost_math_tr1-mgw*-mt-%{abi_tag}.a
+%{_libdir}/libboost_math_tr1f-mgw*-mt-%{abi_tag}.a
+%{_libdir}/libboost_math_tr1l-mgw*-mt-%{abi_tag}.a
+%{_libdir}/libboost_program_options-mgw*-mt-%{abi_tag}.a
+%{_libdir}/libboost_random-mgw*-mt-%{abi_tag}.a
+%{_libdir}/libboost_regex-mgw*-mt-%{abi_tag}.a
+%{?with_serialization:%{_libdir}/libboost_serialization-mgw*-mt-%{abi_tag}.a}
+%{_libdir}/libboost_signals-mgw*-mt-%{abi_tag}.a
+%{_libdir}/libboost_system-mgw*-mt-%{abi_tag}.a
+%{_libdir}/libboost_thread_win32-mgw*-mt-%{abi_tag}.a
+%{_libdir}/libboost_timer-mgw*-mt-%{abi_tag}.a
+%{_libdir}/libboost_type_erasure-mgw*-mt-%{abi_tag}.a
+%{_libdir}/libboost_wave-mgw*-mt-%{abi_tag}.a
+%{?with_serialization:%{_libdir}/libboost_wserialization-mgw*-mt-%{abi_tag}.a}
%files dll
%defattr(644,root,root,755)
-%{_dlldir}/libboost_*-mgw*-mt-*.dll
+%{_dlldir}/libboost_atomic-mgw*-mt-%{abi_tag}.dll
+%{_dlldir}/libboost_chrono-mgw*-mt-%{abi_tag}.dll
+%{_dlldir}/libboost_container-mgw*-mt-%{abi_tag}.dll
+%{?with_context:%{_dlldir}/libboost_context-mgw*-mt-%{abi_tag}.dll}
+%{?with_context:%{_dlldir}/libboost_coroutine-mgw*-mt-%{abi_tag}.dll}
+%{_dlldir}/libboost_date_time-mgw*-mt-%{abi_tag}.dll
+%{_dlldir}/libboost_filesystem-mgw*-mt-%{abi_tag}.dll
+%{_dlldir}/libboost_graph-mgw*-mt-%{abi_tag}.dll
+%{_dlldir}/libboost_iostreams-mgw*-mt-%{abi_tag}.dll
+%{_dlldir}/libboost_locale-mgw*-mt-%{abi_tag}.dll
+%{_dlldir}/libboost_log-mgw*-mt-%{abi_tag}.dll
+%{_dlldir}/libboost_log_setup-mgw*-mt-%{abi_tag}.dll
+%{_dlldir}/libboost_math_c99-mgw*-mt-%{abi_tag}.dll
+%{_dlldir}/libboost_math_c99f-mgw*-mt-%{abi_tag}.dll
+%{_dlldir}/libboost_math_c99l-mgw*-mt-%{abi_tag}.dll
+%{_dlldir}/libboost_math_tr1-mgw*-mt-%{abi_tag}.dll
+%{_dlldir}/libboost_math_tr1f-mgw*-mt-%{abi_tag}.dll
+%{_dlldir}/libboost_math_tr1l-mgw*-mt-%{abi_tag}.dll
+%{_dlldir}/libboost_program_options-mgw*-mt-%{abi_tag}.dll
+%{_dlldir}/libboost_random-mgw*-mt-%{abi_tag}.dll
+%{_dlldir}/libboost_regex-mgw*-mt-%{abi_tag}.dll
+%{?with_serialization:%{_dlldir}/libboost_serialization-mgw*-mt-%{abi_tag}.dll}
+%{_dlldir}/libboost_signals-mgw*-mt-%{abi_tag}.dll
+%{_dlldir}/libboost_system-mgw*-mt-%{abi_tag}.dll
+%{_dlldir}/libboost_thread_win32-mgw*-mt-%{abi_tag}.dll
+%{_dlldir}/libboost_timer-mgw*-mt-%{abi_tag}.dll
+%{_dlldir}/libboost_type_erasure-mgw*-mt-%{abi_tag}.dll
+%{_dlldir}/libboost_wave-mgw*-mt-%{abi_tag}.dll
+%{?with_serialization:%{_dlldir}/libboost_wserialization-mgw*-mt-%{abi_tag}.dll}