Skip to content

Commit 4d318fd

Browse files
authored
Merge pull request #246599 from Homebrew/zopfli-cmake
zopfli: use patch for cmake fix
2 parents 6cf0007 + 6efee8d commit 4d318fd

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

Formula/z/zopfli.rb

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,18 @@ class Zopfli < Formula
2727

2828
depends_on "cmake" => :build
2929

30+
# Backport fix for CMake 4 compatibility
31+
# PR ref: https://github.com/google/zopfli/pull/207
32+
patch do
33+
url "https://github.com/google/zopfli/commit/8ef44ffde0fd2bb2a658f75887e65b31c9e44985.patch?full_index=1"
34+
sha256 "4a6f0b3dc53ea6de1af245231b821a94389e91eab5bd3056f5735c3de29b0402"
35+
end
36+
3037
def install
3138
args = %W[
3239
-DBUILD_SHARED_LIBS=ON
3340
-DCMAKE_INSTALL_RPATH=#{rpath}
3441
]
35-
# Workaround to build with CMake 4
36-
args << "-DCMAKE_POLICY_VERSION_MINIMUM=3.5"
3742
system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args
3843
system "cmake", "--build", "build"
3944
system "cmake", "--install", "build"

0 commit comments

Comments
 (0)