Skip to content

Commit 33130da

Browse files
committed
dart-sdk: support two level namespace for macOS
1 parent 661be86 commit 33130da

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

Formula/d/dart-sdk.rb

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,13 @@ class DartSdk < Formula
3333
end
3434
end
3535

36+
# Workaround for dependants audit failure: Libraries were compiled with a flat namespace.
37+
# Issue ref: https://github.com/dart-lang/sdk/issues/63115
38+
patch do
39+
url "https://github.com/dart-lang/sdk/commit/6b2aae401cd0983fc66b5e4728679b6f85cb1143.patch?full_index=1"
40+
sha256 "83797751b03c1f2a607a2b8fa642d30952d2c4c01356749c480218b9cf89ae0c"
41+
end
42+
3643
def install
3744
resource("depot-tools").stage(buildpath/"depot-tools")
3845

@@ -42,6 +49,12 @@ def install
4249
system "gclient", "config", "--name", "sdk", "https://dart.googlesource.com/sdk.git@#{version}"
4350
system "gclient", "sync", "--no-history"
4451

52+
# Workaround for error: 'readdir_r' is deprecated
53+
# Issue ref: https://github.com/dart-lang/sdk/issues/63089
54+
inreplace "sdk/build/config/compiler/BUILD.gn",
55+
"\"-Wno-tautological-constant-compare\",",
56+
"\\0\n \"-Wno-deprecated-declarations\","
57+
4558
chdir "sdk" do
4659
arch = Hardware::CPU.arm? ? "arm64" : "x64"
4760
system "./tools/build.py", "--mode=release", "--arch=#{arch}", "create_sdk"

0 commit comments

Comments
 (0)