mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH 1/3] libwebp: new package
@ 2019-04-04 16:14 Lucas Stach
  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
  0 siblings, 2 replies; 3+ messages in thread
From: Lucas Stach @ 2019-04-04 16:14 UTC (permalink / raw)
  To: ptxdist

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

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

* [ptxdist] [PATCH 2/3] qt5: select libwebp
  2019-04-04 16:14 [ptxdist] [PATCH 1/3] libwebp: new package Lucas Stach
@ 2019-04-04 16:14 ` Lucas Stach
  2019-04-04 16:14 ` [ptxdist] [PATCH 3/3] sd2-image: " Lucas Stach
  1 sibling, 0 replies; 3+ messages in thread
From: Lucas Stach @ 2019-04-04 16:14 UTC (permalink / raw)
  To: ptxdist

The QT5 imageformat module uses the system wide library when
available.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
---
 rules/qt5.in | 1 +
 1 file changed, 1 insertion(+)

diff --git a/rules/qt5.in b/rules/qt5.in
index 3fa6f69b3c8c..3acab4849b1d 100644
--- a/rules/qt5.in
+++ b/rules/qt5.in
@@ -17,6 +17,7 @@ menuconfig QT5
 	select HOST_LIBPNG		if QT5_MODULE_QTWEBENGINE
 	select LIBJPEG			if QT5_LIBJPEG || QT5_MODULE_QTWEBENGINE
 	select LIBMNG			if QT5_LIBMNG
+	select LIBWEBP			if QT5_MODULE_QTIMAGEFORMATS
 	select ICU			if QT5_ICU
 	select SYSTEMD			if QT5_JOURNALD
 	select OPENSSL			if QT5_OPENSSL
-- 
2.20.1


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

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

* [ptxdist] [PATCH 3/3] sd2-image: select libwebp
  2019-04-04 16:14 [ptxdist] [PATCH 1/3] libwebp: new package Lucas Stach
  2019-04-04 16:14 ` [ptxdist] [PATCH 2/3] qt5: select libwebp Lucas Stach
@ 2019-04-04 16:14 ` Lucas Stach
  1 sibling, 0 replies; 3+ messages in thread
From: Lucas Stach @ 2019-04-04 16:14 UTC (permalink / raw)
  To: ptxdist

Make sure the library is present when webp support is enabled.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
---
 rules/sdl2-image.in | 1 +
 1 file changed, 1 insertion(+)

diff --git a/rules/sdl2-image.in b/rules/sdl2-image.in
index 44bac25ccc80..db234b153174 100644
--- a/rules/sdl2-image.in
+++ b/rules/sdl2-image.in
@@ -6,6 +6,7 @@ menuconfig SDL2_IMAGE
 	prompt "SDL2 image                    "
 	select LIBPNG	if SDL2_IMAGE_PNG
 	select LIBJPEG	if SDL2_IMAGE_JPG
+	select LIBWEBP	if SDL2_IMAGE_WEBP
 	help
 	  This is a simple library to load images of various
 	  formats as SDL surfaces. This library currently supports
-- 
2.20.1


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

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

end of thread, other threads:[~2019-04-04 16:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-04 16:14 [ptxdist] [PATCH 1/3] libwebp: new package Lucas Stach
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

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