opam-version: "2.0"
synopsis: "Official 4.02.3 release"
maintainer: "platform@lists.ocaml.org"
authors: ["Xavier Leroy" "Damien Doligez" "Alain Frisch" "Jacques Garrigue" "Didier Rémy" "Jérôme Vouillon"]
homepage: "https://ocaml.org"
bug-reports: "https://github.com/ocaml/opam-repository/issues"
dev-repo: "git+https://github.com/ocaml/ocaml.git#4.02"
depends: [
  "ocaml" {= "4.02.3" & post}
  "base-unix" {post}
  "base-bigarray" {post}
  "base-threads" {post}
  "base-ocamlbuild" {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"]
    {os != "openbsd" & os != "freebsd" & os != "macos"}
  [
    "./configure"
    "-prefix"
    prefix
    "-with-debug-runtime"
    "-cc"
    "cc"
    "-aspp"
    "cc -c"
  ] {os = "openbsd" | os = "freebsd" | os = "macos"}
  [make "world.opt"]
]
install: [make "install"]
url {
  src: "http://caml.inria.fr/pub/distrib/ocaml-4.02/ocaml-4.02.3.tar.gz"
  checksum: "md5=ef1a324608c97031cbd92a442d685ab7"
}
patches: ["fix-gcc10.patch" "gpr1330.patch"]
extra-files: [
  ["fix-gcc10.patch" "md5=4516183897da9033f49dd291fa198b8c"]
  ["gpr1330.patch" "md5=f6e2574d7b63d3de281f6c48984e2c71"]
]
available: !(os = "macos" & arch = "arm64") & arch != "ppc64"
