p7zip-light: new package
PATCH v3 1/1 p7zip-light: new package
--- package/Config.in | 1 + package/p7zip-light/Config.in | 26 +++++ package/p7zip-light/p7zip-light-disable-rar.patch | 112 +++++++++++++++++++++ package/p7zip-light/p7zip-light-exclude-docs.patch | 30 ++++++ .../p7zip-light/p7zip-light-makefile-flags.patch | 80 +++++++++++++++ package/p7zip-light/p7zip-light.mk | 31 ++++++ 6 files changed, 280 insertions(+) create mode 100644 package/p7zip-light/Config.in create mode 100644 package/p7zip-light/p7zip-light-disable-rar.patch create mode 100644 package/p7zip-light/p7zip-light-exclude-docs.patch create mode 100644 package/p7zip-light/p7zip-light-makefile-flags.patch create mode 100644 package/p7zip-light/p7zip-light.mk
package/Config.in +1 -0
@@ -13,6 +13,7 @@ source "package/gzip/Config.in" endif source "package/lzop/Config.in" source "package/lzma/Config.in" +source "package/p7zip-light/Config.in" source "package/xz/Config.in" endmenu
package/p7zip-light/Config.in new file +26 -0
@@ -0,0 +1,26 @@ +config BR2_PACKAGE_P7ZIP_LIGHT + bool "p7zip-light" + help + Command-line version of the 7-Zip compressed file archiver + without RAR and GUI support. + + http://p7zip.sourceforge.net/ + +if BR2_PACKAGE_P7ZIP_LIGHT + +config BR2_PACKAGE_P7ZIP_LIGHT_SFX + bool "SFX support" + help + Enable support for creating self-extracting archives. + +config BR2_PACKAGE_P7ZIP_LIGHT_7Z + bool "7z" + help + Build 7z executable. Uses plugins to handle archives. + +config BR2_PACKAGE_P7ZIP_LIGHT_7ZR + bool "7zr" + help + Build 7zr executable. Only supports 7z archives. + +endif
package/p7zip-light/p7zip-light-disable-rar.patch new file +112 -0
112 lines not on this page · raw message
package/p7zip-light/p7zip-light-exclude-docs.patch new file +30 -0
@@ -0,0 +1,30 @@ +Do not install documentation + +The install script installs documentation files which are not needed. +Exclude them to reduce footprint. + +Signed-off-by: Jonathan Liu <[email protected]> +--- + install.sh | 2 ++ + 1 file changed, 2 insertions(+) + +Index: p7zip_9.20.1/install.sh +=================================================================== +--- p7zip_9.20.1.orig/install.sh ++++ p7zip_9.20.1/install.sh +@@ -129,6 +129,7 @@ + fi + fi + ++:<<DISABLED + mkdir -p "${DEST_DIR}${DEST_MAN}/man1" + if [ -d DOCS ] + then +@@ -181,6 +182,7 @@ + find "${DEST_DIR}${DEST_SHARE_DOC}/DOCS" -type d -exec chmod 555 {} \; + find "${DEST_DIR}${DEST_SHARE_DOC}/DOCS" -type f -exec chmod 444 {} \; + fi ++DISABLED + + use_lang="n" +
package/p7zip-light/p7zip-light-makefile-flags.patch new file +80 -0
80 lines not on this page · raw message
package/p7zip-light/p7zip-light.mk new file +31 -0
@@ -0,0 +1,31 @@ +############################################################# +# +# p7zip-light +# +############################################################# +P7ZIP_LIGHT_VERSION = 9.20.1 +P7ZIP_LIGHT_SOURCE = p7zip_$(P7ZIP_LIGHT_VERSION)_src_all.tar.bz2 +P7ZIP_LIGHT_SITE = http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/p7zip +P7ZIP_LIGHT_LICENSE = LGPLv2.1+ + +define P7ZIP_LIGHT_BUILD_CMDS + $(MAKE) CC="$(TARGET_CC)" CFLAGS="$(TARGET_CFLAGS)" \ + CXX="$(TARGET_CXX)" CXXFLAGS="$(TARGET_CXXFLAGS)" \ + -C $(@D) 7za \ + $(if $(BR2_PACKAGE_P7ZIP_LIGHT_SFX),sfx) \ + $(if $(BR2_PACKAGE_P7ZIP_LIGHT_7Z),7z) \ + $(if $(BR2_PACKAGE_P7ZIP_LIGHT_7ZR),7zr) +endef + +define P7ZIP_LIGHT_INSTALL_TARGET_CMDS + (cd $(@D); \ + make install DEST_DIR=$(TARGET_DIR) DEST_HOME=/usr DEST_MAN=/usr/share/man \ + ) +endef + +define P7ZIP_LIGHT_UNINSTALL_TARGET_CMDS + rm -f $(TARGET_DIR)/usr/bin/7z{,a,r} + rm -rf $(TARGET_DIR)/usr/lib/p7zip +endef + +$(eval $(generic-package))
Signature · 1 line
1.7.11.3
PATCH v3 1/1 p7zip-light: new package
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Jonathan" == Jonathan Liu <[email protected]> writes:
Jonathan> Signed-off-by: Jonathan Liu <[email protected]>
Hi, sorry for the slow response, see below for comments.
Jonathan> +++ b/package/Config.in
Jonathan> @@ -13,6 +13,7 @@ source "package/gzip/Config.in"
Jonathan> endif Jonathan> source "package/lzop/Config.in" Jonathan> source "package/lzma/Config.in"
Jonathan> +source "package/p7zip-light/Config.in"
Perhaps we should just call it p7zip like upstream, then there's no problem if somebody wants to add an option for rar support in the future.
Jonathan> source "package/xz/Config.in"
Jonathan> endmenu
Jonathan> diff --git a/package/p7zip-light/Config.in b/package/p7zip-light/Config.in Jonathan> new file mode 100644
Jonathan> index 0000000..9aaec23
Jonathan> --- /dev/null
Jonathan> +++ b/package/p7zip-light/Config.in
Jonathan> @@ -0,0 +1,26 @@
Jonathan> +config BR2_PACKAGE_P7ZIP_LIGHT
Jonathan> + bool "p7zip-light"
Jonathan> + help
Jonathan> + Command-line version of the 7-Zip compressed file archiver
Jonathan> + without RAR and GUI support.
Jonathan> +
Jonathan> + http://p7zip.sourceforge.net/
From the looks of the rar patch, it seems to be implemented in C++, so you need to depend on BR2_INSTALL_LIBSTDCPP and add a comment if not available (see iperf package for an example).
Jonathan> +
Jonathan> +if BR2_PACKAGE_P7ZIP_LIGHT
Jonathan> +
Jonathan> +config BR2_PACKAGE_P7ZIP_LIGHT_SFX
Jonathan> + bool "SFX support"
Jonathan> + help
Jonathan> + Enable support for creating self-extracting archives.
Does that work on all the architectures we support in Buildroot?
Jonathan> diff --git a/package/p7zip-light/p7zip-light-disable-rar.patch b/package/p7zip-light/p7zip-light-disable-rar.patch Jonathan> new file mode 100644
Jonathan> index 0000000..d605c6b
Jonathan> --- /dev/null
Jonathan> +++ b/package/p7zip-light/p7zip-light-disable-rar.patch
Jonathan> @@ -0,0 +1,112 @@
Jonathan> +Disable RAR support
Jonathan> +
Jonathan> +The RAR support is non-free and licensed under the unRAR restriction. Jonathan> +As this support is usually not neeeded, disable it to reduce footprint Jonathan> +and simplify licensing.
Any plans for making this a build option and sending it upstream?
Jonathan> diff --git a/package/p7zip-light/p7zip-light-exclude-docs.patch b/package/p7zip-light/p7zip-light-exclude-docs.patch Jonathan> new file mode 100644
Jonathan> index 0000000..f01f114
Jonathan> --- /dev/null
Jonathan> +++ b/package/p7zip-light/p7zip-light-exclude-docs.patch
Jonathan> @@ -0,0 +1,30 @@
Jonathan> +Do not install documentation
Jonathan> +
Jonathan> +The install script installs documentation files which are not needed.
Jonathan> +Exclude them to reduce footprint.
Why is this needed? We have BR2_HAVE_DOCUMENTATION to select if documentation should be included or not (and automatically remove it in the target-finalize step).
Jonathan> diff --git a/package/p7zip-light/p7zip-light-makefile-flags.patch b/package/p7zip-light/p7zip-light-makefile-flags.patch Jonathan> new file mode 100644
Jonathan> index 0000000..0babe95
Jonathan> --- /dev/null
Jonathan> +++ b/package/p7zip-light/p7zip-light-makefile-flags.patch
Jonathan> @@ -0,0 +1,80 @@
Jonathan> +Allow CC/CFLAGS/CXX/CXXFLAGS overrides
Jonathan> +
Jonathan> +The makefiles currently use hardcoded values for the compiler and
Jonathan> +compiler flags. This patch removes flags that not essential or are
Jonathan> +already added by buildroot and then modifies the makefiles to
Jonathan> +to allow specifying custom compiler and compiler flags.
Jonathan> +
Has this been sent upstream?
Jonathan> @@ -0,0 +1,31 @@
Jonathan> +#############################################################
Jonathan> +#
Jonathan> +# p7zip-light
Jonathan> +#
Jonathan> +#############################################################
Jonathan> +P7ZIP_LIGHT_VERSION = 9.20.1
Jonathan> +P7ZIP_LIGHT_SOURCE = p7zip_$(P7ZIP_LIGHT_VERSION)_src_all.tar.bz2 Jonathan> +P7ZIP_LIGHT_SITE = http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/p7zip
BR2_SOURCEFORGE_MIRROR is gone since cdfebcfca60 (Remove BR2_SOURCEFORGE_MIRROR variable). Please change it to use downloads.sourceforge.net.
Jonathan> +P7ZIP_LIGHT_LICENSE = LGPLv2.1+
Jonathan> +
Jonathan> +define P7ZIP_LIGHT_BUILD_CMDS
Jonathan> + $(MAKE) CC="$(TARGET_CC)" CFLAGS="$(TARGET_CFLAGS)" \
Jonathan> + CXX="$(TARGET_CXX)" CXXFLAGS="$(TARGET_CXXFLAGS)" \
You forgot LDFLAGS. It probably makes more sense to use TARGET_CONFIGURE_OPTS instead of this implicit list.
Thanks.
Signature · 1 line
Bye, Peter Korsgaard