mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-18 22:54:00 +00:00
66 lines
1.8 KiB
Bash
66 lines
1.8 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-solver')
|
|
pkgver=4.13.0
|
|
_commit=3049f578a8f98a0b0992eca193afe57a73b30ca3
|
|
pkgrel=2
|
|
pkgdesc='High-performance theorem prover'
|
|
url='https://github.com/Z3Prover/z3'
|
|
arch=('x86_64')
|
|
license=('MIT')
|
|
makedepends=('git' 'glibc' 'cmake' 'ninja' 'python' 'python-setuptools' 'gcc-libs'
|
|
'python-build' 'python-installer' 'python-wheel')
|
|
source=(git+https://github.com/Z3Prover/z3.git#commit=$_commit)
|
|
sha512sums=('SKIP')
|
|
b2sums=('SKIP')
|
|
|
|
build() {
|
|
cd z3
|
|
|
|
# /usr/bin/z3 uses malloc_usable_size, which is incompatible with fortification level 3
|
|
export CFLAGS="${CFLAGS/_FORTIFY_SOURCE=3/_FORTIFY_SOURCE=2}"
|
|
export CXXFLAGS="${CXXFLAGS/_FORTIFY_SOURCE=3/_FORTIFY_SOURCE=2}"
|
|
|
|
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 z3
|
|
DESTDIR="$pkgdir" ninja -C build install
|
|
install -Dm644 LICENSE.txt -t "$pkgdir"/usr/share/licenses/$pkgname
|
|
rm -r "$pkgdir"/usr/lib/python*
|
|
}
|
|
|
|
package_python-z3-solver() {
|
|
depends=('python' 'python-setuptools' 'z3')
|
|
replaces=('python-z3')
|
|
conflicts=('python-z3')
|
|
|
|
cd z3
|
|
DESTDIR="$pkgdir" ninja -C build install
|
|
install -Dm644 LICENSE.txt -t "$pkgdir"/usr/share/licenses/$pkgname
|
|
|
|
cd "$pkgdir"
|
|
rm -r usr/include usr/bin usr/lib/{cmake,pkgconfig,lib*}
|
|
python -m compileall -d /usr/lib "$pkgdir/usr/lib"
|
|
python -O -m compileall -d /usr/lib "$pkgdir/usr/lib"
|
|
}
|
|
|
|
# vim: ts=2 sw=2 et:
|