From 1ed394aca121ef94e02abde1fbd980f4a2f219c4 Mon Sep 17 00:00:00 2001 From: Florian Angeletti Date: Thu, 9 Oct 2025 11:42:01 +0200 Subject: [PATCH] Official release of OCaml 5.4.0 --- .../ocaml-base-compiler.5.4.0/opam | 21 +++ .../ocaml-compiler/ocaml-compiler.5.4.0/opam | 124 ++++++++++++++++++ packages/ocaml-manual/ocaml-manual.5.4.0/opam | 22 ++++ packages/ocaml-src/ocaml-src.5.4.0/opam | 15 +++ packages/ocaml-system/ocaml-system.5.4.0/opam | 61 +++++++++ .../ocaml-variants.5.4.0+options/opam | 24 ++++ .../opam | 0 packages/ocaml/ocaml.5.4.1/opam | 43 ++++++ 8 files changed, 310 insertions(+) create mode 100644 packages/ocaml-base-compiler/ocaml-base-compiler.5.4.0/opam create mode 100644 packages/ocaml-compiler/ocaml-compiler.5.4.0/opam create mode 100644 packages/ocaml-manual/ocaml-manual.5.4.0/opam create mode 100644 packages/ocaml-src/ocaml-src.5.4.0/opam create mode 100644 packages/ocaml-system/ocaml-system.5.4.0/opam create mode 100644 packages/ocaml-variants/ocaml-variants.5.4.0+options/opam rename packages/ocaml-variants/{ocaml-variants.5.4.0+trunk => ocaml-variants.5.4.1+trunk}/opam (100%) create mode 100644 packages/ocaml/ocaml.5.4.1/opam diff --git a/packages/ocaml-base-compiler/ocaml-base-compiler.5.4.0/opam b/packages/ocaml-base-compiler/ocaml-base-compiler.5.4.0/opam new file mode 100644 index 000000000000..db352ce1af4e --- /dev/null +++ b/packages/ocaml-base-compiler/ocaml-base-compiler.5.4.0/opam @@ -0,0 +1,21 @@ +opam-version: "2.0" +synopsis: "Official release of OCaml 5.4.0" +maintainer: [ + "David Allsopp " + "Florian Angeletti " +] +license: "LGPL-2.1-or-later WITH OCaml-LGPL-linking-exception" +authors: "Xavier Leroy and many contributors" +homepage: "https://ocaml.org" +bug-reports: "https://github.com/ocaml/opam-repository/issues" +dev-repo: "git+https://github.com/ocaml/ocaml#5.4" +depends: [ + # This is OCaml 5.4.0 + "ocaml-compiler" {= "5.4.0"} + + + # OCaml with default configuration (no flambda, TSAN, etc.) + "ocaml-options-vanilla" {post} +] +conflict-class: "ocaml-core-compiler" +flags: compiler diff --git a/packages/ocaml-compiler/ocaml-compiler.5.4.0/opam b/packages/ocaml-compiler/ocaml-compiler.5.4.0/opam new file mode 100644 index 000000000000..8a6359cf6ad2 --- /dev/null +++ b/packages/ocaml-compiler/ocaml-compiler.5.4.0/opam @@ -0,0 +1,124 @@ +opam-version: "2.0" +license: "LGPL-2.1-or-later WITH OCaml-LGPL-linking-exception" +synopsis: "Official release of OCaml 5.4.0" +maintainer: [ + "David Allsopp " + "Florian Angeletti " +] +authors: [ + "Xavier Leroy" + "Damien Doligez" + "Alain Frisch" + "Jacques Garrigue" + "Didier Rémy" + "KC Sivaramakrishnan" + "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#5.4" +depends: [ + # This is OCaml 5.4.0 + "ocaml" {= "5.4.0" & post} + + # General base- packages + "base-unix" {post} + "base-bigarray" {post} + "base-threads" {post} + "base-domains" {post} + "base-nnp" {post} + "base-effects" {post} + + # Port selection (Windows) + # amd64 mingw-w64 / MSVC + (("arch-x86_64" {os = "win32" & arch = "x86_64"} & + (("system-mingw" & "mingw-w64-shims" {os-distribution = "cygwin" & build}) | + ("system-msvc" & "winpthreads" & "ocaml-option-no-compression" {os = "win32"}))) | + # i686 mingw-w64 / MSVC + ("arch-x86_32" {os = "win32"} & "ocaml-option-bytecode-only" {os = "win32"} & + (("system-mingw" & "mingw-w64-shims" {os-distribution = "cygwin" & build}) | + ("system-msvc" & "winpthreads" & "ocaml-option-no-compression" {os = "win32"}))) | + # Non-Windows systems need to install something to satisfy this formula, so + # repeat the base-unix dependency + "base-unix" {os != "win32" & post}) + + # All the 32-bit architectures are bytecode-only + "ocaml-option-bytecode-only" {arch != "arm64" & arch != "x86_64" & arch != "s390x" & arch != "riscv64" & arch != "ppc64"} + + # Support Packages + "flexdll" {>= "0.42" & os = "win32"} +] +setenv: CAML_LD_LIBRARY_PATH = "%{lib}%/stublibs" +x-env-path-rewrite: [ + [CAML_LD_LIBRARY_PATH (";" {os = "win32"} ":" {os != "win32"}) "target"] +] +build-env: [ + [MSYS2_ARG_CONV_EXCL = "*"] + [LSAN_OPTIONS = "detect_leaks=0,exitcode=0"] + [ASAN_OPTIONS = "detect_leaks=0,exitcode=0"] +] +build: [ + [ + "./configure" + "--host=x86_64-pc-windows" {system-msvc:installed & arch-x86_64:installed} + "--host=x86_64-w64-mingw32" {os-distribution = "cygwin" & system-mingw:installed & arch-x86_64:installed} + "--host=i686-pc-windows" {system-msvc:installed & arch-x86_32:installed} + "--host=i686-w64-mingw32" {os-distribution = "cygwin" & system-mingw:installed & arch-x86_32:installed} + "--prefix=%{prefix}%" + "--docdir=%{doc}%/ocaml" + "--with-flexdll=%{flexdll:share}%" {os = "win32" & flexdll:installed} + "--with-winpthreads-msvc=%{winpthreads:share}%" {system-msvc:installed} + "-C" + "--with-afl" {ocaml-option-afl:installed} + "--disable-native-compiler" {ocaml-option-bytecode-only:installed} + "--disable-flat-float-array" {ocaml-option-no-flat-float-array:installed} + "--enable-flambda" {ocaml-option-flambda:installed} + "--enable-frame-pointers" {ocaml-option-fp:installed} + "--without-zstd" {ocaml-option-no-compression:installed} + "--enable-tsan" {ocaml-option-tsan:installed} + "CC=cc" {!ocaml-option-32bit:installed & !ocaml-option-musl:installed & (os = "openbsd" | os = "macos")} + "CC=clang" {ocaml-option-tsan:installed & (os="macos")} + "CC=musl-gcc" {ocaml-option-musl:installed & os-distribution!="alpine"} + "CFLAGS=-Os" {ocaml-option-musl:installed & arch != "arm64"} + "CFLAGS=-Os -mno-outline-atomics" {ocaml-option-musl:installed & arch = "arm64"} + "LDFLAGS=-Wl,--no-as-needed,-ldl" {ocaml-option-leak-sanitizer:installed | (ocaml-option-address-sanitizer:installed & os!="macos")} + "CC=gcc -ldl -fsanitize=leak -fno-omit-frame-pointer -O1 -g" {ocaml-option-leak-sanitizer:installed} + "CC=gcc -ldl -fsanitize=address -fno-omit-frame-pointer -O1 -g" {ocaml-option-address-sanitizer:installed & os!="macos"} + "CC=clang -fsanitize=address -fno-omit-frame-pointer -O1 -g" {ocaml-option-address-sanitizer:installed & os="macos"} + "CC=gcc -m32" {ocaml-option-32bit:installed & os="linux"} + "CC=gcc -Wl,-read_only_relocs,suppress -arch i386 -m32" {ocaml-option-32bit:installed & os="macos"} + "ASPP=musl-gcc -c" {ocaml-option-musl:installed & os-distribution!="alpine"} + "--host=i386-linux" {ocaml-option-32bit:installed & os="linux"} + "--host=i386-apple-darwin13.2.0" {ocaml-option-32bit:installed & os="macos"} + "LIBS=-static" {ocaml-option-static:installed} + "--disable-warn-error" + ] + [make "-j%{jobs}%"] +] +install: [make "install"] +url { + src: "https://github.com/ocaml/ocaml/releases/download/5.4.0/ocaml-5.4.0.tar.gz" + checksum: "sha256=6fcf1b192e389e54c4f5cb51306ab2baee2a54a25b1770366de5a8b42695996e" +} +depopts: [ + "ocaml-option-32bit" + "ocaml-option-afl" + "ocaml-option-bytecode-only" + "ocaml-option-no-flat-float-array" + "ocaml-option-flambda" + "ocaml-option-fp" + "ocaml-option-no-compression" + "ocaml-option-musl" + "ocaml-option-leak-sanitizer" + "ocaml-option-address-sanitizer" + "ocaml-option-static" + "ocaml-option-tsan" +] +extra-source "ocaml-compiler.install" { + src: + "https://raw.githubusercontent.com/ocaml/ocaml/899b8f3bece45f55161dad72eaa223c2bb7202e8/ocaml-variants.install" + checksum: [ + "sha256=7af3dc34e6f9f3be2ffd8d32cd64fa650d6a036c86c4821a7033d24a90fba11c" + "md5=781ea69255fd0cb643a9617ff56fd6ba" + ] +} diff --git a/packages/ocaml-manual/ocaml-manual.5.4.0/opam b/packages/ocaml-manual/ocaml-manual.5.4.0/opam new file mode 100644 index 000000000000..0f2d10440d8b --- /dev/null +++ b/packages/ocaml-manual/ocaml-manual.5.4.0/opam @@ -0,0 +1,22 @@ +opam-version: "2.0" +maintainer: "Daniel Bünzli " +authors: [ "Xavier Leroy" + "Damien Doligez" + "Alain Frisch" + "Jacques Garrigue" + "Didier Rémy" + "Jérôme Vouillon" ] +homepage: "http://ocaml.org/" +doc: "https://ocaml.org/manual/" +license: "CC-BY-SA-4.0" +dev-repo: "git+https://github.com/ocaml/ocaml.git" +bug-reports: "https://github.com/ocaml/opam-repository/issues" +install: ["cp" "-R" "." _:doc] +synopsis: "The OCaml system manual" +depends: [ + "ocaml" {= version} +] +url { + src: "http://caml.inria.fr/distrib/ocaml-5.4/ocaml-5.4-refman-html.tar.gz" + checksum: "sha256=114839f9fffd28f46a38af5c81913c5c4f11d606cda292fcd1d91d304bcda25b" +} diff --git a/packages/ocaml-src/ocaml-src.5.4.0/opam b/packages/ocaml-src/ocaml-src.5.4.0/opam new file mode 100644 index 000000000000..cb33d5bd8864 --- /dev/null +++ b/packages/ocaml-src/ocaml-src.5.4.0/opam @@ -0,0 +1,15 @@ +opam-version: "2.0" +maintainer: "opam-devel@lists.ocaml.org" +license: "LGPL-2.1-or-later WITH OCaml-LGPL-linking-exception" +authors: "OCaml contributors" +homepage: "http://ocaml.org/" +build: [ "touch" "META" ] +install: ["cp" "-r" "." "%{lib}%/ocaml-src"] +synopsis: "Compiler sources" +depends: [ + "ocaml" {= "5.4.0"} +] +url { + src: "https://github.com/ocaml/ocaml/releases/download/5.4.0/ocaml-5.4.0.tar.gz" + checksum: "sha256=6fcf1b192e389e54c4f5cb51306ab2baee2a54a25b1770366de5a8b42695996e" +} diff --git a/packages/ocaml-system/ocaml-system.5.4.0/opam b/packages/ocaml-system/ocaml-system.5.4.0/opam new file mode 100644 index 000000000000..0b940311da7a --- /dev/null +++ b/packages/ocaml-system/ocaml-system.5.4.0/opam @@ -0,0 +1,61 @@ +opam-version: "2.0" +synopsis: "The OCaml compiler (system version, from outside of opam)" +maintainer: [ + "David Allsopp " + "Florian Angeletti " +] +license: "LGPL-2.1-or-later WITH OCaml-LGPL-linking-exception" +authors: "Xavier Leroy and many contributors" +homepage: "https://ocaml.org" +bug-reports: "https://github.com/ocaml/opam-repository/issues" +dev-repo: "git+https://github.com/ocaml/ocaml" +depends: [ + # This is OCaml 5.4.0 + "ocaml" {= "5.4.0" & post} + + # General base- packages + "base-unix" {post} + "base-bigarray" {post} + "base-threads" {post} + "base-domains" {post} + "base-nnp" {post} + "base-effects" {post} + + # Architecture (Windows-only at present) + "host-arch-x86_32" {os = "win32" & ?sys-ocaml-arch & sys-ocaml-arch = "i686" & post} + "host-arch-x86_64" {os = "win32" & ?sys-ocaml-arch & sys-ocaml-arch = "x86_64" & post} + "host-arch-unknown" {os = "win32" & (!(?sys-ocaml-arch) | + sys-ocaml-arch != "i686" & + sys-ocaml-arch != "x86_64") & post} + + # System (Windows-only at present) + "host-system-mingw" {os = "win32" & ?sys-ocaml-arch & sys-ocaml-libc = "msvc" & sys-ocaml-cc = "cc" & post} + "host-system-msvc" {os = "win32" & ?sys-ocaml-arch & sys-ocaml-cc = "msvc" & post} + "host-system-other" {os = "win32" & ?sys-ocaml-arch & sys-ocaml-libc != "msvc" & post} + + # Environment configuration (Windows-only) + # NB There are not "system" distributions of OCaml on Windows; the support + # here is intended for binary caching setups, choosing to install a build + # of OCaml external to opam, but still using opam to provide the C compiler + # configuration. + "conf-mingw-w64-gcc-x86_64" {?sys-ocaml-arch & sys-ocaml-arch = "x86_64" & sys-ocaml-libc = "msvc" & sys-ocaml-cc = "cc" & post} + "conf-mingw-w64-gcc-i686" {?sys-ocaml-arch & sys-ocaml-arch = "i686" & sys-ocaml-libc = "msvc" & sys-ocaml-cc = "cc" & post} + "conf-mingw-w64-zstd-x86_64" {?sys-ocaml-arch & sys-ocaml-arch = "x86_64" & sys-ocaml-libc = "msvc" & sys-ocaml-cc = "cc" & post} + "conf-mingw-w64-zstd-i686" {?sys-ocaml-arch & sys-ocaml-arch = "i686" & sys-ocaml-libc = "msvc" & sys-ocaml-cc = "cc" & post} + "mingw-w64-shims" {?sys-ocaml-arch & sys-ocaml-libc = "msvc" & sys-ocaml-cc = "cc" & os-distribution = "cygwin" & post} + "ocaml-env-msvc32" {?sys-ocaml-arch & sys-ocaml-arch = "i686" & sys-ocaml-cc = "msvc" & post} + "ocaml-env-msvc64" {?sys-ocaml-arch & sys-ocaml-arch = "x86_64" & sys-ocaml-cc = "msvc" & post} +] +conflict-class: "ocaml-core-compiler" +available: sys-ocaml-version = "5.4.0" & (os != "win32" | sys-ocaml-libc = "msvc") +flags: [compiler avoid-version] +build: ["ocaml" "gen_ocaml_config.ml"] +substs: "gen_ocaml_config.ml" +extra-source "gen_ocaml_config.ml.in" { + src: + "https://raw.githubusercontent.com/ocaml/opam-source-archives/main/patches/ocaml-system/gen_ocaml_config.ml.in" + checksum: [ + "sha256=71bcd3d35e28cbf71eda81991c8741268f4b87ced71573b2e75f64f136cebfc1" + "md5=093e7bec1ec95f9e4c6a313d73c5d840" + ] +} diff --git a/packages/ocaml-variants/ocaml-variants.5.4.0+options/opam b/packages/ocaml-variants/ocaml-variants.5.4.0+options/opam new file mode 100644 index 000000000000..0e2b6df2d7ee --- /dev/null +++ b/packages/ocaml-variants/ocaml-variants.5.4.0+options/opam @@ -0,0 +1,24 @@ +opam-version: "2.0" +license: "LGPL-2.1-or-later WITH OCaml-LGPL-linking-exception" +synopsis: "Official release of OCaml 5.4.0" +maintainer: [ + "David Allsopp " + "Florian Angeletti " +] +authors: [ + "Xavier Leroy" + "Damien Doligez" + "Alain Frisch" + "Jacques Garrigue" + "Didier Rémy" + "KC Sivaramakrishnan" + "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#5.4" +depends: [ + "ocaml-compiler" {= "5.4.0"} +] +conflict-class: "ocaml-core-compiler" +flags: compiler diff --git a/packages/ocaml-variants/ocaml-variants.5.4.0+trunk/opam b/packages/ocaml-variants/ocaml-variants.5.4.1+trunk/opam similarity index 100% rename from packages/ocaml-variants/ocaml-variants.5.4.0+trunk/opam rename to packages/ocaml-variants/ocaml-variants.5.4.1+trunk/opam diff --git a/packages/ocaml/ocaml.5.4.1/opam b/packages/ocaml/ocaml.5.4.1/opam new file mode 100644 index 000000000000..cafc01354022 --- /dev/null +++ b/packages/ocaml/ocaml.5.4.1/opam @@ -0,0 +1,43 @@ +opam-version: "2.0" +license: "LGPL-2.1-or-later WITH OCaml-LGPL-linking-exception" +synopsis: "The OCaml compiler (virtual package)" +description: """ +This package requires a matching implementation of OCaml, +and polls it to initialise specific variables like `ocaml:native-dynlink`""" +maintainer: "David Allsopp " +authors: [ + "Xavier Leroy" + "Damien Doligez" + "Alain Frisch" + "Jacques Garrigue" + "Didier Rémy" + "KC Sivaramakrishnan" + "Jérôme Vouillon" +] +homepage: "https://ocaml.org" +bug-reports: "https://github.com/ocaml/opam-repository/issues" +depends: [ + "ocaml-config" {>= "3"} + "ocaml-base-compiler" {>= "5.4.1.0~" & < "5.4.1.2~"} | + "ocaml-variants" {>= "5.4.1.0~" & < "5.4.1.2~"} | + "ocaml-system" {>= "5.4.1.0~" & < "5.4.1.2~"} | + "dkml-base-compiler" {>= "5.4.1.0~" & < "5.4.1.2~"} +] +flags: [conf avoid-version] +setenv: [ + [OCAMLTOP_INCLUDE_PATH += "%{toplevel}%"] + [CAML_LD_LIBRARY_PATH = "%{_:stubsdir}%"] + [CAML_LD_LIBRARY_PATH += "%{lib}%/stublibs"] + # Legacy opam variable + [OCAML_TOPLEVEL_PATH = "%{toplevel}%"] +] +x-env-path-rewrite: [ + [CAML_LD_LIBRARY_PATH (";" {os = "win32"} ":" {os != "win32"}) "target"] + [OCAMLTOP_INCLUDE_PATH (";" {os = "win32"} ":" {os != "win32"}) "target"] +] +build-env: [ + [CAML_LD_LIBRARY_PATH = ""] + [LSAN_OPTIONS = "detect_leaks=0,exitcode=0"] + [ASAN_OPTIONS = "detect_leaks=0,exitcode=0"] +] +build: ["ocaml" "%{ocaml-config:share}%/gen_ocaml_config.ml" _:version _:name]