aboutsummaryrefslogtreecommitdiffstats
path: root/community/z3/APKBUILD
blob: 373b8edfae91b1a24c2568d20f9a09c6632651f1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
# Maintainer: Sören Tempel <soeren+alpine@soeren-tempel.net>
pkgname=z3
pkgver=4.8.7
pkgrel=0
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
	0001-Fix-fail-to-build-on-clang-and-g.patch"
builddir="$srcdir/z3-z3-$pkgver"

build() {
	mkdir build && cd build
	cmake -G "Unix Makefiles" \
		-DZ3_BUILD_PYTHON_BINDINGS=True \
		-DZ3_INSTALL_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="145e2b2f1fa4edd0917107c7e1d54d779c7ed85c48af2ce6def4c90d1c4db05f74c9657e173cedf48770589fbe484c97fa1923295271cd3792523ffc4f67ed0c  z3-4.8.7.tar.gz
4463b00e84d81447e62f6363163e6a2fa072fe1a1e1bab29c966ae00a222ab1a2e7429b6527bc5d81defb376590dca7bbc06b970fa780d77384011b573ffd7fd  0001-Fix-fail-to-build-on-clang-and-g.patch"