PKGBUILDs/community/z3/PKGBUILD

59 lines
1.6 KiB
Bash
Raw Normal View History

2019-11-22 19:33:24 +00:00
# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
# Contributor: rudy.matela
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
# - set -DZ3_LINK_TIME_OPTIMIZATION=OFF
pkgbase=z3
pkgname=('z3' 'python-z3')
2021-07-16 18:40:18 +00:00
pkgver=4.8.12
2021-01-22 22:24:49 +00:00
pkgrel=1
2019-11-22 19:33:24 +00:00
pkgdesc='High-performance theorem prover'
url='https://github.com/Z3Prover/z3'
arch=('x86_64')
license=('MIT')
# 'java-environment-common' 'mono' 'ocaml' 'ocaml-findlib'
2021-07-16 18:40:18 +00:00
makedepends=('cmake' 'ninja' 'python' 'python-setuptools' 'gcc-libs')
source=(https://github.com/Z3Prover/z3/archive/z3-$pkgver.tar.gz)
sha512sums=('0b377923bdaffaca1846aa2abd61003bbecadfcdfc908ed3097d0aac8f32028ac39d93fb4a9c2e2c2bfffbdbee80aa415875f17de6c2ee2ae8e2b7921f788c6e')
2019-11-22 19:33:24 +00:00
prepare() {
2021-07-16 18:40:18 +00:00
cd $pkgbase-z3-$pkgver
2019-11-22 19:33:24 +00:00
mkdir -p build
}
build() {
2021-07-16 18:40:18 +00:00
cd $pkgbase-z3-$pkgver/build
2019-11-22 19:33:24 +00:00
cmake .. \
2021-07-16 18:40:18 +00:00
-GNinja \
2019-11-22 19:33:24 +00:00
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=lib \
-DZ3_LINK_TIME_OPTIMIZATION=OFF \
-DZ3_BUILD_PYTHON_BINDINGS=1 \
2020-09-07 21:21:47 +00:00
-DPYTHON_EXECUTABLE=/usr/bin/python
2021-07-16 18:40:18 +00:00
ninja
2019-11-22 19:33:24 +00:00
}
package_z3() {
2020-09-07 21:21:47 +00:00
depends=('gcc-libs')
2019-11-22 19:33:24 +00:00
provides=('libz3' 'libz3.so')
2021-07-16 18:40:18 +00:00
cd $pkgbase-z3-$pkgver/build
DESTDIR="$pkgdir" ninja install
install -Dm 644 ../LICENSE.txt -t "$pkgdir"/usr/share/licenses/$pkgname
rm -r "$pkgdir"/usr/lib/python*
2019-11-22 19:33:24 +00:00
}
package_python-z3() {
2020-09-07 21:21:47 +00:00
depends=('python' 'z3')
2021-07-16 18:40:18 +00:00
cd $pkgbase-z3-$pkgver/build
DESTDIR="$pkgdir" ninja install
install -Dm 644 ../LICENSE.txt -t "$pkgdir"/usr/share/licenses/$pkgname
cd "$pkgdir"
2020-09-12 19:20:52 +00:00
rm -r usr/include usr/bin usr/lib/{cmake,pkgconfig,lib*}
2019-11-22 19:33:24 +00:00
python -m compileall .
python -O -m compileall .
}
# vim: ts=2 sw=2 et: