diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..91d7f39 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +zimg-*.tar.gz diff --git a/0e56801f98db3e363c974fca794fa06022d40ee4.patch b/0e56801f98db3e363c974fca794fa06022d40ee4.patch new file mode 100644 index 0000000..3489e12 --- /dev/null +++ b/0e56801f98db3e363c974fca794fa06022d40ee4.patch @@ -0,0 +1,12 @@ +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 +@@ -19,7 +19,7 @@ std::unique_ptr create_matrix + if (!ret && cpu == CPUClass::AUTO_64B && caps.avx512f) + ret = create_matrix_operation_avx512(m); + #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/b013c7b006e6bee05b7964162f3a00402168e77f.patch b/b013c7b006e6bee05b7964162f3a00402168e77f.patch new file mode 100644 index 0000000..be40ed8 --- /dev/null +++ b/b013c7b006e6bee05b7964162f3a00402168e77f.patch @@ -0,0 +1,28 @@ +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 + +``` +src/testcommon/mmap.cpp: In member function 'void MemoryMappedFile::impl::map_file(const char*, int, int, int)': +src/testcommon/mmap.cpp:273:62: error: 'PTRDIFF_MAX' was not declared in this scope + 273 | if ((file_size = posix::get_file_size(fd)) > PTRDIFF_MAX) + | ^~~~~~~~~~~ +src/testcommon/mmap.cpp:22:1: note: 'PTRDIFF_MAX' is defined in header ''; this is probably fixable by adding '#include ' +``` +--- + src/testcommon/mmap.cpp | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/testcommon/mmap.cpp b/src/testcommon/mmap.cpp +index b6ba7092..0310fa93 100644 +--- a/src/testcommon/mmap.cpp ++++ b/src/testcommon/mmap.cpp +@@ -10,6 +10,7 @@ + #include + #else + #include ++ #include + + #include + #include diff --git a/changelog b/changelog new file mode 100644 index 0000000..0783e25 --- /dev/null +++ b/changelog @@ -0,0 +1,74 @@ +* Fri Jul 25 2025 Fedora Release Engineering - 3.0.5-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + +* Thu Jul 10 2025 Simone Caronni - 3.0.5-5 +- Clean up SPEC file. + +* Sun Jan 19 2025 Fedora Release Engineering - 3.0.5-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + +* Sat Jul 20 2024 Fedora Release Engineering - 3.0.5-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + +* Sat Jan 27 2024 Fedora Release Engineering - 3.0.5-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Mon Oct 09 2023 Simone Caronni - 3.0.5-1 +- Update to 3.0.5. + +* Sat Jul 22 2023 Fedora Release Engineering - 3.0.4-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Sat Jan 21 2023 Fedora Release Engineering - 3.0.4-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Tue Nov 29 2022 Simone Caronni - 3.0.4-1 +- Update to 3.0.4. + +* Sat Jul 23 2022 Fedora Release Engineering - 3.0.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Wed Feb 23 2022 Nicolas Chauvet - 3.0.3-1 +- Update to 3.0.3 + +* Sat Jan 22 2022 Fedora Release Engineering - 3.0.1-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Fri Jul 23 2021 Fedora Release Engineering - 3.0.1-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Thu Jan 28 2021 Fedora Release Engineering - 3.0.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Thu Jan 7 2021 Simone Caronni - 3.0.1-2 +- Fix build on armv7hl. + +* Sat Jan 2 2021 Simone Caronni - 3.0.1-1 +- Update to 3.0.1. + +* Wed Jul 29 2020 Fedora Release Engineering - 2.9.3-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Mon Apr 20 2020 Simone Caronni - 2.9.3-2 +- Fix FTBFS in Rawhide. + +* Wed Mar 04 2020 Simone Caronni - 2.9.3-1 +- Update to 2.9.3. + +* Fri Jan 31 2020 Fedora Release Engineering - 2.9.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Mon Sep 23 2019 Leigh Scott - 2.9.2-1 +- Update to 2.9.2 release + +* Sat Jul 27 2019 Fedora Release Engineering - 2.8-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Sat Jun 08 2019 Simone Caronni - 2.8-3 +- Review fixes. + +* Sat May 25 2019 Simone Caronni - 2.8-2 +- rpmlint fixes. + +* Thu Mar 28 2019 Simone Caronni - 2.8-1 +- First build. diff --git a/sources b/sources new file mode 100644 index 0000000..2f3b2d0 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (zimg-3.0.6.tar.gz) = 98d7d65085530e0e1d3e25218608867f1e8d978fc759777efe2e6034baa31db10f1dda46ef8e00ec6f3c23b91aea839da076bfa4fcb75d98111a08513f45506d diff --git a/zimg.spec b/zimg.spec new file mode 100644 index 0000000..274317b --- /dev/null +++ b/zimg.spec @@ -0,0 +1,73 @@ +Name: zimg +Version: 3.0.6 +Release: %autorelease +Summary: Scaling, color space conversion, and dithering library +License: WTFPL +URL: https://github.com/sekrit-twc/zimg + +Source0: %{url}/archive/release-%{version}/%{name}-%{version}.tar.gz + +# 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 +BuildRequires: gcc-c++ +BuildRequires: libtool +BuildRequires: make + +%description +The "z" library implements the commonly required image processing basics of +scaling, color space conversion, and depth conversion. A simple API enables +conversion between any supported formats to operate with minimal knowledge from +the programmer. All library routines were designed from the ground-up with +correctness, flexibility, and thread-safety as first priorities. Allocation, +buffering, and I/O are cleanly separated from processing, allowing the +programmer to adapt "z" to many scenarios. + +%package devel +Summary: Development files for %{name} +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description devel +The %{name}-devel package contains libraries and header files for +developing applications that use %{name}. + +%prep +%autosetup -p1 -n zimg-release-%{version} + +%build +autoreconf -vif +%configure \ + --disable-static \ + --enable-testapp +%make_build V=1 + +%install +%make_install +install -m 755 -p -D testapp %{buildroot}%{_bindir}/testapp + +find %{buildroot} -name '*.la' -delete + +# Pick up docs in the files section +rm -fr %{buildroot}%{_docdir}/%{name} + +%files +%license COPYING +%doc README.md ChangeLog +%{_libdir}/lib%{name}.so.2.0.0 +%{_libdir}/lib%{name}.so.2 + +%check +./testapp cpuinfo + +%files devel +%{_bindir}/testapp +%{_includedir}/zimg.h +%{_includedir}/zimg++.hpp +%{_libdir}/lib%{name}.so +%{_libdir}/pkgconfig/%{name}.pc + +%changelog +%autochangelog