mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Michael Grzeschik <m.grzeschik@pengutronix.de>
To: ptxdist@pengutronix.de
Subject: [ptxdist] [PATCH v2 3/6] sdl2-image: add new package
Date: Fri, 13 Jul 2018 16:35:12 +0200	[thread overview]
Message-ID: <20180713143515.19019-4-m.grzeschik@pengutronix.de> (raw)
In-Reply-To: <20180713143515.19019-1-m.grzeschik@pengutronix.de>

Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
---
v1 -> v2: - removed extra _ in options
          - removed extra space on _LDFLAGS
	  - added missing license to zlib

 rules/sdl2-image.in   | 52 +++++++++++++++++++++++++++++
 rules/sdl2-image.make | 78 +++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 130 insertions(+)
 create mode 100644 rules/sdl2-image.in
 create mode 100644 rules/sdl2-image.make

diff --git a/rules/sdl2-image.in b/rules/sdl2-image.in
new file mode 100644
index 000000000..3fde58154
--- /dev/null
+++ b/rules/sdl2-image.in
@@ -0,0 +1,52 @@
+## SECTION=multimedia_sdl
+
+menuconfig SDL2_IMAGE
+	tristate
+	select SDL2
+	prompt "SDL2 image                    "
+	select LIBPNG	if SDL2_IMAGE_PNG
+	select LIBJPEG	if SDL2_IMAGE_JPG
+	help
+	  This is a simple library to load images of various
+	  formats as SDL surfaces. This library currently supports
+	  BMP, PPM, PCX, GIF, JPEG, PNG, TIFF, and XPM formats.
+
+if SDL2_IMAGE
+
+config SDL2_IMAGE_BMP
+	bool "bmp support"
+
+config SDL2_IMAGE_GIF
+	bool "gif support"
+
+config SDL2_IMAGE_JPG
+	bool "jpeg support"
+
+config SDL2_IMAGE_LBM
+	bool "lbm support"
+
+config SDL2_IMAGE_PCX
+	bool "pcx support"
+
+config SDL2_IMAGE_PNG
+	bool "png support"
+
+config SDL2_IMAGE_PNM
+	bool "pnm support"
+
+config SDL2_IMAGE_TGA
+	bool "tga support"
+
+config SDL2_IMAGE_TIF
+	bool "tiff support"
+
+config SDL2_IMAGE_XCF
+	bool "xcf support"
+
+config SDL2_IMAGE_XPM
+	bool "xpm support"
+
+config SDL2_IMAGE_XV
+	bool "xv support"
+
+endif
diff --git a/rules/sdl2-image.make b/rules/sdl2-image.make
new file mode 100644
index 000000000..1486e0058
--- /dev/null
+++ b/rules/sdl2-image.make
@@ -0,0 +1,78 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2018 by Sergey Zhuravlevich <zhurxx@gmail.com>
+#
+# 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_SDL2_IMAGE) += sdl2-image
+
+#
+# Paths and names
+#
+SDL2_IMAGE_VERSION	:= 2.0.3
+SDL2_IMAGE_MD5		:= c6baf6dfa80fa8a66853661a36a6034e
+SDL2_IMAGE		:= SDL2_image-$(SDL2_IMAGE_VERSION)
+SDL2_IMAGE_SUFFIX	:= tar.gz
+SDL2_IMAGE_URL		:= https://www.libsdl.org/projects/SDL_image/release/$(SDL2_IMAGE).$(SDL2_IMAGE_SUFFIX)
+SDL2_IMAGE_SOURCE	:= $(SRCDIR)/$(SDL2_IMAGE).$(SDL2_IMAGE_SUFFIX)
+SDL2_IMAGE_DIR		:= $(BUILDDIR)/$(SDL2_IMAGE)
+SDL2_IMAGE_LICENSE	:= zlib
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+SDL2_IMAGE_CONF_TOOL	:= autoconf
+SDL2_IMAGE_CONF_OPT	:= \
+	$(CROSS_AUTOCONF_USR) \
+	--enable-shared \
+	--disable-static \
+	--disable-sdltest \
+	--disable-jpg-shared \
+	--disable-png-shared \
+	--disable-tif-shared \
+	--$(call ptx/endis, PTXCONF_SDL2_IMAGE_BMP)-bmp \
+	--$(call ptx/endis, PTXCONF_SDL2_IMAGE_GIF)-gif \
+	--$(call ptx/endis, PTXCONF_SDL2_IMAGE_JPG)-jpg \
+	--$(call ptx/endis, PTXCONF_SDL2_IMAGE_LBM)-lbm \
+	--$(call ptx/endis, PTXCONF_SDL2_IMAGE_PCX)-pcx \
+	--$(call ptx/endis, PTXCONF_SDL2_IMAGE_PNG)-png \
+	--$(call ptx/endis, PTXCONF_SDL2_IMAGE_PNM)-pnm \
+	--$(call ptx/endis, PTXCONF_SDL2_IMAGE_TGA)-tga \
+	--$(call ptx/endis, PTXCONF_SDL2_IMAGE_TIF)-tif \
+	--$(call ptx/endis, PTXCONF_SDL2_IMAGE_XCF)-xcf \
+	--$(call ptx/endis, PTXCONF_SDL2_IMAGE_XPM)-xpm \
+	--$(call ptx/endis, PTXCONF_SDL2_IMAGE_XV)-xv
+
+ifdef PTXCONF_SDL2_PULSEAUDIO
+SDL2_IMAGE_LDFLAGS	:= \
+	-Wl,-rpath-link,$(SYSROOT)/usr/lib/pulseaudio
+endif
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/sdl2-image.targetinstall:
+	@$(call targetinfo)
+
+	@$(call install_init, sdl2-image)
+	@$(call install_fixup, sdl2-image,PRIORITY,optional)
+	@$(call install_fixup, sdl2-image,SECTION,base)
+	@$(call install_fixup, sdl2-image,AUTHOR,"Sergey Zhuravlevich <zhurxx@gmail.com>")
+	@$(call install_fixup, sdl2-image,DESCRIPTION,missing)
+
+	@$(call install_lib, sdl2-image, 0, 0, 0644, libSDL2_image-2.0)
+
+	@$(call install_finish, sdl2-image)
+
+	@$(call touch)
+
+# vim: syntax=make
-- 
2.18.0


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

  parent reply	other threads:[~2018-07-13 14:35 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-13 14:35 [ptxdist] [PATCH v2 0/6] sdl2: add support for new packages Michael Grzeschik
2018-07-13 14:35 ` [ptxdist] [PATCH v2 1/6] sdl2: add new package Michael Grzeschik
2018-07-16 12:54   ` [ptxdist] [PATCH v3] " Michael Grzeschik
2018-07-16 13:07     ` Michael Olbrich
2018-07-16 13:13     ` Michael Olbrich
2018-07-13 14:35 ` [ptxdist] [PATCH v2 2/6] sdl2-test: " Michael Grzeschik
2018-07-13 14:35 ` Michael Grzeschik [this message]
2018-07-13 14:35 ` [ptxdist] [PATCH v2 4/6] sdl2-net: " Michael Grzeschik
2018-07-13 14:35 ` [ptxdist] [PATCH v2 5/6] sdl2-ttf: " Michael Grzeschik
2018-07-13 14:35 ` [ptxdist] [PATCH v2 6/6] sdl2-mixer: " Michael Grzeschik

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=20180713143515.19019-4-m.grzeschik@pengutronix.de \
    --to=m.grzeschik@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