mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH v2] zstd: new package
@ 2020-02-20 11:17 Philipp Zabel
  2020-02-21  7:12 ` Bruno Thomsen
  0 siblings, 1 reply; 3+ messages in thread
From: Philipp Zabel @ 2020-02-20 11:17 UTC (permalink / raw)
  To: ptxdist; +Cc: Florian Faber

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [ptxdist] [PATCH v2] zstd: new package
  2020-02-20 11:17 [ptxdist] [PATCH v2] zstd: new package Philipp Zabel
@ 2020-02-21  7:12 ` Bruno Thomsen
  2020-02-21  7:54   ` Michael Olbrich
  0 siblings, 1 reply; 3+ messages in thread
From: Bruno Thomsen @ 2020-02-21  7:12 UTC (permalink / raw)
  To: ptxdist; +Cc: Florian Faber

Hi

Den tor. 20. feb. 2020 kl. 12.20 skrev Philipp Zabel <p.zabel@pengutronix.de>:
> +# ----------------------------------------------------------------------------
> +# Target-Install
> +# ----------------------------------------------------------------------------
> +
> +$(STATEDIR)/zstd.targetinstall:
> +       @$(call targetinfo)

This section did not work in my test as indentation is space and not tab.

/home/developer/git/ptxdist/rules/zstd.make:55: *** missing separator.  Stop.

> +
> +       @$(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)

Target-Install lines normally starts with @, e.g.
@$(call install_lib, zstd, 0, 0, 0644, libzstd)

Same for the next 6 lines.

Bruno

> +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

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [ptxdist] [PATCH v2] zstd: new package
  2020-02-21  7:12 ` Bruno Thomsen
@ 2020-02-21  7:54   ` Michael Olbrich
  0 siblings, 0 replies; 3+ messages in thread
From: Michael Olbrich @ 2020-02-21  7:54 UTC (permalink / raw)
  To: ptxdist

On Fri, Feb 21, 2020 at 08:12:37AM +0100, Bruno Thomsen wrote:
> Hi
> 
> Den tor. 20. feb. 2020 kl. 12.20 skrev Philipp Zabel <p.zabel@pengutronix.de>:
> > +# ----------------------------------------------------------------------------
> > +# Target-Install
> > +# ----------------------------------------------------------------------------
> > +
> > +$(STATEDIR)/zstd.targetinstall:
> > +       @$(call targetinfo)
> 
> This section did not work in my test as indentation is space and not tab.
> 
> /home/developer/git/ptxdist/rules/zstd.make:55: *** missing separator.  Stop.

I got the tabs here, so maybe something went wrong on your side.

> > +
> > +       @$(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)
> 
> Target-Install lines normally starts with @, e.g.
> @$(call install_lib, zstd, 0, 0, 0644, libzstd)
> 
> Same for the next 6 lines.

Indeed.

> Bruno
> 
> > +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)

# vim: syntax=make

missing at the end.

Michael

> > --
> > 2.20.1
> >
> >
> > _______________________________________________
> > ptxdist mailing list
> > ptxdist@pengutronix.de
> 
> _______________________________________________
> ptxdist mailing list
> ptxdist@pengutronix.de
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-02-21  7:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-20 11:17 [ptxdist] [PATCH v2] zstd: new package Philipp Zabel
2020-02-21  7:12 ` Bruno Thomsen
2020-02-21  7:54   ` Michael Olbrich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox