From 54f8b3f52d254b9bc01600115aade26e2628ef09 Mon Sep 17 00:00:00 2001 From: Andreas Baumann Date: Sat, 22 Feb 2025 12:50:20 +0100 Subject: added boost181-libs --- extra/boost181-libs/PKGBUILD | 100 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 extra/boost181-libs/PKGBUILD (limited to 'extra/boost181-libs/PKGBUILD') diff --git a/extra/boost181-libs/PKGBUILD b/extra/boost181-libs/PKGBUILD new file mode 100644 index 00000000..7edc8eb7 --- /dev/null +++ b/extra/boost181-libs/PKGBUILD @@ -0,0 +1,100 @@ +options=(!lto) +options=(!lto) +# Maintainer: Evangelos Foutras +# Contributor: Levente Polyak +# Contributor: Bart?omiej Piotrowski +# Contributor: Marius Knaust +# Contributor: Ionut Biru +# Contributor: Stéphane Gaudreault +# Contributor: kevin +# Contributor: Giovanni Scafora +# Contributor: Kritoke +# Contributor: Luca Roccia + +pkgname=('boost181-libs') +pkgver=1.81.0 +pkgrel=1 +_srcname=boost_${pkgver//./_} +pkgdesc="Free peer-reviewed portable C++ source libraries" +arch=(i486 i686 pentium4 'x86_64') +url="https://www.boost.org/" +license=('custom') +makedepends=('icu' 'python' 'python-numpy' 'bzip2' 'zlib' 'openmpi' 'zstd') +source=(https://archives.boost.io/release/$pkgver/source/$_srcname.tar.bz2 + $pkgname-fix-smart-pointer-output.patch::https://github.com/boostorg/smart_ptr/commit/e7433ba54596da97cb7859455cd37ca140305a9c.patch) +sha256sums=('71feeed900fbccca04a3b4f2f84a7c217186f28a940ed8b7ed4725986baf99fa' + '22aab67d550b7f57e361d1c2ea8492a6e4efc5e1b650c8267de52cc5a0c0e46d') + +prepare() { + cd $_srcname + + patch -Np2 -i ../$pkgname-fix-smart-pointer-output.patch +} + +build() { + local JOBS="$(sed 's/.*\(-j *[0-9]\+\).*/\1/' <<<$MAKEFLAGS)" + local python_version=$( + python -c 'import sys; print(".".join(map(str, sys.version_info[:2])))') + + pushd $_srcname/tools/build + ./bootstrap.sh --cxxflags="$CXXFLAGS $LDFLAGS" + ./b2 install --prefix="$srcdir"/fakeinstall + ln -s b2 "$srcdir"/fakeinstall/bin/bjam + popd + + cd $_srcname + ./bootstrap.sh --with-toolset=gcc --with-icu --with-python=python3 + + # support for OpenMPI + echo "using mpi ;" >>project-config.jam + + # boostbook is needed by quickbook + install -dm755 "$srcdir"/fakeinstall/share/boostbook + cp -a tools/boostbook/{xsl,dtd} "$srcdir"/fakeinstall/share/boostbook/ + + # install to $srcdir/fakeinstall in preparation for split packaging + ./b2 install \ + variant=release \ + debug-symbols=off \ + threading=multi \ + runtime-link=shared \ + link=shared,static \ + toolset=gcc \ + --without-python \ + cflags="$CPPFLAGS $CFLAGS -fPIC -O3 -ffat-lto-objects" \ + cxxflags="$CPPFLAGS $CXXFLAGS -fPIC -O3 -ffat-lto-objects" \ + linkflags="$LDFLAGS" \ + --layout=system \ + $JOBS \ + \ + --prefix="$srcdir"/fakeinstall || true +} + +package_boost181-libs() { + pkgdesc+=' (runtime libraries)' + depends=('bzip2' 'zlib' 'icu' 'zstd') + optdepends=('openmpi: for mpi support') + + install -dm755 "$pkgdir"/usr/lib + cp -a fakeinstall/lib/*.so* "$pkgdir"/usr/lib/ + # no develpment so links, just the so libs + rm -f "$pkgdir"/usr/lib/*.so + + install -Dm644 -t "$pkgdir/usr/share/licenses/$pkgname" $_srcname/LICENSE_1_0.txt +} + +# vim:set ts=2 sw=2 et: +# no LTO on i486 +if [ "$CARCH" = 'i486' ]; then + sed -i ' + 1i options=(!lto) + ' PKGBUILD +fi +if [ "$CARCH" == 'i486' ]; then + eval "$( + declare -f build | \ + sed ' + s/-ffat-lto-objects//g + ' + )" +fi -- cgit v1.2.3-70-g09d2