Skip to content

Commit 63109d7

Browse files
committed
amber: update patch to fix dependency resolution
Also drop various workarounds
1 parent 931910d commit 63109d7

File tree

1 file changed

+5
-30
lines changed

1 file changed

+5
-30
lines changed

Formula/a/amber.rb

Lines changed: 5 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ class Amber < Formula
44
url "https://github.com/amberframework/amber/archive/refs/tags/v1.4.1.tar.gz"
55
sha256 "92664a859fb27699855dfa5d87dc9bf2e4a614d3e54844a8344196d2807e775c"
66
license "MIT"
7-
revision 1
7+
revision 2
88

99
bottle do
1010
rebuild 1
@@ -28,38 +28,14 @@ class Amber < Formula
2828

2929
uses_from_macos "zlib"
3030

31-
# Temporary resource to fix build with Crystal 1.13
32-
resource "optarg" do
33-
url "https://github.com/amberframework/optarg/archive/refs/tags/v0.9.3.tar.gz"
34-
sha256 "0d31c0cfdc1c3ec1ca8bfeabea1fc796a1bb02e0a798a8f40f10b035dd4712e9"
35-
36-
# PR ref: https://github.com/amberframework/optarg/pull/6
37-
patch do
38-
url "https://github.com/amberframework/optarg/commit/56b34d117458b67178f77523561813d16ccddaf8.patch?full_index=1"
39-
sha256 "c5d9c374b0fdafe63136cd02126ac71ce394b1706ced59da5584cdc9559912c8"
40-
end
41-
end
42-
4331
# patch granite to fix db dependency resolution issue
4432
# upstream patch https://github.com/amberframework/amber/pull/1339
4533
patch do
46-
url "https://github.com/amberframework/amber/commit/20f95cae1d8c934dcd97070daeaec0077b00d599.patch?full_index=1"
47-
sha256 "ad8a303fe75611583ada10686fee300ab89f3ae37139b50f22eeabef04a48bdf"
34+
url "https://github.com/amberframework/amber/commit/54b1de90cd3e395cd09326b1d43074e267c79695.patch?full_index=1"
35+
sha256 "be0e30f08b8f7fcb71604eb01136d82d48b7e34afac9a1c846c74a7a7d2f8bd6"
4836
end
4937

5038
def install
51-
(buildpath/"optarg").install resource("optarg")
52-
(buildpath/"shard.override.yml").write <<~YAML
53-
dependencies:
54-
optarg:
55-
path: #{buildpath}/optarg
56-
YAML
57-
58-
# Work around an Xcode 15 linker issue which causes linkage against LLVM's
59-
# libunwind due to it being present in a library search path.
60-
llvm = Formula["llvm"]
61-
ENV.remove "HOMEBREW_LIBRARY_PATHS", llvm.opt_lib if DevelopmentTools.clang_build_version >= 1500
62-
6339
system "shards", "install"
6440
system "make", "install", "PREFIX=#{prefix}"
6541
end
@@ -79,9 +55,8 @@ def install
7955
end
8056

8157
cd "test_app" do
82-
build_app = shell_output("shards build test_app")
83-
assert_match "Building", build_app
84-
assert_predicate testpath/"test_app/bin/test_app", :exist?
58+
assert_match "Building", shell_output("#{Formula["crystal"].bin}/shards build test_app")
8559
end
60+
assert_path_exists testpath/"test_app/bin/test_app"
8661
end
8762
end

0 commit comments

Comments
 (0)