# 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 name=boost version=1.76.0 release=2 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-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/boostorg/ublas/commit/a31e5cffa85f.patch 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}" 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 ln -s b2 $PKG/usr/bin/bjam ## ./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])') ./b2 clean ./b2 stage $config python="$pyver3" ./b2 install threading=multi link=shared # 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 }