From: Christian Date: Sun, 11 May 2025 08:10:42 +0000 (+0200) Subject: Fix CI Builds 2/2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fheads%2Ffixci2025;p=thirdparty%2Ftvheadend.git Fix CI Builds 2/2 fix: allow x265 build on CMake <3.2 feat(build): only use armv9 when supported chore(build): remove x265 from unsupported platforms --- diff --git a/Autobuild/bionic-aarch64.sh b/Autobuild/bionic-aarch64.sh index e05e484f6..96fce4a03 100644 --- a/Autobuild/bionic-aarch64.sh +++ b/Autobuild/bionic-aarch64.sh @@ -1,2 +1,3 @@ +AUTOBUILD_CONFIGURE_EXTRA="${AUTOBUILD_CONFIGURE_EXTRA:-} --disable-libx265_static --disable-libx265" source Autobuild/aarch64.sh source Autobuild/bionic.sh diff --git a/Autobuild/buster-aarch64.sh b/Autobuild/buster-aarch64.sh index 586c2b029..3e6de0727 100644 --- a/Autobuild/buster-aarch64.sh +++ b/Autobuild/buster-aarch64.sh @@ -1,2 +1,3 @@ +AUTOBUILD_CONFIGURE_EXTRA="${AUTOBUILD_CONFIGURE_EXTRA:-} --disable-libx265_static --disable-libx265" source Autobuild/aarch64.sh source Autobuild/buster.sh diff --git a/Autobuild/focal-aarch64.sh b/Autobuild/focal-aarch64.sh index c26deb0cb..7f443b089 100644 --- a/Autobuild/focal-aarch64.sh +++ b/Autobuild/focal-aarch64.sh @@ -1,2 +1,3 @@ +AUTOBUILD_CONFIGURE_EXTRA="${AUTOBUILD_CONFIGURE_EXTRA:-} --disable-libx265_static --disable-libx265" source Autobuild/aarch64.sh source Autobuild/focal.sh diff --git a/Autobuild/raspiosbookworm-armv7l.sh b/Autobuild/raspiosbookworm-armv7l.sh index 3abd3e5ce..eb0872c7b 100644 --- a/Autobuild/raspiosbookworm-armv7l.sh +++ b/Autobuild/raspiosbookworm-armv7l.sh @@ -1,3 +1,4 @@ +AUTOBUILD_CONFIGURE_EXTRA="${AUTOBUILD_CONFIGURE_EXTRA:-} --disable-libx265_static --disable-libx265" source Autobuild/armv7l.sh EXTRA_X265_CMAKE_OPTS="${EXTRA_X265_CMAKE_OPTS:-} -DCROSS_COMPILE_ARM=0" source Autobuild/raspiosbookworm.sh diff --git a/Autobuild/stretch-aarch64.sh b/Autobuild/stretch-aarch64.sh index 84f447f5f..0cac59180 100644 --- a/Autobuild/stretch-aarch64.sh +++ b/Autobuild/stretch-aarch64.sh @@ -1,2 +1,3 @@ +AUTOBUILD_CONFIGURE_EXTRA="${AUTOBUILD_CONFIGURE_EXTRA:-} --disable-libx265_static --disable-libx265" source Autobuild/aarch64.sh source Autobuild/stretch.sh diff --git a/Autobuild/xenial-aarch64.sh b/Autobuild/xenial-aarch64.sh index 6df1c98f7..3bea40602 100644 --- a/Autobuild/xenial-aarch64.sh +++ b/Autobuild/xenial-aarch64.sh @@ -1,2 +1,3 @@ +AUTOBUILD_CONFIGURE_EXTRA="${AUTOBUILD_CONFIGURE_EXTRA:-} --disable-libx265_static --disable-libx265" source Autobuild/aarch64.sh source Autobuild/xenial.sh diff --git a/Makefile.ffmpeg b/Makefile.ffmpeg index 5ca89bbbd..5c4c7135c 100644 --- a/Makefile.ffmpeg +++ b/Makefile.ffmpeg @@ -64,6 +64,8 @@ LIBX265_URL = https://bitbucket.org/multicoreware/x265_git/downloads/$(LIBX26 LIBX265_SHA1 = 11880a3aa9e4ee618f539a2d6a8ece0ea442f505 LIBX265_DIFFS = libx265.pic.diff LIBX265_DIFFS += libx265-silence.patch +LIBX265_DIFFS += libx265-substring.patch +LIBX265_DIFFS += libx265-armv9.patch LIBVPX_VER = 1.14.1 LIBVPX = libvpx-$(LIBVPX_VER) diff --git a/support/patches/libx265-armv9.patch b/support/patches/libx265-armv9.patch new file mode 100644 index 000000000..a862c5f6d --- /dev/null +++ b/support/patches/libx265-armv9.patch @@ -0,0 +1,16 @@ +diff -urN ../x265_4.1/source/CMakeLists.txt ./source/CMakeLists.txt +--- ../x265_4.1/source/CMakeLists.txt 2025-05-11 13:30:50.896442393 +0200 ++++ ./source/CMakeLists.txt 2025-05-11 12:55:08.021237448 +0200 +@@ -103,8 +103,10 @@ + # Neon I8MM is mandatory from Armv8.6. + set(AARCH64_NEON_I8MM_FLAG "-march=armv8.2-a+dotprod+i8mm") + set(AARCH64_SVE_FLAG "-march=armv8.2-a+dotprod+i8mm+sve") +- # SVE2 is only available from Armv9.0, and armv9-a implies +dotprod and +sve. +- set(AARCH64_SVE2_FLAG "-march=armv9-a+i8mm+sve2") ++ if((CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 12) OR (CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 12)) ++ # SVE2 is only available from Armv9.0, and armv9-a implies +dotprod and +sve. ++ set(AARCH64_SVE2_FLAG "-march=armv9-a+i8mm+sve2") ++ endif() + else() + message(STATUS "CMAKE_SYSTEM_PROCESSOR value `${CMAKE_SYSTEM_PROCESSOR}` is unknown") + message(STATUS "Please add this value near ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE}") diff --git a/support/patches/libx265-substring.patch b/support/patches/libx265-substring.patch new file mode 100644 index 000000000..4572304f1 --- /dev/null +++ b/support/patches/libx265-substring.patch @@ -0,0 +1,12 @@ +diff -urN ../x265_4.1/source/cmake/Version.cmake ./source/cmake/Version.cmake +--- ../x265_4.1/source/cmake/Version.cmake 2024-11-22 13:07:34.000000000 +0100 ++++ ./source/cmake/Version.cmake 2025-05-11 09:57:56.402729493 +0200 +@@ -126,7 +126,7 @@ + #for x265 the repository changeset has to be a tag id or commit id after the tag + #hence mandating it's presence in version file always for valid tag distances. + if(DEFINED git_repositorychangeset) +- string(SUBSTRING "${git_repositorychangeset}" 0 9 X265_REVISION_ID) ++ string(REGEX MATCH "^.{1,9}" X265_REVISION_ID "${git_repositorychangeset}") + else() + message(WARNING "X265 LATEST COMMIT TIP INFORMATION NOT AVAILABLE") + endif()