PKGBUILDs/community/z3/PKGBUILD
2019-11-22 19:33:24 +00:00

63 lines
2 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
# - upstream patch to fix ARM FTBFS
pkgbase=z3
pkgname=('z3' 'python-z3')
pkgver=4.8.7
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=('cmake' 'python' 'python-setuptools' 'gcc-libs' 'gmp')
source=(https://github.com/Z3Prover/z3/archive/z3-${pkgver}.tar.gz
https://github.com/Z3Prover/z3/commit/e212159f4e941c78fc03239e0884f2f0454f581f.patch)
sha512sums=('145e2b2f1fa4edd0917107c7e1d54d779c7ed85c48af2ce6def4c90d1c4db05f74c9657e173cedf48770589fbe484c97fa1923295271cd3792523ffc4f67ed0c'
'6cf6ee35b23f9ef9fe879369a1900c82d38836f245e927f0f80eb6361e3340c32c8b94f00b1cb69eb8cad1626675b8f7b9bdaecffa5072cd5e8b12ecf1e7e3c0')
prepare() {
cd ${pkgbase}-z3-${pkgver}
mkdir -p build
patch -p1 -i ../e212159f4e941c78fc03239e0884f2f0454f581f.patch
}
build() {
cd ${pkgbase}-z3-${pkgver}/build
cmake .. \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=lib \
-DZ3_LINK_TIME_OPTIMIZATION=OFF \
-DZ3_BUILD_PYTHON_BINDINGS=1 \
-DPYTHON_EXECUTABLE=/usr/bin/python \
-DZ3_USE_LIB_GMP=1
make
}
package_z3() {
depends=('gcc-libs' 'gmp')
provides=('libz3' 'libz3.so')
cd ${pkgbase}-z3-${pkgver}/build
make DESTDIR="${pkgdir}" install
install -Dm 644 ../LICENSE.txt -t "${pkgdir}/usr/share/licenses/${pkgname}"
rm -r "${pkgdir}"/usr/lib/python*
}
package_python-z3() {
depends=('python' 'libz3')
cd ${pkgbase}-z3-${pkgver}/build
make DESTDIR="${pkgdir}" install
install -Dm 644 ../LICENSE.txt -t "${pkgdir}/usr/share/licenses/${pkgname}"
cd "${pkgdir}"
rm -r usr/include usr/bin usr/lib/cmake usr/lib/lib*
python -m compileall .
python -O -m compileall .
}
# vim: ts=2 sw=2 et: