]> git.pld-linux.org Git - packages/boost.git/blobdiff - boost.spec
- fix known compilation breakage
[packages/boost.git] / boost.spec
index 3da20a6ad0b6e5331c09f1f6a719dae79fbd38da..0e1ca5f872d30d519894c8c06e8ea00c0e107578 100644 (file)
@@ -4,79 +4,33 @@
 #      - split shared libs from core package into -iostreams/-serialization.
 #
 # Conditional build:
-%bcond_without python  # without boost-python support
-#
+%bcond_without python2         # without boost-python2 support
+%bcond_without python3         # without boost-python3 support
+
 %define                fver    %(echo %{version} | tr . _)
 Summary:       The Boost C++ Libraries
 Summary(pl.UTF-8):     Biblioteki C++ "Boost"
 Name:          boost
-Version:       1.54.0
+Version:       1.59.0
 Release:       4
 License:       Boost Software License and others
 Group:         Libraries
 Source0:       http://downloads.sourceforge.net/boost/%{name}_%{fver}.tar.bz2
-# Source0-md5: 15cb8c0803064faef0c4ddf5bc5ca279
+# Source0-md5: 6aa9a5c6a4ca1016edd0ed1178e3cb87
 Patch0:                %{name}-link.patch
-Patch1:                %{name}-stdint.patch
-
-# Upstream patches posted as release notes:
-# http://www.boost.org/users/history/version_1_54_0.html
-Patch100: 001-coroutine.patch
-Patch101: 002-date-time.patch
-Patch102: 003-log.patch
-
+Patch1:                %{name}-x32-context.patch
+Patch2:                %{name}-clean-gcc-flags.patch
+# https://svn.boost.org/trac/boost/ticket/11549
+Patch3:                Boost.Log-regression.patch
 # FC Patches:
-# https://svn.boost.org/trac/boost/ticket/8826
-Patch200: boost-1.54.0-context-execstack.patch
-# https://svn.boost.org/trac/boost/ticket/8844
-Patch201: boost-1.54.0-bind-static_assert.patch
-# https://svn.boost.org/trac/boost/ticket/8847
-Patch202: boost-1.54.0-concept-unused_typedef.patch
 # https://svn.boost.org/trac/boost/ticket/5637
-Patch203: boost-1.54.0-mpl-print.patch
-# https://svn.boost.org/trac/boost/ticket/8859
-Patch204: boost-1.54.0-static_warning-unused_typedef.patch
-# https://svn.boost.org/trac/boost/ticket/8855
-Patch205: boost-1.54.0-math-unused_typedef.patch
-Patch206: boost-1.54.0-math-unused_typedef-2.patch
-# https://svn.boost.org/trac/boost/ticket/8853
-Patch207: boost-1.54.0-tuple-unused_typedef.patch
-# https://svn.boost.org/trac/boost/ticket/8854
-Patch208: boost-1.54.0-random-unused_typedef.patch
-# https://svn.boost.org/trac/boost/ticket/8856
-Patch209: boost-1.54.0-date_time-unused_typedef.patch
-Patch210: boost-1.54.0-date_time-unused_typedef-2.patch
+Patch203:      %{name}-1.54.0-mpl-print.patch
 # https://svn.boost.org/trac/boost/ticket/8870
-Patch211: boost-1.54.0-spirit-unused_typedef.patch
-Patch212: boost-1.54.0-spirit-unused_typedef-2.patch
-# https://svn.boost.org/trac/boost/ticket/8871
-Patch213: boost-1.54.0-numeric-unused_typedef.patch
-# https://svn.boost.org/trac/boost/ticket/8872
-Patch214: boost-1.54.0-multiprecision-unused_typedef.patch
-# https://svn.boost.org/trac/boost/ticket/8874
-Patch215: boost-1.54.0-unordered-unused_typedef.patch
-# https://svn.boost.org/trac/boost/ticket/8876
-Patch216: boost-1.54.0-algorithm-unused_typedef.patch
-# https://svn.boost.org/trac/boost/ticket/8877
-Patch217: boost-1.54.0-graph-unused_typedef.patch
+Patch212:      %{name}-1.54.0-spirit-unused_typedef-2.patch
 # https://svn.boost.org/trac/boost/ticket/8878
-Patch218: boost-1.54.0-locale-unused_typedef.patch
-# https://svn.boost.org/trac/boost/ticket/8879
-Patch219: boost-1.54.0-property_tree-unused_typedef.patch
-# https://svn.boost.org/trac/boost/ticket/8880
-Patch220: boost-1.54.0-xpressive-unused_typedef.patch
+Patch218:      %{name}-1.54.0-locale-unused_typedef.patch
 # https://svn.boost.org/trac/boost/ticket/8881
-Patch221: boost-1.54.0-mpi-unused_typedef.patch
-# https://svn.boost.org/trac/boost/ticket/8888
-Patch222: boost-1.54.0-python-unused_typedef.patch
-# https://svn.boost.org/trac/boost/ticket/8941
-Patch223: boost-1.54.0-lexical_cast-int128.patch
-# https://svn.boost.org/trac/boost/ticket/9038
-Patch224: boost-1.54.0-pool-test_linking.patch
-# https://svn.boost.org/trac/boost/ticket/9037
-Patch225: boost-1.54.0-thread-cond_variable_shadow.patch
-# https://svn.boost.org/trac/boost/ticket/9041
-Patch226: boost-1.54.0-thread-link_atomic.patch
+Patch221:      %{name}-1.54.0-mpi-unused_typedef.patch
 URL:           http://www.boost.org/
 BuildRequires: bzip2-devel
 BuildRequires: expat-devel
@@ -84,6 +38,7 @@ BuildRequires:        libicu-devel
 BuildRequires: libstdc++-devel
 BuildRequires: perl-base
 %{?with_python:BuildRequires:  python-devel >= 2.2}
+%{?with_python3:BuildRequires: python3-devel}
 BuildRequires: rpm-pythonprov
 BuildRequires: zlib-devel
 BuildConflicts:        gcc = 5:3.3.1
@@ -120,6 +75,7 @@ Requires:    %{name}-date_time = %{version}-%{release}
 Requires:      %{name}-filesystem = %{version}-%{release}
 Requires:      %{name}-graph = %{version}-%{release}
 Requires:      %{name}-locale = %{version}-%{release}
+Requires:      %{name}-log = %{version}-%{release}
 Requires:      %{name}-program_options = %{version}-%{release}
 Requires:      %{name}-regex = %{version}-%{release}
 Requires:      %{name}-signals = %{version}-%{release}
@@ -182,53 +138,117 @@ Static version of base Boost C++ libraries.
 %description static -l pl.UTF-8
 Statyczne wersje podstawowych bibliotek C++ Boost.
 
+%package python-devel-common
+Summary:       Boost.Python development headers
+Summary(pl.UTF-8):     Pliki nagłówkowe biblioteki Boost.Python
+Group:         Development/Libraries
+Requires:      %{name}-devel = %{version}-%{release}
+
+%description python-devel-common
+Headers for the Boost.Python library.
+
+%description python-devel-common -l pl.UTF-8
+Pliki nagłówkowe biblioteki Boost.Python.
+
 %package python
-Summary:       Boost.Python library
-Summary(pl.UTF-8):     biblioteka Boost.Python
+Summary:       Boost.Python library for Python 2
+Summary(pl.UTF-8):     Biblioteka Boost.Python dla Pythona 2
 Group:         Libraries
-%pyrequires_eq python
+Requires:      python-libs
 
 %description python
 Use the Boost Python Library to quickly and easily export a C++
-library to Python such that the Python interface is very similar to
-the C++ interface. It is designed to be minimally intrusive on your
+library to Python 2 such that the Python 2 interface is very similar
+to the C++ interface. It is designed to be minimally intrusive on your
 C++ design. In most cases, you should not have to alter your C++
 classes in any way in order to use them with Boost.Python. The system
-should simply ``reflect'' your C++ classes and functions into Python.
+should simply ``reflect'' your C++ classes and functions into Python
+3.
 
 %description python -l pl.UTF-8
 Biblioteka Boost Python służy do szybkiego i prostego eksportu
-biblioteki C++ do Pythona, tak że interfejs Pythona jest bardzo
+biblioteki C++ do Pythona 2, tak że interfejs Pythona 2 jest bardzo
 podobny do interfejsu C++. Biblioteka jest zaprojektowana tak, żeby
 narzucać jak najmniej wymagań dotyczących konstrukcjii C++. W
 większości przypadków nie trzeba w ogóle zmieniać własnych klas C++,
 żeby używać ich z Boost.Python. System powinien po prostu ,,odbić''
-klasy C++ i funkcje do Pythona.
+klasy C++ i funkcje do Pythona 3.
 
 %package python-devel
-Summary:       Boost.Python development headers
-Summary(pl.UTF-8):     Pliki nagłówkowe dla Boost.Python
+Summary:       Boost.Python development files for Python 2
+Summary(pl.UTF-8):     Pliki programistyczne biblioteki Boost.Python dla Pythona 2
 Group:         Development/Libraries
 Requires:      %{name}-devel = %{version}-%{release}
 Requires:      %{name}-python = %{version}-%{release}
+Requires:      %{name}-python-devel-common = %{version}-%{release}
 
 %description python-devel
-Headers for the Boost.Python library.
+Boost.Python development files for Python 2.
 
 %description python-devel -l pl.UTF-8
-Pliki nagłówkowe dla biblioteki Boost.Python.
+Pliki programistyczne biblioteki Boost.Python dla Pythona 2.
 
 %package python-static
-Summary:       Static version of Boost.Python library
-Summary(pl.UTF-8):     Statyczna wersja biblioteki Boost.Python
+Summary:       Static version of Boost.Python library for Python 2
+Summary(pl.UTF-8):     Statyczna wersja biblioteki Boost.Python dla Pythona 2
 Group:         Development/Libraries
 Requires:      %{name}-python-devel = %{version}-%{release}
 
 %description python-static
-Static version of Boost.Python library.
+Static version of Boost.Python library for Python 2.
 
 %description python-static -l pl.UTF-8
-Statyczna wersja biblioteki Boost.Python.
+Statyczna wersja biblioteki Boost.Python dla Pythona 2.
+
+%package python3
+Summary:       Boost.Python library for Python 3
+Summary(pl.UTF-8):     biblioteka Boost.Python dla Pythona 3
+Group:         Libraries
+Requires:      python3-libs
+
+%description python3
+Use the Boost Python Library to quickly and easily export a C++
+library to Python 3 such that the Python 3 interface is very similar
+to the C++ interface. It is designed to be minimally intrusive on your
+C++ design. In most cases, you should not have to alter your C++
+classes in any way in order to use them with Boost.Python. The system
+should simply ``reflect'' your C++ classes and functions into Python
+3.
+
+%description python3 -l pl.UTF-8
+Biblioteka Boost Python służy do szybkiego i prostego eksportu
+biblioteki C++ do Pythona 3, tak że interfejs Pythona 3 jest bardzo
+podobny do interfejsu C++. Biblioteka jest zaprojektowana tak, żeby
+narzucać jak najmniej wymagań dotyczących konstrukcjii C++. W
+większości przypadków nie trzeba w ogóle zmieniać własnych klas C++,
+żeby używać ich z Boost.Python. System powinien po prostu ,,odbić''
+klasy C++ i funkcje do Pythona 3.
+
+%package python3-devel
+Summary:       Boost.Python development files for Python 3
+Summary(pl.UTF-8):     Pliki programistyczne biblioteki Boost.Python dla Pythona 3
+Group:         Development/Libraries
+Requires:      %{name}-devel = %{version}-%{release}
+Requires:      %{name}-python3 = %{version}-%{release}
+Requires:      %{name}-python-devel-common = %{version}-%{release}
+
+%description python3-devel
+Boost.Python development files for Python 3.
+
+%description python3-devel -l pl.UTF-8
+Pliki programistyczne biblioteki Boost.Python dla Pythona 3.
+
+%package python3-static
+Summary:       Static version of Boost.Python library for Python 3
+Summary(pl.UTF-8):     Statyczna wersja biblioteki Boost.Python dla Pythona 3
+Group:         Development/Libraries
+Requires:      %{name}-python3-devel = %{version}-%{release}
+
+%description python3-static
+Static version of Boost.Python library for Python 3.
+
+%description python3-static -l pl.UTF-8
+Statyczna wersja biblioteki Boost.Python dla Pythona 3.
 
 %package chrono
 Summary:       Useful time utilities
@@ -427,7 +447,9 @@ Boost.Wave - zgodna ze standardem biblioteka preprocesora C++.
 Summary:       Boost C++ Library documentation
 Summary(pl.UTF-8):     Dokumentacja dla biblioteki Boost C++
 Group:         Documentation
-Requires:      %{name}-devel = %{version}-%{release}
+%if "%{_rpmversion}" >= "5"
+BuildArch:     noarch
+%endif
 
 %description doc
 Documentation for the Boost C++ Library.
@@ -438,69 +460,61 @@ Dokumentacja dla biblioteki Boost C++.
 %prep
 %setup -q -n %{name}_%{fver}
 %patch0 -p1
-%patch1 -p2
-
-%patch100 -p1
-%patch101 -p1
-%patch102 -p1
+%patch1 -p1
+%patch2 -p1
+%patch3 -p1
 
-%patch200 -p1
-%patch201 -p1
-%patch202 -p1
 %patch203 -p0
-%patch204 -p1
-%patch205 -p1
-%patch206 -p0
-%patch207 -p0
-%patch208 -p0
-%patch209 -p0
-%patch210 -p1
-%patch211 -p1
 %patch212 -p1
-%patch213 -p1
-%patch214 -p1
-%patch215 -p1
-%patch216 -p1
-%patch217 -p1
 %patch218 -p1
-%patch219 -p1
-%patch220 -p1
 %patch221 -p1
-%patch222 -p1
-%patch223 -p0
-%patch224 -p1
-%patch225 -p1
-%patch226 -p1
-
-# - don't know how to pass it through (b)jam -s (no way?)
-#   due to oversophisticated build flags system.
-# - pass -fPIC due to <shared-linkable> removal.
-%{__sed} -i "s/<optimization>speed : -O3/<optimization>speed : ${CXXFLAGS:-%rpmcxxflags} -fPIC/" tools/build/v2/tools/gcc.jam
-
-# cleanup -g switch to avoid override debuginfocflags.
-%{__sed} -i 's/<debug-symbols>on : -g/<debug-symbols>on :/' tools/build/v2/tools/gcc.jam
-# link against shared expat library.
-%{__sed} -i 's:find-static:find-shared:' libs/graph/build/Jamfile.v2
-
-cat << EOF > tools/build/v2/user-config.jam
-using gcc : %(%{__cxx} -dumpversion) : %{__cxx} ;
+
+cat << EOF > tools/build/src/user-config.jam
+using gcc : %{cxx_version} : %{__cxx} : <cflags>"%{rpmcflags} -fPIC" <cxxflags>"%{rpmcxxflags} -fPIC" <linkflags>"%{rpmldflags}" ;
 EOF
 
+# cleanup backups after patching
+find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f
+
 %build
-%if %{with python}
-PYTHON_VERSION=$(%{__python} -c 'import sys; print sys.version[0:3]')
-PYTHON_ROOT=%{_prefix}
-%else
-PYTHON_ROOT=
-PYTHON_VERSION=
-%endif
 EXPAT_INCLUDE=%{_includedir} \
 EXPAT_LIBPATH=%{_libdir} \
 ICU_PATH=%{_prefix} \
-./bootstrap.sh --prefix=%{_prefix}
+./bootstrap.sh \
+       --prefix=%{_prefix} \
+       -without-libraries=python
+
 ./b2 \
        -d2 --toolset=gcc \
-       variant=release debug-symbols=on inlining=on link=static,shared threading=multi
+       variant=release \
+       debug-symbols=on \
+       inlining=on \
+       link=static,shared \
+       threading=multi
+
+%if %{with python3}
+echo "using python : %{py3_ver}m : %{py3_prefix} : %{py3_incdir} ;" >> project-config.jam
+./b2 \
+       --with-python python=%{py3_ver}m \
+       -a -d2 --toolset=gcc \
+       variant=release \
+       debug-symbols=on \
+       inlining=on \
+       link=static,shared \
+       threading=multi
+%endif
+
+%if %{with python2}
+echo "using python : %{py_ver} : %{py_prefix} : %{py_incdir} ;" >> project-config.jam
+./b2 \
+       --with-python python=%{py_ver} \
+       -a -d2 --toolset=gcc \
+       variant=release \
+       debug-symbols=on \
+       inlining=on \
+       link=static,shared \
+       threading=multi
+%endif
 
 %install
 rm -rf $RPM_BUILD_ROOT
@@ -586,6 +600,9 @@ rm -rf $RPM_BUILD_ROOT
 %post  python -p /sbin/ldconfig
 %postun        python -p /sbin/ldconfig
 
+%post  python3 -p /sbin/ldconfig
+%postun        python3 -p /sbin/ldconfig
+
 %post  program_options -p /sbin/ldconfig
 %postun        program_options -p /sbin/ldconfig
 
@@ -613,6 +630,8 @@ rm -rf $RPM_BUILD_ROOT
 %files
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_libdir}/libboost_atomic.so.*.*.*
+%attr(755,root,root) %{_libdir}/libboost_container.so.*.*.*
+%attr(755,root,root) %{_libdir}/libboost_coroutine.so.*.*.*
 %attr(755,root,root) %{_libdir}/libboost_iostreams.so.*.*.*
 %attr(755,root,root) %{_libdir}/libboost_math_*.so.*.*.*
 %attr(755,root,root) %{_libdir}/libboost_random.so.*.*.*
@@ -623,7 +642,9 @@ rm -rf $RPM_BUILD_ROOT
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_libdir}/libboost_atomic.so
 %attr(755,root,root) %{_libdir}/libboost_chrono.so
+%attr(755,root,root) %{_libdir}/libboost_container.so
 %attr(755,root,root) %{_libdir}/libboost_context.so
+%attr(755,root,root) %{_libdir}/libboost_coroutine.so
 %attr(755,root,root) %{_libdir}/libboost_date_time.so
 %attr(755,root,root) %{_libdir}/libboost_filesystem.so
 %attr(755,root,root) %{_libdir}/libboost_graph.so
@@ -652,6 +673,7 @@ rm -rf $RPM_BUILD_ROOT
 %defattr(644,root,root,755)
 %{_libdir}/libboost_atomic.a
 %{_libdir}/libboost_chrono.a
+%{_libdir}/libboost_container.a
 %{_libdir}/libboost_context.a
 %{_libdir}/libboost_coroutine.a
 %{_libdir}/libboost_date_time.a
@@ -677,7 +699,14 @@ rm -rf $RPM_BUILD_ROOT
 %{_libdir}/libboost_wave.a
 %{_libdir}/libboost_wserialization.a
 
-%if %{with python}
+%if %{with python2} || %{with python3}
+%files python-devel-common
+%defattr(644,root,root,755)
+%{_includedir}/boost/python
+%{_includedir}/boost/python.hpp
+%endif
+
+%if %{with python2}
 %files python
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_libdir}/libboost_python.so.*.*.*
@@ -685,14 +714,26 @@ rm -rf $RPM_BUILD_ROOT
 %files python-devel
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_libdir}/libboost_python.so
-%{_includedir}/boost/python
-%{_includedir}/boost/python.hpp
 
 %files python-static
 %defattr(644,root,root,755)
 %{_libdir}/libboost_python.a
 %endif
 
+%if %{with python3}
+%files python3
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libboost_python3.so.*.*.*
+
+%files python3-devel
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libboost_python3.so
+
+%files python3-static
+%defattr(644,root,root,755)
+%{_libdir}/libboost_python3.a
+%endif
+
 %files chrono
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_libdir}/libboost_chrono.so.*.*.*
This page took 0.046917 seconds and 4 git commands to generate.