|
| 1 | +opam-version: "2.0" |
| 2 | +license: "LGPL-2.1-or-later WITH OCaml-LGPL-linking-exception" |
| 3 | +synopsis: "Official release of OCaml 5.2.1" |
| 4 | +maintainer: [ |
| 5 | + "David Allsopp < [email protected]>" |
| 6 | + "Florian Angeletti < [email protected]>" |
| 7 | +] |
| 8 | +authors: [ |
| 9 | + "Xavier Leroy" |
| 10 | + "Damien Doligez" |
| 11 | + "Alain Frisch" |
| 12 | + "Jacques Garrigue" |
| 13 | + "Didier Rémy" |
| 14 | + "Jérôme Vouillon" |
| 15 | +] |
| 16 | +homepage: "https://ocaml.org" |
| 17 | +bug-reports: "https://github.com/ocaml/opam-repository/issues" |
| 18 | +dev-repo: "git+https://github.com/ocaml/ocaml.git#5.2" |
| 19 | +depends: [ |
| 20 | + # This is OCaml 5.2.1 |
| 21 | + "ocaml" {= "5.2.1" & post} |
| 22 | + |
| 23 | + # General base- packages |
| 24 | + "base-unix" {post} |
| 25 | + "base-bigarray" {post} |
| 26 | + "base-threads" {post} |
| 27 | + "base-domains" {post} |
| 28 | + "base-nnp" {post} |
| 29 | + |
| 30 | + # Architecture (non-Windows) |
| 31 | + # opam-repository at present requires that ocaml-base-compiler is installed |
| 32 | + # using an architecture which matches the machine's, since arch is used in |
| 33 | + # available fields. Cross-compilation at this stage is an unstable accident. |
| 34 | + "host-arch-arm32" {arch = "arm32" & post} |
| 35 | + "host-arch-arm64" {arch = "arm64" & post} |
| 36 | + "host-arch-ppc64" {arch = "ppc64" & post} |
| 37 | + "host-arch-riscv64" {arch = "riscv64" & post} |
| 38 | + "host-arch-s390x" {arch = "s390x" & post} |
| 39 | + # The Windows ports explicitly select the architecture (see below) this |
| 40 | + # facility is not yet available for other platforms. |
| 41 | + "host-arch-x86_32" {os != "win32" & arch = "x86_32" & post} |
| 42 | + ("host-arch-x86_64" {os != "win32" & arch = "x86_64" & post} | |
| 43 | + ("host-arch-x86_32" {os != "win32" & arch = "x86_64" & post} & "ocaml-option-32bit" {os != "win32" & arch = "x86_64"})) |
| 44 | + "host-arch-unknown" {os != "win32" & arch != "arm32" & arch != "arm64" & arch != "ppc64" & arch != "riscv64" & arch != "s390x" & arch != "x86_32" & arch != "x86_64" & post} |
| 45 | + |
| 46 | + # Port selection (Windows) |
| 47 | + # amd64 mingw-w64 only |
| 48 | + (("arch-x86_64" {os = "win32" & arch = "x86_64"} & |
| 49 | + "system-mingw" & "mingw-w64-shims" {os-distribution = "cygwin" & build}) | |
| 50 | + # i686 mingw-w64 only |
| 51 | + ("arch-x86_32" {os = "win32"} & "ocaml-option-bytecode-only" {os = "win32"} & |
| 52 | + "system-mingw" & "mingw-w64-shims" {os-distribution = "cygwin" & build}) | |
| 53 | + # Non-Windows systems |
| 54 | + "host-system-other" {os != "win32" & post}) |
| 55 | + |
| 56 | + # All the 32-bit architectures are bytecode-only |
| 57 | + "ocaml-option-bytecode-only" {arch != "arm64" & arch != "x86_64" & arch != "s390x" & arch != "riscv64" & arch != "ppc64"} |
| 58 | + |
| 59 | + # Support Packages |
| 60 | + "flexdll" {>= "0.42" & os = "win32"} |
| 61 | +] |
| 62 | +conflict-class: "ocaml-core-compiler" |
| 63 | +flags: compiler |
| 64 | +setenv: CAML_LD_LIBRARY_PATH = "%{lib}%/stublibs" |
| 65 | +x-env-path-rewrite: [ |
| 66 | + [CAML_LD_LIBRARY_PATH (";" {os = "win32"} ":" {os != "win32"}) "target"] |
| 67 | +] |
| 68 | +build-env: [ |
| 69 | + [LSAN_OPTIONS = "detect_leaks=0,exitcode=0"] |
| 70 | + [ASAN_OPTIONS = "detect_leaks=0,exitcode=0"] |
| 71 | +] |
| 72 | +build: [ |
| 73 | + [ |
| 74 | + "./configure" |
| 75 | + "--host=x86_64-w64-mingw32" {os-distribution = "cygwin" & system-mingw:installed & arch-x86_64:installed} |
| 76 | + "--host=i686-w64-mingw32" {os-distribution = "cygwin" & system-mingw:installed & arch-x86_32:installed} |
| 77 | + "--prefix=%{prefix}%" |
| 78 | + "--docdir=%{doc}%/ocaml" |
| 79 | + "--with-flexdll=%{flexdll:share}%" {os = "win32" & flexdll:installed} |
| 80 | + "-C" |
| 81 | + "--with-afl" {ocaml-option-afl:installed} |
| 82 | + "--disable-native-compiler" {ocaml-option-bytecode-only:installed} |
| 83 | + "--disable-flat-float-array" {ocaml-option-no-flat-float-array:installed} |
| 84 | + "--enable-flambda" {ocaml-option-flambda:installed} |
| 85 | + "--enable-frame-pointers" {ocaml-option-fp:installed} |
| 86 | + "--without-zstd" {ocaml-option-no-compression:installed} |
| 87 | + "--enable-tsan" {ocaml-option-tsan:installed} |
| 88 | + "CC=cc" {!ocaml-option-32bit:installed & !ocaml-option-musl:installed & (os="openbsd"|os="macos")} |
| 89 | + "CC=clang" {ocaml-option-tsan:installed & (os="macos")} |
| 90 | + "CC=musl-gcc" {ocaml-option-musl:installed & os-distribution!="alpine"} |
| 91 | + "CFLAGS=-Os" {ocaml-option-musl:installed & arch!="arm64"} |
| 92 | + "CFLAGS=-Os -mno-outline-atomics" {ocaml-option-musl:installed & arch="arm64"} |
| 93 | + "LDFLAGS=-Wl,--no-as-needed,-ldl" {ocaml-option-leak-sanitizer:installed | (ocaml-option-address-sanitizer:installed & os!="macos")} |
| 94 | + "CC=gcc -ldl -fsanitize=leak -fno-omit-frame-pointer -O1 -g" {ocaml-option-leak-sanitizer:installed} |
| 95 | + "CC=gcc -ldl -fsanitize=address -fno-omit-frame-pointer -O1 -g" {ocaml-option-address-sanitizer:installed & os!="macos"} |
| 96 | + "CC=clang -fsanitize=address -fno-omit-frame-pointer -O1 -g" {ocaml-option-address-sanitizer:installed & os="macos"} |
| 97 | + "CC=gcc -m32" {ocaml-option-32bit:installed & os="linux"} |
| 98 | + "CC=gcc -Wl,-read_only_relocs,suppress -arch i386 -m32" {ocaml-option-32bit:installed & os="macos"} |
| 99 | + "ASPP=musl-gcc -c" {ocaml-option-musl:installed & os-distribution!="alpine"} |
| 100 | + "--host=i386-linux" {ocaml-option-32bit:installed & os="linux"} |
| 101 | + "--host=i386-apple-darwin13.2.0" {ocaml-option-32bit:installed & os="macos"} |
| 102 | + "LIBS=-static" {ocaml-option-static:installed} |
| 103 | + "--disable-warn-error" |
| 104 | + ] |
| 105 | + [make "-j%{jobs}%"] |
| 106 | +] |
| 107 | +install: [make "install"] |
| 108 | +url { |
| 109 | + src: "https://github.com/ocaml/ocaml/releases/download/5.2.1/ocaml-5.2.1.tar.gz" |
| 110 | + checksum: "sha256=2d0f8090951a97a2c0e5b8a11e90096c0e1791d2e471e4a67f87e3b974044cd0" |
| 111 | +} |
| 112 | +conflicts: [ |
| 113 | + "system-msvc" |
| 114 | +] |
| 115 | +depopts: [ |
| 116 | + "ocaml-option-32bit" |
| 117 | + "ocaml-option-afl" |
| 118 | + "ocaml-option-bytecode-only" |
| 119 | + "ocaml-option-no-flat-float-array" |
| 120 | + "ocaml-option-flambda" |
| 121 | + "ocaml-option-fp" |
| 122 | + "ocaml-option-no-compression" |
| 123 | + "ocaml-option-musl" |
| 124 | + "ocaml-option-leak-sanitizer" |
| 125 | + "ocaml-option-address-sanitizer" |
| 126 | + "ocaml-option-static" |
| 127 | + "ocaml-option-tsan" |
| 128 | +] |
| 129 | +extra-source "ocaml-variants.install" { |
| 130 | + src: |
| 131 | + "https://raw.githubusercontent.com/ocaml/opam-source-archives/main/patches/ocaml-variants/ocaml-variants.install" |
| 132 | + checksum: [ |
| 133 | + "sha256=79f2a1a5044a91350a0eb6ce12e261a72a2855c094c425cddf3860e58c486678" |
| 134 | + "md5=3e969b841df1f51ca448e6e6295cb451" |
| 135 | + ] |
| 136 | +} |
0 commit comments