PKGBUILDs/community/z3/PKGBUILD
2022-08-18 23:11:24 +00:00

55 lines
1.7 KiB
Bash

# 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')
pkgver=4.10.0
pkgrel=1
pkgdesc='High-performance theorem prover'
url='https://github.com/Z3Prover/z3'
arch=('x86_64')
license=('MIT')
# 'java-environment-common' 'mono' 'ocaml' 'ocaml-findlib'
makedepends=('glibc' 'cmake' 'ninja' 'python' 'python-setuptools' 'gcc-libs')
source=(https://github.com/Z3Prover/z3/archive/z3-$pkgver.tar.gz)
sha512sums=('85847bb12f036aa1cc56d7874670c9ed4934897e7a5ea8d3b7d9828bde8b54e35dfa062a059d3bfce15bb1eac270b7068c2ff5afc83998f1ed124c6334d9c900')
b2sums=('ef0986b8609447baeb2ceae53edc71cfd40c4a01c981e6e618ff9f6b1ce5e2aa7ad27bc2b8bb7df65a173676c05a2b71aaca9be010a13c501ee8043c62bba80d')
build() {
cd $pkgbase-z3-$pkgver
cmake \
-Bbuild \
-GNinja \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=lib \
-DZ3_LINK_TIME_OPTIMIZATION=OFF \
-DZ3_BUILD_PYTHON_BINDINGS=1 \
-DPYTHON_EXECUTABLE=/usr/bin/python
ninja -C build
}
package_z3() {
depends=('glibc' 'gcc-libs')
provides=('libz3' 'libz3.so')
cd $pkgbase-z3-$pkgver
DESTDIR="${pkgdir}" ninja -C build install
install -Dm 644 LICENSE.txt -t "$pkgdir"/usr/share/licenses/$pkgname
rm -r "$pkgdir"/usr/lib/python*
}
package_python-z3() {
depends=('python' 'z3')
cd $pkgbase-z3-$pkgver
DESTDIR="${pkgdir}" ninja -C build install
install -Dm 644 LICENSE.txt -t "$pkgdir"/usr/share/licenses/$pkgname
cd "$pkgdir"
rm -r usr/include usr/bin usr/lib/{cmake,pkgconfig,lib*}
python -m compileall .
python -O -m compileall .
}
# vim: ts=2 sw=2 et: