opam-version: "2.0"
synopsis:
  "Official 4.05.0 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.05.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
    "-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.05.0.tar.gz"
  checksum: "md5=7e0079162134336a24b9028349c756bb"
}
patches: ["fix-gcc10.patch"]
extra-files: [ ["fix-gcc10.patch" "md5=3791e3c17d11ec0f246fc6c5c5e5e2f3"] ]
available: !(os = "macos" & arch = "arm64")
