void-packages/srcpkgs/z3/template

67 lines
1.8 KiB
Bash

# Template file for 'z3'
pkgname=z3
version=4.6.0
revision=2
wrksrc="${pkgname}-${pkgname}-${version}"
hostmakedepends="python $(vopt_if ocaml 'ocaml ocaml-findlib')"
makedepends="libgomp-devel gmp-devel $(vopt_if ocaml 'ocaml-num ncurses-devel')"
depends="python python-setuptools"
pycompile_module="z3"
short_desc="Z3 theorem prover and SMT solver (command line + Python module)"
maintainer="Leah Neukirchen <leah@vuxu.org>"
license="MIT"
homepage="https://github.com/Z3Prover/z3"
distfiles="https://github.com/Z3Prover/z3/archive/${pkgname}-${version}.tar.gz"
checksum=511da31d1f985cf0c79b2de05bda4e057371ba519769d1546ff71e1304fe53c9
build_options="ocaml"
desc_option_ocaml="Enable support for OCaml bindings"
build_options_default="ocaml"
shlib_provides="libz3.so"
subpackages="$(vopt_if ocaml z3-ocaml)"
if [ "$CROSS_BUILD" ]; then
build_options_default=
fi
do_configure() {
LDFLAGS="$CFLAGS $LDFLAGS" ./configure --prefix=/usr -g $(vopt_if ocaml --ml)
}
do_build() {
make ${makejobs} -C build all examples
}
do_install() {
vbin build/z3
vbin build/z3_tptp
vbin build/maxsat
vinstall build/libz3.so 0644 usr/lib
for f in src/api/z3*.h; do
vinstall $f 0644 usr/include
done
vinstall src/api/c++/z3++.h 0644 usr/include
for f in build/python/z3/*; do
vinstall $f 0644 usr/lib/python2.7/site-packages/z3
done
if [ "$build_option_ocaml" ]; then
vmkdir usr/lib/ocaml/Z3
vinstall src/api/ml/z3.mli 0644 usr/lib/ocaml/Z3
for f in build/api/ml/*; do
case "$f" in
*.o) continue ;;
*.so) vinstall $f 0644 usr/lib/ocaml/stublibs ;;
*) vinstall $f 0644 usr/lib/ocaml/Z3
esac
done
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
}
}