From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: From: Philipp Zabel Date: Thu, 20 Feb 2020 12:17:56 +0100 Message-Id: <20200220111756.16577-1-p.zabel@pengutronix.de> MIME-Version: 1.0 Subject: [ptxdist] [PATCH v2] zstd: new package List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ptxdist@pengutronix.de Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ptxdist-bounces@pengutronix.de Sender: "ptxdist" To: ptxdist@pengutronix.de Cc: Florian Faber From: Florian Faber Add zstd-1.4.4 to the repository. Signed-off-by: Florian Faber Signed-off-by: Philipp Zabel --- Changes since v1: - specified license to BSD-3-Clause - dropped ZSTD_ZSTDCAT option - fixed zstdcat link - added zstdmt and unzstd links - added default build options --- rules/zstd.in | 37 +++++++++++++++++++++++ rules/zstd.make | 80 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 117 insertions(+) create mode 100644 rules/zstd.in create mode 100644 rules/zstd.make diff --git a/rules/zstd.in b/rules/zstd.in new file mode 100644 index 000000000000..3010ebda3ff7 --- /dev/null +++ b/rules/zstd.in @@ -0,0 +1,37 @@ +## SECTION=shell_and_console + +menuconfig ZSTD + tristate + prompt "zstd " + select HOST_CMAKE + help + zstd is a fast lossless compression algorithm and data + compression tool, with command line syntax similar to + gzip and xz. It is based on the LZ77 family, with further + FSE & huff0 entropy stages. zstd offers highly configurable + compression speed, with fast modes at > 200 MB/s per code, + and strong modes nearing lzma compression ratios. It also + features a very fast decoder, with speeds > 500 MB/s per core. + +if ZSTD + +config ZSTD_LIBZSTD + bool + prompt "install zstd library" + +config ZSTD_ZSTD + bool + select ZSTD_LIBZSTD + prompt "install zstd tool" + +config ZSTD_ZSTDGREP + bool + select ZSTD_LIBZSTD + prompt "install zstdgrep" + +config ZSTD_ZSTDLESS + bool + select ZSTD_LIBZSTD + prompt "install zstdless" + +endif diff --git a/rules/zstd.make b/rules/zstd.make new file mode 100644 index 000000000000..ccc8f1c36ac4 --- /dev/null +++ b/rules/zstd.make @@ -0,0 +1,80 @@ +# -*-makefile-*- +# +# Copyright (C) 2019 by Florian Faber +# +# For further information about the PTXdist project and license conditions +# see the README file. +# + +# +# We provide this package +# +PACKAGES-$(PTXCONF_ZSTD) += zstd + +# +# Paths and names +# +ZSTD_VERSION := 1.4.4 +ZSTD_MD5 := 532aa7b3a873e144bbbedd9c0ea87694 +ZSTD := zstd-$(ZSTD_VERSION) +ZSTD_SUFFIX := tar.gz +ZSTD_URL := https://github.com/facebook/zstd/archive/v$(ZSTD_VERSION).$(ZSTD_SUFFIX) +ZSTD_SOURCE := $(SRCDIR)/$(ZSTD).$(ZSTD_SUFFIX) +ZSTD_DIR := $(BUILDDIR)/$(ZSTD) +ZSTD_SUBDIR := build/cmake +ZSTD_LICENSE := BSD-3-clause + +# ---------------------------------------------------------------------------- +# Prepare +# ---------------------------------------------------------------------------- + +ZSTD_CONF_TOOL := cmake +ZSTD_BUILD_DIR := $(ZSTD_DIR)-build +ZSTD_CONF_OPT := \ + $(CROSS_CMAKE_USR) \ + -B$(ZSTD_BUILD_DIR) \ + -DZSTD_LEGACY_SUPPORT=OFF \ + -DZSTD_MULTITHREAD_SUPPORT=ON \ + -DZSTD_BUILD_PROGRAMS=ON \ + -DZSTD_BUILD_CONTRIB=OFF \ + -DZSTD_BUILD_TESTS=OFF \ + -DZSTD_USE_STATIC_RUNTIME=OFF \ + -DZSTD_PROGRAMS_LINK_SHARED=OFF \ + -DZSTD_BUILD_STATIC=ON \ + -DZSTD_BUILD_SHARED=ON \ + -DZSTD_ZLIB_SUPPORT=OFF \ + -DZSTD_LZMA_SUPPORT=OFF \ + -DZSTD_LZ4_SUPPORT=OFF + +# ---------------------------------------------------------------------------- +# Target-Install +# ---------------------------------------------------------------------------- + +$(STATEDIR)/zstd.targetinstall: + @$(call targetinfo) + + @$(call install_init, zstd) + @$(call install_fixup, zstd, PRIORITY, optional) + @$(call install_fixup, zstd, SECTION, base) + @$(call install_fixup, zstd, AUTHOR, "Florian Faber ") + @$(call install_fixup, zstd, DESCRIPTION, missing) + +ifdef PTXCONF_ZSTD_LIBZSTD + $(call install_lib, zstd, 0, 0, 0644, libzstd) +endif +ifdef PTXCONF_ZSTD_ZSTD + $(call install_copy, zstd, 0, 0, 0755, -, /usr/bin/zstd) + $(call install_link, zstd, zstd, /usr/bin/zstdcat) + $(call install_link, zstd, zstd, /usr/bin/zstdmt) + $(call install_link, zstd, zstd, /usr/bin/unzstd) +endif +ifdef PTXCONF_ZSTD_ZSTDGREP + $(call install_copy, zstd, 0, 0, 0755, -, /usr/bin/zstdgrep) +endif +ifdef PTXCONF_ZSTD_ZSTDLESS + $(call install_copy, zstd, 0, 0, 0755, -, /usr/bin/zstdless) +endif + + @$(call install_finish, zstd) + + @$(call touch) -- 2.20.1 _______________________________________________ ptxdist mailing list ptxdist@pengutronix.de