forked from ocaml/opam-repository
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Packages - ocaml-src - ocaml-variants - ocaml-base-compiler - ocaml-system for OCaml 5.0.0 and ocaml.5.0.1 (to unblock the dev version of 5.0)
- Loading branch information
Showing
9 changed files
with
253 additions
and
0 deletions.
There are no files selected for viewing
1 change: 1 addition & 0 deletions
1
packages/ocaml-base-compiler/ocaml-base-compiler.5.0.0/files/ocaml-base-compiler.install
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
share_root: ["config.cache" {"ocaml/config.cache"}] |
47 changes: 47 additions & 0 deletions
47
packages/ocaml-base-compiler/ocaml-base-compiler.5.0.0/opam
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
opam-version: "2.0" | ||
synopsis: "Official release 5.0.0" | ||
maintainer: "[email protected]" | ||
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: [ | ||
"ocaml" {= "5.0.0" & post} | ||
"base-unix" {post} | ||
"base-bigarray" {post} | ||
"base-threads" {post} | ||
"base-domains" {post} | ||
"base-nnp" {post} | ||
"ocaml-options-vanilla" {post} | ||
"ocaml-option-bytecode-only" {arch != "arm64" & arch != "x86_64"} | ||
] | ||
conflict-class: "ocaml-core-compiler" | ||
flags: compiler | ||
setenv: CAML_LD_LIBRARY_PATH = "%{lib}%/stublibs" | ||
build: [ | ||
[ | ||
"./configure" | ||
"--prefix=%{prefix}%" | ||
"--docdir=%{doc}%/ocaml" | ||
"-C" | ||
"CC=cc" {os = "openbsd" | os = "macos"} | ||
"ASPP=cc -c" {os = "openbsd" | os = "macos"} | ||
] | ||
[make "-j%{jobs}%"] | ||
] | ||
install: [make "install"] | ||
url { | ||
src: "https://github.com/ocaml/ocaml/archive/5.0.0.tar.gz" | ||
checksum: "sha256=72fa3d0ba19b82fcb9e6c62e0090b9d22e5905c4be0f94faf56904a9377a9e5b" | ||
} | ||
extra-files: ["ocaml-base-compiler.install" "md5=3e969b841df1f51ca448e6e6295cb451"] | ||
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} | ||
"You can try installing again including --jobs=1 | ||
to force a sequential build instead." | ||
{failure & jobs > 1 & opam-version >= "2.0.5"} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
version = "5.0.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
opam-version: "2.0" | ||
maintainer: "[email protected]" | ||
license: "LGPL-2.1-or-later WITH OCaml-LGPL-linking-exception" | ||
authors: "OCaml contributors" | ||
homepage: "http://ocaml.org/" | ||
install: ["cp" "-r" "." "%{lib}%/ocaml-src"] | ||
synopsis: "Compiler sources" | ||
depends: [ | ||
"ocaml" {= "5.0.0"} | ||
] | ||
extra-files: ["META" "md5=b94b49b4f269074ca056d6596e440b8c"] | ||
url { | ||
src: "https://github.com/ocaml/ocaml/archive/5.0.0.tar.gz" | ||
checksum: "sha256=72fa3d0ba19b82fcb9e6c62e0090b9d22e5905c4be0f94faf56904a9377a9e5b" | ||
} | ||
|
||
|
43 changes: 43 additions & 0 deletions
43
packages/ocaml-system/ocaml-system.5.0.0/files/gen_ocaml_config.ml.in
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
let () = | ||
let exe = ".exe" in | ||
let ocamlc = | ||
let (base, suffix) = | ||
let s = Sys.executable_name in | ||
if Filename.check_suffix s exe then | ||
(Filename.chop_suffix s exe, exe) | ||
else | ||
(s, "") in | ||
base ^ "c" ^ suffix in | ||
if Sys.ocaml_version <> "%{_:version}%" then | ||
(Printf.eprintf | ||
"ERROR: The compiler found at %%s has version %%s,\n\ | ||
and this package requires %{_:version}%.\n\ | ||
You should use e.g. 'opam switch create %{_:name}%.%%s' \ | ||
instead." | ||
ocamlc Sys.ocaml_version Sys.ocaml_version; | ||
exit 1) | ||
else | ||
let ocamlc_digest = Digest.to_hex (Digest.file ocamlc) in | ||
let libdir = | ||
if Sys.command (ocamlc^" -where > %{_:name}%.config") = 0 then | ||
let ic = open_in "%{_:name}%.config" in | ||
let r = input_line ic in | ||
close_in ic; | ||
Sys.remove "%{_:name}%.config"; | ||
r | ||
else | ||
failwith "Bad return from 'ocamlc -where'" | ||
in | ||
let graphics = Filename.concat libdir "graphics.cmi" in | ||
let graphics_digest = | ||
if Sys.file_exists graphics then | ||
Digest.to_hex (Digest.file graphics) | ||
else | ||
String.make 32 '0' | ||
in | ||
let oc = open_out "%{_:name}%.config" in | ||
Printf.fprintf oc "opam-version: \"2.0\"\n\ | ||
file-depends: [ [ %%S %%S ] [ %%S %%S ] ]\n\ | ||
variables { path: %%S }\n" | ||
ocamlc ocamlc_digest graphics graphics_digest (Filename.dirname ocamlc); | ||
close_out oc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
opam-version: "2.0" | ||
synopsis: "The OCaml compiler (system version, from outside of opam)" | ||
maintainer: "[email protected]" | ||
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: [ | ||
"ocaml" {post} | ||
"base-unix" {post} | ||
"base-threads" {post} | ||
"base-bigarray" {post} | ||
"base-domains" {post} | ||
"base-nnp" {post} | ||
] | ||
conflict-class: "ocaml-core-compiler" | ||
available: sys-ocaml-version = "5.0.0" | ||
flags: compiler | ||
build: ["ocaml" "gen_ocaml_config.ml"] | ||
substs: "gen_ocaml_config.ml" | ||
extra-files: ["gen_ocaml_config.ml.in" "md5=093e7bec1ec95f9e4c6a313d73c5d840"] |
1 change: 1 addition & 0 deletions
1
packages/ocaml-variants/ocaml-variants.5.0.0+options/files/ocaml-variants.install
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
share_root: ["config.cache" {"ocaml/config.cache"}] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
opam-version: "2.0" | ||
license: "LGPL-2.1-or-later WITH OCaml-LGPL-linking-exception" | ||
synopsis: "Official release of OCaml 5.0.0" | ||
maintainer: "[email protected]" | ||
authors: ["Xavier Leroy" "Damien Doligez" "Alain Frisch" "Jacques Garrigue" "Didier Rémy" "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.0" | ||
depends: [ | ||
"ocaml" {= "5.0.0" & post} | ||
"base-unix" {post} | ||
"base-bigarray" {post} | ||
"base-threads" {post} | ||
"base-domains" {post} | ||
"base-nnp" {post} | ||
"ocaml-option-bytecode-only" {arch != "arm64" & arch != "x86_64"} | ||
] | ||
conflict-class: "ocaml-core-compiler" | ||
flags: compiler | ||
setenv: CAML_LD_LIBRARY_PATH = "%{lib}%/stublibs" | ||
build-env: [ | ||
[LSAN_OPTIONS = "detect_leaks=0,exitcode=0"] | ||
[ASAN_OPTIONS = "detect_leaks=0,exitcode=0"] | ||
] | ||
build: [ | ||
[ | ||
"./configure" | ||
"--prefix=%{prefix}%" | ||
"--docdir=%{doc}%/ocaml" | ||
"-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} | ||
"CC=cc" {!ocaml-option-32bit:installed & !ocaml-option-musl:installed & (os="openbsd"|os="macos")} | ||
"CC=musl-gcc" {ocaml-option-musl:installed & os-distribution!="alpine"} | ||
"CFLAGS=-Os" {ocaml-option-musl:installed} | ||
"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=cc -c" {!ocaml-option-32bit:installed & !ocaml-option-musl:installed & (os="openbsd"|os="macos")} | ||
"ASPP=musl-gcc -c" {ocaml-option-musl:installed & os-distribution!="alpine"} | ||
"ASPP=gcc -m32 -c" {ocaml-option-32bit:installed & os="linux"} | ||
"ASPP=gcc -arch i386 -m32 -c" {ocaml-option-32bit:installed & os="macos"} | ||
"AS=as --32" {ocaml-option-32bit:installed & os="linux"} | ||
"AS=as -arch i386" {ocaml-option-32bit:installed & os="macos"} | ||
"--host=i386-linux" {ocaml-option-32bit:installed & os="linux"} | ||
"--host=i386-apple-darwin13.2.0" {ocaml-option-32bit:installed & os="macos"} | ||
"PARTIALLD=ld -r -melf_i386" {ocaml-option-32bit:installed & os="linux"} | ||
"LIBS=-static" {ocaml-option-static:installed} | ||
"--disable-warn-error" | ||
] | ||
[make "-j%{jobs}%"] | ||
] | ||
install: [make "install"] | ||
url { | ||
src: "https://github.com/ocaml/ocaml/archive/5.0.0.tar.gz" | ||
checksum: "sha256=72fa3d0ba19b82fcb9e6c62e0090b9d22e5905c4be0f94faf56904a9377a9e5b" | ||
} | ||
extra-files: ["ocaml-variants.install" "md5=3e969b841df1f51ca448e6e6295cb451"] | ||
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} | ||
"You can try installing again including --jobs=1 | ||
to force a sequential build instead." | ||
{failure & jobs > 1 & opam-version >= "2.0.5"} | ||
] | ||
conflicts: [ "ocaml-option-fp" ] | ||
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-musl" | ||
"ocaml-option-leak-sanitizer" | ||
"ocaml-option-address-sanitizer" | ||
"ocaml-option-static" | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
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: "[email protected]" | ||
depends: [ | ||
"ocaml-config" {>= "3"} | ||
"ocaml-base-compiler" {>= "5.0.1~" & < "5.0.2~" } | | ||
"ocaml-variants" {>= "5.0.1~" & < "5.0.2~"} | | ||
"ocaml-system" {>= "5.0.1" & < "5.0.2~"} | ||
] | ||
setenv: [ | ||
[CAML_LD_LIBRARY_PATH = "%{_:stubsdir}%"] | ||
[CAML_LD_LIBRARY_PATH += "%{lib}%/stublibs"] | ||
[OCAML_TOPLEVEL_PATH = "%{toplevel}%"] | ||
] | ||
build: ["ocaml" "%{ocaml-config:share}%/gen_ocaml_config.ml" _:version _:name] | ||
build-env: [ | ||
[CAML_LD_LIBRARY_PATH = ""] | ||
[LSAN_OPTIONS = "detect_leaks=0,exitcode=0"] | ||
[ASAN_OPTIONS = "detect_leaks=0,exitcode=0"] | ||
] | ||
homepage: "https://ocaml.org" | ||
bug-reports: "https://github.com/ocaml/opam-repository/issues" | ||
authors: [ | ||
"Xavier Leroy" | ||
"Damien Doligez" | ||
"Alain Frisch" | ||
"Jacques Garrigue" | ||
"Didier Rémy" | ||
"Jérôme Vouillon" | ||
] | ||
flags: conf |