aboutsummaryrefslogtreecommitdiffstats
path: root/community/z3/APKBUILD
blob: 4ac0546e8acfe4df3f447d1ed704b439facf72b9 (plain) (blame)
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
55
56
57
58
# 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=1
pkgdesc="Theorem prover from Microsoft Research"
url="https://github.com/Z3Prover/z3"
arch="all !s390x !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
	fix-ppc64le-ptr-size.patch"
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
3d019959a104b5fd5f72eeb3738cacbdb145764ad4844eeb2539b36fa3a8228ffa062a0899465d4881b6c226301aa09b129ef06a798744b2eec9f943e0d9d366  fix-ppc64le-ptr-size.patch"