Skip to content

Commit f4283f9

Browse files
carlocabdaeho-ro
authored andcommitted
x265: add workaround for CMake 4
Fixes Homebrew/discussions#6088
1 parent 88d391b commit f4283f9

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

Formula/x/x265.rb

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,16 @@ class X265 < Formula
2222
depends_on "nasm" => :build
2323
end
2424

25+
# cmake 4 workaround, remove in next release
26+
patch do
27+
url "https://bitbucket.org/multicoreware/x265_git/commits/b354c009a60bcd6d7fc04014e200a1ee9c45c167/raw"
28+
sha256 "cc24fae87d3af05af3a5ab57041cabc4fb4dc93a6d575d69dd23831fe0856204"
29+
end
30+
patch do
31+
url "https://bitbucket.org/multicoreware/x265_git/commits/51ae8e922bcc4586ad4710812072289af91492a8/raw"
32+
sha256 "4ee41ef60ce1f992b4d23f2f76e2113fb8eac936429d4905507370d345a403bd"
33+
end
34+
2535
def install
2636
ENV.runtime_cpu_detection
2737
# Build based off the script at ./build/linux/multilib.sh
@@ -33,11 +43,13 @@ def install
3343
-DCMAKE_INSTALL_RPATH=#{rpath}
3444
]
3545
args << "-DENABLE_SVE2=OFF" if OS.linux? && Hardware::CPU.arm?
46+
args << "-DCMAKE_POLICY_VERSION_MINIMUM=3.5" # FIXME: Workaround for CMake 4.
3647
high_bit_depth_args = %w[
3748
-DHIGH_BIT_DEPTH=ON -DEXPORT_C_API=OFF
3849
-DENABLE_SHARED=OFF -DENABLE_CLI=OFF
3950
]
4051
high_bit_depth_args << "-DENABLE_SVE2=OFF" if OS.linux? && Hardware::CPU.arm?
52+
high_bit_depth_args << "-DCMAKE_POLICY_VERSION_MINIMUM=3.5" # FIXME: Workaround for CMake 4.
4153

4254
(buildpath/"8bit").mkpath
4355
system "cmake", "-S", buildpath/"source", "-B", "10bit",

0 commit comments

Comments
 (0)