From 44b982729d991372955a68b7a1e3b4e255f4e835 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 17 Jan 2026 21:08:24 +0000 Subject: [PATCH 1/4] Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild From 5b827253a62af354899bdba4e1bd093aad569ba8 Mon Sep 17 00:00:00 2001 From: Simone Caronni Date: Wed, 10 Jun 2026 15:34:29 +0200 Subject: [PATCH 2/4] Fix AVX2 detection (#2485557) --- ...801f98db3e363c974fca794fa06022d40ee4.patch | 23 +++++++++++++++++++ ...c7b006e6bee05b7964162f3a00402168e77f.patch | 2 +- zimg.spec | 7 ++---- 3 files changed, 26 insertions(+), 6 deletions(-) create mode 100644 0e56801f98db3e363c974fca794fa06022d40ee4.patch rename 218.patch => b013c7b006e6bee05b7964162f3a00402168e77f.patch (93%) diff --git a/0e56801f98db3e363c974fca794fa06022d40ee4.patch b/0e56801f98db3e363c974fca794fa06022d40ee4.patch new file mode 100644 index 0000000..674f3ba --- /dev/null +++ b/0e56801f98db3e363c974fca794fa06022d40ee4.patch @@ -0,0 +1,23 @@ +From 0e56801f98db3e363c974fca794fa06022d40ee4 Mon Sep 17 00:00:00 2001 +From: sekrit-twc +Date: Sat, 26 Jul 2025 11:00:28 -0700 +Subject: [PATCH] colorspace: fix AVX2 check + +Fix #226 +--- + src/zimg/colorspace/x86/operation_impl_x86.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/zimg/colorspace/x86/operation_impl_x86.cpp b/src/zimg/colorspace/x86/operation_impl_x86.cpp +index f4ff8f6c..bb43dee2 100644 +--- a/src/zimg/colorspace/x86/operation_impl_x86.cpp ++++ b/src/zimg/colorspace/x86/operation_impl_x86.cpp +@@ -16,7 +16,7 @@ std::unique_ptr create_matrix_operation_x86(const Matrix3x3 &m, CPUCl + if (cpu_is_autodetect(cpu)) { + if (!ret && cpu == CPUClass::AUTO_64B && caps.avx512f) + ret = create_matrix_operation_avx512(m); +- if (!ret && caps.avx) ++ if (!ret && caps.avx2) + ret = create_matrix_operation_avx2(m); + } else { + if (!ret && cpu >= CPUClass::X86_AVX512) diff --git a/218.patch b/b013c7b006e6bee05b7964162f3a00402168e77f.patch similarity index 93% rename from 218.patch rename to b013c7b006e6bee05b7964162f3a00402168e77f.patch index 28ca5fc..be40ed8 100644 --- a/218.patch +++ b/b013c7b006e6bee05b7964162f3a00402168e77f.patch @@ -1,4 +1,4 @@ -From b4de5f36a6b1e31b891492c466888371afb6ee9b Mon Sep 17 00:00:00 2001 +From b013c7b006e6bee05b7964162f3a00402168e77f Mon Sep 17 00:00:00 2001 From: Yaakov Selkowitz Date: Tue, 18 Mar 2025 17:11:00 -0400 Subject: [PATCH] Fix build with GCC 15 diff --git a/zimg.spec b/zimg.spec index 27bcb3f..5a35824 100644 --- a/zimg.spec +++ b/zimg.spec @@ -6,9 +6,8 @@ License: WTFPL URL: https://github.com/sekrit-twc/zimg Source0: %{url}/archive/release-%{version}/%{name}-%{version}.tar.gz - -# Fix build with GCC 15 -Patch0: https://github.com/sekrit-twc/zimg/pull/218.patch +Patch0: https://github.com/sekrit-twc/zimg/commit/b013c7b006e6bee05b7964162f3a00402168e77f.patch +Patch1: https://github.com/sekrit-twc/zimg/commit/0e56801f98db3e363c974fca794fa06022d40ee4.patch BuildRequires: autoconf BuildRequires: automake @@ -52,8 +51,6 @@ find %{buildroot} -name '*.la' -delete # Pick up docs in the files section rm -fr %{buildroot}%{_docdir}/%{name} -%ldconfig_scriptlets - %files %license COPYING %doc README.md ChangeLog From e5e3a6d01947e8d2dbe24eea891636904568a35a Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 17 Jul 2026 09:40:46 +0000 Subject: [PATCH 3/4] Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild From 9e83f41da3a94fbd5c71784a31d2c1a5aa83b587 Mon Sep 17 00:00:00 2001 From: Filipe Rosset Date: Sat, 1 Aug 2026 23:27:17 -0300 Subject: [PATCH 4/4] Fixes zimg: FTBFS in Fedora rawhide/f45 Both patches 0 and 1 were rebased from master on top of 3.0.6. They should be removed during the next zimg update. Resolves: rhbz#2485557 Resolves: rhbz#2505389 Colorspace conversion segfaults on CPUs that support AVX, but not AVX2 Signed-off-by: Filipe Rosset --- ...801f98db3e363c974fca794fa06022d40ee4.patch | 27 ++++++------------- zimg.spec | 12 ++++++--- 2 files changed, 17 insertions(+), 22 deletions(-) diff --git a/0e56801f98db3e363c974fca794fa06022d40ee4.patch b/0e56801f98db3e363c974fca794fa06022d40ee4.patch index 674f3ba..3489e12 100644 --- a/0e56801f98db3e363c974fca794fa06022d40ee4.patch +++ b/0e56801f98db3e363c974fca794fa06022d40ee4.patch @@ -1,23 +1,12 @@ -From 0e56801f98db3e363c974fca794fa06022d40ee4 Mon Sep 17 00:00:00 2001 -From: sekrit-twc -Date: Sat, 26 Jul 2025 11:00:28 -0700 -Subject: [PATCH] colorspace: fix AVX2 check - -Fix #226 ---- - src/zimg/colorspace/x86/operation_impl_x86.cpp | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/zimg/colorspace/x86/operation_impl_x86.cpp b/src/zimg/colorspace/x86/operation_impl_x86.cpp -index f4ff8f6c..bb43dee2 100644 +diff -up a/src/zimg/colorspace/x86/operation_impl_x86.cpp b/src/zimg/colorspace/x86/operation_impl_x86.cpp --- a/src/zimg/colorspace/x86/operation_impl_x86.cpp +++ b/src/zimg/colorspace/x86/operation_impl_x86.cpp -@@ -16,7 +16,7 @@ std::unique_ptr create_matrix_operation_x86(const Matrix3x3 &m, CPUCl - if (cpu_is_autodetect(cpu)) { +@@ -19,7 +19,7 @@ std::unique_ptr create_matrix if (!ret && cpu == CPUClass::AUTO_64B && caps.avx512f) ret = create_matrix_operation_avx512(m); -- if (!ret && caps.avx) -+ if (!ret && caps.avx2) - ret = create_matrix_operation_avx2(m); - } else { - if (!ret && cpu >= CPUClass::X86_AVX512) + #endif +- if (!ret && caps.avx && !cpu_has_slow_avx(caps)) ++ if (!ret && caps.avx2 && !cpu_has_slow_avx(caps)) + ret = create_matrix_operation_avx(m); + if (!ret && caps.sse) + ret = create_matrix_operation_sse(m); diff --git a/zimg.spec b/zimg.spec index 5a35824..274317b 100644 --- a/zimg.spec +++ b/zimg.spec @@ -6,8 +6,10 @@ License: WTFPL URL: https://github.com/sekrit-twc/zimg Source0: %{url}/archive/release-%{version}/%{name}-%{version}.tar.gz -Patch0: https://github.com/sekrit-twc/zimg/commit/b013c7b006e6bee05b7964162f3a00402168e77f.patch -Patch1: https://github.com/sekrit-twc/zimg/commit/0e56801f98db3e363c974fca794fa06022d40ee4.patch + +# Rebased from master on top of 3.0.6, should be removed in the next update +Patch0: b013c7b006e6bee05b7964162f3a00402168e77f.patch +Patch1: 0e56801f98db3e363c974fca794fa06022d40ee4.patch BuildRequires: autoconf BuildRequires: automake @@ -57,9 +59,13 @@ rm -fr %{buildroot}%{_docdir}/%{name} %{_libdir}/lib%{name}.so.2.0.0 %{_libdir}/lib%{name}.so.2 +%check +./testapp cpuinfo + %files devel %{_bindir}/testapp -%{_includedir}/* +%{_includedir}/zimg.h +%{_includedir}/zimg++.hpp %{_libdir}/lib%{name}.so %{_libdir}/pkgconfig/%{name}.pc