simplify %build
This commit is contained in:
parent
0ecd5e495a
commit
397010b3ac
38
boost.spec
38
boost.spec
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
Name: boost
|
Name: boost
|
||||||
Version: 1.78.0
|
Version: 1.78.0
|
||||||
Release: 8
|
Release: 9
|
||||||
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
|
||||||
@ -52,7 +52,7 @@ Requires: %{name}-wave%{?_isa} = %{version}-%{release}
|
|||||||
|
|
||||||
BuildRequires: gcc-c++
|
BuildRequires: gcc-c++
|
||||||
# required by python3
|
# required by python3
|
||||||
BuildRequires: python3-devel
|
BuildRequires: python3-devel python3-unversioned-command
|
||||||
# optional library for asio
|
# optional library for asio
|
||||||
BuildRequires: openssl-devel
|
BuildRequires: openssl-devel
|
||||||
# optional libraries for iostreams
|
# optional libraries for iostreams
|
||||||
@ -276,45 +276,24 @@ as that on the Boost web page (http://www.boost.org/doc/libs/%{version_enc}).
|
|||||||
%autosetup -p1 -n %{name}_%{version_enc}
|
%autosetup -p1 -n %{name}_%{version_enc}
|
||||||
|
|
||||||
%build
|
%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 : : : <compileflags>$(RPM_OPT_FLAGS) <linkflags>$(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
|
./bootstrap.sh
|
||||||
%define opt_build -d+2 -q %{?_smp_mflags} --no-cmake-config
|
%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 opt_libs --without-mpi --without-graph_parallel
|
||||||
%define b2_options %{opt_build} %{opt_feature} %{opt_python}
|
%define b2_options %{opt_build} %{opt_feature} %{opt_libs}
|
||||||
|
./b2 %{b2_options} cxxflags="$RPM_OPT_FLAGS"
|
||||||
./b2 %{b2_options} --without-mpi --without-graph_parallel
|
|
||||||
|
|
||||||
%check
|
%check
|
||||||
:
|
:
|
||||||
|
|
||||||
%install
|
%install
|
||||||
./b2 %{b2_options} \
|
./b2 %{b2_options} \
|
||||||
--without-mpi --without-graph_parallel \
|
|
||||||
--prefix=$RPM_BUILD_ROOT%{_prefix} \
|
--prefix=$RPM_BUILD_ROOT%{_prefix} \
|
||||||
--libdir=$RPM_BUILD_ROOT%{_libdir} \
|
--libdir=$RPM_BUILD_ROOT%{_libdir} \
|
||||||
install
|
install
|
||||||
|
|
||||||
mkdir boost-doc boost-example
|
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
|
cp index.html boost.png rst.css boost.css boost-doc
|
||||||
find . -name example -exec cp {} boost-example --parents -r \;
|
find . -name example -exec cp {} boost-example --parents -r \;
|
||||||
|
|
||||||
@ -455,6 +434,9 @@ find . -name example -exec cp {} boost-example --parents -r \;
|
|||||||
%{_libdir}/*.a
|
%{_libdir}/*.a
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Sat Jan 29 2022 Liu Zixian <liuzixian4@huawei.com> - 1.78.0-9
|
||||||
|
- simplify building scripts
|
||||||
|
|
||||||
* Fri Jan 28 2022 Liu Zixian <liuzixian4@huawei.com> - 1.78.0-8
|
* Fri Jan 28 2022 Liu Zixian <liuzixian4@huawei.com> - 1.78.0-8
|
||||||
- backport bugfix for boost 1.78.0 known issues
|
- backport bugfix for boost 1.78.0 known issues
|
||||||
- https://www.boost.org/users/history/version_1_78_0.html
|
- https://www.boost.org/users/history/version_1_78_0.html
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user