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