[Buildroot] [git commit] package/p7zip: add 7za support
From: Arnout Vandecappelle (Essensium/Mind) <hidden>
Date: 2021-12-06 18:24:54
Subsystem:
the rest · Maintainer:
Linus Torvalds
commit: https://git.buildroot.net/buildroot/commit/?id=c1723424b8189730087006fc879fdae0cc123ca1 branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master Add 7za stand-alone executable as 7zr is a "light-version" of 7za that only handles 7z archives and cannot handle encrypted archives. Fixes: - https://bugs.buildroot.org/show_bug.cgi?id=14266 Signed-off-by: Fabrice Fontaine <redacted> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <redacted> --- package/p7zip/Config.in | 22 ++++++++++++++++++++++ package/p7zip/p7zip.mk | 11 +++++++++-- 2 files changed, 31 insertions(+), 2 deletions(-)
diff --git a/package/p7zip/Config.in b/package/p7zip/Config.in
index badfb9b9e8..3b30fd71cc 100644
--- a/package/p7zip/Config.in
+++ b/package/p7zip/Config.in@@ -12,6 +12,28 @@ config BR2_PACKAGE_P7ZIP http://sourceforge.net/projects/p7zip +if BR2_PACKAGE_P7ZIP + +choice + prompt "p7zip binary" + default BR2_PACKAGE_P7ZIP_7ZR + +config BR2_PACKAGE_P7ZIP_7ZA + bool "7za" + help + Stand-alone executable that handles fewer archive formats + than 7z + +config BR2_PACKAGE_P7ZIP_7ZR + bool "7zr" + help + Stand-alone executable which is a "light-version" of 7za that + only handles 7z archives and cannot handle encrypted archives + +endchoice + +endif + comment "p7zip needs a toolchain w/ threads, wchar, C++" depends on BR2_TOOLCHAIN_HAS_SYNC_4 depends on !BR2_TOOLCHAIN_HAS_THREADS || !BR2_USE_WCHAR || !BR2_INSTALL_LIBSTDCPP
diff --git a/package/p7zip/p7zip.mk b/package/p7zip/p7zip.mk
index f94b55ecd2..b6c5adae26 100644
--- a/package/p7zip/p7zip.mk
+++ b/package/p7zip/p7zip.mk@@ -10,6 +10,12 @@ P7ZIP_LICENSE = LGPL-2.1+ with unRAR restriction P7ZIP_LICENSE_FILES = DOC/License.txt P7ZIP_CPE_ID_VENDOR = 7-zip +ifeq ($(BR2_PACKAGE_P7ZIP_7ZA),y) +P7ZIP_TARGET = 7za +else +P7ZIP_TARGET = 7zr +endif + # p7zip buildsystem is a mess: it plays dirty tricks with CFLAGS and # CXXFLAGS, so we can't pass them. Instead, it accepts ALLFLAGS_C # and ALLFLAGS_CPP as variables to pass the CFLAGS and CXXFLAGS.
@@ -17,11 +23,12 @@ define P7ZIP_BUILD_CMDS $(TARGET_MAKE_ENV) $(MAKE) CC="$(TARGET_CC)" ALLFLAGS_C="$(TARGET_CFLAGS)" \ CXX="$(TARGET_CXX)" ALLFLAGS_CPP="$(TARGET_CXXFLAGS)" \ LDFLAGS="$(TARGET_LDFLAGS)" \ - -C $(@D) 7zr + -C $(@D) $(P7ZIP_TARGET) endef define P7ZIP_INSTALL_TARGET_CMDS - $(INSTALL) -D -m 0755 $(@D)/bin/7zr $(TARGET_DIR)/usr/bin/7zr + $(INSTALL) -D -m 0755 $(@D)/bin/$(P7ZIP_TARGET) \ + $(TARGET_DIR)/usr/bin/$(P7ZIP_TARGET) endef $(eval $(generic-package))
_______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot