Skip to content

Commit 0b3a16a

Browse files
committed
Add packages for OCaml 4.14.1
1 parent 789990a commit 0b3a16a

File tree

9 files changed

+236
-0
lines changed

9 files changed

+236
-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: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
opam-version: "2.0"
2+
synopsis: "Official release 4.14.1"
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" {= "4.14.1" & post}
11+
"base-unix" {post}
12+
"base-bigarray" {post}
13+
"base-threads" {post}
14+
"ocaml-options-vanilla" {post}
15+
]
16+
conflict-class: "ocaml-core-compiler"
17+
flags: compiler
18+
setenv: CAML_LD_LIBRARY_PATH = "%{lib}%/stublibs"
19+
build: [
20+
[
21+
"./configure"
22+
"--prefix=%{prefix}%"
23+
"--docdir=%{doc}%/ocaml"
24+
"-C"
25+
"CC=cc" {os = "openbsd" | os = "macos"}
26+
"ASPP=cc -c" {os = "openbsd" | os = "macos"}
27+
]
28+
[make "-j%{jobs}%"]
29+
]
30+
install: [make "install"]
31+
url {
32+
src: "https://github.com/ocaml/ocaml/archive/4.14.1.tar.gz"
33+
checksum: "sha256=776006e6f0b9bcfb6d9d74381c588e587432ca85562fde93bb80472a5145b028"
34+
}
35+
extra-files: ["ocaml-base-compiler.install" "md5=3e969b841df1f51ca448e6e6295cb451"]
36+
post-messages: [
37+
"A failure in the middle of the build may be caused by build parallelism
38+
(enabled by default).
39+
Please file a bug report at https://github.com/ocaml/opam-repository/issues"
40+
{failure & jobs > 1}
41+
"You can try installing again including --jobs=1
42+
to force a sequential build instead."
43+
{failure & jobs > 1 & opam-version >= "2.0.5"}
44+
]
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
version = "4.14.1"
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" {= "4.14.1"}
10+
]
11+
extra-files: ["META" "md5=860d7e64cb4b724927ee42483e21e133"]
12+
url {
13+
src: "https://github.com/ocaml/ocaml/archive/4.14.1.tar.gz"
14+
checksum: "sha256=776006e6f0b9bcfb6d9d74381c588e587432ca85562fde93bb80472a5145b028"
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: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
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+
]
15+
conflict-class: "ocaml-core-compiler"
16+
available: sys-ocaml-version = "4.14.1"
17+
flags: compiler
18+
build: ["ocaml" "gen_ocaml_config.ml"]
19+
substs: "gen_ocaml_config.ml"
20+
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: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
opam-version: "2.0"
2+
license: "LGPL-2.1-or-later WITH OCaml-LGPL-linking-exception"
3+
synopsis: "Official release of OCaml 4.14.1"
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#4.14"
9+
depends: [
10+
"ocaml" {= "4.14.1" & post}
11+
"base-unix" {post}
12+
"base-bigarray" {post}
13+
"base-threads" {post}
14+
]
15+
conflict-class: "ocaml-core-compiler"
16+
flags: compiler
17+
setenv: CAML_LD_LIBRARY_PATH = "%{lib}%/stublibs"
18+
build: [
19+
[
20+
"./configure"
21+
"--prefix=%{prefix}%"
22+
"--docdir=%{doc}%/ocaml"
23+
"-C"
24+
"--with-afl" {ocaml-option-afl:installed}
25+
"--disable-native-compiler" {ocaml-option-bytecode-only:installed}
26+
"--disable-force-safe-string" {ocaml-option-default-unsafe-string:installed}
27+
"DEFAULT_STRING=unsafe" {ocaml-option-default-unsafe-string:installed}
28+
"--disable-flat-float-array" {ocaml-option-no-flat-float-array:installed}
29+
"--enable-flambda" {ocaml-option-flambda:installed}
30+
"--enable-frame-pointers" {ocaml-option-fp:installed}
31+
"--disable-naked-pointers" {ocaml-option-nnp:installed}
32+
"--enable-naked-pointers-checker" {ocaml-option-nnpchecker:installed}
33+
"CC=cc" {!ocaml-option-32bit:installed & !ocaml-option-musl:installed & (os="openbsd"|os="macos")}
34+
"CC=musl-gcc" {ocaml-option-musl:installed & os-distribution!="alpine"}
35+
"CFLAGS=-Os" {ocaml-option-musl:installed}
36+
"CC=gcc -m32" {ocaml-option-32bit:installed & os="linux"}
37+
"CC=gcc -Wl,-read_only_relocs,suppress -arch i386 -m32" {ocaml-option-32bit:installed & os="macos"}
38+
"ASPP=cc -c" {!ocaml-option-32bit:installed & !ocaml-option-musl:installed & (os="openbsd"|os="macos")}
39+
"ASPP=musl-gcc -c" {ocaml-option-musl:installed & os-distribution!="alpine"}
40+
"ASPP=gcc -m32 -c" {ocaml-option-32bit:installed & os="linux"}
41+
"ASPP=gcc -arch i386 -m32 -c" {ocaml-option-32bit:installed & os="macos"}
42+
"AS=as --32" {ocaml-option-32bit:installed & os="linux"}
43+
"AS=as -arch i386" {ocaml-option-32bit:installed & os="macos"}
44+
"--host=i386-linux" {ocaml-option-32bit:installed & os="linux"}
45+
"--host=i386-apple-darwin13.2.0" {ocaml-option-32bit:installed & os="macos"}
46+
"PARTIALLD=ld -r -melf_i386" {ocaml-option-32bit:installed & os="linux"}
47+
"LIBS=-static" {ocaml-option-static:installed}
48+
]
49+
[make "-j%{jobs}%"]
50+
]
51+
install: [make "install"]
52+
url {
53+
src: "https://github.com/ocaml/ocaml/archive/4.14.1.tar.gz"
54+
checksum: "sha256=776006e6f0b9bcfb6d9d74381c588e587432ca85562fde93bb80472a5145b028"
55+
}
56+
extra-files: ["ocaml-variants.install" "md5=3e969b841df1f51ca448e6e6295cb451"]
57+
post-messages: [
58+
"A failure in the middle of the build may be caused by build parallelism
59+
(enabled by default).
60+
Please file a bug report at https://github.com/ocaml/opam-repository/issues"
61+
{failure & jobs > 1}
62+
"You can try installing again including --jobs=1
63+
to force a sequential build instead."
64+
{failure & jobs > 1 & opam-version >= "2.0.5"}
65+
]
66+
depopts: [
67+
"ocaml-option-32bit"
68+
"ocaml-option-afl"
69+
"ocaml-option-bytecode-only"
70+
"ocaml-option-default-unsafe-string"
71+
"ocaml-option-no-flat-float-array"
72+
"ocaml-option-flambda"
73+
"ocaml-option-fp"
74+
"ocaml-option-musl"
75+
"ocaml-option-static"
76+
"ocaml-option-nnp"
77+
"ocaml-option-nnpchecker"
78+
]

packages/ocaml/ocaml.4.14.2/opam

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
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" {>= "2"}
10+
"ocaml-base-compiler" {>= "4.14.2~" & < "4.14.3~"} |
11+
"ocaml-variants" {>= "4.14.2~" & < "4.14.3~"} |
12+
"ocaml-system" {>= "4.14.2" & < "4.14.3~"}
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: CAML_LD_LIBRARY_PATH = ""
21+
homepage: "https://ocaml.org"
22+
bug-reports: "https://github.com/ocaml/opam-repository/issues"
23+
authors: [
24+
"Xavier Leroy"
25+
"Damien Doligez"
26+
"Alain Frisch"
27+
"Jacques Garrigue"
28+
"Didier Rémy"
29+
"Jérôme Vouillon"
30+
]
31+
flags: conf

0 commit comments

Comments
 (0)