Skip to content

Commit 9b5072b

Browse files
authored
Merge pull request ocaml#22687 from Octachron/OCaml_5.0_release
OCaml 5.0.0 opam packages
2 parents 1aad530 + e6f500d commit 9b5072b

File tree

9 files changed

+253
-0
lines changed

9 files changed

+253
-0
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
share_root: ["config.cache" {"ocaml/config.cache"}]
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
opam-version: "2.0"
2+
synopsis: "Official release 5.0.0"
3+
maintainer: "[email protected]"
4+
license: "LGPL-2.1-or-later WITH OCaml-LGPL-linking-exception"
5+
authors: "Xavier Leroy and many contributors"
6+
homepage: "https://ocaml.org"
7+
bug-reports: "https://github.com/ocaml/opam-repository/issues"
8+
dev-repo: "git+https://github.com/ocaml/ocaml"
9+
depends: [
10+
"ocaml" {= "5.0.0" & post}
11+
"base-unix" {post}
12+
"base-bigarray" {post}
13+
"base-threads" {post}
14+
"base-domains" {post}
15+
"base-nnp" {post}
16+
"ocaml-options-vanilla" {post}
17+
"ocaml-option-bytecode-only" {arch != "arm64" & arch != "x86_64"}
18+
]
19+
conflict-class: "ocaml-core-compiler"
20+
flags: compiler
21+
setenv: CAML_LD_LIBRARY_PATH = "%{lib}%/stublibs"
22+
build: [
23+
[
24+
"./configure"
25+
"--prefix=%{prefix}%"
26+
"--docdir=%{doc}%/ocaml"
27+
"-C"
28+
"CC=cc" {os = "openbsd" | os = "macos"}
29+
"ASPP=cc -c" {os = "openbsd" | os = "macos"}
30+
]
31+
[make "-j%{jobs}%"]
32+
]
33+
install: [make "install"]
34+
url {
35+
src: "https://github.com/ocaml/ocaml/archive/5.0.0.tar.gz"
36+
checksum: "sha256=72fa3d0ba19b82fcb9e6c62e0090b9d22e5905c4be0f94faf56904a9377a9e5b"
37+
}
38+
extra-files: ["ocaml-base-compiler.install" "md5=3e969b841df1f51ca448e6e6295cb451"]
39+
post-messages: [
40+
"A failure in the middle of the build may be caused by build parallelism
41+
(enabled by default).
42+
Please file a bug report at https://github.com/ocaml/opam-repository/issues"
43+
{failure & jobs > 1}
44+
"You can try installing again including --jobs=1
45+
to force a sequential build instead."
46+
{failure & jobs > 1 & opam-version >= "2.0.5"}
47+
]
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
version = "5.0.0"
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
opam-version: "2.0"
2+
maintainer: "[email protected]"
3+
license: "LGPL-2.1-or-later WITH OCaml-LGPL-linking-exception"
4+
authors: "OCaml contributors"
5+
homepage: "http://ocaml.org/"
6+
install: ["cp" "-r" "." "%{lib}%/ocaml-src"]
7+
synopsis: "Compiler sources"
8+
depends: [
9+
"ocaml" {= "5.0.0"}
10+
]
11+
extra-files: ["META" "md5=b94b49b4f269074ca056d6596e440b8c"]
12+
url {
13+
src: "https://github.com/ocaml/ocaml/archive/5.0.0.tar.gz"
14+
checksum: "sha256=72fa3d0ba19b82fcb9e6c62e0090b9d22e5905c4be0f94faf56904a9377a9e5b"
15+
}
16+
17+
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
let () =
2+
let exe = ".exe" in
3+
let ocamlc =
4+
let (base, suffix) =
5+
let s = Sys.executable_name in
6+
if Filename.check_suffix s exe then
7+
(Filename.chop_suffix s exe, exe)
8+
else
9+
(s, "") in
10+
base ^ "c" ^ suffix in
11+
if Sys.ocaml_version <> "%{_:version}%" then
12+
(Printf.eprintf
13+
"ERROR: The compiler found at %%s has version %%s,\n\
14+
and this package requires %{_:version}%.\n\
15+
You should use e.g. 'opam switch create %{_:name}%.%%s' \
16+
instead."
17+
ocamlc Sys.ocaml_version Sys.ocaml_version;
18+
exit 1)
19+
else
20+
let ocamlc_digest = Digest.to_hex (Digest.file ocamlc) in
21+
let libdir =
22+
if Sys.command (ocamlc^" -where > %{_:name}%.config") = 0 then
23+
let ic = open_in "%{_:name}%.config" in
24+
let r = input_line ic in
25+
close_in ic;
26+
Sys.remove "%{_:name}%.config";
27+
r
28+
else
29+
failwith "Bad return from 'ocamlc -where'"
30+
in
31+
let graphics = Filename.concat libdir "graphics.cmi" in
32+
let graphics_digest =
33+
if Sys.file_exists graphics then
34+
Digest.to_hex (Digest.file graphics)
35+
else
36+
String.make 32 '0'
37+
in
38+
let oc = open_out "%{_:name}%.config" in
39+
Printf.fprintf oc "opam-version: \"2.0\"\n\
40+
file-depends: [ [ %%S %%S ] [ %%S %%S ] ]\n\
41+
variables { path: %%S }\n"
42+
ocamlc ocamlc_digest graphics graphics_digest (Filename.dirname ocamlc);
43+
close_out oc
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
opam-version: "2.0"
2+
synopsis: "The OCaml compiler (system version, from outside of opam)"
3+
maintainer: "[email protected]"
4+
license: "LGPL-2.1-or-later WITH OCaml-LGPL-linking-exception"
5+
authors: "Xavier Leroy and many contributors"
6+
homepage: "https://ocaml.org"
7+
bug-reports: "https://github.com/ocaml/opam-repository/issues"
8+
dev-repo: "git+https://github.com/ocaml/ocaml"
9+
depends: [
10+
"ocaml" {post}
11+
"base-unix" {post}
12+
"base-threads" {post}
13+
"base-bigarray" {post}
14+
"base-domains" {post}
15+
"base-nnp" {post}
16+
]
17+
conflict-class: "ocaml-core-compiler"
18+
available: sys-ocaml-version = "5.0.0"
19+
flags: compiler
20+
build: ["ocaml" "gen_ocaml_config.ml"]
21+
substs: "gen_ocaml_config.ml"
22+
extra-files: ["gen_ocaml_config.ml.in" "md5=093e7bec1ec95f9e4c6a313d73c5d840"]
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
share_root: ["config.cache" {"ocaml/config.cache"}]
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
opam-version: "2.0"
2+
license: "LGPL-2.1-or-later WITH OCaml-LGPL-linking-exception"
3+
synopsis: "Official release of OCaml 5.0.0"
4+
maintainer: "[email protected]"
5+
authors: ["Xavier Leroy" "Damien Doligez" "Alain Frisch" "Jacques Garrigue" "Didier Rémy" "Jérôme Vouillon"]
6+
homepage: "https://ocaml.org"
7+
bug-reports: "https://github.com/ocaml/opam-repository/issues"
8+
dev-repo: "git+https://github.com/ocaml/ocaml.git#5.0"
9+
depends: [
10+
"ocaml" {= "5.0.0" & post}
11+
"base-unix" {post}
12+
"base-bigarray" {post}
13+
"base-threads" {post}
14+
"base-domains" {post}
15+
"base-nnp" {post}
16+
"ocaml-option-bytecode-only" {arch != "arm64" & arch != "x86_64"}
17+
]
18+
conflict-class: "ocaml-core-compiler"
19+
flags: compiler
20+
setenv: CAML_LD_LIBRARY_PATH = "%{lib}%/stublibs"
21+
build-env: [
22+
[LSAN_OPTIONS = "detect_leaks=0,exitcode=0"]
23+
[ASAN_OPTIONS = "detect_leaks=0,exitcode=0"]
24+
]
25+
build: [
26+
[
27+
"./configure"
28+
"--prefix=%{prefix}%"
29+
"--docdir=%{doc}%/ocaml"
30+
"-C"
31+
"--with-afl" {ocaml-option-afl:installed}
32+
"--disable-native-compiler" {ocaml-option-bytecode-only:installed}
33+
"--disable-flat-float-array" {ocaml-option-no-flat-float-array:installed}
34+
"--enable-flambda" {ocaml-option-flambda:installed}
35+
"--enable-frame-pointers" {ocaml-option-fp:installed}
36+
"CC=cc" {!ocaml-option-32bit:installed & !ocaml-option-musl:installed & (os="openbsd"|os="macos")}
37+
"CC=musl-gcc" {ocaml-option-musl:installed & os-distribution!="alpine"}
38+
"CFLAGS=-Os" {ocaml-option-musl:installed}
39+
"LDFLAGS=-Wl,--no-as-needed,-ldl" {ocaml-option-leak-sanitizer:installed | (ocaml-option-address-sanitizer:installed & os!="macos")}
40+
"CC=gcc -ldl -fsanitize=leak -fno-omit-frame-pointer -O1 -g" {ocaml-option-leak-sanitizer:installed}
41+
"CC=gcc -ldl -fsanitize=address -fno-omit-frame-pointer -O1 -g" {ocaml-option-address-sanitizer:installed & os!="macos"}
42+
"CC=clang -fsanitize=address -fno-omit-frame-pointer -O1 -g" {ocaml-option-address-sanitizer:installed & os="macos"}
43+
"CC=gcc -m32" {ocaml-option-32bit:installed & os="linux"}
44+
"CC=gcc -Wl,-read_only_relocs,suppress -arch i386 -m32" {ocaml-option-32bit:installed & os="macos"}
45+
"ASPP=cc -c" {!ocaml-option-32bit:installed & !ocaml-option-musl:installed & (os="openbsd"|os="macos")}
46+
"ASPP=musl-gcc -c" {ocaml-option-musl:installed & os-distribution!="alpine"}
47+
"ASPP=gcc -m32 -c" {ocaml-option-32bit:installed & os="linux"}
48+
"ASPP=gcc -arch i386 -m32 -c" {ocaml-option-32bit:installed & os="macos"}
49+
"AS=as --32" {ocaml-option-32bit:installed & os="linux"}
50+
"AS=as -arch i386" {ocaml-option-32bit:installed & os="macos"}
51+
"--host=i386-linux" {ocaml-option-32bit:installed & os="linux"}
52+
"--host=i386-apple-darwin13.2.0" {ocaml-option-32bit:installed & os="macos"}
53+
"PARTIALLD=ld -r -melf_i386" {ocaml-option-32bit:installed & os="linux"}
54+
"LIBS=-static" {ocaml-option-static:installed}
55+
"--disable-warn-error"
56+
]
57+
[make "-j%{jobs}%"]
58+
]
59+
install: [make "install"]
60+
url {
61+
src: "https://github.com/ocaml/ocaml/archive/5.0.0.tar.gz"
62+
checksum: "sha256=72fa3d0ba19b82fcb9e6c62e0090b9d22e5905c4be0f94faf56904a9377a9e5b"
63+
}
64+
extra-files: ["ocaml-variants.install" "md5=3e969b841df1f51ca448e6e6295cb451"]
65+
post-messages: [
66+
"A failure in the middle of the build may be caused by build parallelism
67+
(enabled by default).
68+
Please file a bug report at https://github.com/ocaml/opam-repository/issues"
69+
{failure & jobs > 1}
70+
"You can try installing again including --jobs=1
71+
to force a sequential build instead."
72+
{failure & jobs > 1 & opam-version >= "2.0.5"}
73+
]
74+
conflicts: [ "ocaml-option-fp" ]
75+
depopts: [
76+
"ocaml-option-32bit"
77+
"ocaml-option-afl"
78+
"ocaml-option-bytecode-only"
79+
"ocaml-option-no-flat-float-array"
80+
"ocaml-option-flambda"
81+
"ocaml-option-fp"
82+
"ocaml-option-musl"
83+
"ocaml-option-leak-sanitizer"
84+
"ocaml-option-address-sanitizer"
85+
"ocaml-option-static"
86+
]

packages/ocaml/ocaml.5.0.1/opam

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
opam-version: "2.0"
2+
license: "LGPL-2.1-or-later WITH OCaml-LGPL-linking-exception"
3+
synopsis: "The OCaml compiler (virtual package)"
4+
description: """
5+
This package requires a matching implementation of OCaml,
6+
and polls it to initialise specific variables like `ocaml:native-dynlink`"""
7+
maintainer: "[email protected]"
8+
depends: [
9+
"ocaml-config" {>= "3"}
10+
"ocaml-base-compiler" {>= "5.0.1~" & < "5.0.2~" } |
11+
"ocaml-variants" {>= "5.0.1~" & < "5.0.2~"} |
12+
"ocaml-system" {>= "5.0.1" & < "5.0.2~"}
13+
]
14+
setenv: [
15+
[CAML_LD_LIBRARY_PATH = "%{_:stubsdir}%"]
16+
[CAML_LD_LIBRARY_PATH += "%{lib}%/stublibs"]
17+
[OCAML_TOPLEVEL_PATH = "%{toplevel}%"]
18+
]
19+
build: ["ocaml" "%{ocaml-config:share}%/gen_ocaml_config.ml" _:version _:name]
20+
build-env: [
21+
[CAML_LD_LIBRARY_PATH = ""]
22+
[LSAN_OPTIONS = "detect_leaks=0,exitcode=0"]
23+
[ASAN_OPTIONS = "detect_leaks=0,exitcode=0"]
24+
]
25+
homepage: "https://ocaml.org"
26+
bug-reports: "https://github.com/ocaml/opam-repository/issues"
27+
authors: [
28+
"Xavier Leroy"
29+
"Damien Doligez"
30+
"Alain Frisch"
31+
"Jacques Garrigue"
32+
"Didier Rémy"
33+
"Jérôme Vouillon"
34+
]
35+
flags: conf

0 commit comments

Comments
 (0)