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

 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 <zhu...@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 
<zhu...@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

Reply via email to