mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Philipp Zabel <p.zabel@pengutronix.de>
To: ptxdist@pengutronix.de
Cc: Florian Faber <faber@faberman.de>
Subject: [ptxdist] [PATCH v2] zstd: new package
Date: Thu, 20 Feb 2020 12:17:56 +0100	[thread overview]
Message-ID: <20200220111756.16577-1-p.zabel@pengutronix.de> (raw)

From: Florian Faber <faber@faberman.de>

Add zstd-1.4.4 to the repository.

Signed-off-by: Florian Faber <faber@faberman.de>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
---
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 <faber@faberman.de>
+#
+# 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 <faber@faberman.de>")
+	@$(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

             reply	other threads:[~2020-02-20 11:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-20 11:17 Philipp Zabel [this message]
2020-02-21  7:12 ` Bruno Thomsen
2020-02-21  7:54   ` Michael Olbrich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200220111756.16577-1-p.zabel@pengutronix.de \
    --to=p.zabel@pengutronix.de \
    --cc=faber@faberman.de \
    --cc=ptxdist@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox