# Contributor: tcely # Maintainer: Natanael Copa pkgname=botan3 pkgver=3.1.1 pkgrel=1 pkgdesc="Crypto and TLS for C++11 (v3)" url="https://botan.randombit.net/" arch="all" license="BSD-2-Clause" depends_dev=" boost-dev bzip2-dev sqlite-dev xz-dev zlib-dev " makedepends=" $depends_dev python3 " subpackages="$pkgname-dev $pkgname-doc py3-$pkgname:py3 $pkgname-libs" source="https://botan.randombit.net/releases/Botan-$pkgver.tar.xz" builddir="$srcdir/Botan-$pkgver" build() { case "$CARCH" in # On x86, botan segfaults with -O1 upwards this is likely due # to a miscompilation wih recent g++ version. Compile with our # standard -Os as a workaround. # # See: https://github.com/randombit/botan/issues/3637 x86) ;; # botan benefits from -O3. Upstream is using it when testing. *) export CXXFLAGS="$CXXFLAGS -O3" CFLAGS="$CFLAGS -O3" ;; esac python3 ./configure.py \ --prefix=/usr \ --mandir=/usr/share/man \ --with-boost \ --with-bzip2 \ --with-lzma \ --with-sqlite3 \ --with-zlib \ --with-os-feature=getrandom \ --disable-static make } check() { LD_LIBRARY_PATH="$builddir" \ timeout 600 \ ./botan-test } package() { make DESTDIR="$pkgdir" install } py3() { pkgdesc="$pkgdesc (python module)" depends="$pkgname-libs=$pkgver-r$pkgrel" amove usr/lib/python* } sha512sums=" ed6bdadb910b0775245648140212953ed364aa26107f851e39ac5cb664d7f476c519a22cdad41f0e520796c4ebe453c56ca68a2178e39f815d445e9979333795 Botan-3.1.1.tar.xz "