diff options
Diffstat (limited to 'community/z3')
-rw-r--r-- | community/z3/APKBUILD | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/community/z3/APKBUILD b/community/z3/APKBUILD new file mode 100644 index 0000000000..7772fa03e6 --- /dev/null +++ b/community/z3/APKBUILD @@ -0,0 +1,56 @@ +# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net> +# Maintainer: Sören Tempel <soeren+alpine@soeren-tempel.net> +pkgname=z3 +pkgver=4.7.1 +pkgrel=0 +pkgdesc="Theorem prover from Microsoft Research" +url="https://github.com/Z3Prover/z3" +arch="all !s390x !ppc64le !aarch64" +license="MIT" +depends="" +makedepends="cmake python3" +install="" +subpackages="$pkgname-dev py3-$pkgname:py3:noarch" +source="https://github.com/Z3Prover/$pkgname/archive/$pkgname-$pkgver.tar.gz" +builddir="$srcdir/$pkgname-$pkgname-$pkgver" + +build() { + cd "$builddir" + 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() { + cd "$builddir" + ./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="4c8c856691134298c4b5e465d6fadfe446532dfcd8c92aed7c9a6bbfc8557074a45cd7316dbfa5045824e2504db159afeb8ff676d4bfc942496623cf31d11aa0 z3-4.7.1.tar.gz" |