opam-version: "2.0"
name: "ocaml-base-compiler"
version: "4.08.1"
synopsis: "Official release 4.08.1"
maintainer: "platform@lists.ocaml.org"
authors: "Xavier Leroy and many contributors"
license: "LGPL-2.1-or-later WITH OCaml-LGPL-linking-exception"
homepage: "https://ocaml.org"
bug-reports: "https://github.com/ocaml/opam-repository/issues"
depends: [
  "ocaml" {= "4.08.1" & post}
  "base-unix" {post}
  "base-bigarray" {post}
  "base-threads" {post}
]
conflict-class: "ocaml-core-compiler"
available: !(os = "macos" & arch = "arm64")
flags: compiler
setenv: CAML_LD_LIBRARY_PATH = "%{lib}%/stublibs"
build: [
  [
    "./configure"
    "--prefix=%{prefix}%"
    "-C"
    "CC=cc" {os = "openbsd" | os = "freebsd" | os = "macos"}
    "ASPP=cc -c" {os = "openbsd" | os = "freebsd" | os = "macos"}
  ]
  [make "-j%{jobs}%" {os != "cygwin"} "world"]
  [make "-j%{jobs}%" {os != "cygwin"} "world.opt"]
]
install: [make "install"]
patches: ["fix-gcc10.patch" "alt-signal-stack.patch"]
post-messages: [
  """\
A failure in the middle of the build may be caused by build parallelism
   (enabled by default).
   Please file a bug report at https://github.com/ocaml/opam-repository/issues"""
    {failure & jobs > "1" & os != "cygwin"}
  """\
You can try installing again including --jobs=1
   to force a sequential build instead."""
    {failure & jobs > "1" & os != "cygwin" & opam-version >= "2.0.5"}
]
dev-repo: "git+https://github.com/ocaml/ocaml"
extra-files: [
  ["fix-gcc10.patch" "md5=17ecd696a8f5647a4c543280599f6974"]
  ["ocaml-base-compiler.install" "md5=3e969b841df1f51ca448e6e6295cb451"]
  ["alt-signal-stack.patch" "sha256=35403384714b7d9961cc30b775fe9a03a762810c6693d0a4e05fff37c429d521"]
]
url {
  src: "https://github.com/ocaml/ocaml/archive/4.08.1.tar.gz"
  checksum: "md5=723b6bfe8cf5abcbccc6911143f71055"
}
