67 lines
1.7 KiB
Bash
67 lines
1.7 KiB
Bash
# Template file for 'z3'
|
|
pkgname=z3
|
|
version=4.13.2
|
|
revision=1
|
|
build_style=configure
|
|
configure_args="--prefix=/usr -g --python $(vopt_if ocaml --ml)"
|
|
make_build_args="-C build all examples"
|
|
make_install_args="-C build install"
|
|
hostmakedepends="python3 which $(vopt_if ocaml 'ocaml ocaml-findlib')"
|
|
makedepends="libgomp-devel gmp-devel $(vopt_if ocaml 'ocaml-zarith ncurses-devel')"
|
|
depends="libz3 python3 python3-setuptools"
|
|
short_desc="Z3 theorem prover and SMT solver (command line + Python3 module)"
|
|
maintainer="Leah Neukirchen <leah@vuxu.org>"
|
|
license="MIT"
|
|
homepage="https://github.com/Z3Prover/z3"
|
|
distfiles="https://github.com/Z3Prover/z3/archive/z3-${version}.tar.gz"
|
|
checksum=fd7dc6dd2633074f0a47670d6378b0e5c28c2c26f2b58aa23e9cd7f0bc9ba0dc
|
|
|
|
build_options="ocaml"
|
|
desc_option_ocaml="Enable support for OCaml bindings"
|
|
|
|
subpackages="$(vopt_if ocaml z3-ocaml) libz3 z3-devel"
|
|
|
|
if [ -z "$CROSS_BUILD" ]; then
|
|
case "$XBPS_TARGET_MACHINE" in
|
|
x86_64*|aarch64*|riscv64*) build_options_default="ocaml"
|
|
esac
|
|
fi
|
|
|
|
do_check() {
|
|
make ${MAKEJOBS} -C build test
|
|
./build/test-z3 /a
|
|
}
|
|
|
|
post_install() {
|
|
vbin build/z3_tptp
|
|
vbin build/maxsat
|
|
if [ "$build_option_ocaml" ]; then
|
|
vmkdir usr/lib/ocaml/Z3/stublibs
|
|
mv ${DESTDIR}/usr/lib/ocaml/Z3/dllz3ml.so ${DESTDIR}/usr/lib/ocaml/Z3/stublibs
|
|
fi
|
|
vlicense LICENSE.txt
|
|
}
|
|
|
|
z3-ocaml_package() {
|
|
short_desc="Z3 theorem prover and SMT solver (OCaml bindings)"
|
|
depends="z3>=${version}_${revision}"
|
|
pkg_install() {
|
|
vmove usr/lib/ocaml
|
|
}
|
|
}
|
|
|
|
libz3_package() {
|
|
short_desc+=" - runtime library"
|
|
pkg_install() {
|
|
vmove usr/lib/libz3.so
|
|
}
|
|
}
|
|
|
|
z3-devel_package() {
|
|
depends="${sourcepkg}>=${version}_${revision}"
|
|
short_desc+=" - development files"
|
|
pkg_install() {
|
|
vmove usr/include
|
|
}
|
|
}
|