Skip to content

Commit

Permalink
ocaml 4.14.0
Browse files Browse the repository at this point in the history
  • Loading branch information
cho-m committed Sep 20, 2022
1 parent a4a8d59 commit b1e16ae
Showing 1 changed file with 18 additions and 16 deletions.
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) :

0 comments on commit b1e16ae

Please sign in to comment.