From 60ab9abf56df5a77071c9b9e373cbd6356b061e0 Mon Sep 17 00:00:00 2001 From: Trevor Gamblin Date: Thu, 5 Feb 2026 15:25:52 -0500 Subject: [PATCH 1/2] scripts/build-ffmpeg: remove cmake version restriction We'll need a newer one to use cmake binaries for riscv64. Signed-off-by: Trevor Gamblin --- scripts/build-ffmpeg.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/build-ffmpeg.py b/scripts/build-ffmpeg.py index 541078cd..32a51139 100644 --- a/scripts/build-ffmpeg.py +++ b/scripts/build-ffmpeg.py @@ -321,7 +321,7 @@ def main(): run(["where", tool]) with log_group("install python packages"): - run(["pip", "install", "cmake==3.31.10", "meson", "ninja"]) + run(["pip", "install", "cmake", "meson", "ninja"]) # build tools build_tools = [] From 0bff12e0d3a8c090f114ea480a5e52ae7531677f Mon Sep 17 00:00:00 2001 From: Trevor Gamblin Date: Thu, 5 Feb 2026 16:42:02 -0500 Subject: [PATCH 2/2] patches: add x265.patch Fix policy definitions and minimum required CMake version in CMakeLists.txt so that we can build using riscv64 wheels. Add an extra check to mimic what the CMP0025 policy used to do for AppleClang. Signed-off-by: Trevor Gamblin --- patches/x265.patch | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 patches/x265.patch diff --git a/patches/x265.patch b/patches/x265.patch new file mode 100644 index 00000000..f2f4b49c --- /dev/null +++ b/patches/x265.patch @@ -0,0 +1,34 @@ +diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt +index 95218f5dc..488fd0d7d 100755 +--- a/source/CMakeLists.txt ++++ b/source/CMakeLists.txt +@@ -6,18 +6,12 @@ if(NOT CMAKE_BUILD_TYPE) + FORCE) + endif() + message(STATUS "cmake version ${CMAKE_VERSION}") +-if(POLICY CMP0025) +- cmake_policy(SET CMP0025 OLD) # report Apple's Clang as just Clang +-endif() + if(POLICY CMP0042) + cmake_policy(SET CMP0042 NEW) # MACOSX_RPATH + endif() +-if(POLICY CMP0054) +- cmake_policy(SET CMP0054 OLD) # Only interpret if() arguments as variables or keywords when unquoted +-endif() + + project (x265) +-cmake_minimum_required (VERSION 2.8.8) # OBJECT libraries require 2.8.8 ++cmake_minimum_required (VERSION 4.2.1) # OBJECT libraries require 2.8.8 + include(CheckIncludeFiles) + include(CheckFunctionExists) + include(CheckSymbolExists) +@@ -141,6 +135,9 @@ endif() + if(${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang") + set(CLANG 1) + endif() ++if(${CMAKE_CXX_COMPILER_ID} STREQUAL "AppleClang") ++ set(CLANG 1) ++endif() + if(${CMAKE_CXX_COMPILER_ID} STREQUAL "Intel") + set(INTEL_CXX 1) + endif()