diff --git a/boost-1.63.0-VERSION-parameter.patch b/boost-1.63.0-VERSION-parameter.patch new file mode 100644 index 0000000..9017dbd --- /dev/null +++ b/boost-1.63.0-VERSION-parameter.patch @@ -0,0 +1,33 @@ +--- boost_1_63_0/boost/test/impl/unit_test_parameters.ipp.orig 2017-08-09 18:45:45.223055629 +0100 ++++ boost_1_63_0/boost/test/impl/unit_test_parameters.ipp 2017-08-09 18:45:48.815050508 +0100 +@@ -99,7 +99,7 @@ + + std::string HELP = "help"; + std::string USAGE = "usage"; +-std::string VERSION = "version"; ++std::string btrt_VERSION = "version"; + + //____________________________________________________________________________// + +@@ -638,10 +638,10 @@ + + /////////////////////////////////////////////// + +- rt::option version( VERSION, ( ++ rt::option version( btrt_VERSION, ( + rt::description = "Prints Boost.Test version and exits." + )); +- version.add_cla_id( "--", VERSION, " " ); ++ version.add_cla_id( "--", btrt_VERSION, " " ); + store.add( version ); + } + +@@ -676,7 +676,7 @@ + rt::finalize_arguments( s_parameters_store, s_arguments_store ); + + // Report help if requested +- if( runtime_config::get( VERSION ) ) { ++ if( runtime_config::get( btrt_VERSION ) ) { + parser->version( std::cerr ); + BOOST_TEST_I_THROW( framework::nothing_to_test( boost::exit_success ) ); + } diff --git a/boost-1.63.0-asio-ssl.patch b/boost-1.63.0-asio-ssl.patch new file mode 100644 index 0000000..4abed3d --- /dev/null +++ b/boost-1.63.0-asio-ssl.patch @@ -0,0 +1,25 @@ +From 2b6230aef8c819a2118196861c46a9011cfaf46e Mon Sep 17 00:00:00 2001 +From: Christopher Kohlhoff +Date: Sun, 5 Mar 2017 22:58:18 +1100 +Subject: [PATCH] Make sure asio/ssl/error.hpp is self-contained. + +--- + include/boost/asio/ssl/error.hpp | 1 + + test/ssl/Jamfile | 1 + + test/ssl/Jamfile.v2 | 2 ++ + test/ssl/error.cpp | 25 +++++++++++++++++++++++++ + 4 files changed, 29 insertions(+) + create mode 100644 test/ssl/error.cpp + +diff --git a/include/boost/asio/ssl/error.hpp b/include/boost/asio/ssl/error.hpp +index c7825e64..968902c5 100644 +--- a/include/boost/asio/ssl/error.hpp ++++ b/include/boost/asio/ssl/error.hpp +@@ -17,6 +17,7 @@ + + #include + #include ++#include + + #include + diff --git a/boost-1.63.0-config-cuda-version.patch b/boost-1.63.0-config-cuda-version.patch new file mode 100644 index 0000000..bf91c4b --- /dev/null +++ b/boost-1.63.0-config-cuda-version.patch @@ -0,0 +1,86 @@ +From 17a4997aaa05ce92237c73c82e6d8fb475a0abaf Mon Sep 17 00:00:00 2001 +From: jzmaddock +Date: Fri, 11 Aug 2017 19:38:00 +0100 +Subject: [PATCH 1/2] Update for CUDA version macro changes. + +--- + include/boost/config/compiler/nvcc.hpp | 15 ++++++++++++--- + 1 file changed, 12 insertions(+), 3 deletions(-) + +diff --git a/include/boost/config/compiler/nvcc.hpp b/include/boost/config/compiler/nvcc.hpp +index 43039b5c2..907eade96 100644 +--- a/include/boost/config/compiler/nvcc.hpp ++++ b/include/boost/config/compiler/nvcc.hpp +@@ -11,6 +11,15 @@ + # define BOOST_COMPILER "NVIDIA CUDA C++ Compiler" + #endif + ++#if defined(__CUDACC_VER_MAJOR__) && defined(__CUDACC_VER_MINOR__) && defined(__CUDACC_VER_BUILD__) ++# define BOOST_CUDA_VERSION __CUDACC_VER_MAJOR__ * 10000 + __CUDACC_VER_MINOR__ * 100 + __CUDACC_VER_BUILD__ ++#elif defined(__CUDACC_VER__) ++ define BOOST_CUDA_VERSION __CUDACC_VER__ ++#else ++// We don't really know what the CUDA version is, but it's definitely before 7.5: ++# define BOOST_CUDA_VERSION 70000 ++#endif ++ + // NVIDIA Specific support + // BOOST_GPU_ENABLED : Flag a function or a method as being enabled on the host and device + #define BOOST_GPU_ENABLED __host__ __device__ +@@ -19,11 +28,11 @@ + // https://svn.boost.org/trac/boost/ticket/11897 + // This is fixed in 7.5. As the following version macro was introduced in 7.5 an existance + // check is enough to detect versions < 7.5 +-#if !defined(__CUDACC_VER__) || (__CUDACC_VER__ < 70500) ++#if BOOST_CUDA_VERSION < 70500 + # define BOOST_NO_CXX11_VARIADIC_TEMPLATES + #endif + // The same bug is back again in 8.0: +-#if (__CUDACC_VER__ > 80000) && (__CUDACC_VER__ < 80100) ++#if (BOOST_CUDA_VERSION > 80000) && (BOOST_CUDA_VERSION < 80100) + # define BOOST_NO_CXX11_VARIADIC_TEMPLATES + #endif + // Most recent CUDA (8.0) has no constexpr support in msvc mode: + +From 593389dc4b4dae14e6d38bb1c81b7bf70ec21f26 Mon Sep 17 00:00:00 2001 +From: jzmaddock +Date: Fri, 18 Aug 2017 18:13:38 +0100 +Subject: [PATCH 2/2] Update nvcc.hpp + +--- + include/boost/config/compiler/nvcc.hpp | 12 +++++------- + 1 file changed, 5 insertions(+), 7 deletions(-) + +diff --git a/include/boost/config/compiler/nvcc.hpp b/include/boost/config/compiler/nvcc.hpp +index 907eade96..f21b9b54f 100644 +--- a/include/boost/config/compiler/nvcc.hpp ++++ b/include/boost/config/compiler/nvcc.hpp +@@ -12,12 +12,10 @@ + #endif + + #if defined(__CUDACC_VER_MAJOR__) && defined(__CUDACC_VER_MINOR__) && defined(__CUDACC_VER_BUILD__) +-# define BOOST_CUDA_VERSION __CUDACC_VER_MAJOR__ * 10000 + __CUDACC_VER_MINOR__ * 100 + __CUDACC_VER_BUILD__ +-#elif defined(__CUDACC_VER__) +- define BOOST_CUDA_VERSION __CUDACC_VER__ ++# define BOOST_CUDA_VERSION __CUDACC_VER_MAJOR__ * 1000000 + __CUDACC_VER_MINOR__ * 10000 + __CUDACC_VER_BUILD__ + #else + // We don't really know what the CUDA version is, but it's definitely before 7.5: +-# define BOOST_CUDA_VERSION 70000 ++# define BOOST_CUDA_VERSION 7000000 + #endif + + // NVIDIA Specific support +@@ -28,11 +26,11 @@ + // https://svn.boost.org/trac/boost/ticket/11897 + // This is fixed in 7.5. As the following version macro was introduced in 7.5 an existance + // check is enough to detect versions < 7.5 +-#if BOOST_CUDA_VERSION < 70500 ++#if BOOST_CUDA_VERSION < 7050000 + # define BOOST_NO_CXX11_VARIADIC_TEMPLATES + #endif + // The same bug is back again in 8.0: +-#if (BOOST_CUDA_VERSION > 80000) && (BOOST_CUDA_VERSION < 80100) ++#if (BOOST_CUDA_VERSION > 8000000) && (BOOST_CUDA_VERSION < 8010000) + # define BOOST_NO_CXX11_VARIADIC_TEMPLATES + #endif + // Most recent CUDA (8.0) has no constexpr support in msvc mode: diff --git a/boost-1.63.0-dual-python-build-v2.patch b/boost-1.63.0-dual-python-build-v2.patch new file mode 100644 index 0000000..dfb6ee1 --- /dev/null +++ b/boost-1.63.0-dual-python-build-v2.patch @@ -0,0 +1,129 @@ +--- boost_1_63_0/libs/mpi/build/Jamfile.v2 2016-12-22 06:33:17.000000000 -0600 ++++ boost_1_63_0/libs/mpi/build/Jamfile.v2 2017-05-19 01:45:05.485563800 -0500 +@@ -11,6 +11,7 @@ + import mpi ; + import indirect ; + import python ; ++import feature ; + + libraries = ; + +@@ -53,18 +54,38 @@ lib boost_mpi + ../../serialization/build//boost_serialization + /mpi//mpi [ mpi.extra-requirements ] + ; ++ ++rule cond ( test ? : yes * : no * ) { if $(test) { return $(yes) ; } else { return $(no) ; } } + + libraries += boost_mpi ; ++rule find-py3-version ++{ ++ local versions = [ feature.values python ] ; ++ local py3ver ; ++ for local v in $(versions) ++ { ++ if $(v) >= 3.0 ++ { ++ py3ver = $(v) ; ++ } ++ } ++ return $(py3ver) ; ++} ++ ++py3-version = [ find-py3-version ] ; + + if [ python.configured ] + { +- lib boost_mpi_python ++ ++ rule lib_boost_mpi_python ( is-py3 ? ) { ++ ++ lib [ cond $(is-py3) : boost_mpi_python3 : boost_mpi_python ] + : # Sources + python/serialize.cpp + : # Requirements + boost_mpi + /mpi//mpi [ mpi.extra-requirements ] +- /boost/python//boost_python ++ [ cond $(is-py3) : /boost/python//boost_python3 : /boost/python//boost_python ] + shared:BOOST_MPI_DYN_LINK=1 + shared:BOOST_MPI_PYTHON_DYN_LINK=1 + shared:BOOST_PYTHON_DYN_LINK=1 +@@ -76,7 +97,6 @@ libraries += boost_mpi ; + : # Usage requirements + /mpi//mpi [ mpi.extra-requirements ] + ; +- libraries += boost_mpi_python ; + + python-extension mpi + : # Sources +@@ -93,8 +113,8 @@ libraries += boost_mpi ; + python/status.cpp + python/py_timer.cpp + : # Requirements +- /boost/python//boost_python +- boost_mpi_python ++ [ cond $(is-py3) : /boost/python//boost_python3 : /boost/python//boost_python ] ++ [ cond $(is-py3) : boost_mpi_python3 : boost_mpi_python ] + boost_mpi + /mpi//mpi [ mpi.extra-requirements ] + shared:BOOST_MPI_DYN_LINK=1 +@@ -102,6 +122,16 @@ libraries += boost_mpi ; + shared:BOOST_PYTHON_DYN_LINK=1 + shared shared + ; ++ } ++ ++ if $(py3-version) { ++ lib_boost_mpi_python yes ; ++ libraries += boost_mpi_python3 ; ++ } else { ++ lib_boost_mpi_python ; ++ libraries += boost_mpi_python ; ++ } ++ + } + } + else if ! ( --without-mpi in [ modules.peek : ARGV ] ) +--- boost_1_63_0/libs/python/build/Jamfile 2017-05-19 02:33:53.600132400 -0500 ++++ boost_1_63_0/libs/python/build/Jamfile 2017-05-19 01:50:43.746550000 -0500 +@@ -140,7 +140,7 @@ rule lib_boost_numpy ( is-py3 ? ) + [ cond [ python.numpy ] : /python//python_for_extensions ] + [ unless [ python.numpy ] : no ] + $(numpy-include) +- boost_python ++ [ cond $(is-py3) : boost_python3 : boost_python ] + on:BOOST_DEBUG_PYTHON + [ cond $(is-py3) : $(py3-version) ] + +@@ -154,22 +154,25 @@ rule lib_boost_numpy ( is-py3 ? ) + ; + } + +-libraries = boost_python ; ++libraries2 = boost_python ; + libraries3 = boost_python3 ; + if [ python.numpy ] + { +- libraries += boost_numpy ; ++ libraries2 += boost_numpy ; + libraries3 += boost_numpy3 ; + } + +-lib_boost_python ; +-lib_boost_numpy ; +- + if $(py3-version) + { + lib_boost_python yes ; + lib_boost_numpy yes ; + libraries += $(libraries3) ; + } ++else ++{ ++ lib_boost_python ; ++ lib_boost_numpy ; ++ libraries += $(libraries2) ; ++} + + boost-install $(libraries) ; diff --git a/boost-1.63.0-dual-python-build.patch b/boost-1.63.0-dual-python-build.patch deleted file mode 100644 index d20b262..0000000 --- a/boost-1.63.0-dual-python-build.patch +++ /dev/null @@ -1,46 +0,0 @@ ---- boost_1_63_0/tools/build/src/tools/python.jam.orig 2017-02-16 18:51:14.005483084 +0000 -+++ boost_1_63_0/tools/build/src/tools/python.jam 2017-02-16 18:51:24.912497496 +0000 -@@ -926,27 +926,27 @@ - # for a particular target OS as the default. This makes it so that we can - # select a python interpreter with only knowledge of the target OS. And hence - # can configure different Pythons based on the target OS only. -- local toolset-requirements = [ toolset.requirements ] ; -- local toolset-target-os-requirements -- = [ property.evaluate-conditionals-in-context -- [ $(toolset-requirements).raw ] : $(target-os) ] ; -- if ! in $(toolset-target-os-requirements:G) -- { -- toolset.add-requirements $(target-os):$(version:E=default) ; -- } -+ #local toolset-requirements = [ toolset.requirements ] ; -+ #local toolset-target-os-requirements -+ # = [ property.evaluate-conditionals-in-context -+ # [ $(toolset-requirements).raw ] : $(target-os) ] ; -+ #if ! in $(toolset-target-os-requirements:G) -+ #{ -+ # toolset.add-requirements $(target-os):$(version:E=default) ; -+ #} - - # We also set a default requirement that assigns the first python configured - # for a particular target OS as the default. This makes it so that we can - # select a python interpreter with only knowledge of the target OS. And hence - # can configure different Pythons based on the target OS only. -- local toolset-requirements = [ toolset.requirements ] ; -- local toolset-target-os-requirements -- = [ property.evaluate-conditionals-in-context -- [ $(toolset-requirements).raw ] : $(target-os) ] ; -- if ! in $(toolset-target-os-requirements:G) -- { -- toolset.add-requirements $(target-os):$(version:E=default) ; -- } -+ #local toolset-requirements = [ toolset.requirements ] ; -+ #local toolset-target-os-requirements -+ # = [ property.evaluate-conditionals-in-context -+ # [ $(toolset-requirements).raw ] : $(target-os) ] ; -+ #if ! in $(toolset-target-os-requirements:G) -+ #{ -+ # toolset.add-requirements $(target-os):$(version:E=default) ; -+ #} - - # Register the right suffix for extensions. - register-extension-suffix $(extension-suffix) : $(target-requirements) ; diff --git a/boost-1.63.0-icl-ttp-matching.patch b/boost-1.63.0-icl-ttp-matching.patch new file mode 100644 index 0000000..bcda940 --- /dev/null +++ b/boost-1.63.0-icl-ttp-matching.patch @@ -0,0 +1,37 @@ +From 32178e147a976419b9ac846d3c40c3ab4d1e0ff6 Mon Sep 17 00:00:00 2001 +From: Mathias Gaunard +Date: Thu, 4 May 2017 17:18:22 +0100 +Subject: [PATCH] Compatibility with GCC 7.1 + +The libstdc++ shipped with GCC 7.1 uses a unary class template for std::string. +type_to_string needs to be adapted to deal with this properly. +--- + include/boost/icl/type_traits/type_to_string.hpp | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +diff --git a/include/boost/icl/type_traits/type_to_string.hpp b/include/boost/icl/type_traits/type_to_string.hpp +index 80c473a..994711b 100644 +--- a/include/boost/icl/type_traits/type_to_string.hpp ++++ b/include/boost/icl/type_traits/type_to_string.hpp +@@ -43,7 +43,6 @@ namespace boost{ namespace icl + + template<>inline std::string type_to_string::apply() { return "flt"; } + template<>inline std::string type_to_string::apply() { return "dbl"; } +- template<>inline std::string type_to_string::apply() { return "string"; } + + //------------------------------------------------------------------------- + template class Templ> +@@ -78,6 +77,13 @@ namespace boost{ namespace icl + } + }; + ++ // --------------------------------------------------------------------------- ++ template<> ++ struct type_to_string ++ { ++ static std::string apply() { return "string"; } ++ }; ++ + }} // namespace boost icl + + #endif diff --git a/boost-1.64.0-icl-undefined-shift.patch b/boost-1.64.0-icl-undefined-shift.patch new file mode 100644 index 0000000..88441a1 --- /dev/null +++ b/boost-1.64.0-icl-undefined-shift.patch @@ -0,0 +1,28 @@ +From 9687dea689e58cd1f67440fa529cb5c9692e9858 Mon Sep 17 00:00:00 2001 +From: Avi Kivity +Date: Sun, 2 Jul 2017 12:56:35 +0300 +Subject: [PATCH] Fix undefined behavior in interval_bounds::reverse_right() + +The ~ operator converts _bits from unsigned char to int, and makes it +negative to boot. Shifting left a negative number is undefined behavior. + +Cast it back to unsigned char to prevent undefined behavior. +--- + include/boost/icl/interval_bounds.hpp | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/include/boost/icl/interval_bounds.hpp b/include/boost/icl/interval_bounds.hpp +index edf16d0..f917cb6 100644 +--- a/include/boost/icl/interval_bounds.hpp ++++ b/include/boost/icl/interval_bounds.hpp +@@ -41,8 +41,8 @@ class interval_bounds + interval_bounds all ()const { return interval_bounds(_bits & _all ); } + interval_bounds left ()const { return interval_bounds(_bits & _left ); } + interval_bounds right()const { return interval_bounds(_bits & _right); } +- interval_bounds reverse_left ()const { return interval_bounds((~_bits>>1) & _right); } +- interval_bounds reverse_right()const { return interval_bounds((~_bits<<1) & _left ); } ++ interval_bounds reverse_left ()const { return interval_bounds((bound_type(~_bits)>>1) & _right); } ++ interval_bounds reverse_right()const { return interval_bounds((bound_type(~_bits)<<1) & _left ); } + + bound_type bits()const{ return _bits; } + diff --git a/boost-1.64.0-regex-overflow.patch b/boost-1.64.0-regex-overflow.patch new file mode 100644 index 0000000..220b877 --- /dev/null +++ b/boost-1.64.0-regex-overflow.patch @@ -0,0 +1,26 @@ +From bc9b25b5d3c3784543158510c6087d41739ab64a Mon Sep 17 00:00:00 2001 +From: jzmaddock +Date: Mon, 31 Jul 2017 19:18:10 +0100 +Subject: [PATCH] Fix potential overflow in max_state_count calculation. Fixes: + https://svn.boost.org/trac10/ticket/13036. + +--- + include/boost/regex/v4/perl_matcher_common.hpp | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/include/boost/regex/v4/perl_matcher_common.hpp b/include/boost/regex/v4/perl_matcher_common.hpp +index 7974e7483..f08e9d434 100644 +--- a/include/boost/regex/v4/perl_matcher_common.hpp ++++ b/include/boost/regex/v4/perl_matcher_common.hpp +@@ -113,6 +113,11 @@ void perl_matcher::estimate_max_state_count(std + std::ptrdiff_t states = re.size(); + if(states == 0) + states = 1; ++ if ((std::numeric_limits::max)() / states < states) ++ { ++ max_state_count = (std::min)((std::ptrdiff_t)BOOST_REGEX_MAX_STATE_COUNT, (std::numeric_limits::max)() - 2); ++ return; ++ } + states *= states; + if((std::numeric_limits::max)() / dist < states) + { diff --git a/boost.spec b/boost.spec index 0f48a47..dd6ad82 100644 --- a/boost.spec +++ b/boost.spec @@ -35,7 +35,7 @@ Name: boost Summary: The free peer-reviewed portable C++ source libraries Version: 1.63.0 %global version_enc 1_63_0 -Release: 5%{?dist} +Release: 12%{?dist} License: Boost and MIT and Python %global toplev_dirname %{name}_%{version_enc} @@ -56,6 +56,7 @@ Source2: libboost_thread.so # to have interested parties install them explicitly. Requires: boost-atomic%{?_isa} = %{version}-%{release} Requires: boost-chrono%{?_isa} = %{version}-%{release} +Requires: boost-container%{?_isa} = %{version}-%{release} %if %{with context} Requires: boost-context%{?_isa} = %{version}-%{release} Requires: boost-coroutine%{?_isa} = %{version}-%{release} @@ -70,6 +71,7 @@ Requires: boost-iostreams%{?_isa} = %{version}-%{release} Requires: boost-locale%{?_isa} = %{version}-%{release} Requires: boost-log%{?_isa} = %{version}-%{release} Requires: boost-math%{?_isa} = %{version}-%{release} +Requires: boost-numpy%{?_isa} = %{version}-%{release} Requires: boost-program-options%{?_isa} = %{version}-%{release} Requires: boost-python%{?_isa} = %{version}-%{release} Requires: boost-random%{?_isa} = %{version}-%{release} @@ -88,8 +90,10 @@ BuildRequires: libstdc++-devel BuildRequires: bzip2-devel BuildRequires: zlib-devel BuildRequires: python-devel +BuildRequires: python2-numpy %if %{with python3} BuildRequires: python3-devel +BuildRequires: python3-numpy %endif BuildRequires: libicu-devel %if %{with quadmath} @@ -127,9 +131,30 @@ Patch68: boost-1.58.0-address-model.patch # https://bugzilla.redhat.com/show_bug.cgi?id=1318383 Patch82: boost-1.60.0-no-rpath.patch -# https://github.com/boostorg/build/issues/163 -Patch83: boost-1.63.0-dual-python-build.patch +# https://bugzilla.redhat.com/show_bug.cgi?id=1451982 +Patch83: boost-1.63.0-dual-python-build-v2.patch +# https://bugzilla.redhat.com/show_bug.cgi?id=1478329 +Patch84: boost-1.63.0-VERSION-parameter.patch + +# https://bugzilla.redhat.com/show_bug.cgi?id=1485641 +# https://github.com/boostorg/icl/pull/9 +Patch86: boost-1.63.0-icl-ttp-matching.patch + +# https://bugzilla.redhat.com/show_bug.cgi?id=1421784 +Patch87: boost-1.63.0-asio-ssl.patch + +# https://bugzilla.redhat.com/show_bug.cgi?id=1516837 +# https://github.com/boostorg/icl/pull/11 +Patch88: boost-1.64.0-icl-undefined-shift.patch + +# https://bugzilla.redhat.com/show_bug.cgi?id=1564252 +# https://svn.boost.org/trac10/ticket/13036 +Patch90: boost-1.64.0-regex-overflow.patch + +# https://bugzilla.redhat.com/show_bug.cgi?id=1530828 +# https://github.com/boostorg/config/pull/175 +Patch91: boost-1.63.0-config-cuda-version.patch %bcond_with tests %bcond_with docs_generated @@ -171,7 +196,7 @@ Group: System Environment/Libraries %description container Boost.Container library implements several well-known containers, -including STL containers. The aim of the library is to offers advanced +including STL containers. The aim of the library is to offer advanced features not present in standard containers or to offer the latest standard draft features for compilers that comply with C++03. @@ -235,7 +260,7 @@ Requires: boost-regex%{?_isa} = %{version}-%{release} %description graph Run-time support for the BGL graph library. BGL interface and graph -components are generic, in the same sense as the the Standard Template +components are generic, in the same sense as the Standard Template Library (STL). %package iostreams @@ -244,7 +269,7 @@ Group: System Environment/Libraries %description iostreams -Run-time support for Boost.IOStreams, a framework for defining streams, +Run-time support for Boost.Iostreams, a framework for defining streams, stream buffers and i/o filters. %package locale @@ -281,6 +306,38 @@ Requires: libquadmath%{?_isa} Run-time support for C99 and C++ TR1 C-style Functions from the math portion of Boost.TR1. +%package numpy +Summary: Run-time component of boost python numpy extension +Group: System Environment/Libraries +Requires: boost-python%{?_isa} = %{version}-%{release} +Requires: python2-numpy + +%description numpy + +The Boost Python Library is a framework for interfacing Python and +C++. It allows you to quickly and seamlessly expose C++ classes, +functions and objects to Python, and vice versa, using no special +tools -- just your C++ compiler. This package contains run-time +support for the NumPy extension of the Boost Python Library. + +%if %{with python3} + +%package numpy3 +Summary: Run-time component of boost numpy library for Python 3 +Group: System Environment/Libraries +Requires: boost-python3%{?_isa} = %{version}-%{release} +Requires: python3-numpy + +%description numpy3 + +The Boost Python Library is a framework for interfacing Python and +C++. It allows you to quickly and seamlessly expose C++ classes, +functions and objects to Python, and vice versa, using no special +tools -- just your C++ compiler. This package contains run-time +support for the NumPy extension of the Boost Python Library for Python 3. + +%endif + %package program-options Summary: Run-time component of boost program_options library Group: System Environment/Libraries @@ -301,7 +358,7 @@ The Boost Python Library is a framework for interfacing Python and C++. It allows you to quickly and seamlessly expose C++ classes, functions and objects to Python, and vice versa, using no special tools -- just your C++ compiler. This package contains run-time -support for Boost Python Library. +support for the Boost Python Library compiled for Python 2. %if %{with python3} @@ -315,11 +372,12 @@ The Boost Python Library is a framework for interfacing Python and C++. It allows you to quickly and seamlessly expose C++ classes, functions and objects to Python, and vice versa, using no special tools -- just your C++ compiler. This package contains run-time -support for Boost Python Library compiled for Python 3. +support for the Boost Python Library compiled for Python 3. %package python3-devel Summary: Shared object symbolic links for Boost.Python 3 Group: System Environment/Libraries +Requires: boost-numpy3%{?_isa} = %{version}-%{release} Requires: boost-python3%{?_isa} = %{version}-%{release} Requires: boost-devel%{?_isa} = %{version}-%{release} @@ -415,7 +473,7 @@ The Boost.TypeErasure library provides runtime polymorphism in C++ that is more flexible than that provided by the core language. %package wave -Summary: Run-time component of boost C99/C++ pre-processing library +Summary: Run-time component of boost C99/C++ preprocessing library Group: System Environment/Libraries Requires: boost-chrono%{?_isa} = %{version}-%{release} Requires: boost-date-time%{?_isa} = %{version}-%{release} @@ -427,7 +485,7 @@ Requires: boost-thread%{?_isa} = %{version}-%{release} Run-time support for the Boost.Wave library, a Standards conforming, and highly configurable implementation of the mandated C99/C++ -pre-processor functionality. +preprocessor functionality. %package devel Summary: The Boost C++ headers and shared development libraries @@ -475,7 +533,7 @@ Obsoletes: odeint-doc < 2.2-5 %description doc This package contains the documentation in the HTML format of the Boost C++ libraries. The documentation provides the same content as that on the Boost -web page (http://www.boost.org/doc/libs/1_40_0). +web page (http://www.boost.org/doc/libs/%{version_enc}). %package examples Summary: Source examples for the Boost C++ libraries @@ -521,12 +579,43 @@ Group: System Environment/Libraries Requires: boost-openmpi%{?_isa} = %{version}-%{release} Requires: boost-python%{?_isa} = %{version}-%{release} Requires: boost-serialization%{?_isa} = %{version}-%{release} +Requires: python2-openmpi%{?_isa} %description openmpi-python -Python support for Boost.MPI-OpenMPI, a library providing a clean C++ +Python 2 support for Boost.MPI-OpenMPI, a library providing a clean C++ API over the OpenMPI implementation of MPI. +%if %{with python3} + +%package openmpi-python3 +Summary: Python 3 run-time component of Boost.MPI library +Group: System Environment/Libraries +Requires: boost-openmpi%{?_isa} = %{version}-%{release} +Requires: boost-python3%{?_isa} = %{version}-%{release} +Requires: boost-serialization%{?_isa} = %{version}-%{release} +Requires: python3-openmpi%{?_isa} + +%description openmpi-python3 + +Python 3 support for Boost.MPI-OpenMPI, a library providing a clean C++ +API over the OpenMPI implementation of MPI. + +%package openmpi-python3-devel +Summary: Shared library symbolic links for Boost.MPI Python 3 component +Group: System Environment/Libraries +Requires: boost-devel%{?_isa} = %{version}-%{release} +Requires: boost-python3-devel%{?_isa} = %{version}-%{release} +Requires: boost-openmpi-devel%{?_isa} = %{version}-%{release} +Requires: boost-openmpi-python3%{?_isa} = %{version}-%{release} + +%description openmpi-python3-devel + +Devel package for the Python 3 interface of Boost.MPI-OpenMPI, a library +providing a clean C++ API over the OpenMPI implementation of MPI. + +%endif + %package graph-openmpi Summary: Run-time component of parallel boost graph library Group: System Environment/Libraries @@ -536,7 +625,7 @@ Requires: boost-serialization%{?_isa} = %{version}-%{release} %description graph-openmpi Run-time support for the Parallel BGL graph library. The interface and -graph components are generic, in the same sense as the the Standard +graph components are generic, in the same sense as the Standard Template Library (STL). This libraries in this package use OpenMPI back-end to do the parallel work. @@ -581,12 +670,43 @@ Requires: boost-python%{?_isa} = %{version}-%{release} Requires: boost-serialization%{?_isa} = %{version}-%{release} Provides: boost-mpich2-python = %{version}-%{release} Obsoletes: boost-mpich2-python < 1.53.0-9 +Requires: python2-mpich%{?_isa} %description mpich-python -Python support for Boost.MPI-MPICH, a library providing a clean C++ +Python 2 support for Boost.MPI-MPICH, a library providing a clean C++ API over the MPICH implementation of MPI. +%if %{with python3} + +%package mpich-python3 +Summary: Python 3 run-time component of Boost.MPI library +Group: System Environment/Libraries +Requires: boost-mpich%{?_isa} = %{version}-%{release} +Requires: boost-python3%{?_isa} = %{version}-%{release} +Requires: boost-serialization%{?_isa} = %{version}-%{release} +Requires: python3-mpich%{?_isa} + +%description mpich-python3 + +Python 3 support for Boost.MPI-MPICH, a library providing a clean C++ +API over the MPICH implementation of MPI. + +%package mpich-python3-devel +Summary: Shared library symbolic links for Boost.MPI Python 3 component +Group: System Environment/Libraries +Requires: boost-devel%{?_isa} = %{version}-%{release} +Requires: boost-python3-devel%{?_isa} = %{version}-%{release} +Requires: boost-mpich-devel%{?_isa} = %{version}-%{release} +Requires: boost-mpich-python3%{?_isa} = %{version}-%{release} + +%description mpich-python3-devel + +Devel package for the Python 3 interface of Boost.MPI-MPICH, a library +providing a clean C++ API over the MPICH implementation of MPI. + +%endif + %package graph-mpich Summary: Run-time component of parallel boost graph library Group: System Environment/Libraries @@ -598,7 +718,7 @@ Obsoletes: boost-graph-mpich2 < 1.53.0-9 %description graph-mpich Run-time support for the Parallel BGL graph library. The interface and -graph components are generic, in the same sense as the the Standard +graph components are generic, in the same sense as the Standard Template Library (STL). This libraries in this package use MPICH back-end to do the parallel work. @@ -635,10 +755,11 @@ Group: Development/Tools %description jam Boost.Jam (BJam) is the low-level build engine tool for Boost.Build. Historically, Boost.Jam is based on on FTJam and on Perforce Jam but has grown -a number of significant features and is now developed independently +a number of significant features and is now developed independently. %prep %setup -q -n %{toplev_dirname} +find ./boost -name '*.hpp' -perm /111 | xargs chmod a-x %patch4 -p1 %patch5 -p1 @@ -651,6 +772,11 @@ a number of significant features and is now developed independently %patch68 -p1 %patch82 -p0 %patch83 -p1 +%patch84 -p1 +%patch86 -p2 +%patch88 -p2 +%patch90 -p2 +%patch91 -p2 # At least python2_version needs to be a macro so that it's visible in # %%install as well. @@ -680,10 +806,7 @@ using gcc : : : $(RPM_OPT_FLAGS) ; %if %{with openmpi} || %{with mpich} using mpi ; %endif -%if %{with python3} using python : %{python2_version} : /usr/bin/python2 : /usr/include/python%{python2_version} : : : : ; -using python : %{python3_version} : /usr/bin/python3 : /usr/include/python%{python3_version}%{python3_abiflags} : : : : %{python3_abiflags} ; -%endif EOF ./bootstrap.sh --with-toolset=gcc --with-icu @@ -692,13 +815,6 @@ EOF # library in particular) end up being built second time during # installation. Unsure why that is, but all sub-builds need to be # built with pch=off to avoid this. -# -# The "python=2.*" bit tells jam that we want to _also_ build 2.*, not -# just 3.*. When omitted, it just builds for python 3 twice, once -# calling the library libboost_python and once libboost_python3. I -# assume this is for backward compatibility for apps that are used to -# linking against -lboost_python, for when 2->3 transition is -# eventually done. echo ============================= build serial ================== ./b2 -d+2 -q %{?_smp_mflags} \ @@ -721,6 +837,33 @@ fi m4 -${DEF}HAS_ATOMIC_FLAG_LOCKFREE -DVERSION=%{version} \ %{SOURCE2} > $(basename %{SOURCE2}) +%if %{with python3} + +# Previously, we built python 2.x and 3.x interfaces simultaneously. +# However, this doesn't work once trying to build other Python components +# such as libboost_numpy. Therefore, we build for each separately, while +# minimizing duplicate compilation as much as possible. + +cat > python3-config.jam << "EOF" +import os ; +local RPM_OPT_FLAGS = [ os.environ RPM_OPT_FLAGS ] ; + +using gcc : : : $(RPM_OPT_FLAGS) ; +%if %{with openmpi} || %{with mpich} +using mpi ; +%endif +using python : %{python3_version} : /usr/bin/python3 : /usr/include/python%{python3_version}%{python3_abiflags} : : : : %{python3_abiflags} ; +EOF + +echo ============================= build serial-py3 ================== +./b2 -d+2 -q %{?_smp_mflags} \ + --user-config=./python3-config.jam \ + --with-python --build-dir=serial-py3 \ + variant=release threading=multi debug-symbols=on pch=off \ + python=%{python3_version} stage + +%endif + # Build MPI parts of Boost with OpenMPI support %if %{with openmpi} || %{with mpich} @@ -729,9 +872,6 @@ m4 -${DEF}HAS_ATOMIC_FLAG_LOCKFREE -DVERSION=%{version} \ module purge ||: %endif -# N.B. python=2.* here behaves differently: it exactly selects a -# version that we want to build against. Boost MPI is not portable to -# Python 3 due to API changes in Python, so this suits us. %if %{with openmpi} %{_openmpi_load} echo ============================= build $MPI_COMPILER ================== @@ -739,6 +879,16 @@ echo ============================= build $MPI_COMPILER ================== --with-mpi --with-graph_parallel --build-dir=$MPI_COMPILER \ variant=release threading=multi debug-symbols=on pch=off \ python=%{python2_version} stage + +%if %{with python3} +echo ============================= build $MPI_COMPILER-py3 ================== +./b2 -d+2 -q %{?_smp_mflags} \ + --user-config=./python3-config.jam \ + --with-mpi --with-graph_parallel --build-dir=$MPI_COMPILER-py3 \ + variant=release threading=multi debug-symbols=on pch=off \ + python=%{python3_version} stage +%endif + %{_openmpi_unload} export PATH=/bin${PATH:+:}$PATH %endif @@ -751,6 +901,16 @@ echo ============================= build $MPI_COMPILER ================== --with-mpi --with-graph_parallel --build-dir=$MPI_COMPILER \ variant=release threading=multi debug-symbols=on pch=off \ python=%{python2_version} stage + +%if %{with python3} +echo ============================= build $MPI_COMPILER-py3 ================== +./b2 -d+2 -q %{?_smp_mflags} \ + --user-config=./python3-config.jam \ + --with-mpi --with-graph_parallel --build-dir=$MPI_COMPILER-py3 \ + variant=release threading=multi debug-symbols=on pch=off \ + python=%{python3_version} stage +%endif + %{_mpich_unload} export PATH=/bin${PATH:+:}$PATH %endif @@ -784,6 +944,28 @@ echo ============================= install $MPI_COMPILER ================== variant=release threading=multi debug-symbols=on pch=off \ python=%{python2_version} stage +# Move Python module to proper location for automatic loading +mkdir -p ${RPM_BUILD_ROOT}%{python2_sitearch}/openmpi/boost +touch ${RPM_BUILD_ROOT}%{python2_sitearch}/openmpi/boost/__init__.py +mv ${RPM_BUILD_ROOT}${MPI_HOME}/lib/mpi.so \ + ${RPM_BUILD_ROOT}%{python2_sitearch}/openmpi/boost/ + +%if %{with python3} +echo ============================= install $MPI_COMPILER-py3 ================== +./b2 -q %{?_smp_mflags} \ + --user-config=./python3-config.jam \ + --with-mpi --with-graph_parallel --build-dir=$MPI_COMPILER-py3 \ + --stagedir=${RPM_BUILD_ROOT}${MPI_HOME} \ + variant=release threading=multi debug-symbols=on pch=off \ + python=%{python3_version} stage + +# Move Python module to proper location for automatic loading +mkdir -p ${RPM_BUILD_ROOT}%{python3_sitearch}/openmpi/boost +touch ${RPM_BUILD_ROOT}%{python3_sitearch}/openmpi/boost/__init__.py +mv ${RPM_BUILD_ROOT}${MPI_HOME}/lib/mpi.so \ + ${RPM_BUILD_ROOT}%{python3_sitearch}/openmpi/boost/ +%endif + # Remove generic parts of boost that were built for dependencies. rm -f ${RPM_BUILD_ROOT}${MPI_HOME}/lib/libboost_{python,{w,}serialization}* @@ -800,6 +982,28 @@ echo ============================= install $MPI_COMPILER ================== variant=release threading=multi debug-symbols=on pch=off \ python=%{python2_version} stage +# Move Python module to proper location for automatic loading +mkdir -p ${RPM_BUILD_ROOT}%{python2_sitearch}/mpich/boost +touch ${RPM_BUILD_ROOT}%{python2_sitearch}/mpich/boost/__init__.py +mv ${RPM_BUILD_ROOT}${MPI_HOME}/lib/mpi.so \ + ${RPM_BUILD_ROOT}%{python2_sitearch}/mpich/boost/ + +%if %{with python3} +echo ============================= install $MPI_COMPILER-py3 ================== +./b2 -q %{?_smp_mflags} \ + --user-config=./python3-config.jam \ + --with-mpi --with-graph_parallel --build-dir=$MPI_COMPILER-py3 \ + --stagedir=${RPM_BUILD_ROOT}${MPI_HOME} \ + variant=release threading=multi debug-symbols=on pch=off \ + python=%{python3_version} stage + +# Move Python module to proper location for automatic loading +mkdir -p ${RPM_BUILD_ROOT}%{python3_sitearch}/mpich/boost +touch ${RPM_BUILD_ROOT}%{python3_sitearch}/mpich/boost/__init__.py +mv ${RPM_BUILD_ROOT}${MPI_HOME}/lib/mpi.so \ + ${RPM_BUILD_ROOT}%{python3_sitearch}/mpich/boost/ +%endif + # Remove generic parts of boost that were built for dependencies. rm -f ${RPM_BUILD_ROOT}${MPI_HOME}/lib/libboost_{python,{w,}serialization}* @@ -825,6 +1029,18 @@ echo ============================= install serial ================== rm -f $RPM_BUILD_ROOT%{_libdir}/libboost_thread.so install -p -m 644 $(basename %{SOURCE2}) $RPM_BUILD_ROOT%{_libdir}/ +%if %{with python3} +echo ============================= install serial-py3 ================== +./b2 -d+2 -q %{?_smp_mflags} \ + --user-config=python3-config.jam \ + --with-python --build-dir=serial-py3 \ + --prefix=$RPM_BUILD_ROOT%{_prefix} \ + --libdir=$RPM_BUILD_ROOT%{_libdir} \ + variant=release threading=multi debug-symbols=on pch=off \ + python=%{python3_version} install + +%endif + echo ============================= install Boost.Build ================== (cd tools/build ./b2 --prefix=$RPM_BUILD_ROOT%{_prefix} install @@ -979,6 +1195,16 @@ rm -rf $RPM_BUILD_ROOT %postun math -p /sbin/ldconfig +%post numpy -p /sbin/ldconfig + +%postun numpy -p /sbin/ldconfig + +%if %{with python3} +%post numpy3 -p /sbin/ldconfig + +%postun numpy3 -p /sbin/ldconfig +%endif + %post program-options -p /sbin/ldconfig %postun program-options -p /sbin/ldconfig @@ -987,6 +1213,12 @@ rm -rf $RPM_BUILD_ROOT %postun python -p /sbin/ldconfig +%if %{with python3} +%post python3 -p /sbin/ldconfig + +%postun python3 -p /sbin/ldconfig +%endif + %post random -p /sbin/ldconfig %postun random -p /sbin/ldconfig @@ -1120,6 +1352,16 @@ fi %{_libdir}/libboost_math_tr1f.so.%{sonamever} %{_libdir}/libboost_math_tr1l.so.%{sonamever} +%files numpy +%license LICENSE_1_0.txt +%{_libdir}/libboost_numpy.so.%{sonamever} + +%if %{with python3} +%files numpy3 +%license LICENSE_1_0.txt +%{_libdir}/libboost_numpy3.so.%{sonamever} +%endif + %files test %license LICENSE_1_0.txt %{_libdir}/libboost_prg_exec_monitor.so.%{sonamever} @@ -1140,6 +1382,7 @@ fi %files python3-devel %license LICENSE_1_0.txt +%{_libdir}/libboost_numpy3.so %{_libdir}/libboost_python3.so %endif @@ -1212,6 +1455,7 @@ fi %{_libdir}/libboost_math_c99.so %{_libdir}/libboost_math_c99f.so %{_libdir}/libboost_math_c99l.so +%{_libdir}/libboost_numpy.so %{_libdir}/libboost_prg_exec_monitor.so %{_libdir}/libboost_unit_test_framework.so %{_libdir}/libboost_program_options.so @@ -1246,12 +1490,27 @@ fi %files openmpi-devel %license LICENSE_1_0.txt -%{_libdir}/openmpi/lib/libboost_*.so +%{_libdir}/openmpi/lib/libboost_mpi.so +%{_libdir}/openmpi/lib/libboost_mpi_python.so +%{_libdir}/openmpi/lib/libboost_graph_parallel.so %files openmpi-python %license LICENSE_1_0.txt %{_libdir}/openmpi/lib/libboost_mpi_python.so.%{sonamever} -%{_libdir}/openmpi/lib/mpi.so +%{python2_sitearch}/openmpi/boost/ + +%if %{with python3} + +%files openmpi-python3 +%license LICENSE_1_0.txt +%{_libdir}/openmpi/lib/libboost_mpi_python3.so.%{sonamever} +%{python3_sitearch}/openmpi/boost/ + +%files openmpi-python3-devel +%license LICENSE_1_0.txt +%{_libdir}/openmpi/lib/libboost_mpi_python3.so + +%endif %files graph-openmpi %license LICENSE_1_0.txt @@ -1268,12 +1527,27 @@ fi %files mpich-devel %license LICENSE_1_0.txt -%{_libdir}/mpich/lib/libboost_*.so +%{_libdir}/mpich/lib/libboost_mpi.so +%{_libdir}/mpich/lib/libboost_mpi_python.so +%{_libdir}/mpich/lib/libboost_graph_parallel.so %files mpich-python %license LICENSE_1_0.txt %{_libdir}/mpich/lib/libboost_mpi_python.so.%{sonamever} -%{_libdir}/mpich/lib/mpi.so +%{python2_sitearch}/mpich/boost/ + +%if %{with python3} + +%files mpich-python3 +%license LICENSE_1_0.txt +%{_libdir}/mpich/lib/libboost_mpi_python3.so.%{sonamever} +%{python3_sitearch}/mpich/boost/ + +%files mpich-python3-devel +%license LICENSE_1_0.txt +%{_libdir}/mpich/lib/libboost_mpi_python3.so + +%endif %files graph-mpich %license LICENSE_1_0.txt @@ -1296,6 +1570,35 @@ fi %{_mandir}/man1/bjam.1* %changelog +* Wed Apr 18 2018 Jonathan Wakely - 1.63.0-12 +- Add patch for Boost.Regex integer overflow (#1564252) +- Add patch for CUDA version macro changes (#1530828) + +* Wed Feb 28 2018 Jonathan Wakely - 1.63.0-11 +- Ensure boost metapackage installs boost-container + +* Thu Dec 07 2017 Jonathan Wakely - 1.63.0-10 +- Patch to fix #1516837 + +* Mon Sep 25 2017 Jonathan Wakely - 1.63.0-9 +- Patch asio so header is self-contained (#1421784) +- Fix some rpmlint issues: +- Remove executable bits on header files (spurious-executable-perm) +- Adjust boost.wave %%description (spelling-error) + +* Fri Sep 22 2017 Yaakov Selkowitz - 1.63.0-8 +- Add numpy and numpy3 packages (#1451982) +- Fix location of openmpi-python and mpich-python modules +- Add openmpi-python3 and mpich-python3 packages +- Add missing ldconfig post/postun for python3 package + +* Tue Sep 12 2017 Jonathan Wakely - 1.63.0-7 +- Fix descriptions +- Patch to fix #1485641 + +* Wed Aug 09 2017 Jonathan Wakely - 1.63.0-6 +- Rename VERSION variable to avoid clashing with autotools macro (#1478329) + * Sun Mar 12 2017 Peter Robinson 1.63.0-5 - Enable OpenMPI/mpich on ppc64le and s390x now they have support