mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Lucas Stach <l.stach@pengutronix.de>
To: ptxdist@pengutronix.de
Subject: [ptxdist] [PATCH 1/3] libwebp: new package
Date: Thu,  4 Apr 2019 18:14:38 +0200	[thread overview]
Message-ID: <20190404161440.6823-1-l.stach@pengutronix.de> (raw)

This adds support for building libwebp and associated tools.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
---
 rules/libwebp.in   | 31 ++++++++++++++++
 rules/libwebp.make | 93 ++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 124 insertions(+)
 create mode 100644 rules/libwebp.in
 create mode 100644 rules/libwebp.make

diff --git a/rules/libwebp.in b/rules/libwebp.in
new file mode 100644
index 000000000000..1a50e7d4237c
--- /dev/null
+++ b/rules/libwebp.in
@@ -0,0 +1,31 @@
+## SECTION=system_libraries
+
+menuconfig LIBWEBP
+	tristate
+	prompt "libwebp                       "
+	help
+	  Library to encode and decode images in WebP format.
+
+if LIBWEBP
+
+config LIBWEBP_DECODER
+	bool
+	prompt "additional decoder-only library"
+
+config LIBWEBP_MUX
+	bool
+	prompt "webpmux support"
+
+config LIBWEBP_DEMUX
+	bool
+	prompt "webpdemux support"
+
+config LIBWEBP_CWEBP
+	bool
+	prompt "install cwebp tool"
+
+config LIBWEBP_DWEBP
+	bool
+	prompt "install dwebp tool"
+
+endif
diff --git a/rules/libwebp.make b/rules/libwebp.make
new file mode 100644
index 000000000000..a0ea8ab9ed65
--- /dev/null
+++ b/rules/libwebp.make
@@ -0,0 +1,93 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2018 by Steffen Trumtrar <s.trumtrar@pengutronix.de>
+#
+# See CREDITS for details about who has contributed to this project.
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_LIBWEBP) += libwebp
+
+#
+# Paths and names
+#
+LIBWEBP_VERSION		:= 1.0.2
+LIBWEBP_MD5		:= 02c0c55f1dd8612cd4d462e3409ad35d
+LIBWEBP			:= libwebp-$(LIBWEBP_VERSION)
+LIBWEBP_SUFFIX		:= tar.gz
+LIBWEBP_URL		:= http://downloads.webmproject.org/releases/webp/$(LIBWEBP).$(LIBWEBP_SUFFIX)
+LIBWEBP_SOURCE		:= $(SRCDIR)/$(LIBWEBP).$(LIBWEBP_SUFFIX)
+LIBWEBP_DIR		:= $(BUILDDIR)/$(LIBWEBP)
+LIBWEBP_LICENSE		:= BSD-3-Clause
+LIBWEBP_LICENSE_FILES	:= file://COPYING;md5=6e8dee932c26f2dab503abf70c96d8bb
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+#
+# autoconf
+#
+LIBWEBP_CONF_TOOL	:= autoconf
+LIBWEBP_CONF_OPT 	:= \
+	$(CROSS_AUTOCONF_USR) \
+	--disable-asserts \
+	--$(call ptx/endis, PTXCONF_ARCH_X86)-sse4.1 \
+	--$(call ptx/endis, PTXCONF_ARCH_X86)-sse2 \
+	--$(call ptx/endis, PTXCONF_ARCH_ARM_NEON)-neon \
+	--$(call ptx/endis, PTXCONF_ARCH_ARM_NEON)-neon-rtcd \
+	--enable-threading \
+	--disable-gl \
+	--disable-sdl \
+	--disable-png \
+	--disable-jpeg \
+	--disable-tiff \
+	--disable-gif \
+	--disable-wic \
+	--enable-swap-16bit-csp \
+	--enable-near-lossless \
+	--$(call ptx/endis, PTXCONF_LIBWEBP_MUX)-libwebpmux \
+	--$(call ptx/endis, PTXCONF_LIBWEBP_DEMUX)-libwebpdemux \
+	--$(call ptx/endis, PTXCONF_LIBWEBP_DECODER)-libwebpdecoder \
+	--disable-libwebpextras
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+LIBWEBP_INSTALL_FILES-y =
+LIBWEBP_INSTALL_FILES-$(PTXCONF_LIBWEBP_CWEBP) += cwebp
+LIBWEBP_INSTALL_FILES-$(PTXCONF_LIBWEBP_DWEBP) += dwebp
+
+$(STATEDIR)/libwebp.targetinstall:
+	@$(call targetinfo)
+
+	@$(call install_init, libwebp)
+	@$(call install_fixup, libwebp,PRIORITY,optional)
+	@$(call install_fixup, libwebp,SECTION,base)
+	@$(call install_fixup, libwebp,AUTHOR,"Steffen Trumtrar <s.trumtrar@pengutronix.de>")
+	@$(call install_fixup, libwebp,DESCRIPTION,missing)
+
+	@$(call install_lib, libwebp, 0, 0, 0644, libwebp)
+ifdef PTXCONF_LIBWEBP_DEMUX
+	@$(call install_lib, libwebp, 0, 0, 0644, libwebpdemux)
+endif
+ifdef PTXCONF_LIBWEBP_MUX
+	@$(call install_lib, libwebp, 0, 0, 0644, libwebpmux)
+endif
+ifdef PTXCONF_LIBWEBP_DECODER
+	@$(call install_lib, libwebp, 0, 0, 0644, libwebpdecoder)
+endif
+
+	@for i in $(LIBWEBP_INSTALL_FILES-y); do \
+		$(call install_copy, libwebp, 0, 0, 0755, -, /usr/bin/$$i) \
+	done
+
+	@$(call install_finish, libwebp)
+
+	@$(call touch)
-- 
2.20.1


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

             reply	other threads:[~2019-04-04 16:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-04 16:14 Lucas Stach [this message]
2019-04-04 16:14 ` [ptxdist] [PATCH 2/3] qt5: select libwebp Lucas Stach
2019-04-04 16:14 ` [ptxdist] [PATCH 3/3] sd2-image: " Lucas Stach

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=20190404161440.6823-1-l.stach@pengutronix.de \
    --to=l.stach@pengutronix.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