Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/extra/boost180-libs/PKGBUILD
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2023-05-22 20:18:50 +0200
committerErich Eckner <git@eckner.net>2023-05-22 20:18:50 +0200
commite74cde76c104df82b120a7b13964cb786da8f565 (patch)
tree39967e24037929c04aaf79922aa260b437a60a5e /extra/boost180-libs/PKGBUILD
parent73e1d3b448cc583ab38cae4d61a26f313fad946b (diff)
community -> extra
Diffstat (limited to 'extra/boost180-libs/PKGBUILD')
-rw-r--r--extra/boost180-libs/PKGBUILD102
1 files changed, 102 insertions, 0 deletions
diff --git a/extra/boost180-libs/PKGBUILD b/extra/boost180-libs/PKGBUILD
new file mode 100644
index 00000000..502a065e
--- /dev/null
+++ b/extra/boost180-libs/PKGBUILD
@@ -0,0 +1,102 @@
+options=(!lto)
+options=(!lto)
+options=(!lto)
+# Maintainer: Evangelos Foutras <evangelos@foutrelis.com>
+# Contributor: Levente Polyak <anthraxx[at]archlinux[dot]org>
+# Contributor: Bart?omiej Piotrowski <bpiotrowski@archlinux.org>
+# Contributor: Marius Knaust <marius.knaust@gmail.com>
+# Contributor: Ionut Biru <ibiru@archlinux.org>
+# Contributor: Stéphane Gaudreault <stephane@archlinux.org>
+# Contributor: kevin <kevin@archlinux.org>
+# Contributor: Giovanni Scafora <giovanni@archlinux.org>
+# Contributor: Kritoke <kritoke@gamebox.net>
+# Contributor: Luca Roccia <little_rock@users.sourceforge.net>
+
+pkgname=('boost180-libs')
+pkgver=1.80.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://boostorg.jfrog.io/artifactory/main/release/$pkgver/source/$_srcname.tar.gz
+ $pkgname-ublas-c++20-iterator.patch::https://github.com/boostorg/ublas/commit/a31e5cffa85f.patch)
+sha256sums=('4b2136f98bdd1f5857f1c3dea9ac2018effe65286cf251534b6ae20cc45e1847'
+ 'aa38addb40d5f44b4a8472029b475e7e6aef1c460509eb7d8edf03491dc1b5ee')
+
+prepare() {
+ cd $_srcname
+
+ # https://github.com/boostorg/ublas/pull/97
+ patch -Np2 -i ../$pkgname-ublas-c++20-iterator.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 \
+ python=$python_version \
+ cflags="$CPPFLAGS $CFLAGS -fPIC -O3 -ffat-lto-objects" \
+ cxxflags="$CPPFLAGS $CXXFLAGS -fPIC -O3 -ffat-lto-objects" \
+ linkflags="$LDFLAGS" \
+ --layout=system \
+ $JOBS \
+ \
+ --prefix="$srcdir"/fakeinstall
+}
+
+package_boost180-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