forked from SynoCommunity/spksrc
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SABnzbd: use cross/7zz and cross/unrar7 (SynoCommunity#6366)
* add 7zip v24.09 - add cross7zz and cross/7za * add cross/unrar7 - add unrar v7.1.2 * sabnzbd: use cross/7zz and cross/unrar7 for DSM 7 * fix 7zip for armv7 and older compilers (DSM 6) - add patch to define additional cflags for ARMv7 - add patch for older compilers (required for x64 and evansport on DSM 6) - add patch to fix XzCrc64Opt.c (required for qoriq) - add custom patch target to make files to patch writable and to run patch in different folder * sabnzbd: update changelog and package revision * sabnzb: remove cross/busybox dependency - remove cross/busybox: use cross/coreutils for nice and cross/ionice - update cross/coreutils from v8.21 to v9.5 and limit tools to 'nice' - remarks: DSM 6+ and SRM 1.3+ already have nice (but an older version) * sabnzbd: update cross/par2cmdline-turbo - update cross/par2cmdline-turbo to v1.2.0 and optimize code - fix of animetosho/par2cmdline-turbo#22 is included - former post_install_target is obsolete * fix 7zip - install tools with executable flag --------- Co-authored-by: hgy59 <[email protected]>
- Loading branch information
Showing
26 changed files
with
492 additions
and
151 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
PKG_NAME = 7za | ||
PKG_VERS = 24.09 | ||
PKG_EXT = tar.xz | ||
PKG_DIST_NAME = 7z$(subst .,,$(PKG_VERS))-src.$(PKG_EXT) | ||
PKG_DIST_SITE = https://github.com/ip7z/7zip/releases/download/$(PKG_VERS) | ||
PKG_DIR = $(PKG_NAME)-$(PKG_VERS)/CPP/7zip/Bundles/Alone | ||
|
||
# source archive does not have a package named top folder | ||
# https://github.com/ip7z/7zip/issues/45 | ||
EXTRACT_PATH = $(WORK_DIR)/$(PKG_NAME)-$(PKG_VERS) | ||
|
||
DEPENDS = | ||
|
||
# compiler too old | ||
UNSUPPORTED_ARCHS = $(OLD_PPC_ARCHS) $(ARMv5_ARCHS) | ||
|
||
HOMEPAGE = https://www.7-zip.org/ | ||
COMMENT = 7-Zip is a file archiver with a high compression ratio. | ||
LICENSE = https://github.com/ip7z/7zip/blob/main/DOC/License.txt | ||
|
||
CONFIGURE_TARGET = nop | ||
COMPILE_MAKE_OPTIONS = -f makefile.gcc | ||
|
||
PATCH_TARGET = 7z_patch | ||
INSTALL_TARGET = 7z_install | ||
|
||
include ../../mk/spksrc.cross-cc.mk | ||
|
||
# disable unsupported HW capabilities: | ||
ifeq ($(findstring $(ARCH),$(ARMv7_ARCHS) $(ARMv7L_ARCHS)),$(ARCH)) | ||
# ARMv7 fails with some undefined symbols | ||
ADDITIONAL_CFLAGS += -DHWCAP2_CRC32=0 -DHWCAP2_SHA1=0 -DHWCAP2_SHA2=0 -DHWCAP2_AES=0 | ||
endif | ||
ifeq ($(findstring $(ARCH),$(ARMv7L_ARCHS)),$(ARCH)) | ||
# ARMv7L is missing one more symbol: | ||
ADDITIONAL_CFLAGS += -DHWCAP_NEON=0 | ||
endif | ||
|
||
ENV += ADDITIONAL_CFLAGS="$(ADDITIONAL_CFLAGS)" | ||
|
||
.PHONY: 7z_patch | ||
7z_patch: | ||
ifneq ($(strip $(PATCHES)),) | ||
@$(MSG) Make files to patch writable | ||
chmod +w $(EXTRACT_PATH)/CPP/7zip/7zip_gcc.mak | ||
chmod +w $(EXTRACT_PATH)/CPP/7zip/Crypto/MyAes.cpp | ||
chmod +w $(EXTRACT_PATH)/C/XzCrc64Opt.c | ||
@$(MSG) Run patch in $(EXTRACT_PATH) instead of $(WORK_DIR)/$(PKG_DIR) | ||
@for patchfile in $(PATCHES) ; \ | ||
do \ | ||
echo "patch -p$(PATCHES_LEVEL) < $${patchfile}" ; \ | ||
cat $${patchfile} | (cd $(EXTRACT_PATH) && patch -p$(PATCHES_LEVEL)) ; \ | ||
done | ||
endif | ||
|
||
.PHONY: 7z_install | ||
7z_install: | ||
@$(MSG) Install target file | ||
@install -d -m 755 $(STAGING_INSTALL_PREFIX)/bin | ||
@install -m 755 $(WORK_DIR)/$(PKG_DIR)/_o/7za $(STAGING_INSTALL_PREFIX)/bin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
bin:bin/7za |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
7z2409-src.tar.xz SHA1 fb0ef0558895ad5f33f6ba7e096c90db3f60f146 | ||
7z2409-src.tar.xz SHA256 49c05169f49572c1128453579af1632a952409ced028259381dac30726b6133a | ||
7z2409-src.tar.xz MD5 310660dea1e78cfd676cf142f8dc247a |
15 changes: 15 additions & 0 deletions
15
cross/7za/patches/001-allow-additional-cflags-for-gcc.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# add ADDITIONAL_CFLAGS to makefile for gcc | ||
# | ||
# allow to define additional cflags (required to fix build for 32-bit arm archs) | ||
# | ||
--- CPP/7zip/7zip_gcc.mak.orig 2024-11-25 17:00:00.000000000 +0000 | ||
+++ CPP/7zip/7zip_gcc.mak 2025-01-03 17:13:03.955679931 +0000 | ||
@@ -50,7 +50,7 @@ | ||
endif | ||
|
||
# CFLAGS_BASE_LIST = -S | ||
-CFLAGS_BASE = -O2 $(CFLAGS_BASE_LIST) $(CFLAGS_WARN_WALL) $(CFLAGS_WARN) \ | ||
+CFLAGS_BASE = -O2 $(CFLAGS_BASE_LIST) $(CFLAGS_WARN_WALL) $(CFLAGS_WARN) $(ADDITIONAL_CFLAGS) \ | ||
$(CFLAGS_DEBUG) -D_REENTRANT -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE \ | ||
-fPIC | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# Fix provided by Igor Pavlov for: | ||
# Inquiry Regarding Build Error Encountered While Compiling 7-Zip:undefined reference to `AesCbc_Decode_HW_256' | ||
# in https://sourceforge.net/p/sevenzip/discussion/45797/thread/2a49e0adde/ | ||
# | ||
--- CPP/7zip/Crypto/MyAes.cpp.orig 2024-03-01 09:00:00.000000000 +0000 | ||
+++ CPP/7zip/Crypto/MyAes.cpp 2025-01-03 18:38:35.330153025 +0000 | ||
@@ -153,7 +153,26 @@ | ||
#ifndef Z7_EXTRACT_ONLY | ||
|
||
#ifdef MY_CPU_X86_OR_AMD64 | ||
- #define USE_HW_AES | ||
+ | ||
+ #if defined(__INTEL_COMPILER) | ||
+ #if (__INTEL_COMPILER >= 1110) | ||
+ #define USE_HW_AES | ||
+ #if (__INTEL_COMPILER >= 1900) | ||
+ #define USE_HW_VAES | ||
+ #endif | ||
+ #endif | ||
+ #elif defined(Z7_CLANG_VERSION) && (Z7_CLANG_VERSION >= 30800) \ | ||
+ || defined(Z7_GCC_VERSION) && (Z7_GCC_VERSION >= 40400) | ||
+ #define USE_HW_AES | ||
+ #if defined(__clang__) && (__clang_major__ >= 8) \ | ||
+ || defined(__GNUC__) && (__GNUC__ >= 8) | ||
+ #define USE_HW_VAES | ||
+ #endif | ||
+ #elif defined(_MSC_VER) | ||
+ #define USE_HW_AES | ||
+ #define USE_HW_VAES | ||
+ #endif | ||
+ | ||
#elif defined(MY_CPU_ARM_OR_ARM64) && defined(MY_CPU_LE) | ||
|
||
#if defined(__ARM_FEATURE_AES) \ | ||
@@ -186,15 +205,15 @@ | ||
#define SET_AES_FUNC_2(f2) \ | ||
if (algo == 2) if (g_Aes_SupportedFunctions_Flags & k_Aes_SupportedFunctions_HW) \ | ||
{ f = f2; } | ||
- #ifdef MY_CPU_X86_OR_AMD64 | ||
+ #ifdef USE_HW_VAES | ||
#define SET_AES_FUNC_23(f2, f3) \ | ||
SET_AES_FUNC_2(f2) \ | ||
if (algo == 3) if (g_Aes_SupportedFunctions_Flags & k_Aes_SupportedFunctions_HW_256) \ | ||
{ f = f3; } | ||
- #else // MY_CPU_X86_OR_AMD64 | ||
+ #else // USE_HW_VAES | ||
#define SET_AES_FUNC_23(f2, f3) \ | ||
SET_AES_FUNC_2(f2) | ||
- #endif // MY_CPU_X86_OR_AMD64 | ||
+ #endif // USE_HW_VAES | ||
#else // USE_HW_AES | ||
#define SET_AES_FUNC_23(f2, f3) | ||
#endif // USE_HW_AES |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# fix preprocessor commands | ||
# https://sourceforge.net/p/sevenzip/discussion/45797/thread/d9908ffd01/ | ||
# | ||
--- C/XzCrc64Opt.c.orig 2023-12-08 08:00:00.000000000 +0000 | ||
+++ C/XzCrc64Opt.c 2025-01-03 19:08:34.320848333 +0000 | ||
@@ -235,7 +235,7 @@ | ||
v = Q32BE(1, w1) ^ Q32BE(0, w0); | ||
v ^= Q32BE(3, d1) ^ Q32BE(2, d0); | ||
#endif | ||
-#elif | ||
+#else | ||
#error Stop_Compiling_Bad_CRC64_NUM_TABLES | ||
#endif | ||
p += Z7_CRC64_NUM_TABLES_USE; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
PKG_NAME = 7zz | ||
PKG_VERS = 24.09 | ||
PKG_EXT = tar.xz | ||
PKG_DIST_NAME = 7z$(subst .,,$(PKG_VERS))-src.$(PKG_EXT) | ||
PKG_DIST_SITE = https://github.com/ip7z/7zip/releases/download/$(PKG_VERS) | ||
PKG_DIR = $(PKG_NAME)-$(PKG_VERS)/CPP/7zip/Bundles/Alone2 | ||
|
||
# source archive does not have a package named top folder | ||
# https://github.com/ip7z/7zip/issues/45 | ||
EXTRACT_PATH = $(WORK_DIR)/$(PKG_NAME)-$(PKG_VERS) | ||
|
||
DEPENDS = | ||
|
||
# compiler too old | ||
UNSUPPORTED_ARCHS = $(OLD_PPC_ARCHS) $(ARMv5_ARCHS) | ||
|
||
HOMEPAGE = https://www.7-zip.org/ | ||
COMMENT = 7-Zip is a file archiver with a high compression ratio. | ||
LICENSE = https://github.com/ip7z/7zip/blob/main/DOC/License.txt | ||
|
||
CONFIGURE_TARGET = nop | ||
COMPILE_MAKE_OPTIONS = -f makefile.gcc | ||
|
||
PATCH_TARGET = 7z_patch | ||
INSTALL_TARGET = 7z_install | ||
|
||
include ../../mk/spksrc.cross-cc.mk | ||
|
||
# disable unsupported HW capabilities: | ||
ifeq ($(findstring $(ARCH),$(ARMv7_ARCHS) $(ARMv7L_ARCHS)),$(ARCH)) | ||
# ARMv7 fails with some undefined symbols | ||
ADDITIONAL_CFLAGS += -DHWCAP2_CRC32=0 -DHWCAP2_SHA1=0 -DHWCAP2_SHA2=0 -DHWCAP2_AES=0 | ||
endif | ||
ifeq ($(findstring $(ARCH),$(ARMv7L_ARCHS)),$(ARCH)) | ||
# ARMv7L is missing one more symbol: | ||
ADDITIONAL_CFLAGS += -DHWCAP_NEON=0 | ||
endif | ||
|
||
ENV += ADDITIONAL_CFLAGS="$(ADDITIONAL_CFLAGS)" | ||
|
||
.PHONY: 7z_patch | ||
7z_patch: | ||
ifneq ($(strip $(PATCHES)),) | ||
@$(MSG) Make files to patch writable | ||
chmod +w $(EXTRACT_PATH)/CPP/7zip/7zip_gcc.mak | ||
chmod +w $(EXTRACT_PATH)/CPP/7zip/Crypto/MyAes.cpp | ||
chmod +w $(EXTRACT_PATH)/C/XzCrc64Opt.c | ||
@$(MSG) Run patch in $(EXTRACT_PATH) instead of $(WORK_DIR)/$(PKG_DIR) | ||
@for patchfile in $(PATCHES) ; \ | ||
do \ | ||
echo "patch -p$(PATCHES_LEVEL) < $${patchfile}" ; \ | ||
cat $${patchfile} | (cd $(EXTRACT_PATH) && patch -p$(PATCHES_LEVEL)) ; \ | ||
done | ||
endif | ||
|
||
.PHONY: 7z_install | ||
7z_install: | ||
@$(MSG) Install target file | ||
@install -d -m 755 $(STAGING_INSTALL_PREFIX)/bin | ||
@install -m 755 $(WORK_DIR)/$(PKG_DIR)/_o/7zz $(STAGING_INSTALL_PREFIX)/bin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
bin:bin/7zz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
7z2409-src.tar.xz SHA1 fb0ef0558895ad5f33f6ba7e096c90db3f60f146 | ||
7z2409-src.tar.xz SHA256 49c05169f49572c1128453579af1632a952409ced028259381dac30726b6133a | ||
7z2409-src.tar.xz MD5 310660dea1e78cfd676cf142f8dc247a |
15 changes: 15 additions & 0 deletions
15
cross/7zz/patches/001-allow-additional-cflags-for-gcc.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# add ADDITIONAL_CFLAGS to makefile for gcc | ||
# | ||
# allow to define additional cflags (required to fix build for 32-bit arm archs) | ||
# | ||
--- CPP/7zip/7zip_gcc.mak.orig 2024-11-25 17:00:00.000000000 +0000 | ||
+++ CPP/7zip/7zip_gcc.mak 2025-01-03 17:13:03.955679931 +0000 | ||
@@ -50,7 +50,7 @@ | ||
endif | ||
|
||
# CFLAGS_BASE_LIST = -S | ||
-CFLAGS_BASE = -O2 $(CFLAGS_BASE_LIST) $(CFLAGS_WARN_WALL) $(CFLAGS_WARN) \ | ||
+CFLAGS_BASE = -O2 $(CFLAGS_BASE_LIST) $(CFLAGS_WARN_WALL) $(CFLAGS_WARN) $(ADDITIONAL_CFLAGS) \ | ||
$(CFLAGS_DEBUG) -D_REENTRANT -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE \ | ||
-fPIC | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# Fix provided by Igor Pavlov for: | ||
# Inquiry Regarding Build Error Encountered While Compiling 7-Zip:undefined reference to `AesCbc_Decode_HW_256' | ||
# in https://sourceforge.net/p/sevenzip/discussion/45797/thread/2a49e0adde/ | ||
# | ||
--- CPP/7zip/Crypto/MyAes.cpp.orig 2024-03-01 09:00:00.000000000 +0000 | ||
+++ CPP/7zip/Crypto/MyAes.cpp 2025-01-03 18:38:35.330153025 +0000 | ||
@@ -153,7 +153,26 @@ | ||
#ifndef Z7_EXTRACT_ONLY | ||
|
||
#ifdef MY_CPU_X86_OR_AMD64 | ||
- #define USE_HW_AES | ||
+ | ||
+ #if defined(__INTEL_COMPILER) | ||
+ #if (__INTEL_COMPILER >= 1110) | ||
+ #define USE_HW_AES | ||
+ #if (__INTEL_COMPILER >= 1900) | ||
+ #define USE_HW_VAES | ||
+ #endif | ||
+ #endif | ||
+ #elif defined(Z7_CLANG_VERSION) && (Z7_CLANG_VERSION >= 30800) \ | ||
+ || defined(Z7_GCC_VERSION) && (Z7_GCC_VERSION >= 40400) | ||
+ #define USE_HW_AES | ||
+ #if defined(__clang__) && (__clang_major__ >= 8) \ | ||
+ || defined(__GNUC__) && (__GNUC__ >= 8) | ||
+ #define USE_HW_VAES | ||
+ #endif | ||
+ #elif defined(_MSC_VER) | ||
+ #define USE_HW_AES | ||
+ #define USE_HW_VAES | ||
+ #endif | ||
+ | ||
#elif defined(MY_CPU_ARM_OR_ARM64) && defined(MY_CPU_LE) | ||
|
||
#if defined(__ARM_FEATURE_AES) \ | ||
@@ -186,15 +205,15 @@ | ||
#define SET_AES_FUNC_2(f2) \ | ||
if (algo == 2) if (g_Aes_SupportedFunctions_Flags & k_Aes_SupportedFunctions_HW) \ | ||
{ f = f2; } | ||
- #ifdef MY_CPU_X86_OR_AMD64 | ||
+ #ifdef USE_HW_VAES | ||
#define SET_AES_FUNC_23(f2, f3) \ | ||
SET_AES_FUNC_2(f2) \ | ||
if (algo == 3) if (g_Aes_SupportedFunctions_Flags & k_Aes_SupportedFunctions_HW_256) \ | ||
{ f = f3; } | ||
- #else // MY_CPU_X86_OR_AMD64 | ||
+ #else // USE_HW_VAES | ||
#define SET_AES_FUNC_23(f2, f3) \ | ||
SET_AES_FUNC_2(f2) | ||
- #endif // MY_CPU_X86_OR_AMD64 | ||
+ #endif // USE_HW_VAES | ||
#else // USE_HW_AES | ||
#define SET_AES_FUNC_23(f2, f3) | ||
#endif // USE_HW_AES |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# fix preprocessor commands | ||
# https://sourceforge.net/p/sevenzip/discussion/45797/thread/d9908ffd01/ | ||
# | ||
--- C/XzCrc64Opt.c.orig 2023-12-08 08:00:00.000000000 +0000 | ||
+++ C/XzCrc64Opt.c 2025-01-03 19:08:34.320848333 +0000 | ||
@@ -235,7 +235,7 @@ | ||
v = Q32BE(1, w1) ^ Q32BE(0, w0); | ||
v ^= Q32BE(3, d1) ^ Q32BE(2, d0); | ||
#endif | ||
-#elif | ||
+#else | ||
#error Stop_Compiling_Bad_CRC64_NUM_TABLES | ||
#endif | ||
p += Z7_CRC64_NUM_TABLES_USE; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,23 @@ | ||
PKG_NAME = coreutils | ||
PKG_VERS = 8.21 | ||
PKG_VERS = 9.5 | ||
PKG_EXT = tar.xz | ||
PKG_DIST_NAME = $(PKG_NAME)-$(PKG_VERS).$(PKG_EXT) | ||
PKG_DIST_SITE = https://ftp.gnu.org/gnu/$(PKG_NAME) | ||
PKG_DIST_SITE = https://ftp.gnu.org/gnu/coreutils | ||
PKG_DIR = $(PKG_NAME)-$(PKG_VERS) | ||
|
||
DEPENDS = | ||
|
||
HOMEPAGE = https://www.gnu.org/s/coreutils/ | ||
COMMENT = Basic file, shell and text manipulation utilities of the GNU operating system | ||
LICENSE = GPL | ||
COMMENT = Basic file, shell and text manipulation utilities of the GNU operating system. We use 'nice' only. | ||
LICENSE = GPLv3 | ||
|
||
GNU_CONFIGURE = 1 | ||
CONFIGURE_ARGS = --disable-nls | ||
|
||
include ../../mk/spksrc.cross-cc.mk | ||
|
||
# 32-bit archs require glibc >= 2.34 (i.e. DSM 7.2) to support 64 bit timestamps | ||
ifneq ($(findstring $(ARCH),$(x64_ARCHS)),$(ARCH)) | ||
ifeq ($(call version_lt, $(TC_GLIBC), 2.34),1) | ||
CONFIGURE_ARGS += --disable-year2038 | ||
endif | ||
endif |
Oops, something went wrong.