simplify spec
(cherry picked from commit b4400d6fa59eff4f39b2a7d3f886a538d1f2a6cf)
This commit is contained in:
parent
947b4a914a
commit
5a73e77234
75
boost.spec
75
boost.spec
@ -4,21 +4,12 @@
|
|||||||
|
|
||||||
%bcond_with mpich
|
%bcond_with mpich
|
||||||
%bcond_with openmpi
|
%bcond_with openmpi
|
||||||
%bcond_without context
|
|
||||||
%bcond_without python3
|
|
||||||
|
|
||||||
%ifnarch %{ix86} x86_64
|
|
||||||
%bcond_with quadmath
|
|
||||||
%else
|
|
||||||
%bcond_without quadmath
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%bcond_with tests
|
%bcond_with tests
|
||||||
%bcond_with docs_generated
|
%bcond_with docs_generated
|
||||||
|
|
||||||
Name: boost
|
Name: boost
|
||||||
Version: 1.78.0
|
Version: 1.78.0
|
||||||
Release: 1
|
Release: 2
|
||||||
Summary: The free peer-reviewed portable C++ source libraries
|
Summary: The free peer-reviewed portable C++ source libraries
|
||||||
License: Boost Software License 1.0
|
License: Boost Software License 1.0
|
||||||
URL: http://www.boost.org
|
URL: http://www.boost.org
|
||||||
@ -63,13 +54,8 @@ Requires: %{name}-contract%{?_isa} = %{version}-%{release}
|
|||||||
|
|
||||||
BuildRequires: gcc-c++
|
BuildRequires: gcc-c++
|
||||||
BuildRequires: bzip2-devel zlib-devel libicu-devel
|
BuildRequires: bzip2-devel zlib-devel libicu-devel
|
||||||
%if %{with python3}
|
|
||||||
BuildRequires: python3-devel python3-numpy
|
BuildRequires: python3-devel python3-numpy
|
||||||
%endif
|
|
||||||
|
|
||||||
%if %{with quadmath}
|
|
||||||
BuildRequires: libquadmath-devel
|
BuildRequires: libquadmath-devel
|
||||||
%endif
|
|
||||||
|
|
||||||
Obsoletes: boost-signals
|
Obsoletes: boost-signals
|
||||||
|
|
||||||
@ -233,8 +219,6 @@ Summary: Standard library functions with UTF-8 API on Windows
|
|||||||
|
|
||||||
Run-time support for Boost.Nowide.
|
Run-time support for Boost.Nowide.
|
||||||
|
|
||||||
%if %{with python3}
|
|
||||||
|
|
||||||
%package numpy3
|
%package numpy3
|
||||||
Summary: Run-time component of boost numpy library for Python 3
|
Summary: Run-time component of boost numpy library for Python 3
|
||||||
Requires: boost-python3%{?_isa} = %{version}-%{release}
|
Requires: boost-python3%{?_isa} = %{version}-%{release}
|
||||||
@ -269,8 +253,6 @@ Requires: boost-devel%{?_isa} = %{version}-%{release}
|
|||||||
|
|
||||||
Shared object symbolic links for Python 3 variant of Boost.Python.
|
Shared object symbolic links for Python 3 variant of Boost.Python.
|
||||||
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%package program-options
|
%package program-options
|
||||||
Summary: Run-time component of boost program_options library
|
Summary: Run-time component of boost program_options library
|
||||||
|
|
||||||
@ -365,9 +347,7 @@ functionality packed behind an easy to use iterator interface.
|
|||||||
Summary: The Boost C++ headers, shared and static development libraries
|
Summary: The Boost C++ headers, shared and static development libraries
|
||||||
Requires: boost%{?_isa} = %{version}-%{release}
|
Requires: boost%{?_isa} = %{version}-%{release}
|
||||||
Requires: libicu-devel%{?_isa}
|
Requires: libicu-devel%{?_isa}
|
||||||
%if %{with quadmath}
|
|
||||||
Requires: libquadmath-devel%{?_isa}
|
Requires: libquadmath-devel%{?_isa}
|
||||||
%endif
|
|
||||||
Provides: boost-static
|
Provides: boost-static
|
||||||
Obsoletes: boost-static
|
Obsoletes: boost-static
|
||||||
|
|
||||||
@ -414,8 +394,6 @@ Requires: boost-graph-openmpi%{?_isa} = %{version}-%{release}
|
|||||||
Devel package for Boost.MPI-OpenMPI, a library providing a clean C++
|
Devel package for Boost.MPI-OpenMPI, a library providing a clean C++
|
||||||
API over the OpenMPI implementation of MPI.
|
API over the OpenMPI implementation of MPI.
|
||||||
|
|
||||||
%if %{with python3}
|
|
||||||
|
|
||||||
%package openmpi-python3
|
%package openmpi-python3
|
||||||
Summary: Python 3 run-time component of Boost.MPI library
|
Summary: Python 3 run-time component of Boost.MPI library
|
||||||
Requires: boost-openmpi%{?_isa} = %{version}-%{release}
|
Requires: boost-openmpi%{?_isa} = %{version}-%{release}
|
||||||
@ -440,8 +418,6 @@ Requires: boost-openmpi-python3%{?_isa} = %{version}-%{release}
|
|||||||
Devel package for the Python 3 interface of Boost.MPI-OpenMPI, a library
|
Devel package for the Python 3 interface of Boost.MPI-OpenMPI, a library
|
||||||
providing a clean C++ API over the OpenMPI implementation of MPI.
|
providing a clean C++ API over the OpenMPI implementation of MPI.
|
||||||
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%package graph-openmpi
|
%package graph-openmpi
|
||||||
Summary: Run-time component of parallel boost graph library
|
Summary: Run-time component of parallel boost graph library
|
||||||
Requires: boost-openmpi%{?_isa} = %{version}-%{release}
|
Requires: boost-openmpi%{?_isa} = %{version}-%{release}
|
||||||
@ -477,8 +453,6 @@ Requires: boost-graph-mpich%{?_isa} = %{version}-%{release}
|
|||||||
Devel package for Boost.MPI-MPICH, a library providing a clean C++
|
Devel package for Boost.MPI-MPICH, a library providing a clean C++
|
||||||
API over the MPICH implementation of MPI.
|
API over the MPICH implementation of MPI.
|
||||||
|
|
||||||
%if %{with python3}
|
|
||||||
|
|
||||||
%package mpich-python3
|
%package mpich-python3
|
||||||
Summary: Python 3 run-time component of Boost.MPI library
|
Summary: Python 3 run-time component of Boost.MPI library
|
||||||
Requires: boost-mpich%{?_isa} = %{version}-%{release}
|
Requires: boost-mpich%{?_isa} = %{version}-%{release}
|
||||||
@ -503,8 +477,6 @@ Requires: boost-mpich-python3%{?_isa} = %{version}-%{release}
|
|||||||
Devel package for the Python 3 interface of Boost.MPI-MPICH, a library
|
Devel package for the Python 3 interface of Boost.MPI-MPICH, a library
|
||||||
providing a clean C++ API over the MPICH implementation of MPI.
|
providing a clean C++ API over the MPICH implementation of MPI.
|
||||||
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%package graph-mpich
|
%package graph-mpich
|
||||||
Summary: Run-time component of parallel boost graph library
|
Summary: Run-time component of parallel boost graph library
|
||||||
Requires: boost-mpich%{?_isa} = %{version}-%{release}
|
Requires: boost-mpich%{?_isa} = %{version}-%{release}
|
||||||
@ -553,11 +525,9 @@ a number of significant features and is now developed independently.
|
|||||||
%autosetup -p1 -n %{name}_%{version_enc}
|
%autosetup -p1 -n %{name}_%{version_enc}
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%if %{with python3}
|
|
||||||
PYTHON3_ABIFLAGS=$(/usr/bin/python3-config --abiflags)
|
PYTHON3_ABIFLAGS=$(/usr/bin/python3-config --abiflags)
|
||||||
: PYTHON3_VERSION=%{python3_version}
|
: PYTHON3_VERSION=%{python3_version}
|
||||||
: PYTHON3_ABIFLAGS=${PYTHON3_ABIFLAGS}
|
: PYTHON3_ABIFLAGS=${PYTHON3_ABIFLAGS}
|
||||||
%endif
|
|
||||||
|
|
||||||
export RPM_OPT_FLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing -Wno-unused-local-typedefs -Wno-deprecated-declarations"
|
export RPM_OPT_FLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing -Wno-unused-local-typedefs -Wno-deprecated-declarations"
|
||||||
export RPM_LD_FLAGS
|
export RPM_LD_FLAGS
|
||||||
@ -573,33 +543,19 @@ using mpi ;
|
|||||||
%endif
|
%endif
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
%if %{with python3}
|
|
||||||
cat >> ./tools/build/src/user-config.jam << EOF
|
cat >> ./tools/build/src/user-config.jam << EOF
|
||||||
using python : %{python3_version} : /usr/bin/python3 : /usr/include/python%{python3_version}${PYTHON3_ABIFLAGS} : : : ;
|
using python : %{python3_version} : /usr/bin/python3 : /usr/include/python%{python3_version}${PYTHON3_ABIFLAGS} : : : ;
|
||||||
EOF
|
EOF
|
||||||
%endif
|
|
||||||
|
|
||||||
./bootstrap.sh --with-toolset=gcc --with-icu
|
./bootstrap.sh --with-toolset=gcc --with-icu
|
||||||
|
|
||||||
echo ============================= build serial ==================
|
echo ============================= build serial ==================
|
||||||
./b2 -d+2 -q %{?_smp_mflags} \
|
./b2 -d+2 -q %{?_smp_mflags} \
|
||||||
--without-mpi --without-graph_parallel --build-dir=serial \
|
--without-mpi --without-graph_parallel --build-dir=serial \
|
||||||
%if !%{with context}
|
|
||||||
--without-context --without-coroutine \
|
|
||||||
--without-fiber \
|
|
||||||
%endif
|
|
||||||
variant=release threading=multi debug-symbols=on pch=off \
|
variant=release threading=multi debug-symbols=on pch=off \
|
||||||
%if %{with python3}
|
|
||||||
python=%{python3_version} \
|
python=%{python3_version} \
|
||||||
%endif
|
|
||||||
stage
|
stage
|
||||||
|
|
||||||
if [ $(find serial -type f -name has_atomic_flag_lockfree -print -quit | wc -l) -ne 0 ]; then
|
|
||||||
DEF=D
|
|
||||||
else
|
|
||||||
DEF=U
|
|
||||||
fi
|
|
||||||
|
|
||||||
%if %{with openmpi} || %{with mpich}
|
%if %{with openmpi} || %{with mpich}
|
||||||
module purge ||:
|
module purge ||:
|
||||||
%endif
|
%endif
|
||||||
@ -607,13 +563,11 @@ module purge ||:
|
|||||||
%if %{with openmpi}
|
%if %{with openmpi}
|
||||||
%{_openmpi_load}
|
%{_openmpi_load}
|
||||||
|
|
||||||
%if %{with python3}
|
|
||||||
echo ============================= build $MPI_COMPILER ==================
|
echo ============================= build $MPI_COMPILER ==================
|
||||||
./b2 -d+2 -q %{?_smp_mflags} \
|
./b2 -d+2 -q %{?_smp_mflags} \
|
||||||
--with-mpi --with-graph_parallel --build-dir=$MPI_COMPILER \
|
--with-mpi --with-graph_parallel --build-dir=$MPI_COMPILER \
|
||||||
variant=release threading=multi debug-symbols=on pch=off \
|
variant=release threading=multi debug-symbols=on pch=off \
|
||||||
python=%{python3_version} stage
|
python=%{python3_version} stage
|
||||||
%endif
|
|
||||||
|
|
||||||
%{_openmpi_unload}
|
%{_openmpi_unload}
|
||||||
export PATH=/bin${PATH:+:}$PATH
|
export PATH=/bin${PATH:+:}$PATH
|
||||||
@ -622,13 +576,11 @@ export PATH=/bin${PATH:+:}$PATH
|
|||||||
%if %{with mpich}
|
%if %{with mpich}
|
||||||
%{_mpich_load}
|
%{_mpich_load}
|
||||||
|
|
||||||
%if %{with python3}
|
|
||||||
echo ============================= build $MPI_COMPILER ==================
|
echo ============================= build $MPI_COMPILER ==================
|
||||||
./b2 -d+2 -q %{?_smp_mflags} \
|
./b2 -d+2 -q %{?_smp_mflags} \
|
||||||
--with-mpi --with-graph_parallel --build-dir=$MPI_COMPILER \
|
--with-mpi --with-graph_parallel --build-dir=$MPI_COMPILER \
|
||||||
variant=release threading=multi debug-symbols=on pch=off \
|
variant=release threading=multi debug-symbols=on pch=off \
|
||||||
python=%{python3_version} stage
|
python=%{python3_version} stage
|
||||||
%endif
|
|
||||||
|
|
||||||
%{_mpich_unload}
|
%{_mpich_unload}
|
||||||
export PATH=/bin${PATH:+:}$PATH
|
export PATH=/bin${PATH:+:}$PATH
|
||||||
@ -650,7 +602,6 @@ module purge ||:
|
|||||||
%if 0%{with openmpi}
|
%if 0%{with openmpi}
|
||||||
%{_openmpi_load}
|
%{_openmpi_load}
|
||||||
|
|
||||||
%if %{with python3}
|
|
||||||
echo ============================= install $MPI_COMPILER ==================
|
echo ============================= install $MPI_COMPILER ==================
|
||||||
./b2 -q %{?_smp_mflags} \
|
./b2 -q %{?_smp_mflags} \
|
||||||
--with-mpi --with-graph_parallel --build-dir=$MPI_COMPILER \
|
--with-mpi --with-graph_parallel --build-dir=$MPI_COMPILER \
|
||||||
@ -662,7 +613,6 @@ mkdir -p ${RPM_BUILD_ROOT}%{python3_sitearch}/openmpi/boost
|
|||||||
touch ${RPM_BUILD_ROOT}%{python3_sitearch}/openmpi/boost/__init__.py
|
touch ${RPM_BUILD_ROOT}%{python3_sitearch}/openmpi/boost/__init__.py
|
||||||
mv ${RPM_BUILD_ROOT}${MPI_HOME}/lib/boost-python%{python3_version}/mpi.so \
|
mv ${RPM_BUILD_ROOT}${MPI_HOME}/lib/boost-python%{python3_version}/mpi.so \
|
||||||
${RPM_BUILD_ROOT}%{python3_sitearch}/openmpi/boost/
|
${RPM_BUILD_ROOT}%{python3_sitearch}/openmpi/boost/
|
||||||
%endif
|
|
||||||
|
|
||||||
rm -f ${RPM_BUILD_ROOT}${MPI_HOME}/lib/libboost_{python,{w,}serialization}*
|
rm -f ${RPM_BUILD_ROOT}${MPI_HOME}/lib/libboost_{python,{w,}serialization}*
|
||||||
rm -f ${RPM_BUILD_ROOT}${MPI_HOME}/lib/libboost_numpy*
|
rm -f ${RPM_BUILD_ROOT}${MPI_HOME}/lib/libboost_numpy*
|
||||||
@ -675,7 +625,6 @@ export PATH=/bin${PATH:+:}$PATH
|
|||||||
%if 0%{with mpich}
|
%if 0%{with mpich}
|
||||||
%{_mpich_load}
|
%{_mpich_load}
|
||||||
|
|
||||||
%if %{with python3}
|
|
||||||
echo ============================= install $MPI_COMPILER ==================
|
echo ============================= install $MPI_COMPILER ==================
|
||||||
./b2 -q %{?_smp_mflags} \
|
./b2 -q %{?_smp_mflags} \
|
||||||
--with-mpi --with-graph_parallel --build-dir=$MPI_COMPILER \
|
--with-mpi --with-graph_parallel --build-dir=$MPI_COMPILER \
|
||||||
@ -687,7 +636,6 @@ mkdir -p ${RPM_BUILD_ROOT}%{python3_sitearch}/mpich/boost
|
|||||||
touch ${RPM_BUILD_ROOT}%{python3_sitearch}/mpich/boost/__init__.py
|
touch ${RPM_BUILD_ROOT}%{python3_sitearch}/mpich/boost/__init__.py
|
||||||
mv ${RPM_BUILD_ROOT}${MPI_HOME}/lib/boost-python%{python3_version}/mpi.so \
|
mv ${RPM_BUILD_ROOT}${MPI_HOME}/lib/boost-python%{python3_version}/mpi.so \
|
||||||
${RPM_BUILD_ROOT}%{python3_sitearch}/mpich/boost/
|
${RPM_BUILD_ROOT}%{python3_sitearch}/mpich/boost/
|
||||||
%endif
|
|
||||||
|
|
||||||
rm -f ${RPM_BUILD_ROOT}${MPI_HOME}/lib/libboost_{python,{w,}serialization}*
|
rm -f ${RPM_BUILD_ROOT}${MPI_HOME}/lib/libboost_{python,{w,}serialization}*
|
||||||
rm -f ${RPM_BUILD_ROOT}${MPI_HOME}/lib/libboost_numpy*
|
rm -f ${RPM_BUILD_ROOT}${MPI_HOME}/lib/libboost_numpy*
|
||||||
@ -700,16 +648,10 @@ export PATH=/bin${PATH:+:}$PATH
|
|||||||
echo ============================= install serial ==================
|
echo ============================= install serial ==================
|
||||||
./b2 -d+2 -q %{?_smp_mflags} \
|
./b2 -d+2 -q %{?_smp_mflags} \
|
||||||
--without-mpi --without-graph_parallel --build-dir=serial \
|
--without-mpi --without-graph_parallel --build-dir=serial \
|
||||||
%if !%{with context}
|
|
||||||
--without-context --without-coroutine \
|
|
||||||
--without-fiber \
|
|
||||||
%endif
|
|
||||||
--prefix=$RPM_BUILD_ROOT%{_prefix} \
|
--prefix=$RPM_BUILD_ROOT%{_prefix} \
|
||||||
--libdir=$RPM_BUILD_ROOT%{_libdir} \
|
--libdir=$RPM_BUILD_ROOT%{_libdir} \
|
||||||
variant=release threading=multi debug-symbols=on pch=off \
|
variant=release threading=multi debug-symbols=on pch=off \
|
||||||
%if %{with python3}
|
|
||||||
python=%{python3_version} \
|
python=%{python3_version} \
|
||||||
%endif
|
|
||||||
install
|
install
|
||||||
|
|
||||||
rm -r $RPM_BUILD_ROOT/%{_libdir}/cmake
|
rm -r $RPM_BUILD_ROOT/%{_libdir}/cmake
|
||||||
@ -882,8 +824,6 @@ fi
|
|||||||
%license LICENSE_1_0.txt
|
%license LICENSE_1_0.txt
|
||||||
%{_libdir}/libboost_nowide.so.%{version}
|
%{_libdir}/libboost_nowide.so.%{version}
|
||||||
|
|
||||||
%if %{with python3}
|
|
||||||
|
|
||||||
%files numpy3
|
%files numpy3
|
||||||
%license LICENSE_1_0.txt
|
%license LICENSE_1_0.txt
|
||||||
%{_libdir}/libboost_numpy%{python3_version_nodots}.so.%{version}
|
%{_libdir}/libboost_numpy%{python3_version_nodots}.so.%{version}
|
||||||
@ -897,8 +837,6 @@ fi
|
|||||||
%{_libdir}/libboost_numpy%{python3_version_nodots}.so
|
%{_libdir}/libboost_numpy%{python3_version_nodots}.so
|
||||||
%{_libdir}/libboost_python%{python3_version_nodots}.so
|
%{_libdir}/libboost_python%{python3_version_nodots}.so
|
||||||
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%files test
|
%files test
|
||||||
%license LICENSE_1_0.txt
|
%license LICENSE_1_0.txt
|
||||||
%{_libdir}/libboost_prg_exec_monitor.so.%{version}
|
%{_libdir}/libboost_prg_exec_monitor.so.%{version}
|
||||||
@ -972,8 +910,6 @@ fi
|
|||||||
%{_libdir}/openmpi/lib/libboost_mpi.so
|
%{_libdir}/openmpi/lib/libboost_mpi.so
|
||||||
%{_libdir}/openmpi/lib/libboost_graph_parallel.so
|
%{_libdir}/openmpi/lib/libboost_graph_parallel.so
|
||||||
|
|
||||||
%if %{with python3}
|
|
||||||
|
|
||||||
%files openmpi-python3
|
%files openmpi-python3
|
||||||
%license LICENSE_1_0.txt
|
%license LICENSE_1_0.txt
|
||||||
%{_libdir}/openmpi/lib/libboost_mpi_python%{python3_version_nodots}.so.%{version}
|
%{_libdir}/openmpi/lib/libboost_mpi_python%{python3_version_nodots}.so.%{version}
|
||||||
@ -983,8 +919,6 @@ fi
|
|||||||
%license LICENSE_1_0.txt
|
%license LICENSE_1_0.txt
|
||||||
%{_libdir}/openmpi/lib/libboost_mpi_python%{python3_version_nodots}.so
|
%{_libdir}/openmpi/lib/libboost_mpi_python%{python3_version_nodots}.so
|
||||||
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%files graph-openmpi
|
%files graph-openmpi
|
||||||
%license LICENSE_1_0.txt
|
%license LICENSE_1_0.txt
|
||||||
%{_libdir}/openmpi/lib/libboost_graph_parallel.so.%{version}
|
%{_libdir}/openmpi/lib/libboost_graph_parallel.so.%{version}
|
||||||
@ -1000,8 +934,6 @@ fi
|
|||||||
%{_libdir}/mpich/lib/libboost_mpi.so
|
%{_libdir}/mpich/lib/libboost_mpi.so
|
||||||
%{_libdir}/mpich/lib/libboost_graph_parallel.so
|
%{_libdir}/mpich/lib/libboost_graph_parallel.so
|
||||||
|
|
||||||
%if %{with python3}
|
|
||||||
|
|
||||||
%files mpich-python3
|
%files mpich-python3
|
||||||
%license LICENSE_1_0.txt
|
%license LICENSE_1_0.txt
|
||||||
%{_libdir}/mpich/lib/libboost_mpi_python%{python3_version_nodots}.so.%{version}
|
%{_libdir}/mpich/lib/libboost_mpi_python%{python3_version_nodots}.so.%{version}
|
||||||
@ -1011,8 +943,6 @@ fi
|
|||||||
%license LICENSE_1_0.txt
|
%license LICENSE_1_0.txt
|
||||||
%{_libdir}/mpich/lib/libboost_mpi_python%{python3_version_nodots}.so
|
%{_libdir}/mpich/lib/libboost_mpi_python%{python3_version_nodots}.so
|
||||||
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%files graph-mpich
|
%files graph-mpich
|
||||||
%license LICENSE_1_0.txt
|
%license LICENSE_1_0.txt
|
||||||
%{_libdir}/mpich/lib/libboost_graph_parallel.so.%{version}
|
%{_libdir}/mpich/lib/libboost_graph_parallel.so.%{version}
|
||||||
@ -1034,6 +964,9 @@ fi
|
|||||||
%{_mandir}/man1/bjam.1*
|
%{_mandir}/man1/bjam.1*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Dec 10 2021 sdlzx <sdlzx@163.com> - 1.78.0-2
|
||||||
|
- Simplify spec: remove useless bcond
|
||||||
|
|
||||||
* Fri Dec 10 2021 sdlzx <sdlzx@163.com> - 1.78.0-1
|
* Fri Dec 10 2021 sdlzx <sdlzx@163.com> - 1.78.0-1
|
||||||
- update to 1.78.0
|
- update to 1.78.0
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user