opam-version: "2.0"
synopsis: "4.06 beta1 with afl-fuzz instrumentation"
maintainer: "platform@lists.ocaml.org"
depends: [
  "ocaml" {= "4.06.0" & post}
  "base-unix" {post}
  "base-bigarray" {post}
  "base-threads" {post}
]
conflict-class: "ocaml-core-compiler"
flags: compiler
setenv: CAML_LD_LIBRARY_PATH = "%{lib}%/stublibs"
build: [
  [
    "sed"
    "-ib"
    "-e"
    "s/opts=\"\"/opts=\"-Wno-implicit-function-declaration\"/"
    "config/auto-aux/hasgot"
  ] {os = "macos"}
  ["./configure" "-prefix" prefix "-afl-instrument"]
    {os != "openbsd" & os != "freebsd" & os != "macos"}
  [
    "./configure"
    "-prefix"
    prefix
    "-afl-instrument"
    "-cc"
    "cc"
    "-aspp"
    "cc -c"
  ] {os = "openbsd" | os = "freebsd" | os = "macos"}
  [make "world"]
  [make "world.opt"]
]
install: [make "install"]
url {
  src: "https://github.com/ocaml/ocaml/archive/4.06.0+beta1.tar.gz"
  checksum: "md5=150d27e8c053e1f2794be668895fcf1f"
}
patches: ["fix-gcc10.patch"]
extra-files: [ ["fix-gcc10.patch" "md5=c9198adfe0c9d8e7e299b4f4fef5dfc5"] ]
available: !(os = "macos" & arch = "arm64")
