Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ocaml 4.14.0 #102436

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions Formula/camlp-streams.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
class CamlpStreams < Formula
desc "Stream and Genlex libraries for use with Camlp4 and Camlp5"
homepage "https://github.com/ocaml/camlp-streams"
url "https://github.com/ocaml/camlp-streams/archive/refs/tags/v5.0.1.tar.gz"
sha256 "ad71f62406e9bb4e7fb5d4593ede2af6c68f8b0d96f25574446e142c3eb0d9a4"
license "LGPL-2.1-only" => { with: "OCaml-LGPL-linking-exception" }

depends_on "dune" => :build
depends_on "ocaml-findlib" => :test
depends_on "ocaml"

def install
system "dune", "build", "@install"
system "dune", "install", "--prefix=#{prefix}", "--libdir=#{lib}/ocaml", "--docdir=#{doc.parent}"
end

test do
(testpath/"test.ml").write <<~EOS
let stream = Stream.of_list ([] : unit list)
EOS
system "ocamlfind", "ocamlopt", "-linkpkg", "-package", "camlp-streams",
"-warn-error", "+3", "-o", "test", "test.ml"
assert_predicate testpath/"test", :exist?
end
end
2 changes: 2 additions & 0 deletions Formula/camlp5.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ class Camlp5 < Formula
url "https://github.com/camlp5/camlp5/archive/refs/tags/rel8.00.03.tar.gz"
sha256 "1a710e2a6dbb0f4440867850d605f31fe8407ee8a56c9e067866e34e584385b4"
license "BSD-3-Clause"
revision 1
head "https://github.com/camlp5/camlp5.git", branch: "master"

livecheck do
Expand All @@ -21,6 +22,7 @@ class Camlp5 < Formula
end

depends_on "ocaml-findlib" => :build
depends_on "camlp-streams"
cho-m marked this conversation as resolved.
Show resolved Hide resolved
depends_on "ocaml"

def install
Expand Down
1 change: 1 addition & 0 deletions Formula/lablgtk.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ class Lablgtk < Formula
url "https://github.com/garrigue/lablgtk/archive/2.18.12.tar.gz"
sha256 "43b2640b6b6d6ba352fa0c4265695d6e0b5acb8eb1da17290493e99ae6879b18"
license "LGPL-2.1"
revision 1

livecheck do
url :stable
Expand Down
2 changes: 1 addition & 1 deletion Formula/ocaml-num.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ class OcamlNum < Formula
url "https://github.com/ocaml/num/archive/v1.4.tar.gz"
sha256 "015088b68e717b04c07997920e33c53219711dfaf36d1196d02313f48ea00f24"
license "LGPL-2.1"
revision 2
revision 3

bottle do
sha256 cellar: :any, arm64_monterey: "8a5d1c3625dc2fb163fed6576507e859f4d117b9612a69c8569d6047de63f9dd"
Expand Down
2 changes: 1 addition & 1 deletion Formula/ocaml-zarith.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ class OcamlZarith < Formula
url "https://github.com/ocaml/Zarith/archive/release-1.12.tar.gz"
sha256 "cc32563c3845c86d0f609c86d83bf8607ef12354863d31d3bffc0dacf1ed2881"
license "LGPL-2.0-only"
revision 1
revision 2

bottle do
sha256 cellar: :any, arm64_monterey: "bab7865c8b5616ad638197376c590dd7bde6740c338c4729bc3c1eafbb1f2192"
Expand Down
34 changes: 18 additions & 16 deletions Formula/ocaml.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,19 @@
class Ocaml < Formula
desc "General purpose programming language in the ML family"
homepage "https://ocaml.org/"
# Remove `coq` from `flat_namespace_allowlist` at version bump.
url "https://caml.inria.fr/pub/distrib/ocaml-4.12/ocaml-4.12.0.tar.xz"
sha256 "39ee9db8dc1e3eb65473dd81a71fabab7cc253dbd7b85e9f9b5b28271319bec3"
license "LGPL-2.1-only" => { with: "OCaml-LGPL-linking-exception" }
head "https://github.com/ocaml/ocaml.git", branch: "trunk"

stable do
url "https://caml.inria.fr/pub/distrib/ocaml-4.14/ocaml-4.14.0.tar.xz"
sha256 "36abd8cca53ff593d5e7cd8b98eee2f1f36bd49aaf6ff26dc4c4dd21d861ac2b"

# Remove use of -flat_namespace. Upstreamed at
# https://github.com/ocaml/ocaml/pull/10723
# We embed a patch here so we don't have to regenerate configure.
patch :DATA
end

livecheck do
url "https://ocaml.org/releases"
regex(%r{href=.*?/releases/v?(\d+(?:\.\d+)+)/?["']}i)
Expand All @@ -38,11 +45,6 @@ class Ocaml < Formula
# brew detection doesn't find, and so needs to be explicitly blocked.
pour_bottle? only_if: :default_prefix

# Remove use of -flat_namespace. Upstreamed at
# https://github.com/ocaml/ocaml/pull/10723
# We embed a patch here so we don't have to regenerate configure.
patch :p0, :DATA

# Fix -flat_namespace being used on Big Sur and later.
patch do
url "https://raw.githubusercontent.com/Homebrew/formula-patches/03cf8088210822aa2c1ab544ed58ea04c897d9c4/libtool/configure-big_sur.diff"
Expand Down Expand Up @@ -71,14 +73,14 @@ def install
end

__END__
--- configure.orig 2021-10-24 09:34:12.145636659 +0800
+++ configure 2021-10-24 09:34:30.504944693 +0800
@@ -13644,7 +13644,7 @@
if test x"$enable_shared" != "xno"; then :
--- a/configure
+++ b/configure
@@ -14087,7 +14087,7 @@ if test x"$enable_shared" != "xno"; then :
case $host in #(
*-apple-darwin*) :
- mksharedlib="$CC -shared -flat_namespace -undefined suppress \
+ mksharedlib="$CC -shared -undefined dynamic_lookup \
-Wl,-no_compact_unwind"
shared_libraries_supported=true ;; #(
mksharedlib="$CC -shared \
- -flat_namespace -undefined suppress -Wl,-no_compact_unwind \
+ -undefined dynamic_lookup -Wl,-no_compact_unwind \
\$(LDFLAGS)"
supports_shared_libraries=true ;; #(
*-*-mingw32) :
1 change: 0 additions & 1 deletion audit_exceptions/flat_namespace_allowlist.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"arpack",
"bind",
"blast",
"coq",
"e2fsprogs",
"gnuradio",
"hdf5-mpi",
Expand Down