|
| 1 | +opam-version: "2.0" |
| 2 | + |
| 3 | +authors: "MSR" |
| 4 | +homepage: "https://github.com/Z3prover/z3" |
| 5 | +bug-reports: "https://github.com/Z3prover/z3/issues" |
| 6 | +license: "MIT" |
| 7 | +dev-repo: "git+https://github.com/Z3prover/z3.git" |
| 8 | +patches: [ |
| 9 | + "gccstd-2a.patch" { (os-family = "opensuse" | os-family = "suse") | (os-distribution = "ubuntu" & os-version <= "20.04") } |
| 10 | +] |
| 11 | +build: [ |
| 12 | + [ "python3" "scripts/mk_make.py" "--ml" ] {os-distribution != "homebrew"} |
| 13 | + [ make "-C" "build" "-j" jobs ] {os-distribution != "homebrew"} |
| 14 | + [ "sh" "-c" """#!/bin/sh |
| 15 | + PATH=/usr/local/opt/llvm/bin:$PATH |
| 16 | + LDFLAGS="-L/usr/local/opt/llvm/lib $LDFLAGS" |
| 17 | + CPPFLAGS="-I/usr/local/opt/llvm/include $CPPFLAGS" |
| 18 | + export PATH LDFLAGS CPPFLAGS |
| 19 | + python3 scripts/mk_make.py --ml |
| 20 | + make -C build |
| 21 | + """] {os-distribution = "homebrew" & arch = "x86_64"} |
| 22 | + [ "sh" "-c" """#!/bin/sh |
| 23 | + PATH=/opt/homebrew/opt/llvm/bin:$PATH |
| 24 | + LDFLAGS="-L/opt/homebrew/opt/llvm/lib $LDFLAGS" |
| 25 | + CPPFLAGS="-I/opt/homebrew/opt/llvm/include $CPPFLAGS" |
| 26 | + export PATH LDFLAGS CPPFLAGS |
| 27 | + python3 scripts/mk_make.py --ml |
| 28 | + make -C build |
| 29 | + """] {os-distribution = "homebrew" & arch = "arm64"} |
| 30 | +] |
| 31 | + |
| 32 | +install: [ |
| 33 | + [ "sh" "-c" "ocamlfind install z3 build/api/ml/* -dll build/libz3.*"] |
| 34 | + [ "cp" "build/z3" "%{bin}%/z3"] |
| 35 | +] |
| 36 | + |
| 37 | +depends: [ |
| 38 | + "ocaml" {>= "4.08.0"} |
| 39 | + "ocamlfind" {build} |
| 40 | + "zarith" |
| 41 | + "conf-llvm" { os-distribution = "homebrew" } |
| 42 | + "conf-python-3" {build} |
| 43 | + "conf-c++" {build} |
| 44 | +] |
| 45 | +x-ci-accept-failures: [ |
| 46 | + "centos-7" "oraclelinux-7" "opensuse-15.6" # C compiler is too old |
| 47 | +] |
| 48 | +conflicts: [ |
| 49 | + "ocaml-option-bytecode-only" |
| 50 | +] |
| 51 | +synopsis: "Z3 solver" |
| 52 | +url { |
| 53 | + src: |
| 54 | + "https://github.com/Z3Prover/z3/archive/refs/tags/z3-4.15.2.tar.gz" |
| 55 | + checksum: [ |
| 56 | + "sha256=3486bf5b35b185981cab0b0a81f870547648a1ca433085aa79afd17c44959751" |
| 57 | + "sha512=ef752530cec0c08dbc53671c9fd04b6ed4d190905598d3d7dc1cb21dfde97fd0d69962c478ccc60e823718e2c57d9b3ee670f48fd09215597fa44d04b60fb21c" |
| 58 | + ] |
| 59 | +} |
| 60 | +extra-source "gccstd-2a.patch" { |
| 61 | + src: |
| 62 | + "https://raw.githubusercontent.com/ocaml/opam-source-archives/main/patches/z3/gccstd-2a.patch" |
| 63 | + checksum: |
| 64 | + "sha256=ae4088ff14739bcc2cadc90bc428f08277e898b832f6b859a46e23c584d513c8" |
| 65 | +} |
0 commit comments