PKGBUILDs/community/z3/PKGBUILD

62 lines
1.8 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
2019-03-19 18:35:15 +00:00
pkgname=('z3' 'python-z3')
2019-06-05 23:58:46 +00:00
pkgver=4.8.5
pkgrel=1
2018-11-06 20:20:32 +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'
2019-03-19 18:35:15 +00:00
makedepends=('cmake' 'python' 'python-setuptools' 'gcc-libs' 'gmp')
2019-06-05 23:58:46 +00:00
source=(https://github.com/Z3Prover/z3/archive/Z3-${pkgver}.tar.gz
2018-11-06 20:20:32 +00:00
z3-no-sse.patch)
2019-06-05 23:58:46 +00:00
sha512sums=('ca36e1a0332bd473a64f41dfdb31656fb3486178473e4fd4934dccce109a84c9686c08f94998df74bacb588eb12ea5db25dc17a564ee76f82fd2559349697309'
2018-12-21 20:40:47 +00:00
'90dc75045745c59456327a92b6b6b90547f7a6f130720bb683cc5f6c3ea46fcef271e74d2d319c05515af48061414d2eca3c7d6b4e36451547e07f30e8ece132')
2018-11-06 20:20:32 +00:00
prepare() {
2019-06-05 23:58:46 +00:00
cd ${pkgbase}-Z3-${pkgver}
2018-11-06 20:20:32 +00:00
mkdir -p build
patch -p0 -i ../z3-no-sse.patch
}
build() {
2019-06-05 23:58:46 +00:00
cd ${pkgbase}-Z3-${pkgver}/build
2018-11-06 20:20:32 +00:00
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')
2019-06-05 23:58:46 +00:00
cd ${pkgbase}-Z3-${pkgver}/build
2018-11-06 20:20:32 +00:00
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')
2019-06-05 23:58:46 +00:00
cd ${pkgbase}-Z3-${pkgver}/build
2018-11-06 20:20:32 +00:00
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: