opam-version: "2.0"
synopsis:
  "Official 4.06.1 release compiled with musl-clang and with flambda activated"
description:
  "Requires musl-clang to be installed (package musl on Arch Linux or musl-tools on Debian)"
maintainer: "platform@lists.ocaml.org"
depends: [
  "ocaml" {= "4.06.1" & 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
    "-with-debug-runtime"
    "-flambda"
    "-cc"
    "musl-clang -Os"
    "-aspp"
    "musl-clang -c"
    "-no-curses"
    "-no-graph"
  ]
  [make "world"]
  [make "world.opt"]
]
install: [make "install"]
url {
  src: "https://github.com/ocaml/ocaml/archive/4.06.1.tar.gz"
  checksum: "md5=d02eb67b828de22c3f97d94b3c46acba"
}
patches: ["fix-gcc10.patch"]
extra-files: [ ["fix-gcc10.patch" "md5=171b510547baa777839b2ad50608a3ee"] ]
available: !(os = "macos" & arch = "arm64")
