opam-version: "2.0"
synopsis: "Official 3.08.4 release"
maintainer: "platform@lists.ocaml.org"
authors: ["Xavier Leroy" "Damien Doligez" "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#3.08"
depends: [
  "ocaml" {= "3.08.4" & 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"}
  ["sed" "-i" "-e" "s/struct sigaltstack/stack_t/" "asmrun/signals.c"]
  ["./configure" "-prefix" prefix]
    {os != "openbsd" & os != "freebsd" & os != "macos"}
  ["./configure" "-prefix" prefix "-cc" "cc" "-aspp" "cc -c"]
    {os = "openbsd" | os = "freebsd" | os = "macos"}
  [make "world"]
  [make "world.opt"]
]
install: [
  [make "install"]
  ["mkdir" "-p" "%{prefix}%/lib/ocaml/compiler-libs"]
  ["cp" "-r" "typing" "parsing" "utils" "%{prefix}%/lib/ocaml/compiler-libs/"]
]
url {
  src: "https://caml.inria.fr/pub/distrib/ocaml-3.08/ocaml-3.08.4.tar.gz"
  checksum: "md5=105d192896bf945b660c4fb1ee486f57"
}
patches: ["PIC.patch"]
extra-files: ["PIC.patch" "md5=53aa5accaa1308e7b9eb434f47068a24"]
available: arch != "arm64" & arch != "arm32" & arch != "ppc64"
