2019-11-22 19:33:24 +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>
|
|
|
|
# - set -DZ3_LINK_TIME_OPTIMIZATION=OFF
|
|
|
|
|
|
|
|
pkgbase=z3
|
2022-08-19 18:40:27 +00:00
|
|
|
pkgname=('z3' 'python-z3-solver')
|
2024-03-09 21:28:25 +00:00
|
|
|
pkgver=4.13.0
|
|
|
|
_commit=3049f578a8f98a0b0992eca193afe57a73b30ca3
|
2023-08-31 12:40:18 +00:00
|
|
|
pkgrel=1
|
2019-11-22 19:33:24 +00:00
|
|
|
pkgdesc='High-performance theorem prover'
|
|
|
|
url='https://github.com/Z3Prover/z3'
|
|
|
|
arch=('x86_64')
|
|
|
|
license=('MIT')
|
2023-02-04 03:14:16 +00:00
|
|
|
makedepends=('git' 'glibc' 'cmake' 'ninja' 'python' 'python-setuptools' 'gcc-libs'
|
2022-08-19 18:40:27 +00:00
|
|
|
'python-build' 'python-installer' 'python-wheel')
|
2023-02-04 03:14:16 +00:00
|
|
|
source=(git+https://github.com/Z3Prover/z3.git#commit=$_commit)
|
|
|
|
sha512sums=('SKIP')
|
|
|
|
b2sums=('SKIP')
|
2019-11-22 19:33:24 +00:00
|
|
|
|
|
|
|
build() {
|
2023-02-04 03:14:16 +00:00
|
|
|
cd z3
|
2023-12-24 16:03:59 +00:00
|
|
|
|
|
|
|
# /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}"
|
|
|
|
|
2022-05-12 22:34:19 +00:00
|
|
|
cmake \
|
|
|
|
-Bbuild \
|
2021-07-16 18:40:18 +00:00
|
|
|
-GNinja \
|
2019-11-22 19:33:24 +00:00
|
|
|
-DCMAKE_INSTALL_PREFIX=/usr \
|
|
|
|
-DCMAKE_INSTALL_LIBDIR=lib \
|
|
|
|
-DZ3_LINK_TIME_OPTIMIZATION=OFF \
|
|
|
|
-DZ3_BUILD_PYTHON_BINDINGS=1 \
|
2020-09-07 21:21:47 +00:00
|
|
|
-DPYTHON_EXECUTABLE=/usr/bin/python
|
2022-05-12 22:34:19 +00:00
|
|
|
ninja -C build
|
2019-11-22 19:33:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
package_z3() {
|
2022-05-12 22:34:19 +00:00
|
|
|
depends=('glibc' 'gcc-libs')
|
2019-11-22 19:33:24 +00:00
|
|
|
provides=('libz3' 'libz3.so')
|
2022-08-19 18:40:27 +00:00
|
|
|
|
2023-02-04 03:14:16 +00:00
|
|
|
cd z3
|
|
|
|
DESTDIR="$pkgdir" ninja -C build install
|
|
|
|
install -Dm644 LICENSE.txt -t "$pkgdir"/usr/share/licenses/$pkgname
|
2021-07-16 18:40:18 +00:00
|
|
|
rm -r "$pkgdir"/usr/lib/python*
|
2019-11-22 19:33:24 +00:00
|
|
|
}
|
|
|
|
|
2022-08-19 18:40:27 +00:00
|
|
|
package_python-z3-solver() {
|
|
|
|
depends=('python' 'python-setuptools' 'z3')
|
|
|
|
replaces=('python-z3')
|
|
|
|
conflicts=('python-z3')
|
|
|
|
|
2023-02-04 03:14:16 +00:00
|
|
|
cd z3
|
|
|
|
DESTDIR="$pkgdir" ninja -C build install
|
|
|
|
install -Dm644 LICENSE.txt -t "$pkgdir"/usr/share/licenses/$pkgname
|
2022-08-19 18:40:27 +00:00
|
|
|
|
2021-07-16 18:40:18 +00:00
|
|
|
cd "$pkgdir"
|
2020-09-12 19:20:52 +00:00
|
|
|
rm -r usr/include usr/bin usr/lib/{cmake,pkgconfig,lib*}
|
2022-08-19 18:40:27 +00:00
|
|
|
python -m compileall -d /usr/lib "$pkgdir/usr/lib"
|
|
|
|
python -O -m compileall -d /usr/lib "$pkgdir/usr/lib"
|
2019-11-22 19:33:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
# vim: ts=2 sw=2 et:
|