From 89c67472166f29650a2953875bf38dd3afb13bd0 Mon Sep 17 00:00:00 2001 From: Konstantin Podsvirov Date: Wed, 9 Feb 2022 19:36:41 +0300 Subject: [PATCH 1/2] boost: Enable Boost.Python (NumPy) --- mingw-w64-boost/PKGBUILD | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mingw-w64-boost/PKGBUILD b/mingw-w64-boost/PKGBUILD index 108c6f3bb8..4b39cc95eb 100644 --- a/mingw-w64-boost/PKGBUILD +++ b/mingw-w64-boost/PKGBUILD @@ -12,7 +12,7 @@ pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" pkgver=1.78.0 _boostver=${pkgver//./_} -pkgrel=1 +pkgrel=2 pkgdesc="Free peer-reviewed portable C++ source libraries (mingw-w64)" arch=('any') mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32') @@ -24,7 +24,10 @@ depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs" "${MINGW_PACKAGE_PREFIX}-xz" "${MINGW_PACKAGE_PREFIX}-zstd" "${MINGW_PACKAGE_PREFIX}-zlib") +optdepends=("${MINGW_PACKAGE_PREFIX}-python: For Boost.Python" + "${MINGW_PACKAGE_PREFIX}-python-numpy: For Boost.Python (NumPy)") makedepends=("${MINGW_PACKAGE_PREFIX}-python" + "${MINGW_PACKAGE_PREFIX}-python-numpy" "${MINGW_PACKAGE_PREFIX}-cc" "lndir") options=('strip' 'buildflags' 'staticlibs') From 2b09adc6c3be278760011cdfc4d1afc5a8afa669 Mon Sep 17 00:00:00 2001 From: Jeremy Drake Date: Wed, 9 Feb 2022 12:40:54 -0800 Subject: [PATCH 2/2] boost: override c++ compiler mingw logic lives in gcc.jam (the gcc toolset), so we have to use that even for clang, where the g++ alias no longer exists. Pass CXX when building b2, and override the compiler to use to c++.exe in user-config.jam --- mingw-w64-boost/PKGBUILD | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/mingw-w64-boost/PKGBUILD b/mingw-w64-boost/PKGBUILD index 4b39cc95eb..c323129a7e 100644 --- a/mingw-w64-boost/PKGBUILD +++ b/mingw-w64-boost/PKGBUILD @@ -1,11 +1,7 @@ # Maintainer: Alexey Pavlov -if [[ "${MINGW_PREFIX}" =~ /clang.* ]] ; then - # _toolset=clang creates dlls names without the `lib' prefix - _toolset=gcc -else - _toolset=gcc -fi +# mingw logic lives in gcc.jam, so we always need to use the 'gcc' toolset +_toolset=gcc _realname=boost pkgbase=mingw-w64-${_realname} @@ -168,9 +164,14 @@ build() { local _pyver=$(${MINGW_PREFIX}/bin/python -c "import sys;sys.stdout.write('.'.join(map(str, sys.version_info[:2])))") echo "using python : ${_pyver} : ${PREFIX_DEPS}/bin/python.exe : ${PREFIX_DEPS}/include/python${_pyver} : ${PREFIX_DEPS}/lib/python${_pyver}/config-${_pyver} ;" >> ./tools/build/src/user-config.jam - #echo "using gcc : : ${PREFIX_DEPS}/bin/g++.exe : ${PREFIX_DEPS}/bin/windres.exe ;" >> ./tools/build/src/user-config.jam + # configure b2 to use c++ rather than g++, as the latter no longer exists in + # clang prefixes + echo "using gcc : : ${PREFIX_DEPS}/bin/c++.exe ;" >> ./tools/build/src/user-config.jam - ./bootstrap.sh --with-icu=${MINGW_PREFIX} --with-python=${MINGW_PREFIX} --with-toolset=$_toolset + ./tools/build/src/engine/build.sh --cxx="${CXX}" gcc + cp ./tools/build/src/engine/b2 . + + ./bootstrap.sh --with-icu=${MINGW_PREFIX} --with-python=${MINGW_PREFIX} --with-toolset=$_toolset --with-bjam="$(pwd)/b2" setb2args ./b2 $b2args -j$(nproc)