extract common b2 configs into b2_config
(cherry picked from commit e3e238a9e235365d083f0e4909d2dc94f83acc29)
This commit is contained in:
parent
c78c7d6df8
commit
a4e325ad1a
41
boost.spec
41
boost.spec
@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
Name: boost
|
Name: boost
|
||||||
Version: 1.78.0
|
Version: 1.78.0
|
||||||
Release: 2
|
Release: 3
|
||||||
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
|
||||||
@ -548,12 +548,14 @@ using python : %{python3_version} : /usr/bin/python3 : /usr/include/python%{pyth
|
|||||||
EOF
|
EOF
|
||||||
|
|
||||||
./bootstrap.sh --with-toolset=gcc --with-icu
|
./bootstrap.sh --with-toolset=gcc --with-icu
|
||||||
|
%define opt_build -d+2 -q %{?_smp_mflags} --no-cmake-config
|
||||||
|
%define opt_feature variant=release threading=multi debug-symbols=on pch=off
|
||||||
|
%define opt_python python=%{python3_version}
|
||||||
|
%define b2_options %{opt_build} %{opt_feature} %{opt_python}
|
||||||
|
|
||||||
echo ============================= build serial ==================
|
echo ============================= build serial ==================
|
||||||
./b2 -d+2 -q %{?_smp_mflags} \
|
./b2 %{b2_options} \
|
||||||
--without-mpi --without-graph_parallel --build-dir=serial \
|
--without-mpi --without-graph_parallel --build-dir=serial \
|
||||||
variant=release threading=multi debug-symbols=on pch=off \
|
|
||||||
python=%{python3_version} \
|
|
||||||
stage
|
stage
|
||||||
|
|
||||||
%if %{with openmpi} || %{with mpich}
|
%if %{with openmpi} || %{with mpich}
|
||||||
@ -564,10 +566,9 @@ module purge ||:
|
|||||||
%{_openmpi_load}
|
%{_openmpi_load}
|
||||||
|
|
||||||
echo ============================= build $MPI_COMPILER ==================
|
echo ============================= build $MPI_COMPILER ==================
|
||||||
./b2 -d+2 -q %{?_smp_mflags} \
|
./b2 %{b2_options} \
|
||||||
--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 \
|
stage
|
||||||
python=%{python3_version} stage
|
|
||||||
|
|
||||||
%{_openmpi_unload}
|
%{_openmpi_unload}
|
||||||
export PATH=/bin${PATH:+:}$PATH
|
export PATH=/bin${PATH:+:}$PATH
|
||||||
@ -577,10 +578,9 @@ export PATH=/bin${PATH:+:}$PATH
|
|||||||
%{_mpich_load}
|
%{_mpich_load}
|
||||||
|
|
||||||
echo ============================= build $MPI_COMPILER ==================
|
echo ============================= build $MPI_COMPILER ==================
|
||||||
./b2 -d+2 -q %{?_smp_mflags} \
|
./b2 %{b2_options} \
|
||||||
--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 \
|
stage
|
||||||
python=%{python3_version} stage
|
|
||||||
|
|
||||||
%{_mpich_unload}
|
%{_mpich_unload}
|
||||||
export PATH=/bin${PATH:+:}$PATH
|
export PATH=/bin${PATH:+:}$PATH
|
||||||
@ -603,11 +603,10 @@ module purge ||:
|
|||||||
%{_openmpi_load}
|
%{_openmpi_load}
|
||||||
|
|
||||||
echo ============================= install $MPI_COMPILER ==================
|
echo ============================= install $MPI_COMPILER ==================
|
||||||
./b2 -q %{?_smp_mflags} \
|
./b2 %{b2_options} \
|
||||||
--with-mpi --with-graph_parallel --build-dir=$MPI_COMPILER \
|
--with-mpi --with-graph_parallel --build-dir=$MPI_COMPILER \
|
||||||
--stagedir=${RPM_BUILD_ROOT}${MPI_HOME} \
|
--stagedir=${RPM_BUILD_ROOT}${MPI_HOME} \
|
||||||
variant=release threading=multi debug-symbols=on pch=off \
|
install
|
||||||
python=%{python3_version} stage
|
|
||||||
|
|
||||||
mkdir -p ${RPM_BUILD_ROOT}%{python3_sitearch}/openmpi/boost
|
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
|
||||||
@ -616,7 +615,6 @@ mv ${RPM_BUILD_ROOT}${MPI_HOME}/lib/boost-python%{python3_version}/mpi.so \
|
|||||||
|
|
||||||
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*
|
||||||
rm -r ${RPM_BUILD_ROOT}${MPI_HOME}/lib/cmake
|
|
||||||
|
|
||||||
%{_openmpi_unload}
|
%{_openmpi_unload}
|
||||||
export PATH=/bin${PATH:+:}$PATH
|
export PATH=/bin${PATH:+:}$PATH
|
||||||
@ -626,11 +624,10 @@ export PATH=/bin${PATH:+:}$PATH
|
|||||||
%{_mpich_load}
|
%{_mpich_load}
|
||||||
|
|
||||||
echo ============================= install $MPI_COMPILER ==================
|
echo ============================= install $MPI_COMPILER ==================
|
||||||
./b2 -q %{?_smp_mflags} \
|
./b2 %{b2_options} \
|
||||||
--with-mpi --with-graph_parallel --build-dir=$MPI_COMPILER \
|
--with-mpi --with-graph_parallel --build-dir=$MPI_COMPILER \
|
||||||
--stagedir=${RPM_BUILD_ROOT}${MPI_HOME} \
|
--stagedir=${RPM_BUILD_ROOT}${MPI_HOME} \
|
||||||
variant=release threading=multi debug-symbols=on pch=off \
|
install
|
||||||
python=%{python3_version} stage
|
|
||||||
|
|
||||||
mkdir -p ${RPM_BUILD_ROOT}%{python3_sitearch}/mpich/boost
|
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
|
||||||
@ -639,23 +636,18 @@ mv ${RPM_BUILD_ROOT}${MPI_HOME}/lib/boost-python%{python3_version}/mpi.so \
|
|||||||
|
|
||||||
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*
|
||||||
rm -r ${RPM_BUILD_ROOT}${MPI_HOME}/lib/cmake
|
|
||||||
|
|
||||||
%{_mpich_unload}
|
%{_mpich_unload}
|
||||||
export PATH=/bin${PATH:+:}$PATH
|
export PATH=/bin${PATH:+:}$PATH
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
echo ============================= install serial ==================
|
echo ============================= install serial ==================
|
||||||
./b2 -d+2 -q %{?_smp_mflags} \
|
./b2 %{b2_options} \
|
||||||
--without-mpi --without-graph_parallel --build-dir=serial \
|
--without-mpi --without-graph_parallel --build-dir=serial \
|
||||||
--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 \
|
|
||||||
python=%{python3_version} \
|
|
||||||
install
|
install
|
||||||
|
|
||||||
rm -r $RPM_BUILD_ROOT/%{_libdir}/cmake
|
|
||||||
|
|
||||||
version=%{version}
|
version=%{version}
|
||||||
|
|
||||||
echo ============================= install Boost.Build ==================
|
echo ============================= install Boost.Build ==================
|
||||||
@ -964,6 +956,9 @@ fi
|
|||||||
%{_mandir}/man1/bjam.1*
|
%{_mandir}/man1/bjam.1*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Sun Dec 19 2021 sdlzx <sdlzx@163.com> - 1.78.0-3
|
||||||
|
- Simplify spec: extract common b2 configs into b2_config
|
||||||
|
|
||||||
* Fri Dec 10 2021 sdlzx <sdlzx@163.com> - 1.78.0-2
|
* Fri Dec 10 2021 sdlzx <sdlzx@163.com> - 1.78.0-2
|
||||||
- Simplify spec: remove useless bcond
|
- Simplify spec: remove useless bcond
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user