PKGBUILDs/community/z3/PKGBUILD

76 lines
2.4 KiB
Bash
Raw Normal View History

2018-11-06 20:20:32 +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>
# - patch from Fedora to fix ARM FTBFS
pkgbase=z3
pkgname=('z3' 'python-z3' 'python2-z3')
2018-11-22 21:56:48 +00:00
pkgver=4.8.3
2018-11-06 20:20:32 +00:00
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' 'python2' 'python2-setuptools' 'python' 'python-setuptools' 'gcc-libs' 'gmp')
optdepends=('python2-setuptools: bindings for python2')
source=(https://github.com/Z3Prover/z3/archive/${pkgbase}-${pkgver}.tar.gz
z3-no-sse.patch)
2018-11-22 21:56:48 +00:00
sha512sums=('34a2dca0083ed469fdaf5ac062dda26248633245607ddd9ef90629c5f76ae30f87bfa4191c04ba9be7a617bf182a1bd00b59fd2274699e12ece69b86088c8044'
2018-11-06 20:20:32 +00:00
'd172454a024eae2ac2246de481349ac61d9d9fdf41b5b0bb8b9343f74c5232c5f74458e30e16d745af9ad99e9aa4444627248bdb29b86d437471fd97bbba96b3')
prepare() {
cd ${pkgbase}-${pkgbase}-${pkgver}
mkdir -p build
patch -p0 -i ../z3-no-sse.patch
}
build() {
cd ${pkgbase}-${pkgbase}-${pkgver}/build
cmake .. \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=lib \
-DBUILD_PYTHON_BINDINGS=1 \
-DPYTHON_EXECUTABLE=/usr/bin/python \
-DUSE_LIB_GMP=1
make
}
package_z3() {
depends=('gcc-libs' 'gmp')
provides=('libz3' 'libz3.so')
cd ${pkgbase}-${pkgbase}-${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}-${pkgbase}-${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 .
}
package_python2-z3() {
depends=('python2' 'libz3')
cd ${pkgbase}-${pkgbase}-${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*
mv usr/lib/python* usr/lib/python2.7
[ -n "${SOURCE_DATE_EPOCH}" ] && find . -exec touch -h -d @$SOURCE_DATE_EPOCH {} +
python2 -m compileall .
python2 -O -m compileall .
}
# vim: ts=2 sw=2 et: