# Contributor: Sören Tempel # Maintainer: Sören Tempel pkgname=z3 pkgver=4.8.6 pkgrel=1 pkgdesc="Theorem prover from Microsoft Research" url="https://github.com/Z3Prover/z3" arch="all !s390x !aarch64" license="MIT" makedepends="cmake python3" subpackages="$pkgname-dev py3-$pkgname:py3:noarch" source="https://github.com/Z3Prover/z3/archive/z3-$pkgver.tar.gz" builddir="$srcdir/z3-z3-$pkgver" build() { mkdir build && cd build cmake -G "Unix Makefiles" \ -DBUILD_PYTHON_BINDINGS=True \ -DINSTALL_PYTHON_BINDINGS=True \ -DPYTHON_EXECUTABLE=/usr/bin/python3 \ -DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_INSTALL_LIBDIR=lib \ -DBUILD_SHARED_LIBS=True \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_CXX_FLAGS="$CXXFLAGS" \ -DCMAKE_C_FLAGS="$CFLAGS" \ .. make # Binary for running the unit tests make test-z3 } check() { ./build/test-z3 -a } package() { cd "$builddir/build" make DESTDIR="$pkgdir" install } py3() { pkgdesc="Python bindings for $pkgname" depends="python3" mkdir -p "$subpkgdir"/usr/lib/ mv "$pkgdir"/usr/lib/python3* \ "$subpkgdir"/usr/lib/ } sha512sums="d338413274a3d11a9e9287202989df9da4c31e095c14428a418d4019e9f86c0e2b681c519d2d0bcbb4cd99a722a2539006f5c86ade568b1ee208545b142369f1 z3-4.8.6.tar.gz"