From 3918ae02fb67051f17fcf683efa816f1e8aa27f5 Mon Sep 17 00:00:00 2001 From: yuanhui Date: Fri, 14 Apr 2023 14:51:33 +0800 Subject: [PATCH] Optimize the spec file Signed-off-by: yuanhui --- ... => 0001-boost-1.81.0-build-optflags.patch | 0 ....patch => 0002-boost-1.78.0-no-rpath.patch | 0 ....patch => 0003-boost-1.73.0-cmakedir.patch | 0 ... => 0004-boost-1.78.0-b2-build-flags.patch | 0 ...tch => 0005-boost-1.76.0-random-test.patch | 0 ... 0006-boost-1.81.0-pool-test_linking.patch | 0 ...g.patch => 0007-boost-1.74.0-linking.patch | 0 ...08-boost-1.57.0-python-libpython_dep.patch | 0 ...> 0009-boost-1.72.0-mpi-python-build.patch | 0 ...le-change-uarg-N-to-internal-linkage.patch | 0 boost.spec | 953 +++++++++--------- 11 files changed, 456 insertions(+), 497 deletions(-) rename boost-1.81.0-build-optflags.patch => 0001-boost-1.81.0-build-optflags.patch (100%) rename boost-1.78.0-no-rpath.patch => 0002-boost-1.78.0-no-rpath.patch (100%) rename boost-1.73.0-cmakedir.patch => 0003-boost-1.73.0-cmakedir.patch (100%) rename boost-1.78.0-b2-build-flags.patch => 0004-boost-1.78.0-b2-build-flags.patch (100%) rename boost-1.76.0-random-test.patch => 0005-boost-1.76.0-random-test.patch (100%) rename boost-1.81.0-pool-test_linking.patch => 0006-boost-1.81.0-pool-test_linking.patch (100%) rename boost-1.74.0-linking.patch => 0007-boost-1.74.0-linking.patch (100%) rename boost-1.57.0-python-libpython_dep.patch => 0008-boost-1.57.0-python-libpython_dep.patch (100%) rename boost-1.72.0-mpi-python-build.patch => 0009-boost-1.72.0-mpi-python-build.patch (100%) rename 0001-stl-tuple-change-uarg-N-to-internal-linkage.patch => 0010-stl-tuple-change-uarg-N-to-internal-linkage.patch (100%) diff --git a/boost-1.81.0-build-optflags.patch b/0001-boost-1.81.0-build-optflags.patch similarity index 100% rename from boost-1.81.0-build-optflags.patch rename to 0001-boost-1.81.0-build-optflags.patch diff --git a/boost-1.78.0-no-rpath.patch b/0002-boost-1.78.0-no-rpath.patch similarity index 100% rename from boost-1.78.0-no-rpath.patch rename to 0002-boost-1.78.0-no-rpath.patch diff --git a/boost-1.73.0-cmakedir.patch b/0003-boost-1.73.0-cmakedir.patch similarity index 100% rename from boost-1.73.0-cmakedir.patch rename to 0003-boost-1.73.0-cmakedir.patch diff --git a/boost-1.78.0-b2-build-flags.patch b/0004-boost-1.78.0-b2-build-flags.patch similarity index 100% rename from boost-1.78.0-b2-build-flags.patch rename to 0004-boost-1.78.0-b2-build-flags.patch diff --git a/boost-1.76.0-random-test.patch b/0005-boost-1.76.0-random-test.patch similarity index 100% rename from boost-1.76.0-random-test.patch rename to 0005-boost-1.76.0-random-test.patch diff --git a/boost-1.81.0-pool-test_linking.patch b/0006-boost-1.81.0-pool-test_linking.patch similarity index 100% rename from boost-1.81.0-pool-test_linking.patch rename to 0006-boost-1.81.0-pool-test_linking.patch diff --git a/boost-1.74.0-linking.patch b/0007-boost-1.74.0-linking.patch similarity index 100% rename from boost-1.74.0-linking.patch rename to 0007-boost-1.74.0-linking.patch diff --git a/boost-1.57.0-python-libpython_dep.patch b/0008-boost-1.57.0-python-libpython_dep.patch similarity index 100% rename from boost-1.57.0-python-libpython_dep.patch rename to 0008-boost-1.57.0-python-libpython_dep.patch diff --git a/boost-1.72.0-mpi-python-build.patch b/0009-boost-1.72.0-mpi-python-build.patch similarity index 100% rename from boost-1.72.0-mpi-python-build.patch rename to 0009-boost-1.72.0-mpi-python-build.patch diff --git a/0001-stl-tuple-change-uarg-N-to-internal-linkage.patch b/0010-stl-tuple-change-uarg-N-to-internal-linkage.patch similarity index 100% rename from 0001-stl-tuple-change-uarg-N-to-internal-linkage.patch rename to 0010-stl-tuple-change-uarg-N-to-internal-linkage.patch diff --git a/boost.spec b/boost.spec index ecab5c7..ad8ce93 100644 --- a/boost.spec +++ b/boost.spec @@ -1,10 +1,10 @@ -%define anolis_release 2 +%define anolis_release 3 + %global boost_docdir __tmp_docdir %global boost_examplesdir __tmp_examplesdir +%global sonamever %{version} %if 0%{?flatpak} -# For bundling in Flatpak, currently build without mpich and openmpi, -# which aren't needed and cause prefix=/app errors. %bcond_with mpich %bcond_with openmpi %else @@ -26,62 +26,50 @@ %else %bcond_without quadmath %endif +%bcond_with tests +%bcond_with docs_generated -Name: boost -%global real_name boost -Summary: The free peer-reviewed portable C++ source libraries -Version: 1.81.0 -Release: %{anolis_release}%{dist} -License: Boost and MIT and Python -BuildRequires: lua-posix - +Name: boost +Version: 1.81.0 +Release: %{anolis_release}%{dist} +License: Boost and MIT and Python +Summary: The free peer-reviewed portable C++ source libraries +URL: http://www.boost.org # Replace each . with _ in %%{version} -%global version_enc %{lua: - local ver = rpm.expand("%{version}") - ver = ver:gsub("%.", "_") - print(ver) -} -%global toplev_dirname %{real_name}_%{version_enc} -URL: http://www.boost.org - -Source0: https://boostorg.jfrog.io/artifactory/main/release/%{version}/source/%{name}_%{version_enc}.tar.bz2 -Source1: libboost_thread.so -# Add a manual page for b2, based on the online documentation: -# http://www.boost.org/boost-build2/doc/html/bbv2/overview.html -Source2: b2.1 - -# https://bugzilla.redhat.com/show_bug.cgi?id=1541035 -Patch111: boost-1.81.0-build-optflags.patch -# https://bugzilla.redhat.com/show_bug.cgi?id=1318383 -Patch106: boost-1.78.0-no-rpath.patch +%define version_enc %(echo "%{version}" | tr "." "_") +Source0: https://boostorg.jfrog.io/artifactory/main/release/%{version}/source/%{name}_%{version_enc}.tar.bz2 +Source1: libboost_thread.so +Source2: b2.1 + +Patch0001: 0001-boost-1.81.0-build-optflags.patch +Patch0002: 0002-boost-1.78.0-no-rpath.patch # https://lists.boost.org/Archives/boost/2020/04/248812.php -Patch88: boost-1.73.0-cmakedir.patch -# https://bugzilla.redhat.com/show_bug.cgi?id=1541035 -Patch107: boost-1.78.0-b2-build-flags.patch +Patch0003: 0003-boost-1.73.0-cmakedir.patch +Patch0004: 0004-boost-1.78.0-b2-build-flags.patch # https://github.com/boostorg/random/issues/82 -Patch102: boost-1.76.0-random-test.patch - +Patch0005: 0005-boost-1.76.0-random-test.patch # https://svn.boost.org/trac/boost/ticket/9038 -Patch1051: boost-1.81.0-pool-test_linking.patch +Patch0006: 0006-boost-1.81.0-pool-test_linking.patch # Fix library overlinking -Patch1201: boost-1.74.0-linking.patch +Patch0007: 0007-boost-1.74.0-linking.patch # Fix linking with py3 -Patch1202: boost-1.57.0-python-libpython_dep.patch +Patch0008: 0008-boost-1.57.0-python-libpython_dep.patch # Hack to fix mpi build -Patch1203: boost-1.72.0-mpi-python-build.patch +Patch0009: 0009-boost-1.72.0-mpi-python-build.patch # Fixes freeorion build and maybe some more # https://github.com/boostorg/phoenix/issues/111 # https://github.com/boostorg/phoenix/pull/112 -Patch1204: 0001-stl-tuple-change-uarg-N-to-internal-linkage.patch +Patch0010: 0010-stl-tuple-change-uarg-N-to-internal-linkage.patch -%global sonamever %{version} +BuildRequires: gcc-c++ python3 m4 lua-posix bison zlib-devel libicu-devel +BuildRequires: libstdc++-devel bzip2-devel xz-devel libzstd-devel +%if %{with python3} +BuildRequires: python3-devel python3-numpy +%endif +%if %{with quadmath} +BuildRequires: libquadmath-devel +%endif -# boost is an "umbrella" package that pulls in all boost shared library -# components, except for MPI sub-packages. Those are special in that -# there are alternative implementations to choose from (Open MPI and MPICH), -# and it's not a big burden to have interested parties install them explicitly. -# The subpackages that don't install shared libraries are also not pulled in -# (b2, build, doc, doctools, examples, static). Requires: %{name}-atomic = %{version}-%{release} Requires: %{name}-chrono = %{version}-%{release} Requires: %{name}-container = %{version}-%{release} @@ -121,36 +109,224 @@ Requires: %{name}-wave = %{version}-%{release} Recommends: (boost-numpy3 if python3-numpy) %endif -BuildRequires: python3 -BuildRequires: gcc-c++ -BuildRequires: m4 -BuildRequires: libstdc++-devel -BuildRequires: bzip2-devel -BuildRequires: zlib-devel -BuildRequires: xz-devel -BuildRequires: libzstd-devel +%description +Boost provides free peer-reviewed portable C++ source libraries. + +We emphasize libraries that work well with the C++ Standard Library. Boost libraries are +intended to be widely useful, and usable across a broad spectrum of applications. The Boost +license encourages the use of Boost libraries for all users with minimal restrictions. + +We aim to establish "existing practice" and provide reference implementations so that Boost +libraries are suitable for eventual standardization. Beginning with the ten Boost Libraries +included in the Library Technical Report (TR1) and continuing with every release of the ISO +standard for C++ since 2011, the C++ Standards Committee has continued to rely on Boost as +a valuable source for additions to the Standard C++ Library. + +%package devel +Summary: The Boost C++ headers and shared development libraries +Requires: %{name} = %{version}-%{release} +Requires: libicu-devel +%if %{with quadmath} +Requires: libquadmath-devel +%endif %if %{with python3} -BuildRequires: python3-devel -BuildRequires: python3-numpy +# Require boost-numpy3 here, because main boost metapackage only Recommends: it +Requires: %{name}-numpy3 = %{version}-%{release} +Obsoletes: %{name}-python3-devel < 1.69.0 +Provides: %{name}-python3-devel = %{version}-%{release} %endif -BuildRequires: libicu-devel -%if %{with quadmath} -BuildRequires: libquadmath-devel +Obsoletes: boost-nowide-devel <= 0.20190814 +Provides: boost-nowide-devel = %{version} + +%description devel +Headers and shared object symbolic links for the Boost C++ libraries. + + +%if %{with context} +%package context +Summary: Run-time component of boost context switching library + +%description context + +Run-time support for Boost.Context, a foundational library that +provides a sort of cooperative multitasking on a single thread. + +%package coroutine +Summary: Run-time component of boost coroutine library + +%description coroutine +Run-time support for Boost.Coroutine, a library that provides +generalized subroutines which allow multiple entry points for +suspending and resuming execution. + +%package fiber +Summary: Run-time component of boost fiber library + +%description fiber + +Run-time support for the Boost Fiber library, a framework for +micro-/userland-threads (fibers) scheduled cooperatively. + %endif -BuildRequires: bison -%bcond_with tests -%bcond_with docs_generated -%description -Boost provides free peer-reviewed portable C++ source libraries. The -emphasis is on libraries which work well with the C++ Standard -Library, in the hopes of establishing "existing practice" for -extensions and providing reference implementations so that the Boost -libraries are suitable for eventual standardization. (Some of the -libraries have already been included in the C++ 2011 standard and -others have been proposed to the C++ Standards Committee for inclusion -in future standards.) +%if %{with python3} + +%package numpy3 +Summary: Run-time component of boost numpy library for Python 3 +Requires: %{name}-python3 = %{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. + +%package python3 +Summary: Run-time component of boost python library for Python 3 +Requires: python(abi) = %{python3_version} + +%description python3 + +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 Boost Python Library compiled for Python 3. + +%endif + +%if %{with openmpi} + +%package openmpi +Summary: Run-time component of Boost.MPI library +BuildRequires: openmpi-devel +Requires: %{name}-serialization = %{version}-%{release} + +%description openmpi + +Run-time support for Boost.MPI-OpenMPI, a library providing a clean C++ +API over the OpenMPI implementation of MPI. + +%package openmpi-devel +Summary: Shared library symbolic links for Boost.MPI +Requires: %{name}-devel = %{version}-%{release} +Requires: %{name}-openmpi = %{version}-%{release} +Requires: %{name}-graph-openmpi = %{version}-%{release} + +%description openmpi-devel + +Devel package 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 +Requires: %{name}-openmpi = %{version}-%{release} +Requires: %{name}-python3 = %{version}-%{release} +Requires: %{name}-serialization = %{version}-%{release} +Requires: python3-openmpi + +%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 +Requires: %{name}-devel = %{version}-%{release} +Requires: %{name}-openmpi-devel = %{version}-%{release} +Requires: %{name}-openmpi-python3 = %{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 +Requires: %{name}-openmpi = %{version}-%{release} +Requires: %{name}-serialization = %{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 Standard +Template Library (STL). This libraries in this package use OpenMPI +back-end to do the parallel work. + +%endif + + +%if %{with mpich} + +%package mpich +Summary: Run-time component of Boost.MPI library +BuildRequires: mpich-devel +Requires: %{name}-serialization = %{version}-%{release} + +%description mpich + +Run-time support for Boost.MPI-MPICH, a library providing a clean C++ +API over the MPICH implementation of MPI. + +%package mpich-devel +Summary: Shared library symbolic links for Boost.MPI +Requires: %{name}-devel%{?_isa} = %{version}-%{release} +Requires: %{name}-mpich%{?_isa} = %{version}-%{release} +Requires: %{name}-graph-mpich%{?_isa} = %{version}-%{release} + +%description mpich-devel + +Devel package 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 +Requires: %{name}-mpich = %{version}-%{release} +Requires: %{name}-python3 = %{version}-%{release} +Requires: %{name}-serialization = %{version}-%{release} +Requires: python3-mpich + +%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 +Requires: %{name}-devel = %{version}-%{release} +Requires: %{name}-mpich-devel = %{version}-%{release} +Requires: %{name}-mpich-python3 = %{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 +Requires: %{name}-mpich = %{version}-%{release} +Requires: %{name}-serialization = %{version}-%{release} + +%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 Standard +Template Library (STL). This libraries in this package use MPICH +back-end to do the parallel work. + +%endif %package atomic Summary: Run-time component of boost atomic library @@ -192,25 +368,6 @@ preconditions, customizable actions on assertion failure (e.g., terminate or throw), optional compilation and checking of assertions, etc, from Lorenzo Caminiti. -%if %{with context} -%package context -Summary: Run-time component of boost context switching library - -%description context - -Run-time support for Boost.Context, a foundational library that -provides a sort of cooperative multitasking on a single thread. - -%package coroutine -Summary: Run-time component of boost coroutine library - -%description coroutine -Run-time support for Boost.Coroutine, a library that provides -generalized subroutines which allow multiple entry points for -suspending and resuming execution. - -%endif - %package date-time Summary: Run-time component of boost date-time library @@ -219,16 +376,6 @@ Summary: Run-time component of boost date-time library Run-time support for Boost Date Time, a set of date-time libraries based on generic programming concepts. -%if %{with context} -%package fiber -Summary: Run-time component of boost fiber library - -%description fiber - -Run-time support for the Boost Fiber library, a framework for -micro-/userland-threads (fibers) scheduled cooperatively. -%endif - %package filesystem Summary: Run-time component of boost filesystem library Requires: %{name}-system = %{version}-%{release} @@ -299,48 +446,16 @@ Summary: Standard library functions with UTF-8 API on Windows Obsoletes: boost-nowide <= 0.20190814 %description nowide - Run-time support for Boost.Nowide. -%if %{with python3} - -%package numpy3 -Summary: Run-time component of boost numpy library for Python 3 -Requires: %{name}-python3 = %{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 +%package program-options +Summary: Run-time component of boost program_options library %description program-options - Run-time support of boost program options library, which allows program developers to obtain (name, value) pairs from the user, via conventional methods such as command-line and configuration file. -%if %{with python3} -%package python3 -Summary: Run-time component of boost python library for Python 3 -Requires: python(abi) = %{python3_version} - -%description python3 - -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 Boost Python Library compiled for Python 3. -%endif %package random Summary: Run-time component of boost random library @@ -428,7 +543,6 @@ Identifier (URI) specification (henceforth referred to as rfc3986). A URL is a compact sequence of characters that identifies an abstract or physical resource. - %package wave Summary: Run-time component of boost C99/C++ preprocessing library Requires: %{name}-chrono = %{version}-%{release} @@ -443,25 +557,6 @@ Run-time support for the Boost.Wave library, a Standards conforming, and highly configurable implementation of the mandated C99/C++ preprocessor functionality. -%package devel -Summary: The Boost C++ headers and shared development libraries -Requires: %{name} = %{version}-%{release} -Requires: libicu-devel -%if %{with quadmath} -Requires: libquadmath-devel -%endif -%if %{with python3} -# Require boost-numpy3 here, because main boost metapackage only Recommends: it -Requires: %{name}-numpy3 = %{version}-%{release} -Obsoletes: %{name}-python3-devel < 1.69.0 -Provides: %{name}-python3-devel = %{version}-%{release} -%endif -Obsoletes: boost-nowide-devel <= 0.20190814 -Provides: boost-nowide-devel = %{version} - -%description devel -Headers and shared object symbolic links for the Boost C++ libraries. - %package static Summary: The Boost C++ static development libraries Requires: %{name}-devel = %{version}-%{release} @@ -469,14 +564,6 @@ Requires: %{name}-devel = %{version}-%{release} %description static Static Boost C++ libraries. -%package doc -Summary: HTML documentation for the Boost C++ libraries - -%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/%{version_enc}). - %package examples Summary: Source examples for the Boost C++ libraries Requires: %{name}-devel = %{version}-%{release} @@ -484,136 +571,6 @@ Requires: %{name}-devel = %{version}-%{release} %description examples This package contains example source files distributed with boost. - -%if %{with openmpi} - -%package openmpi -Summary: Run-time component of Boost.MPI library -BuildRequires: openmpi-devel -Requires: %{name}-serialization = %{version}-%{release} - -%description openmpi - -Run-time support for Boost.MPI-OpenMPI, a library providing a clean C++ -API over the OpenMPI implementation of MPI. - -%package openmpi-devel -Summary: Shared library symbolic links for Boost.MPI -Requires: %{name}-devel = %{version}-%{release} -Requires: %{name}-openmpi = %{version}-%{release} -Requires: %{name}-graph-openmpi = %{version}-%{release} - -%description openmpi-devel - -Devel package 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 -Requires: %{name}-openmpi = %{version}-%{release} -Requires: %{name}-python3 = %{version}-%{release} -Requires: %{name}-serialization = %{version}-%{release} -Requires: python3-openmpi - -%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 -Requires: %{name}-devel = %{version}-%{release} -Requires: %{name}-openmpi-devel = %{version}-%{release} -Requires: %{name}-openmpi-python3 = %{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 -Requires: %{name}-openmpi = %{version}-%{release} -Requires: %{name}-serialization = %{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 Standard -Template Library (STL). This libraries in this package use OpenMPI -back-end to do the parallel work. - -%endif - - -%if %{with mpich} - -%package mpich -Summary: Run-time component of Boost.MPI library -BuildRequires: mpich-devel -Requires: %{name}-serialization = %{version}-%{release} - -%description mpich - -Run-time support for Boost.MPI-MPICH, a library providing a clean C++ -API over the MPICH implementation of MPI. - -%package mpich-devel -Summary: Shared library symbolic links for Boost.MPI -Requires: %{name}-devel%{?_isa} = %{version}-%{release} -Requires: %{name}-mpich%{?_isa} = %{version}-%{release} -Requires: %{name}-graph-mpich%{?_isa} = %{version}-%{release} - -%description mpich-devel - -Devel package 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 -Requires: %{name}-mpich = %{version}-%{release} -Requires: %{name}-python3 = %{version}-%{release} -Requires: %{name}-serialization = %{version}-%{release} -Requires: python3-mpich - -%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 -Requires: %{name}-devel = %{version}-%{release} -Requires: %{name}-mpich-devel = %{version}-%{release} -Requires: %{name}-mpich-python3 = %{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 -Requires: %{name}-mpich = %{version}-%{release} -Requires: %{name}-serialization = %{version}-%{release} - -%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 Standard -Template Library (STL). This libraries in this package use MPICH -back-end to do the parallel work. - -%endif - %package build Summary: Cross platform build system for C++ projects Requires: %{name}-b2 @@ -646,6 +603,14 @@ B2 (formerly Boost.Jam) is the low-level build engine tool for Boost.Build. Historically, B2 was based on on FTJam and on Perforce Jam but has grown a number of significant features and is now developed independently. +%package doc +Summary: Documentation files for %{name} +Requires: %{name} = %{EVR} +BuildArch: noarch + +%description doc +The %{name}-doc package contains documentation files for %{name}. + %prep %autosetup -p1 -n %{name}_%{version_enc} @@ -658,9 +623,6 @@ PYTHON3_ABIFLAGS=$(/usr/bin/python3-config --abiflags) : PYTHON3_ABIFLAGS=${PYTHON3_ABIFLAGS} %endif -# There are many strict aliasing warnings, and it's not feasible to go -# through them all at this time. -# There are also lots of noisy but harmless unused local typedef warnings. export RPM_OPT_FLAGS="%{build_cxxflags} -fno-strict-aliasing -Wno-unused-local-typedefs -Wno-deprecated-declarations" export RPM_LD_FLAGS="%{build_ldflags}" @@ -683,10 +645,6 @@ EOF ./bootstrap.sh --with-toolset=%{toolchain} --with-icu -# N.B. When we build the following with PCH, parts of boost (math -# 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. echo ============================= build serial ================== ./b2 -d+2 -q %{?_smp_mflags} \ @@ -760,7 +718,7 @@ echo ============================= build Boost.Build ================== %install -cd %{_builddir}/%{toplev_dirname} +cd %{_builddir}/%{name}_%{version_enc} %if %{with openmpi} || %{with mpich} # First, purge all modules so that user environment does not conflict @@ -775,23 +733,23 @@ module purge ||: echo ============================= install $MPI_COMPILER ================== ./b2 -q %{?_smp_mflags} \ --with-mpi --with-graph_parallel --build-dir=$MPI_COMPILER \ - --stagedir=${RPM_BUILD_ROOT}${MPI_HOME} \ + --stagedir=%{buildroot}${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/boost-python%{python3_version}/mpi.so \ - ${RPM_BUILD_ROOT}%{python3_sitearch}/openmpi/boost/ +mkdir -p %{buildroot}%{python3_sitearch}/openmpi/boost +touch %{buildroot}%{python3_sitearch}/openmpi/boost/__init__.py +mv %{buildroot}${MPI_HOME}/lib/boost-python%{python3_version}/mpi.so \ + %{buildroot}%{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}* -rm -f ${RPM_BUILD_ROOT}${MPI_HOME}/lib/libboost_numpy* +rm -f %{buildroot}${MPI_HOME}/lib/libboost_{python,{w,}serialization}* +rm -f %{buildroot}${MPI_HOME}/lib/libboost_numpy* # Remove cmake files (some of these are duplicates of the generic bits anyway). -rm -r ${RPM_BUILD_ROOT}${MPI_HOME}/lib/cmake +rm -r %{buildroot}${MPI_HOME}/lib/cmake %{_openmpi_unload} export PATH=/bin${PATH:+:}$PATH @@ -804,23 +762,23 @@ export PATH=/bin${PATH:+:}$PATH echo ============================= install $MPI_COMPILER ================== ./b2 -q %{?_smp_mflags} \ --with-mpi --with-graph_parallel --build-dir=$MPI_COMPILER \ - --stagedir=${RPM_BUILD_ROOT}${MPI_HOME} \ + --stagedir=%{buildroot}${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/boost-python%{python3_version}/mpi.so \ - ${RPM_BUILD_ROOT}%{python3_sitearch}/mpich/boost/ +mkdir -p %{buildroot}%{python3_sitearch}/mpich/boost +touch %{buildroot}%{python3_sitearch}/mpich/boost/__init__.py +mv %{buildroot}${MPI_HOME}/lib/boost-python%{python3_version}/mpi.so \ + %{buildroot}%{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}* -rm -f ${RPM_BUILD_ROOT}${MPI_HOME}/lib/libboost_numpy* +rm -f %{buildroot}${MPI_HOME}/lib/libboost_{python,{w,}serialization}* +rm -f %{buildroot}${MPI_HOME}/lib/libboost_numpy* # Remove cmake files (some of these are duplicates of the generic bits anyway). -rm -r ${RPM_BUILD_ROOT}${MPI_HOME}/lib/cmake +rm -r %{buildroot}${MPI_HOME}/lib/cmake %{_mpich_unload} export PATH=/bin${PATH:+:}$PATH @@ -833,8 +791,8 @@ echo ============================= install serial ================== --without-context --without-coroutine \ --without-fiber \ %endif - --prefix=$RPM_BUILD_ROOT%{_prefix} \ - --libdir=$RPM_BUILD_ROOT%{_libdir} \ + --prefix=%{buildroot}%{_prefix} \ + --libdir=%{buildroot}%{_libdir} \ variant=release threading=multi debug-symbols=on pch=off \ %if %{with python3} python=%{python3_version} \ @@ -843,34 +801,34 @@ echo ============================= install serial ================== # Override DSO symlink with a linker script. See the linker script # itself for details of why we need to do this. -[ -f $RPM_BUILD_ROOT%{_libdir}/libboost_thread.so ] # Must be present -rm -f $RPM_BUILD_ROOT%{_libdir}/libboost_thread.so -install -p -m 644 $(basename %{SOURCE1}) $RPM_BUILD_ROOT%{_libdir}/ +[ -f %{buildroot}%{_libdir}/libboost_thread.so ] # Must be present +rm -f %{buildroot}%{_libdir}/libboost_thread.so +install -p -m 644 $(basename %{SOURCE1}) %{buildroot}%{_libdir}/ # Remove cmake files until we know somebody wants them. -rm -r $RPM_BUILD_ROOT/%{_libdir}/cmake +rm -r %{buildroot}/%{_libdir}/cmake echo ============================= install Boost.Build ================== (cd tools/build - ./b2 --prefix=$RPM_BUILD_ROOT%{_prefix} install + ./b2 --prefix=%{buildroot}%{_prefix} install # Fix some permissions - chmod +x $RPM_BUILD_ROOT%{_datadir}/b2/src/tools/doxproc.py + chmod +x %{buildroot}%{_datadir}/b2/src/tools/doxproc.py # Fix shebang using unversioned python - sed -i '1s@^#!/usr/bin.python$@&3@' $RPM_BUILD_ROOT%{_datadir}/b2/src/tools/doxproc.py + sed -i '1s@^#!/usr/bin.python$@&3@' %{buildroot}%{_datadir}/b2/src/tools/doxproc.py # Install the manual page - %{__install} -p -m 644 %{SOURCE2} -D $RPM_BUILD_ROOT%{_mandir}/man1/b2.1 + %{__install} -p -m 644 %{SOURCE2} -D %{buildroot}%{_mandir}/man1/b2.1 ) echo ============================= install Boost.QuickBook ================== (cd tools/quickbook - ../build/b2 --prefix=$RPM_BUILD_ROOT%{_prefix} - %{__install} -p -m 755 ../../dist/bin/quickbook $RPM_BUILD_ROOT%{_bindir}/ + ../build/b2 --prefix=%{buildroot}%{_prefix} + %{__install} -p -m 755 ../../dist/bin/quickbook %{buildroot}%{_bindir}/ cd ../boostbook find dtd -type f -name '*.dtd' | while read tobeinstalledfiles; do - install -p -m 644 $tobeinstalledfiles -D $RPM_BUILD_ROOT%{_datadir}/boostbook/$tobeinstalledfiles + install -p -m 644 $tobeinstalledfiles -D %{buildroot}%{_datadir}/boostbook/$tobeinstalledfiles done find xsl -type f | while read tobeinstalledfiles; do - install -p -m 644 $tobeinstalledfiles -D $RPM_BUILD_ROOT%{_datadir}/boostbook/$tobeinstalledfiles + install -p -m 644 $tobeinstalledfiles -D %{buildroot}%{_datadir}/boostbook/$tobeinstalledfiles done ) @@ -936,7 +894,6 @@ rm -f tmp-doc-directories %generate_compatibility_deps - %post doctools CATALOG=%{_sysconfdir}/xml/catalog %{_bindir}/xmlcatalog --noout --add "rewriteSystem" \ @@ -967,20 +924,58 @@ fi %dir %{abidir} %license LICENSE_1_0.txt -%files atomic -%license LICENSE_1_0.txt -%{_libdir}/libboost_atomic.so.%{sonamever} -%{abidir}/libboost_atomic.dump - -%files chrono +%files devel %license LICENSE_1_0.txt -%{_libdir}/libboost_chrono.so.%{sonamever} -%{abidir}/libboost_chrono.dump +%{_includedir}/%{name} +%{_libdir}/libboost_atomic.so +%{_libdir}/libboost_chrono.so +%{_libdir}/libboost_container.so +%{_libdir}/libboost_contract.so +%if %{with context} +%{_libdir}/libboost_context.so +%{_libdir}/libboost_coroutine.so +%endif +%{_libdir}/libboost_date_time.so +%if %{with context} +%{_libdir}/libboost_fiber.so +%endif +%{_libdir}/libboost_filesystem.so +%{_libdir}/libboost_graph.so +%{_libdir}/libboost_iostreams.so +%{_libdir}/libboost_json.so +%{_libdir}/libboost_locale.so +%{_libdir}/libboost_log.so +%{_libdir}/libboost_log_setup.so +%{_libdir}/libboost_math_tr1.so +%{_libdir}/libboost_math_tr1f.so +%{_libdir}/libboost_math_tr1l.so +%{_libdir}/libboost_math_c99.so +%{_libdir}/libboost_math_c99f.so +%{_libdir}/libboost_math_c99l.so +%{_libdir}/libboost_nowide.so +%if %{with python3} +%{_libdir}/libboost_numpy%{python3_version_nodots}.so +%endif +%{_libdir}/libboost_prg_exec_monitor.so +%{_libdir}/libboost_unit_test_framework.so +%{_libdir}/libboost_program_options.so +%if %{with python3} +%{_libdir}/libboost_python%{python3_version_nodots}.so +%endif +%{_libdir}/libboost_random.so +%{_libdir}/libboost_regex.so +%{_libdir}/libboost_serialization.so +%{_libdir}/libboost_wserialization.so +%{_libdir}/libboost_stacktrace_addr2line.so +%{_libdir}/libboost_stacktrace_basic.so +%{_libdir}/libboost_stacktrace_noop.so +%{_libdir}/libboost_system.so +%{_libdir}/libboost_thread.so +%{_libdir}/libboost_timer.so +%{_libdir}/libboost_url.so +%{_libdir}/libboost_type_erasure.so +%{_libdir}/libboost_wave.so -%files container -%license LICENSE_1_0.txt -%{_libdir}/libboost_container.so.%{sonamever} -%{abidir}/libboost_container.dump %if %{with context} @@ -993,20 +988,117 @@ fi %license LICENSE_1_0.txt %{_libdir}/libboost_coroutine.so.%{sonamever} %{abidir}/libboost_coroutine.dump -%endif -%files date-time -%license LICENSE_1_0.txt -%{_libdir}/libboost_date_time.so.%{sonamever} -%{abidir}/libboost_date_time.dump - -%if %{with context} -%files fiber +%files fiber %license LICENSE_1_0.txt %{_libdir}/libboost_fiber.so.%{sonamever} %{abidir}/libboost_fiber.dump %endif + +%if %{with python3} +%files numpy3 +%license LICENSE_1_0.txt +%{_libdir}/libboost_numpy%{python3_version_nodots}.so.%{sonamever} +%{abidir}/libboost_numpy%{python3_version_nodots}.dump + +%files python3 +%license LICENSE_1_0.txt +%{_libdir}/libboost_python%{python3_version_nodots}.so.%{sonamever} +%{abidir}/libboost_python%{python3_version_nodots}.dump + +%endif + +# OpenMPI packages +%if %{with openmpi} + +%files openmpi +%license LICENSE_1_0.txt +%{_libdir}/openmpi/lib/libboost_mpi.so.%{sonamever} +%{abidir}/libboost_mpi.dump + +%files openmpi-devel +%license LICENSE_1_0.txt +%{_libdir}/openmpi/lib/libboost_mpi.so +%{_libdir}/openmpi/lib/libboost_graph_parallel.so +%{abidir}/libboost_graph_parallel.dump + +%if %{with python3} + +%files openmpi-python3 +%license LICENSE_1_0.txt +%{_libdir}/openmpi/lib/libboost_mpi_python%{python3_version_nodots}.so.%{sonamever} +%{abidir}/libboost_mpi_python%{python3_version_nodots}.dump +%{python3_sitearch}/openmpi/boost/ + +%files openmpi-python3-devel +%license LICENSE_1_0.txt +%{_libdir}/openmpi/lib/libboost_mpi_python%{python3_version_nodots}.so + +%endif + +%files graph-openmpi +%license LICENSE_1_0.txt +%{_libdir}/openmpi/lib/libboost_graph_parallel.so.%{sonamever} + +%endif + +# MPICH packages +%if %{with mpich} + +%files mpich +%license LICENSE_1_0.txt +%{_libdir}/mpich/lib/libboost_mpi.so.%{sonamever} + +%files mpich-devel +%license LICENSE_1_0.txt +%{_libdir}/mpich/lib/libboost_mpi.so +%{_libdir}/mpich/lib/libboost_graph_parallel.so + +%if %{with python3} + +%files mpich-python3 +%license LICENSE_1_0.txt +%{_libdir}/mpich/lib/libboost_mpi_python%{python3_version_nodots}.so.%{sonamever} +%{python3_sitearch}/mpich/boost/ + +%files mpich-python3-devel +%license LICENSE_1_0.txt +%{_libdir}/mpich/lib/libboost_mpi_python%{python3_version_nodots}.so + +%endif + +%files graph-mpich +%license LICENSE_1_0.txt +%{_libdir}/mpich/lib/libboost_graph_parallel.so.%{sonamever} + +%endif + +%files atomic +%license LICENSE_1_0.txt +%{_libdir}/libboost_atomic.so.%{sonamever} +%{abidir}/libboost_atomic.dump + +%files chrono +%license LICENSE_1_0.txt +%{_libdir}/libboost_chrono.so.%{sonamever} +%{abidir}/libboost_chrono.dump + +%files container +%license LICENSE_1_0.txt +%{_libdir}/libboost_container.so.%{sonamever} +%{abidir}/libboost_container.dump + +%files contract +%license LICENSE_1_0.txt +%{_libdir}/libboost_contract.so.%{sonamever} +%{abidir}/libboost_contract.dump + +%files date-time +%license LICENSE_1_0.txt +%{_libdir}/libboost_date_time.so.%{sonamever} +%{abidir}/libboost_date_time.dump + %files filesystem %license LICENSE_1_0.txt %{_libdir}/libboost_filesystem.so.%{sonamever} @@ -1055,32 +1147,11 @@ fi %{_libdir}/libboost_nowide.so.%{sonamever} %{abidir}/libboost_nowide.dump -%if %{with python3} -%files numpy3 -%license LICENSE_1_0.txt -%{_libdir}/libboost_numpy%{python3_version_nodots}.so.%{sonamever} -%{abidir}/libboost_numpy%{python3_version_nodots}.dump -%endif - -%files test -%license LICENSE_1_0.txt -%{_libdir}/libboost_prg_exec_monitor.so.%{sonamever} -%{_libdir}/libboost_unit_test_framework.so.%{sonamever} -%{abidir}/libboost_prg_exec_monitor.dump -%{abidir}/libboost_unit_test_framework.dump - %files program-options %license LICENSE_1_0.txt %{_libdir}/libboost_program_options.so.%{sonamever} %{abidir}/libboost_program_options.dump -%if %{with python3} -%files python3 -%license LICENSE_1_0.txt -%{_libdir}/libboost_python%{python3_version_nodots}.so.%{sonamever} -%{abidir}/libboost_python%{python3_version_nodots}.dump -%endif - %files random %license LICENSE_1_0.txt %{_libdir}/libboost_random.so.%{sonamever} @@ -1117,6 +1188,13 @@ fi %{_libdir}/libboost_thread.so.%{sonamever} %{abidir}/libboost_thread.dump +%files test +%license LICENSE_1_0.txt +%{_libdir}/libboost_prg_exec_monitor.so.%{sonamever} +%{_libdir}/libboost_unit_test_framework.so.%{sonamever} +%{abidir}/libboost_prg_exec_monitor.dump +%{abidir}/libboost_unit_test_framework.dump + %files timer %license LICENSE_1_0.txt %{_libdir}/libboost_timer.so.%{sonamever} @@ -1137,69 +1215,9 @@ fi %{_libdir}/libboost_wave.so.%{sonamever} %{abidir}/libboost_wave.dump -%files contract -%license LICENSE_1_0.txt -%{_libdir}/libboost_contract.so.%{sonamever} -%{abidir}/libboost_contract.dump - -%files doc -%doc %{boost_docdir}/* - %files examples %doc %{boost_examplesdir}/* -%files devel -%license LICENSE_1_0.txt -%{_includedir}/%{name} -%{_libdir}/libboost_atomic.so -%{_libdir}/libboost_chrono.so -%{_libdir}/libboost_container.so -%{_libdir}/libboost_contract.so -%if %{with context} -%{_libdir}/libboost_context.so -%{_libdir}/libboost_coroutine.so -%endif -%{_libdir}/libboost_date_time.so -%if %{with context} -%{_libdir}/libboost_fiber.so -%endif -%{_libdir}/libboost_filesystem.so -%{_libdir}/libboost_graph.so -%{_libdir}/libboost_iostreams.so -%{_libdir}/libboost_json.so -%{_libdir}/libboost_locale.so -%{_libdir}/libboost_log.so -%{_libdir}/libboost_log_setup.so -%{_libdir}/libboost_math_tr1.so -%{_libdir}/libboost_math_tr1f.so -%{_libdir}/libboost_math_tr1l.so -%{_libdir}/libboost_math_c99.so -%{_libdir}/libboost_math_c99f.so -%{_libdir}/libboost_math_c99l.so -%{_libdir}/libboost_nowide.so -%if %{with python3} -%{_libdir}/libboost_numpy%{python3_version_nodots}.so -%endif -%{_libdir}/libboost_prg_exec_monitor.so -%{_libdir}/libboost_unit_test_framework.so -%{_libdir}/libboost_program_options.so -%if %{with python3} -%{_libdir}/libboost_python%{python3_version_nodots}.so -%endif -%{_libdir}/libboost_random.so -%{_libdir}/libboost_regex.so -%{_libdir}/libboost_serialization.so -%{_libdir}/libboost_wserialization.so -%{_libdir}/libboost_stacktrace_addr2line.so -%{_libdir}/libboost_stacktrace_basic.so -%{_libdir}/libboost_stacktrace_noop.so -%{_libdir}/libboost_system.so -%{_libdir}/libboost_thread.so -%{_libdir}/libboost_timer.so -%{_libdir}/libboost_url.so -%{_libdir}/libboost_type_erasure.so -%{_libdir}/libboost_wave.so - %files static %license LICENSE_1_0.txt %{_libdir}/*.a @@ -1211,71 +1229,6 @@ fi %endif %{abidir}/mpi.dump -# OpenMPI packages -%if %{with openmpi} - -%files openmpi -%license LICENSE_1_0.txt -%{_libdir}/openmpi/lib/libboost_mpi.so.%{sonamever} -%{abidir}/libboost_mpi.dump - -%files openmpi-devel -%license LICENSE_1_0.txt -%{_libdir}/openmpi/lib/libboost_mpi.so -%{_libdir}/openmpi/lib/libboost_graph_parallel.so -%{abidir}/libboost_graph_parallel.dump - -%if %{with python3} - -%files openmpi-python3 -%license LICENSE_1_0.txt -%{_libdir}/openmpi/lib/libboost_mpi_python%{python3_version_nodots}.so.%{sonamever} -%{abidir}/libboost_mpi_python%{python3_version_nodots}.dump -%{python3_sitearch}/openmpi/boost/ - -%files openmpi-python3-devel -%license LICENSE_1_0.txt -%{_libdir}/openmpi/lib/libboost_mpi_python%{python3_version_nodots}.so - -%endif - -%files graph-openmpi -%license LICENSE_1_0.txt -%{_libdir}/openmpi/lib/libboost_graph_parallel.so.%{sonamever} - -%endif - -# MPICH packages -%if %{with mpich} - -%files mpich -%license LICENSE_1_0.txt -%{_libdir}/mpich/lib/libboost_mpi.so.%{sonamever} - -%files mpich-devel -%license LICENSE_1_0.txt -%{_libdir}/mpich/lib/libboost_mpi.so -%{_libdir}/mpich/lib/libboost_graph_parallel.so - -%if %{with python3} - -%files mpich-python3 -%license LICENSE_1_0.txt -%{_libdir}/mpich/lib/libboost_mpi_python%{python3_version_nodots}.so.%{sonamever} -%{python3_sitearch}/mpich/boost/ - -%files mpich-python3-devel -%license LICENSE_1_0.txt -%{_libdir}/mpich/lib/libboost_mpi_python%{python3_version_nodots}.so - -%endif - -%files graph-mpich -%license LICENSE_1_0.txt -%{_libdir}/mpich/lib/libboost_graph_parallel.so.%{sonamever} - -%endif - %files build %license LICENSE_1_0.txt %{_datadir}/b2 @@ -1292,7 +1245,13 @@ fi %{abidir}/b2-option.list %{_mandir}/man1/b2.1* +%files doc +%doc %{boost_docdir}/* + %changelog +* Fri Apr 14 2023 yuanhui - 1.81.0-3 +- Optimize the spec file + * Thu Mar 02 2023 Funda Wang - 1.81.0-2 - Add patches from various distros -- Gitee