extra/boost to 1.76.0-6

This commit is contained in:
Kevin Mihelich 2021-12-13 00:32:42 +00:00
parent 9af0511a3a
commit 065c6222a3

View file

@ -16,7 +16,7 @@
pkgname=('boost' 'boost-libs')
pkgver=1.76.0
pkgrel=2
pkgrel=6
_srcname=boost_${pkgver//./_}
pkgdesc="Free peer-reviewed portable C++ source libraries"
arch=('x86_64')
@ -24,15 +24,20 @@ url="https://www.boost.org/"
license=('custom')
makedepends=('icu' 'python' 'python-numpy' 'bzip2' 'zlib' 'openmpi' 'zstd')
source=(https://boostorg.jfrog.io/artifactory/main/release/$pkgver/source/$_srcname.tar.gz
$pkgname-boost_install-python310.patch::https://github.com/boostorg/boost_install/commit/e193f080c7d2.patch
$pkgname-ublas-c++20-iterator.patch::https://github.com/boostorg/ublas/commit/a31e5cffa85f.patch
https://patch-diff.githubusercontent.com/raw/boostorg/regex/pull/132.patch)
sha256sums=('7bd7ddceec1a1dfdcbdb3e609b60d01739c38390a5f956385a12f3122049f0ca'
'550ad9a4d0afa108bb9f2e2b7f53b548618542db8000e2334261f6fe03850d87'
'aa38addb40d5f44b4a8472029b475e7e6aef1c460509eb7d8edf03491dc1b5ee'
'05590413cbefd1d64c65d29c5d7d06a54629dc2db26f09e008a18cda8a61d771')
prepare() {
cd $_srcname
# https://github.com/boostorg/boost_install/pull/53
patch -Np1 -d tools/boost_install <../$pkgname-boost_install-python310.patch
# https://github.com/boostorg/ublas/pull/97
patch -Np2 -i ../$pkgname-ublas-c++20-iterator.patch
@ -69,7 +74,7 @@ build() {
runtime-link=shared \
link=shared,static \
toolset=gcc \
python=3.9 \
python=3.10 \
cflags="$CPPFLAGS $CFLAGS -fPIC -O3" \
cxxflags="$CPPFLAGS $CXXFLAGS -fPIC -O3" \
linkflags="$LDFLAGS" \
@ -104,9 +109,9 @@ package_boost-libs() {
libboost_json.so libboost_locale.so libboost_log.so libboost_log_setup.so
libboost_math_c99.so libboost_math_c99f.so libboost_math_c99l.so
libboost_math_tr1.so libboost_math_tr1f.so libboost_math_tr1l.so
libboost_mpi.so libboost_numpy39.so
libboost_mpi.so libboost_numpy310.so
libboost_prg_exec_monitor.so libboost_program_options.so
libboost_python39.so libboost_random.so
libboost_python310.so libboost_random.so
libboost_regex.so libboost_serialization.so
libboost_stacktrace_addr2line.so libboost_stacktrace_basic.so
libboost_stacktrace_noop.so libboost_system.so libboost_thread.so
@ -117,15 +122,15 @@ package_boost-libs() {
cp -a fakeinstall/lib/*.so* "$pkgdir"/usr/lib/
# https://github.com/boostorg/mpi/issues/112
install -d "$pkgdir"/usr/lib/python3.9/site-packages/boost
touch "$pkgdir"/usr/lib/python3.9/site-packages/boost/__init__.py
python -m compileall -o 0 -o 1 -o 2 "$pkgdir"/usr/lib/python3.9/site-packages/boost
cp fakeinstall/lib/boost-python3.9/mpi.so \
"$pkgdir"/usr/lib/python3.9/site-packages/boost/mpi.so
install -d "$pkgdir"/usr/lib/python3.10/site-packages/boost
touch "$pkgdir"/usr/lib/python3.10/site-packages/boost/__init__.py
python -m compileall -o 0 -o 1 -o 2 "$pkgdir"/usr/lib/python3.10/site-packages/boost
cp fakeinstall/lib/boost-python3.10/mpi.so \
"$pkgdir"/usr/lib/python3.10/site-packages/boost/mpi.so
# https://github.com/boostorg/python/issues/203#issuecomment-391477685
for _lib in python numpy; do
ln -srL "$pkgdir"/usr/lib/libboost_${_lib}3{9,}.so
ln -srL "$pkgdir"/usr/lib/libboost_${_lib}3{10,}.so
done
install -Dm644 -t "$pkgdir/usr/share/licenses/$pkgname" $_srcname/LICENSE_1_0.txt