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

51 lines
1.2 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:
tea.xyz/gx/cc: c99
tea.xyz/gx/make: '*'
cmake.org: ^3
python.org: ^3
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:
tea.xyz/gx/cc: c99
gnu.org/wget: '*'
python.org: ^3.11
script: |
wget https://raw.githubusercontent.com/Z3Prover/z3/master/examples/c/test_capi.c
cc -lz3 test_capi.c
v="$(python -c 'import z3; print(z3.get_version_string())')"
test "$v" = {{version}}