[notify] boost: 1.76.0 -> 1.78.0 rebuild dependent ports to relink to versioned libraries, check with revdep

This commit is contained in:
Danny Rawlins 2022-01-05 08:55:30 +11:00
parent f4a83b6ae6
commit a7b53a465c
4 changed files with 927 additions and 389 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1,8 +1,7 @@
untrusted comment: verify with /etc/ports/contrib.pub
RWSagIOpLGJF30W0CwZqdxqwXM2U8MODMwZBPYOXpaGdQtRSWs/AmK2gDPfrXn0mHTex5oWIq6hCEp1ZSksNIZjnsMUbEO7uQw4=
SHA256 (Pkgfile) = 44cdb651b83cb2f0f106da51ac085530637a2564cb7fc33e108de8e6d0cfc2d2
SHA256 (.footprint) = cfa7b4c07712fba576a518e2bd3d776ad4f04916a3ee9d778fa4f01b062ae340
SHA256 (boost_1_76_0.tar.bz2) = f0397ba6e982c4450f27bf32a2a83292aba035b827a5623a14636ea583318c41
SHA256 (boost-1.74-CVE-2012-2677.patch) = 22cebe2a5020b3ce362e52ccc05506dbcc885723896373409597f0b4d0de1f53
SHA256 (boost-1.71.0-disable_icu_rpath.patch) = a47429ab9a144ed9d9a12dcdac9dbcd15c490b726fc7e1d6db204bda8a4b987e
RWSagIOpLGJF39ndvrrQhnQjk+abeZCFOqJbvk0A5bdfx9/v5PaOoVTmqTF5urFEIbC4lE+RZs17TSsq9dBuUpTDBAaR6e61Kgw=
SHA256 (Pkgfile) = f41dbf052cf13f61ff90db04c54a838ad9b95905d3c1fbaa0d0ceb965e748226
SHA256 (.footprint) = ce1cf80706d42890baa4e6770f239940b65564e97ff2f636d4a3171bea9cd442
SHA256 (boost_1_78_0.tar.bz2) = 8681f175d4bdb26c52222665793eef08490d7758529330f98d3b29dd0735bccc
SHA256 (boost-b2-fix-lib-install.patch) = d233b16920ad7da8bb6e02bf5fb4e429592057b4f4db28d4babf3850e837a8db
SHA256 (boost-ublas-c++20-iterator.patch) = aa38addb40d5f44b4a8472029b475e7e6aef1c460509eb7d8edf03491dc1b5ee

View File

@ -1,55 +1,67 @@
# Description: Free peer-reviewed portable C++ source libraries.
# URL: https://www.boost.org/
# Maintainer: Danny Rawlins, crux at romster dot me
# Depends on: python
# Optional: icu python3-numpy
# Depends on: bzip2 zstd
# Optional: icu openmpi python3-numpy
name=boost
version=1.76.0
release=2
version=1.78.0
release=1
source=(https://boostorg.jfrog.io/artifactory/main/release/$version/source/${name}_${version//./_}.tar.bz2
boost-1.74-CVE-2012-2677.patch
boost-1.71.0-disable_icu_rpath.patch
boost-b2-fix-lib-install.patch
boost-ublas-c++20-iterator.patch)
build() {
cd ${name}_${version//./_}
patch -p1 -i $SRC/boost-1.74-CVE-2012-2677.patch
patch -p1 -i $SRC/boost-1.71.0-disable_icu_rpath.patch
# https://github.com/bfgroup/b2/issues/104
patch -p1 -d tools/build -i $SRC/boost-b2-fix-lib-install.patch
# https://github.com/boostorg/ublas/commit/a31e5cffa85f.patch
# https://github.com/boostorg/ublas/pull/97
patch -p2 -i $SRC/boost-ublas-c++20-iterator.patch
local config="
variant=release \
threading=multi \
runtime-link=shared \
link=shared,static \
debug-symbols=off \
toolset=gcc \
-j ${JOBS-1}"
# Boost.Build does not allow for disabling of numpy
# extensions, thereby leading to automagic numpy
# https://github.com/boostorg/python/issues/111#issuecomment-280447482
prt-get isinst python3-numpy || sed \
-e 's/\[ unless \[ python\.numpy \] : <build>no \]/<build>no/g' \
-i libs/python/build/Jamfile
local ICU="$([ -e /usr/bin/icu-config ] && echo --with-icu)"
./bootstrap.sh --prefix=$PKG/usr --with-toolset=gcc $ICU --with-python=/usr/bin/python2
local pyver2="$(/usr/bin/python2 -c 'import sys; print("%s.%s" % sys.version_info[:2])')"
./b2 stage $config python="$pyver2"
./b2 install threading=multi link=shared
./b2 install threading=multi link=static
install -m 0755 -D b2 $PKG/usr/bin/b2
pushd tools/build
./bootstrap.sh --cxxflags="$CXXFLAGS $LDFLAGS"
./b2 install --prefix=$PKG/usr
ln -s b2 $PKG/usr/bin/bjam
popd
##
./bootstrap.sh --prefix=$PKG/usr --with-toolset=gcc $ICU --with-python=/usr/bin/python3 --with-libraries=python
local pyver3=$(/usr/bin/python3 -c 'import sys; print("%s.%s" % sys.version_info[:2])')
# Boost.Build does not allow for disabling of numpy
# extensions, thereby leading to automagic numpy
# https://github.com/boostorg/python/issues/111#issuecomment-280447482
prt-get isinst python3-numpy || sed \
-e 's/\[ unless \[ python\.numpy \] : <build>no \]/<build>no/g' \
-i libs/python/build/Jamfile
./b2 clean
./b2 stage $config python="$pyver3"
./b2 install threading=multi link=shared
./bootstrap.sh --with-toolset=gcc --with-python=/usr/bin/python3
# https://github.com/boostorg/python/issues/203#issuecomment-391477685
local pyver="$(/usr/bin/python3 -c 'import sys; print("%s%s" % sys.version_info[:2])')"
ln -s libboost_python$pyver.so $PKG/usr/lib/libboost_python3.so
# support for OpenMPI
prt-get isinst openmpi && echo "using mpi ;" >>project-config.jam || PKGMK_BOOST+=' --without-mpi --without-graph_parallel'
prt-get isinst icu || PKGMK_BOOST+=' --disable-icu boost.locale.icu=off'
./b2 install ${PKGMK_BOOST} \
--prefix=$PKG/usr \
--layout=system \
--without-stacktrace \
-j ${JOBS-1} \
variant=release \
debug-symbols=off \
threading=multi \
runtime-link=shared \
link=shared,static \
toolset=gcc \
python=$(/usr/bin/python3 -c 'import sys; print("%s.%s" % sys.version_info[:2])') \
cflags="$CPPFLAGS $CFLAGS -fPIC -O3 -ffat-lto-objects" \
cxxflags="$CPPFLAGS $CXXFLAGS -fPIC -O3 -ffat-lto-objects" \
linkflags="$LDFLAGS"
prt-get isinst python3-numpy || rm -r $PKG/usr/include/boost/python/numpy*
prt-get isinst openmpi || rm -r $PKG//usr/include/boost/mpi/python*
}

View File

@ -0,0 +1,72 @@
From 78fd284a42caabe8815cb0870b46e5567872e75b Mon Sep 17 00:00:00 2001
From: Dmitry <grisumbras@gmail.com>
Date: Sat, 11 Dec 2021 16:58:23 +0300
Subject: [PATCH] Don't skip install targets if there's <build>no in ureqs
(#113)
---
src/tools/stage.jam | 4 ++++
test/install_build_no.py | 26 ++++++++++++++++++++++++++
test/test_all.py | 1 +
3 files changed, 31 insertions(+)
create mode 100755 test/install_build_no.py
diff --git a/src/tools/stage.jam b/src/tools/stage.jam
index c5f02e3ba4..325129dc81 100644
--- a/src/tools/stage.jam
+++ b/src/tools/stage.jam
@@ -478,6 +478,10 @@ class install-target-class : basic-target
return [ sequence.unique $(result2) ] ;
}
+ rule skip-from-usage-requirements ( )
+ {
+ }
+
# Returns true iff 'type' is subtype of some element of 'types-to-include'.
#
local rule include-type ( type : types-to-include * )
diff --git a/test/install_build_no.py b/test/install_build_no.py
new file mode 100755
index 0000000000..0ccf3c5cc6
--- /dev/null
+++ b/test/install_build_no.py
@@ -0,0 +1,26 @@
+#!/usr/bin/python
+
+# Copyright 2021 Dmitry Arkhipov (grisumbras@gmail.com)
+# Distributed under the Boost Software License, Version 1.0.
+# (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt)
+
+# Check that <build>no in usage-requirements of dependencies does not affect
+# install rule, i.e. a skipped installed target does not affect insallation of
+# other targets.
+
+import BoostBuild
+
+t = BoostBuild.Tester()
+
+t.write("a.cpp", "int main() {}\n")
+
+t.write("jamroot.jam", """
+make x : : maker : <build>no ;
+exe a : a.cpp ;
+install install : x a ;
+""")
+
+t.run_build_system()
+t.expect_addition("install/a.exe")
+
+t.cleanup()
diff --git a/test/test_all.py b/test/test_all.py
index b7ef5ad701..9ed729d017 100644
--- a/test/test_all.py
+++ b/test/test_all.py
@@ -250,6 +250,7 @@ def reorder_tests(tests, first_test):
"inherit_toolset",
"inherited_dependency",
"inline",
+ "install_build_no",
"libjpeg",
"liblzma",
"libpng",