From 809a7b20c8dd540f550fd2f1c41e2255ff3848ab7493776be1a034d6fe88d4e5 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Tue, 30 Apr 2024 11:04:38 +0000 Subject: [PATCH 1/3] - Update to release 23.01 OBS-URL: https://build.opensuse.org/package/show/Archiving/lzma-sdk?expand=0&rev=30 --- lzma-sdk.changes | 7 +++++++ lzma-sdk.spec | 8 ++++---- lzma2201.7z | 3 --- lzma2301.7z | 3 +++ 4 files changed, 14 insertions(+), 7 deletions(-) delete mode 100644 lzma2201.7z create mode 100644 lzma2301.7z diff --git a/lzma-sdk.changes b/lzma-sdk.changes index 98889b8..d52b98a 100644 --- a/lzma-sdk.changes +++ b/lzma-sdk.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Tue Apr 30 10:42:48 UTC 2024 - Jan Engelhardt + +- Update to release 23.01 + * New filter for ARM64 executables. BCJ2 filter was improved + for better compression ratio. Some bugs were fixed. + ------------------------------------------------------------------- Wed Mar 15 14:40:12 UTC 2023 - Martin Pluskal diff --git a/lzma-sdk.spec b/lzma-sdk.spec index 4a134df..9899df1 100644 --- a/lzma-sdk.spec +++ b/lzma-sdk.spec @@ -1,7 +1,7 @@ # # spec file for package lzma-sdk # -# Copyright (c) 2023 SUSE LLC +# Copyright (c) 2024 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,11 +16,11 @@ # -%define _sver 2201 -%define _maver 22 +%define _sver 2301 +%define _maver 23 %define _miver 01 Name: lzma-sdk -Version: 22.01 +Version: 23.01 Release: 0 Summary: An implementation of LZMA compression # Actually the site says "Public Domain". See license file. diff --git a/lzma2201.7z b/lzma2201.7z deleted file mode 100644 index 130de7e..0000000 --- a/lzma2201.7z +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:35b1689169efbc7c3c147387e5495130f371b4bad8ec24f049d28e126d52d9fe -size 1261282 diff --git a/lzma2301.7z b/lzma2301.7z new file mode 100644 index 0000000..43e21e0 --- /dev/null +++ b/lzma2301.7z @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:317dd834d6bbfd95433488b832e823cd3d4d420101436422c03af88507dd1370 +size 1322733 From 8d848aa023567323072fc9b52a2ff41af664db05362a61ddd1bed598c03c9db9 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Tue, 30 Apr 2024 21:52:48 +0000 Subject: [PATCH 2/3] update lzma-sdk-shlib.patch OBS-URL: https://build.opensuse.org/package/show/Archiving/lzma-sdk?expand=0&rev=31 --- baselibs.conf | 2 +- lzma-sdk-shlib.patch | 6 +++--- lzma-sdk.spec | 32 +++++++++++++++----------------- 3 files changed, 19 insertions(+), 21 deletions(-) diff --git a/baselibs.conf b/baselibs.conf index a9234b9..a3d5930 100644 --- a/baselibs.conf +++ b/baselibs.conf @@ -1 +1 @@ -libclzma-suse0 +libclzma-suse1 diff --git a/lzma-sdk-shlib.patch b/lzma-sdk-shlib.patch index 9a4a199..74d077b 100644 --- a/lzma-sdk-shlib.patch +++ b/lzma-sdk-shlib.patch @@ -21,9 +21,9 @@ Index: 1/Makefile.am +pkgconfigdir = ${libdir}/pkgconfig +pkgconfig_DATA = clzma.pc +# source list: C/Util/LzmaLib/makefile -+libclzma_la_SOURCES = C/7zAlloc.c C/7zArcIn.c C/7zBuf2.c C/7zBuf.c C/7zCrc.c C/7zCrcOpt.c C/7zDec.c C/7zFile.c C/7zStream.c C/7zVersion.rc C/Aes.c C/AesOpt.c C/Alloc.c C/Bcj2.c C/Bra86.c C/Bra.c C/BraIA64.c C/CpuArch.c C/Delta.c C/DllSecur.c C/LzFind.c C/Lzma2Dec.c C/Lzma2Enc.c C/Lzma86Dec.c C/Lzma86Enc.c C/LzmaDec.c C/LzmaEnc.c C/LzmaLib.c C/Ppmd7.c C/Ppmd7Dec.c C/Ppmd7Enc.c C/Sha256.c C/Sha256Opt.c C/Sort.c C/Xz.c C/XzCrc64.c C/XzCrc64Opt.c C/XzDec.c C/XzEnc.c C/XzIn.c -+#ifWIN32#SOURCES += C/Bcj2Enc.c C/LzFindMt.c C/MtCoder.c C/Threads.c -+libclzma_la_LDFLAGS = -release suse -version-info 0:0:0 ++#lzma.dll = C/Alloc.c C/CpuArch.c C/LzFind.c C/LzFindMt.c C/LzFindOpt.c C/LzmaDec.c C/LzmaEnc.c C/LzmaLib.c C/Threads.c ++libclzma_la_SOURCES = C/7zAlloc.c C/7zArcIn.c C/7zBuf.c C/7zBuf2.c C/7zCrc.c C/7zCrcOpt.c C/7zDec.c C/7zFile.c C/7zStream.c C/Aes.c C/AesOpt.c C/Alloc.c C/Bcj2.c C/Bcj2Enc.c C/Bra.c C/Bra86.c C/BraIA64.c C/CpuArch.c C/Delta.c C/DllSecur.c C/LzFind.c C/LzFindMt.c C/LzFindOpt.c C/Lzma2Dec.c C/Lzma2DecMt.c C/Lzma2Enc.c C/Lzma86Dec.c C/Lzma86Enc.c C/LzmaDec.c C/LzmaEnc.c C/LzmaLib.c C/MtCoder.c C/MtDec.c C/Ppmd7.c C/Ppmd7Dec.c C/Ppmd7Enc.c C/Sha256.c C/Sha256Opt.c C/Sort.c C/SwapBytes.c C/Threads.c C/Xz.c C/XzCrc64.c C/XzCrc64Opt.c C/XzDec.c C/XzEnc.c C/XzIn.c ++libclzma_la_LDFLAGS = -release suse -version-info 1:0:0 +clzmadir = ${includedir}/clzma +clzma_HEADERS = C/7zAlloc.h C/7zBuf.h C/7zCrc.h C/7zFile.h C/7z.h C/7zTypes.h C/7zVersion.h C/Aes.h C/Alloc.h C/Bcj2.h C/Bra.h C/Compiler.h C/CpuArch.h C/Delta.h C/DllSecur.h C/LzFind.h C/LzFindMt.h C/LzHash.h C/Lzma2Dec.h C/Lzma2Enc.h C/Lzma86.h C/LzmaDec.h C/LzmaEnc.h C/LzmaLib.h C/MtCoder.h C/Ppmd7.h C/Ppmd.h C/Precomp.h C/RotateDefs.h C/Sha256.h C/Sort.h C/Threads.h C/XzCrc64.h C/XzEnc.h C/Xz.h +clzma.pc: ${top_builddir}/config.status diff --git a/lzma-sdk.spec b/lzma-sdk.spec index 9899df1..8ef2224 100644 --- a/lzma-sdk.spec +++ b/lzma-sdk.spec @@ -27,7 +27,7 @@ Summary: An implementation of LZMA compression License: LGPL-2.1-only Group: Productivity/Archiving/Compression URL: https://www.7-zip.org/sdk.html -Source0: https://www.7-zip.org/a/lzma%{_sver}.7z +Source0: https://www.7-zip.org/a/lzma%_sver.7z Source1: lzma-sdk-LICENSE.fedora Source2: baselibs.conf Patch1: lzma-sdk-shlib.patch @@ -52,50 +52,48 @@ LZMA yields around 20%% better compression when operating at approximately zlib's speed, and around 40%% when trading more time. %package devel -Summary: Development libraries and headers for %{name} +Summary: Development libraries and headers for %name Group: Development/Languages/C and C++ -Requires: libclzma-suse0 = %{version} +Requires: libclzma-suse1 = %version %description devel -This package contains development libraries and headers for %{name}. +This package contains development libraries and headers for %name. -%package -n libclzma-suse0 +%package -n libclzma-suse1 Summary: LZMA stream encoding/decoding library from 7-Zip Group: System/Libraries -%description -n libclzma-suse0 +%description -n libclzma-suse1 Library for encoding/decoding LZMA streams, using the 7-Zip library implementation. %prep -%setup -q -c -n lzma%{_sver} -%patch -P 1 -p1 +%autosetup -c -n lzma%_sver perl -i -pe 's{AC_INIT.*}{AC_INIT([lzma-sdk], [%version])}' configure.ac dos2unix DOC/*.txt -install -p -m 0644 %{SOURCE1} . +install -p -m 0644 %SOURCE1 . %build autoreconf -fi %configure -make %{?_smp_mflags} +%make_build %install %make_install rm -f "%buildroot/%_libdir"/*.la -%post -n libclzma-suse0 -p /sbin/ldconfig -%postun -n libclzma-suse0 -p /sbin/ldconfig +%ldconfig_scriptlets -n libclzma-suse1 -%files -n libclzma-suse0 +%files -n libclzma-suse1 %license lzma-sdk-LICENSE.fedora %doc DOC/lzma.txt DOC/lzma-history.txt -%{_libdir}/libclzma-suse.so.0* +%_libdir/libclzma-suse.so.* %files devel %license lzma-sdk-LICENSE.fedora %doc DOC/7z*.txt DOC/Methods.txt -%{_includedir}/clzma/ -%{_libdir}/libclzma.so -%{_libdir}/pkgconfig/clzma.pc +%_includedir/clzma/ +%_libdir/libclzma.so +%_libdir/pkgconfig/clzma.pc %changelog From cfac7b69b68de4577a39577773946f43837225fae24b23b00f6d7020bcef21cf Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Tue, 30 Apr 2024 22:53:58 +0000 Subject: [PATCH 3/3] - Add lzma-simd.patch to fix compiler error on old gcc OBS-URL: https://build.opensuse.org/package/show/Archiving/lzma-sdk?expand=0&rev=32 --- lzma-sdk.changes | 1 + lzma-sdk.spec | 3 ++- lzma-simd.patch | 25 +++++++++++++++++++++++++ 3 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 lzma-simd.patch diff --git a/lzma-sdk.changes b/lzma-sdk.changes index d52b98a..0b1a157 100644 --- a/lzma-sdk.changes +++ b/lzma-sdk.changes @@ -4,6 +4,7 @@ Tue Apr 30 10:42:48 UTC 2024 - Jan Engelhardt - Update to release 23.01 * New filter for ARM64 executables. BCJ2 filter was improved for better compression ratio. Some bugs were fixed. +- Add lzma-simd.patch to fix compiler error on old gcc ------------------------------------------------------------------- Wed Mar 15 14:40:12 UTC 2023 - Martin Pluskal diff --git a/lzma-sdk.spec b/lzma-sdk.spec index 8ef2224..6e038f5 100644 --- a/lzma-sdk.spec +++ b/lzma-sdk.spec @@ -31,6 +31,7 @@ Source0: https://www.7-zip.org/a/lzma%_sver.7z Source1: lzma-sdk-LICENSE.fedora Source2: baselibs.conf Patch1: lzma-sdk-shlib.patch +Patch2: lzma-simd.patch BuildRequires: automake BuildRequires: dos2unix BuildRequires: fdupes @@ -68,7 +69,7 @@ Library for encoding/decoding LZMA streams, using the 7-Zip library implementation. %prep -%autosetup -c -n lzma%_sver +%autosetup -c -n lzma%_sver -p1 perl -i -pe 's{AC_INIT.*}{AC_INIT([lzma-sdk], [%version])}' configure.ac dos2unix DOC/*.txt install -p -m 0644 %SOURCE1 . diff --git a/lzma-simd.patch b/lzma-simd.patch new file mode 100644 index 0000000..7aaa8e6 --- /dev/null +++ b/lzma-simd.patch @@ -0,0 +1,25 @@ +From: Jan Engelhardt +Date: 2024-05-01 00:14:04.625759204 +0200 +Fix build failures involving SIMD code + +Fix build failure on Leap 15.6/gcc-7 amd64: +[ 31s] C/SwapBytes.c:312:7: error: incompatible types when initializing type +'__m256i {aka const __vector(4) long long int}' using type 'int' + +--- + C/SwapBytes.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: 23/C/SwapBytes.c +=================================================================== +--- a/C/SwapBytes.c ++++ b/C/SwapBytes.c +@@ -22,7 +22,7 @@ typedef UInt32 CSwapUInt32; + // #if defined(__INTEL_COMPILER) && (__INTEL_COMPILER >= 1900) + #if defined(__clang__) && (__clang_major__ >= 4) \ + || defined(Z7_GCC_VERSION) && (Z7_GCC_VERSION >= 40701) +- #define k_SwapBytes_Mode_MAX k_SwapBytes_Mode_AVX2 ++ #define k_SwapBytes_Mode_MAX k_SwapBytes_Mode_SSE2 + #define SWAP_ATTRIB_SSE2 __attribute__((__target__("sse2"))) + #define SWAP_ATTRIB_SSSE3 __attribute__((__target__("ssse3"))) + #define SWAP_ATTRIB_AVX2 __attribute__((__target__("avx2")))