# Maintainer: Felix Yan # Maintainer: Levente Polyak # Contributor: rudy.matela # ALARM: Kevin Mihelich # - set -DZ3_LINK_TIME_OPTIMIZATION=OFF pkgbase=z3 pkgname=('z3' 'python-z3-solver') pkgver=4.12.2 _commit=e417f7d78509b2d0c9ebc911fee7632e6ef546b6 pkgrel=1 pkgdesc='High-performance theorem prover' url='https://github.com/Z3Prover/z3' arch=('x86_64') license=('MIT') makedepends=('git' 'glibc' 'cmake' 'ninja' 'python' 'python-setuptools' 'gcc-libs' 'python-build' 'python-installer' 'python-wheel') source=(git+https://github.com/Z3Prover/z3.git#commit=$_commit) sha512sums=('SKIP') b2sums=('SKIP') prepare() { cd $pkgname # Fix build with GCC 13 git cherry-pick -n c9d8e646ed505a9cd4c84b2cb31d846b8588109f } build() { cd z3 cmake \ -Bbuild \ -GNinja \ -DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_INSTALL_LIBDIR=lib \ -DZ3_LINK_TIME_OPTIMIZATION=OFF \ -DZ3_BUILD_PYTHON_BINDINGS=1 \ -DPYTHON_EXECUTABLE=/usr/bin/python ninja -C build } package_z3() { depends=('glibc' 'gcc-libs') provides=('libz3' 'libz3.so') cd z3 DESTDIR="$pkgdir" ninja -C build install install -Dm644 LICENSE.txt -t "$pkgdir"/usr/share/licenses/$pkgname rm -r "$pkgdir"/usr/lib/python* } package_python-z3-solver() { depends=('python' 'python-setuptools' 'z3') replaces=('python-z3') conflicts=('python-z3') cd z3 DESTDIR="$pkgdir" ninja -C build install install -Dm644 LICENSE.txt -t "$pkgdir"/usr/share/licenses/$pkgname cd "$pkgdir" rm -r usr/include usr/bin usr/lib/{cmake,pkgconfig,lib*} python -m compileall -d /usr/lib "$pkgdir/usr/lib" python -O -m compileall -d /usr/lib "$pkgdir/usr/lib" } # vim: ts=2 sw=2 et: