From ccb0e141aa9d63ff09bd558656072cd8523fe1d5 Mon Sep 17 00:00:00 2001 From: Lucy Phipps Date: Sun, 9 Jun 2024 03:00:22 +0100 Subject: [PATCH] 7zip 24.06 --- packages/7zip/build.sh | 4 +- ...hardware_acceleration_support_on_arm.patch | 159 ------------------ ...armv8_feature_from_old_architectures.patch | 25 --- packages/7zip/no-timespec_get.patch | 11 ++ 4 files changed, 13 insertions(+), 186 deletions(-) delete mode 100755 packages/7zip/disable_hardware_acceleration_support_on_arm.patch delete mode 100755 packages/7zip/guard_armv8_feature_from_old_architectures.patch create mode 100644 packages/7zip/no-timespec_get.patch diff --git a/packages/7zip/build.sh b/packages/7zip/build.sh index 187fec7634caff..2f5935961a5a21 100644 --- a/packages/7zip/build.sh +++ b/packages/7zip/build.sh @@ -2,9 +2,9 @@ TERMUX_PKG_HOMEPAGE=https://www.7-zip.org TERMUX_PKG_DESCRIPTION="7-Zip file archiver with a high compression ratio" TERMUX_PKG_LICENSE="LGPL-2.1, BSD 3-Clause" TERMUX_PKG_MAINTAINER="@termux" -TERMUX_PKG_VERSION=23.01 +TERMUX_PKG_VERSION=24.06 TERMUX_PKG_SRCURL=https://www.7-zip.org/a/7z${TERMUX_PKG_VERSION//./}-src.tar.xz -TERMUX_PKG_SHA256=356071007360e5a1824d9904993e8b2480b51b570e8c9faf7c0f58ebe4bf9f74 +TERMUX_PKG_SHA256=2aa1660c773525b2ed84d6cd7ff0680c786ec0893b87e4db44654dcb7f5ac8b5 TERMUX_PKG_AUTO_UPDATE=false TERMUX_PKG_BUILD_IN_SRC=true diff --git a/packages/7zip/disable_hardware_acceleration_support_on_arm.patch b/packages/7zip/disable_hardware_acceleration_support_on_arm.patch deleted file mode 100755 index 30683d3d6372ab..00000000000000 --- a/packages/7zip/disable_hardware_acceleration_support_on_arm.patch +++ /dev/null @@ -1,159 +0,0 @@ -From: YOKOTA Hiroshi -Date: Tue, 14 Sep 2021 23:51:04 +0900 -Subject: Disable hardware acceleration support on armel - -Use "__ARM_ARCH" to split "armel" and "armhf" - -__ARM_ARCH: - armel = 5 - armhf = 7 ---- - C/Aes.c | 2 ++ - C/AesOpt.c | 2 ++ - C/Sha1.c | 2 ++ - C/Sha1Opt.c | 2 ++ - C/Sha256.c | 2 ++ - C/Sha256Opt.c | 2 ++ - CPP/7zip/Crypto/MyAes.cpp | 2 ++ - 7 files changed, 14 insertions(+) - -diff --git a/C/Aes.c b/C/Aes.c -index 9ad66c5..2af4298 100755 ---- a/C/Aes.c -+++ b/C/Aes.c -@@ -56,6 +56,7 @@ static Byte InvS[256]; - #ifdef MY_CPU_X86_OR_AMD64 - #define USE_HW_AES - #elif defined(MY_CPU_ARM_OR_ARM64) && defined(MY_CPU_LE) -+ #if (__ARM_ARCH > 7) - #if defined(__clang__) - #if (__clang_major__ >= 8) // fix that check - #define USE_HW_AES -@@ -69,6 +70,7 @@ static Byte InvS[256]; - #define USE_HW_AES - #endif - #endif -+ #endif - #endif - - #ifdef USE_HW_AES -diff --git a/C/AesOpt.c b/C/AesOpt.c -index 1bdc9a8..60058bc 100755 ---- a/C/AesOpt.c -+++ b/C/AesOpt.c -@@ -508,6 +508,7 @@ VAES_COMPAT_STUB (AesCtr_Code_HW) - - #elif defined(MY_CPU_ARM_OR_ARM64) && defined(MY_CPU_LE) - -+ #if (__ARM_ARCH > 7) - #if defined(__clang__) - #if (__clang_major__ >= 8) // fix that check - #define USE_HW_AES -@@ -521,6 +522,7 @@ VAES_COMPAT_STUB (AesCtr_Code_HW) - #define USE_HW_AES - #endif - #endif -+ #endif - - #ifdef USE_HW_AES - -diff --git a/C/Sha1.c b/C/Sha1.c -index 7adeb44..b6ee739 100755 ---- a/C/Sha1.c -+++ b/C/Sha1.c -@@ -33,6 +33,7 @@ This code is based on public domain code of Steve Reid from Wei Dai's Crypto++ l - #endif - #endif - #elif defined(MY_CPU_ARM_OR_ARM64) -+ #if (__ARM_ARCH > 7) - #ifdef _MSC_VER - #if _MSC_VER >= 1910 && _MSC_VER >= 1929 && _MSC_FULL_VER >= 192930037 - #define _SHA_SUPPORTED -@@ -46,6 +47,7 @@ This code is based on public domain code of Steve Reid from Wei Dai's Crypto++ l - #define _SHA_SUPPORTED - #endif - #endif -+ #endif - #endif - - void MY_FAST_CALL Sha1_UpdateBlocks(UInt32 state[5], const Byte *data, size_t numBlocks); -diff --git a/C/Sha1Opt.c b/C/Sha1Opt.c -index dcedfbc..574d469 100755 ---- a/C/Sha1Opt.c -+++ b/C/Sha1Opt.c -@@ -214,6 +214,7 @@ void MY_FAST_CALL Sha1_UpdateBlocks_HW(UInt32 state[5], const Byte *data, size_t - - #elif defined(MY_CPU_ARM_OR_ARM64) - -+ #if (__ARM_ARCH > 7) - #if defined(__clang__) - #if (__clang_major__ >= 8) // fix that check - #define USE_HW_SHA -@@ -227,6 +228,7 @@ void MY_FAST_CALL Sha1_UpdateBlocks_HW(UInt32 state[5], const Byte *data, size_t - #define USE_HW_SHA - #endif - #endif -+ #endif - - #ifdef USE_HW_SHA - -diff --git a/C/Sha256.c b/C/Sha256.c -index c03b75a..e997ad4 100755 ---- a/C/Sha256.c -+++ b/C/Sha256.c -@@ -33,6 +33,7 @@ This code is based on public domain code from Wei Dai's Crypto++ library. */ - #endif - #endif - #elif defined(MY_CPU_ARM_OR_ARM64) -+ #if (__ARM_ARCH > 7) - #ifdef _MSC_VER - #if _MSC_VER >= 1910 - #define _SHA_SUPPORTED -@@ -46,6 +47,7 @@ This code is based on public domain code from Wei Dai's Crypto++ library. */ - #define _SHA_SUPPORTED - #endif - #endif -+ #endif - #endif - - void MY_FAST_CALL Sha256_UpdateBlocks(UInt32 state[8], const Byte *data, size_t numBlocks); -diff --git a/C/Sha256Opt.c b/C/Sha256Opt.c -index cc8c53e..b13cf7b 100755 ---- a/C/Sha256Opt.c -+++ b/C/Sha256Opt.c -@@ -214,6 +214,7 @@ void MY_FAST_CALL Sha256_UpdateBlocks_HW(UInt32 state[8], const Byte *data, size - - #elif defined(MY_CPU_ARM_OR_ARM64) - -+ #if (__ARM_ARCH > 7) - #if defined(__clang__) - #if (__clang_major__ >= 8) // fix that check - #define USE_HW_SHA -@@ -227,6 +228,7 @@ void MY_FAST_CALL Sha256_UpdateBlocks_HW(UInt32 state[8], const Byte *data, size - #define USE_HW_SHA - #endif - #endif -+ #endif - - #ifdef USE_HW_SHA - -diff --git a/CPP/7zip/Crypto/MyAes.cpp b/CPP/7zip/Crypto/MyAes.cpp -index 7e7cced..0df7b2f 100755 ---- a/CPP/7zip/Crypto/MyAes.cpp -+++ b/CPP/7zip/Crypto/MyAes.cpp -@@ -86,6 +86,7 @@ STDMETHODIMP CAesCoder::SetInitVector(const Byte *data, UInt32 size) - #ifdef MY_CPU_X86_OR_AMD64 - #define USE_HW_AES - #elif defined(MY_CPU_ARM_OR_ARM64) && defined(MY_CPU_LE) -+ #if (__ARM_ARCH > 7) - #if defined(__clang__) - #if (__clang_major__ >= 8) // fix that check - #define USE_HW_AES -@@ -99,6 +100,7 @@ STDMETHODIMP CAesCoder::SetInitVector(const Byte *data, UInt32 size) - #define USE_HW_AES - #endif - #endif -+ #endif - #endif - - #endif diff --git a/packages/7zip/guard_armv8_feature_from_old_architectures.patch b/packages/7zip/guard_armv8_feature_from_old_architectures.patch deleted file mode 100755 index 4bcfd9770d53e0..00000000000000 --- a/packages/7zip/guard_armv8_feature_from_old_architectures.patch +++ /dev/null @@ -1,25 +0,0 @@ -From: YOKOTA Hiroshi -Date: Wed, 13 Oct 2021 07:59:13 +0900 -Subject: Guard ARM v8 feature from old architecture - -Forwarded: not-needed ---- - C/7zCrc.c | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -diff --git a/C/7zCrc.c b/C/7zCrc.c -index c7ec353..230d8a5 100755 ---- a/C/7zCrc.c -+++ b/C/7zCrc.c -@@ -81,8 +81,9 @@ UInt32 MY_FAST_CALL CrcUpdateT1(UInt32 v, const void *data, size_t size, const U - #define USE_ARM64_CRC - #endif - #endif -- #elif (defined(__clang__) && (__clang_major__ >= 3)) \ -- || (defined(__GNUC__) && (__GNUC__ > 4)) -+ #elif ( (defined(__clang__) && (__clang_major__ >= 3)) || \ -+ (defined(__GNUC__) && (__GNUC__ > 4) ) ) && \ -+ (__ARM_ARCH >= 8) - #if !defined(__ARM_FEATURE_CRC32) - #define __ARM_FEATURE_CRC32 1 - #if (!defined(__clang__) || (__clang_major__ > 3)) // fix these numbers diff --git a/packages/7zip/no-timespec_get.patch b/packages/7zip/no-timespec_get.patch new file mode 100644 index 00000000000000..363d1d8bb6703d --- /dev/null +++ b/packages/7zip/no-timespec_get.patch @@ -0,0 +1,11 @@ +--- a/CPP/Windows/TimeUtils.cpp ++++ b/CPP/Windows/TimeUtils.cpp +@@ -259,7 +259,7 @@ bool GetSecondsSince1601(unsigned year, unsigned month, unsigned day, + Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, Solaris 11.3, + Cygwin 2.9, mingw, MSVC 14, Android 9.0. + */ +-#if defined(TIME_UTC) ++#if defined(TIME_UTC) && (!defined __ANDROID_API__ || __ANDROID_API__ >= 29) + #define ZIP7_USE_timespec_get + // #pragma message("ZIP7_USE_timespec_get") + #elif defined(CLOCK_REALTIME)