diff --git a/0001-Don-t-export-libzstd_static-CMake-target.patch b/0001-Don-t-export-libzstd_static-CMake-target.patch new file mode 100644 index 0000000..3f231ee --- /dev/null +++ b/0001-Don-t-export-libzstd_static-CMake-target.patch @@ -0,0 +1,55 @@ +From f40bbc53bffb905b735c2584c80da396b7a97ed0 Mon Sep 17 00:00:00 2001 +From: Christophe Marin +Date: Tue, 25 Mar 2025 11:44:48 +0100 +Subject: [PATCH] Don't export libzstd_static CMake target + +Exporting the libzstd_static means it must be present when CMake looks for zstd, which breaks openSUSE policies. +--- + build/cmake/lib/CMakeLists.txt | 17 +++++++++++++++-- + 1 file changed, 15 insertions(+), 2 deletions(-) + +diff --git a/build/cmake/lib/CMakeLists.txt b/build/cmake/lib/CMakeLists.txt +index 4e902a1..2ce926d 100644 +--- a/build/cmake/lib/CMakeLists.txt ++++ b/build/cmake/lib/CMakeLists.txt +@@ -138,7 +138,8 @@ endif () + if (ZSTD_BUILD_STATIC) + add_library(libzstd_static STATIC ${Sources} ${Headers}) + target_include_directories(libzstd_static INTERFACE $) +- list(APPEND library_targets libzstd_static) ++ # The static library is not added to the array to avoid requiring it when looking for zstd ++ # list(APPEND library_targets libzstd_static) + if (ZSTD_MULTITHREAD_SUPPORT) + set_property(TARGET libzstd_static APPEND PROPERTY COMPILE_DEFINITIONS "ZSTD_MULTITHREAD") + if (UNIX) +@@ -207,7 +208,7 @@ if (ZSTD_BUILD_SHARED) + OUTPUT_NAME zstd + VERSION ${ZSTD_FULL_VERSION} + SOVERSION ${zstd_VERSION_MAJOR}) +- ++ + if (ZSTD_FRAMEWORK) + set_target_properties( + libzstd_shared +@@ -283,6 +284,18 @@ install(TARGETS ${library_targets} + PUBLIC_HEADER DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" + ) + ++if(ZSTD_BUILD_STATIC) ++ install(TARGETS libzstd_static ++ INCLUDES DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" ++ ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" ++ LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" ++ RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" ++ BUNDLE DESTINATION "${CMAKE_INSTALL_BINDIR}" ++ FRAMEWORK DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT runtime OPTIONAL ++ PUBLIC_HEADER DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" ++ ) ++endif() ++ + # uninstall target + if (NOT TARGET uninstall) + configure_file( +-- +2.49.0 + diff --git a/pzstd.1.patch b/pzstd.1.patch deleted file mode 100644 index b80716c..0000000 --- a/pzstd.1.patch +++ /dev/null @@ -1,17 +0,0 @@ -Index: zstd-1.5.6/programs/zstd.1 -=================================================================== ---- zstd-1.5.6.orig/programs/zstd.1 -+++ zstd-1.5.6/programs/zstd.1 -@@ -258,6 +258,12 @@ do not store the original filename and t - \fB\-\-best\fR - alias to the option \fB\-9\fR\. - . -+.SS Parallel Zstd OPTIONS -+Additional options for the pzstd utility -+.TP -+\fB\-p\fR, \fB\-\-processes\fR -+ number of threads to use for (de)compression (default:4) -+. - .SS "Environment Variables" - Employing environment variables to set parameters has security implications\. Therefore, this avenue is intentionally limited\. Only \fBZSTD_CLEVEL\fR and \fBZSTD_NBTHREADS\fR are currently supported\. They set the default compression level and number of threads to use during compression, respectively\. - . diff --git a/zstd-1.5.6.tar.gz b/zstd-1.5.6.tar.gz deleted file mode 100644 index 486c25d..0000000 --- a/zstd-1.5.6.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:8c29e06cf42aacc1eafc4077ae2ec6c6fcb96a626157e0593d5e82a34fd403c1 -size 2406875 diff --git a/zstd-1.5.6.tar.gz.sig b/zstd-1.5.6.tar.gz.sig deleted file mode 100644 index 7b20e2d..0000000 --- a/zstd-1.5.6.tar.gz.sig +++ /dev/null @@ -1,17 +0,0 @@ ------BEGIN PGP SIGNATURE----- - -iQJFBAADCgAvFiEETvSsY0VfyfRUXZt974/plSi1L/0FAmYDZzgRHHNpZ25pbmdA -enN0ZC5uZXQACgkQ74/plSi1L/1Slw/+L4Z0YQU+3OwcbS7c/dmP/FHiCtyZHdHg -ShhC4YEmDvFsYeYLotkhB9v0rf+/ZMZLzaHGWbBqSA27VMfHNth0NA/onDE01PGm -0WetCZKG8DS4Nay/6YA/M9Z2Ag/LrXEZd2r643p/eiGXq70ufKpZujMF9B4iXW8c -T/vPPXiRffB/KuzPRSoGfiN5HZwD1+FWfZ+X2SWhEZ9tutwcaYpKazJtwOb6eEBN -SwDg7elwp3aqt0ci6CVCeU810lNmAKuedhHU6nZPSBeXWEMGSQ6OHJhKdm/Jolkv -r0DtiKvQFn1cN8rzohmxLO3/OplTDEOnSgfVkyfxxldu+0j4hvR3eCOOicHp70v/ -WTSpVSlraIn4nJdTfLwO7xNxntdiGczR/fqLmewIctg2gY9wfx7ITOTgTyumuVcX -C0boMIS/Ra6l4RtLvwRC/QMXQNLmnkGPxULnGPpDfOfnF1NJzr0AVsD5D1V3wlZl -+ANBR3sjQbQOYGr7h15wgGWmTx/0hvANceUZcBWR2fUvBQQGkkwSQPpHjqdcVC8c -cMs56qFyihrXWyX3kohuPJ2EQEQl/s3FGoZKnuLjh98nXSh5uuXODDJUaB7adu2d -Ok2hJ34Xzyvgx1PwrHW6upfNeKsTcxATVg+1l42Yan0hExiZ+prDANdr8DJT/MYf -vSAV1ZQ2rPU= -=YKei ------END PGP SIGNATURE----- diff --git a/zstd-1.5.7.tar.gz b/zstd-1.5.7.tar.gz new file mode 100644 index 0000000..1609ac2 --- /dev/null +++ b/zstd-1.5.7.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:eb33e51f49a15e023950cd7825ca74a4a2b43db8354825ac24fc1b7ee09e6fa3 +size 2434947 diff --git a/zstd-1.5.7.tar.gz.sig b/zstd-1.5.7.tar.gz.sig new file mode 100644 index 0000000..5f4530b --- /dev/null +++ b/zstd-1.5.7.tar.gz.sig @@ -0,0 +1,17 @@ +-----BEGIN PGP SIGNATURE----- + +iQJFBAADCgAvFiEETvSsY0VfyfRUXZt974/plSi1L/0FAme2UiwRHHNpZ25pbmdA +enN0ZC5uZXQACgkQ74/plSi1L/0AXQ/8Cws6GYY/1VLiBKsxKaOTeETM0poDGtzX +plYMAnbSrDLLoUKXN4ovy2Zrz6iJoi1WLdTwpYRR5En90tvaQaDHXrFDvf1bKJw0 +C5ldy0xDxZ4TPJr7QBL3Xv1/XResNnFjzYdKMKTa4R9gVPca4BTzszolq8VHyKp7 +aj2NlDdm/jrq67o5GGDo3K+GzUlzvOgxfdV5+eBWyjCYLSzBEfI6kX6mRJ7BdYBL +JWk+OnmW7K9vQTYANkrNMTqeKxaI8OJxfs8zk14TqKYSMoyj1MUW94eknj+A6Inv +vEW749Pb/u1iUEouRdTuNyG6iDRi1Jm7e9huiocWzNqH7XSYZDDUA0LwGJamdn7y +VH9Au8tABEfzHX5KWS/HYkKEkOXagNdUp24Kma9CdhmTjZny9oOJKEvv4rtRMf+z +XgoSRIR5OxAv6u0aCgi9CR5xQyiMiklQ07x+r1CpMeaj+dzwOAM0nQtwPmXDVc4d +9fwe7fBmBtDHiKqJV5k526UndxRay1GdmS1TOTahDjAbivGpHrVvulabfVO1MbJn +PlzMaW+jZ6kJ1+YKZELlwXRi9NeoOSQAQcIheL/DOZ22ThnWKG3fQQ8Q5ismCAkm +Hw6ypXSD2mndquoq8eUTlpbjIiqj9CuhIvz9TDnkeJhkWzXhnlC7hA8RNamkKQ5W +LC1I0ec0Dkw= +=8zJz +-----END PGP SIGNATURE----- diff --git a/zstd.changes b/zstd.changes index bd02b87..a52e14e 100644 --- a/zstd.changes +++ b/zstd.changes @@ -1,3 +1,25 @@ +------------------------------------------------------------------- +Tue Mar 25 10:45:34 UTC 2025 - Christophe Marin + +- Add patch (non-upstreamable): + * 0001-Don-t-export-libzstd_static-CMake-target.patch + +------------------------------------------------------------------- +Sat Mar 1 03:59:19 UTC 2025 - Marcus Rueckert + +- build with cmake as it is needed for building blender 4.4 + this should not be a problem any more as cmake:mini is in ring0 + +------------------------------------------------------------------- +Thu Feb 20 02:56:07 UTC 2025 - Bernhard Wiedemann + +- update to 1.5.7: + * zstd now employs multiple threads by default + * Fix a rare bug in 32-bit mode + * Enhanced Compression Speed for Small Data Blocks + * Substantial --patch-from performance improvements +- Drop pzstd.1.patch - not upstream, but also not needed + ------------------------------------------------------------------- Thu Mar 28 15:56:09 UTC 2024 - Andreas Stieger diff --git a/zstd.spec b/zstd.spec index d9f7edc..eb6e95b 100644 --- a/zstd.spec +++ b/zstd.spec @@ -1,7 +1,7 @@ # # spec file for package zstd # -# Copyright (c) 2024 SUSE LLC +# Copyright (c) 2025 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,6 +16,8 @@ # +%bcond_without cmake + %define libname libzstd1 %if 0%{?suse_version} <= 1500 %define with_gzip 0 @@ -23,7 +25,7 @@ %define with_gzip 1 %endif Name: zstd -Version: 1.5.6 +Version: 1.5.7 Release: 0 Summary: Zstandard compression tools License: BSD-3-Clause AND GPL-2.0-only @@ -33,7 +35,11 @@ Source0: https://github.com/facebook/zstd/releases/download/v%{version}/% Source1: https://github.com/facebook/zstd/releases/download/v%{version}/%{name}-%{version}.tar.gz.sig Source2: zstd.keyring Source99: baselibs.conf -Patch1: pzstd.1.patch +# PATCH-FIX-OPENSUSE -- 0001-Don-t-export-libzstd_static-CMake-target.patch +Patch0: 0001-Don-t-export-libzstd_static-CMake-target.patch +%if %{with cmake} +BuildRequires: cmake +%endif BuildRequires: gcc # C++ is needed for pzstd only BuildRequires: gcc-c++ @@ -114,11 +120,16 @@ an optimized deflate/zlib handling. %global _lto_cflags %{_lto_cflags} -ffat-lto-objects export CFLAGS="%{optflags}" export CXXFLAGS="%{optflags} -std=c++11" +%if %{with cmake} +%cmake ./cmake -DZSTD_BUILD_CONTRIB:BOOL=ON -DZSTD_ZLIB_SUPPORT:BOOL=ON +%cmake_build +%else # lib-mt is alias for multi-threaded library support %make_build HAVE_ZLIB=1 prefix=%{_prefix} libdir=%{_libdir} -C lib lib-mt for dir in programs contrib/pzstd; do %make_build -C "$dir" done +%endif %check export CFLAGS="%{optflags}" @@ -127,9 +138,14 @@ export CXXFLAGS="%{optflags} -std=c++11" #make_build -C contrib/pzstd test-pzstd %install +%if %{with cmake} +%cmake_install +rm %{buildroot}%{_datadir}/doc/packages/zstd/zstd_manual.html +%else %make_install V=1 VERBOSE=1 prefix=%{_prefix} libdir=%{_libdir} install -D -m755 contrib/pzstd/pzstd %{buildroot}%{_bindir}/pzstd install -D -m644 programs/zstd.1 %{buildroot}%{_mandir}/man1/pzstd.1 +%endif %if %{with_gzip} ln -s zstd %{buildroot}/%{_bindir}/gzip ln -s zstd %{buildroot}/%{_bindir}/gunzip @@ -159,6 +175,9 @@ ln -s zstdcat %{buildroot}/%{_bindir}/zcat %{_includedir}/*.h %{_libdir}/pkgconfig/libzstd.pc %{_libdir}/libzstd.so +%if %{with cmake} +%{_libdir}/cmake/zstd/ +%endif %files -n lib%{name}-devel-static %license COPYING LICENSE