diff --git a/backport-third-party-sjpeg-cmake-4.0.patch b/backport-third-party-sjpeg-cmake-4.0.patch new file mode 100644 index 0000000000000000000000000000000000000000..eb1326e5aa1f56f5282363c18060dce481c46362 --- /dev/null +++ b/backport-third-party-sjpeg-cmake-4.0.patch @@ -0,0 +1,33 @@ +From 94e0df6d0f8b44228de5be0ff35efb9f946a13c9 Mon Sep 17 00:00:00 2001 +From: James Zern +Date: Wed, 2 Apr 2025 15:42:02 -0700 +Subject: [PATCH] CMakeLists.txt: bump minimum cmake version to 3.5 (#132) + +Fixes an error with cmake 4.0.0: + Compatibility with CMake < 3.5 has been removed from CMake. + +Also indicate that the file has been updated to support 3.10 to avoid: + Compatibility with CMake < 3.10 will be removed from a future version + of CMake. + +3.5 is relatively old, but maintain compatibility while cmake still +supports it. + +Fixes: #131 +--- + CMakeLists.txt | 2 +- + 1 files changed, 1 insertion(+), 1 deletion(-) + +diff --git a/third_party/sjpeg/CMakeLists.txt b/third_party/sjpeg/CMakeLists.txt +index ac78373..5e9f679 100644 +--- a/third_party/sjpeg/CMakeLists.txt ++++ b/third_party/sjpeg/CMakeLists.txt +@@ -12,7 +12,7 @@ + # See the License for the specific language governing permissions and + # limitations under the License. + +-cmake_minimum_required(VERSION 2.8.7) ++cmake_minimum_required(VERSION 3.5...3.10) + + # Prefer GLVND libraries by default. + if(POLICY CMP0072) diff --git a/jpegxl.spec b/jpegxl.spec index 13cf1d35ea47d278461ac4a3323a32b0f1275392..9d87d24071b5cb2aab64a980a5e9e91264e32cab 100644 --- a/jpegxl.spec +++ b/jpegxl.spec @@ -3,7 +3,7 @@ Name: jpegxl Version: 0.11.1 -Release: 1 +Release: 2 Summary: JPEG XL image format reference implementation License: BSD-3-Clause AND Apache-2.0 AND Zlib @@ -12,6 +12,7 @@ Source0: https://github.com/libjxl/libjxl/archive/v%{version}/%{name}-%{v # set VERSION and run ./update_third_party.sh to get Source1 Source1: third_party-%{version}.tar.gz +Patch6001: backport-third-party-sjpeg-cmake-4.0.patch BuildRequires: asciidoc BuildRequires: cmake @@ -109,9 +110,10 @@ This is a GIMP plugin for loading and saving JPEG-XL images. %endif %prep -%autosetup -p1 -n libjxl-%{version} +%setup -qn libjxl-%{version} rm -rf third_party/ %setup -q -T -D -a 1 -n libjxl-%{version} +%autopatch -p1 %build %cmake -DENABLE_CCACHE=1 \ @@ -194,5 +196,8 @@ rm -rf third_party/ %endif %changelog +* Mon Dec 15 2025 Funda Wang - 0.11.1-2 +- fix build with cmake 4.0 + * Fri Oct 10 2025 yangfeng - 0.11.1-1 -- Initial package \ No newline at end of file +- Initial package