From e23616af91c1b434a59a7cdf97985689031a8cb3 Mon Sep 17 00:00:00 2001 From: Liu Zixian Date: Sat, 29 Jan 2022 23:44:30 +0800 Subject: [PATCH] simplify %build --- boost.spec | 35 +++++++++-------------------------- 1 file changed, 9 insertions(+), 26 deletions(-) diff --git a/boost.spec b/boost.spec index 50f28f1..5084727 100644 --- a/boost.spec +++ b/boost.spec @@ -2,7 +2,7 @@ Name: boost Version: 1.78.0 -Release: 8 +Release: 9 Summary: The free peer-reviewed portable C++ source libraries License: Boost Software License 1.0 URL: http://www.boost.org @@ -276,45 +276,25 @@ as that on the Boost web page (http://www.boost.org/doc/libs/%{version_enc}). %autosetup -p1 -n %{name}_%{version_enc} %build -PYTHON3_ABIFLAGS=$(/usr/bin/python3-config --abiflags) -: PYTHON3_VERSION=%{python3_version} -: PYTHON3_ABIFLAGS=${PYTHON3_ABIFLAGS} - -export RPM_OPT_FLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing -Wno-unused-local-typedefs -Wno-deprecated-declarations" -export RPM_LD_FLAGS - -cat > ./tools/build/src/user-config.jam << "EOF" -import os ; -local RPM_OPT_FLAGS = [ os.environ RPM_OPT_FLAGS ] ; -local RPM_LD_FLAGS = [ os.environ RPM_LD_FLAGS ] ; - -using gcc : : : $(RPM_OPT_FLAGS) $(RPM_LD_FLAGS) ; -EOF - -cat >> ./tools/build/src/user-config.jam << EOF -using python : %{python3_version} : /usr/bin/python3 : /usr/include/python%{python3_version}${PYTHON3_ABIFLAGS} : : : ; -EOF - ./bootstrap.sh %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_feature release debug-symbols=on pch=off %define opt_python python=%{python3_version} -%define b2_options %{opt_build} %{opt_feature} %{opt_python} - -./b2 %{b2_options} --without-mpi --without-graph_parallel +%define opt_libs --without-mpi --without-graph_parallel +%define b2_options %{opt_build} %{opt_feature} %{opt_python} %{opt_libs} +./b2 %{b2_options} cxxflags="$RPM_OPT_FLAGS" %check : %install ./b2 %{b2_options} \ - --without-mpi --without-graph_parallel \ --prefix=$RPM_BUILD_ROOT%{_prefix} \ --libdir=$RPM_BUILD_ROOT%{_libdir} \ install mkdir boost-doc boost-example -find libs doc more -regex '.*\.\(html?\|css\|png\|gif\)' -exec cp {} boost-doc --parents -r \; +find libs doc more -regex '.*\.\(html?\|css\|png\|gif\)' -exec cp {} boost-doc --parents \; cp index.html boost.png rst.css boost.css boost-doc find . -name example -exec cp {} boost-example --parents -r \; @@ -455,6 +435,9 @@ find . -name example -exec cp {} boost-example --parents -r \; %{_libdir}/*.a %changelog +* Sat Jan 29 2022 Liu Zixian - 1.78.0-9 +- simplify building scripts + * Fri Jan 28 2022 Liu Zixian - 1.78.0-8 - backport bugfix for boost 1.78.0 known issues - https://www.boost.org/users/history/version_1_78_0.html -- Gitee