pantry/projects/github.com/Z3Prover/z3/package.yml

60 lines
1.6 KiB
YAML
Raw Normal View History

2023-03-17 14:48:32 +03:00
distributable:
url: https://github.com/Z3Prover/z3/archive/z3-{{version}}.tar.gz
strip-components: 1
versions:
github: Z3Prover/z3
strip: /z3-/
build:
dependencies:
cmake.org: ^3
2023-10-03 18:23:56 +03:00
python.org: '>=3<3.12'
2023-03-17 14:48:32 +03:00
working-directory: build
script: |
cmake .. $ARGS
make --jobs {{hw.concurrency}} install
env:
ARGS:
- -DZ3_LINK_TIME_OPTIMIZATION=ON
- -DZ3_INCLUDE_GIT_DESCRIBE=OFF
- -DZ3_INCLUDE_GIT_HASH=OFF
- -DZ3_INSTALL_PYTHON_BINDINGS=ON
- -DZ3_BUILD_EXECUTABLE=ON
- -DZ3_BUILD_TEST_EXECUTABLES=OFF
- -DZ3_BUILD_PYTHON_BINDINGS=ON
- -DZ3_BUILD_DOTNET_BINDINGS=OFF
- -DZ3_BUILD_JAVA_BINDINGS=OFF
- -DZ3_USE_LIB_GMP=OFF
- -DCMAKE_INSTALL_PREFIX={{prefix}}
- -DCMAKE_BUILD_TYPE=Release
- -DCMAKE_INSTALL_PYTHON_PKG_DIR={{prefix}}/lib/python
runtime:
env:
PYTHONPATH: ${{prefix}}/lib/python
provides:
- bin/z3
test:
dependencies:
gnu.org/wget: '*'
2023-10-03 18:23:56 +03:00
python.org: ~3.11
2023-03-17 14:48:32 +03:00
script: |
wget https://raw.githubusercontent.com/Z3Prover/z3/master/examples/c/test_capi.c
cc -lz3 test_capi.c
2023-04-19 04:08:34 +03:00
# FIXME: this fails on ubuntu-latest
# BUG: incorrect use of Z3.
# Error code: 12
test "{{hw.platform}}+{{hw.arch}}" != "linux+x86-64" &&
./a.out
# FIXME: this fails on linux-aarch64, for some reason
# /tmp/ffb7372b/xyz.tea.test.sh: line 27: 55494 Aborted \
# python -c 'import z3; print(z3.get_version_string())'
if "{{hw.platform}}+{{hw.arch}}" != "linux+aarch"; then
v="$(python -c 'import z3; print(z3.get_version_string())')"
test "$v" = {{version}}
fi