mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH v5 0/6] sdl2: add support for new packages
@ 2018-07-26 17:39 Michael Grzeschik
  2018-07-26 17:39 ` [ptxdist] [PATCH v5 1/6] sdl2: add new package Michael Grzeschik
                   ` (5 more replies)
  0 siblings, 6 replies; 8+ messages in thread
From: Michael Grzeschik @ 2018-07-26 17:39 UTC (permalink / raw)
  To: ptxdist

This series adds support for new packages from the sdl2 project.

Michael Grzeschik (6):
  sdl2: add new package
  sdl2-image: add new package
  sdl2-net: add new package
  sdl2-ttf: add new package
  sdl2-mixer: add new package
  sdl2-test: add new package

 ...001-sdl-2.0.8-add-egl-cflags-to-test.patch |  55 ++++++
 ...-find-available-card-if-called-witho.patch | 129 +++++++++++++
 patches/SDL2-2.0.8/autogen.sh                 |   3 +
 patches/SDL2-2.0.8/series                     |   5 +
 ...001-sdl-2.0.8-tests-configure-opengl.patch |  44 +++++
 patches/SDL2_test-2.0.8/autogen.sh            |   4 +
 patches/SDL2_test-2.0.8/series                |   4 +
 ...igure-make-opengl-support-switchable.patch |  34 ++++
 patches/SDL2_ttf-2.0.14/autogen.sh            |   3 +
 patches/SDL2_ttf-2.0.14/series                |   4 +
 rules/sdl2-image.in                           |  52 ++++++
 rules/sdl2-image.make                         |  78 ++++++++
 rules/sdl2-mixer.in                           |  11 ++
 rules/sdl2-mixer.make                         |  58 ++++++
 rules/sdl2-net.in                             |  10 +
 rules/sdl2-net.make                           |  58 ++++++
 rules/sdl2-test.in                            |  12 ++
 rules/sdl2-test.make                          | 173 ++++++++++++++++++
 rules/sdl2-ttf.in                             |  12 ++
 rules/sdl2-ttf.make                           |  61 ++++++
 rules/sdl2.in                                 | 153 ++++++++++++++++
 rules/sdl2.make                               | 153 ++++++++++++++++
 22 files changed, 1116 insertions(+)
 create mode 100644 patches/SDL2-2.0.8/0001-sdl-2.0.8-add-egl-cflags-to-test.patch
 create mode 100644 patches/SDL2-2.0.8/0002-sdl-2.0.8-KMSDRM-find-available-card-if-called-witho.patch
 create mode 100755 patches/SDL2-2.0.8/autogen.sh
 create mode 100644 patches/SDL2-2.0.8/series
 create mode 100644 patches/SDL2_test-2.0.8/0001-sdl-2.0.8-tests-configure-opengl.patch
 create mode 100755 patches/SDL2_test-2.0.8/autogen.sh
 create mode 100644 patches/SDL2_test-2.0.8/series
 create mode 100644 patches/SDL2_ttf-2.0.14/0001-configure-make-opengl-support-switchable.patch
 create mode 100755 patches/SDL2_ttf-2.0.14/autogen.sh
 create mode 100644 patches/SDL2_ttf-2.0.14/series
 create mode 100644 rules/sdl2-image.in
 create mode 100644 rules/sdl2-image.make
 create mode 100644 rules/sdl2-mixer.in
 create mode 100644 rules/sdl2-mixer.make
 create mode 100644 rules/sdl2-net.in
 create mode 100644 rules/sdl2-net.make
 create mode 100644 rules/sdl2-test.in
 create mode 100644 rules/sdl2-test.make
 create mode 100644 rules/sdl2-ttf.in
 create mode 100644 rules/sdl2-ttf.make
 create mode 100644 rules/sdl2.in
 create mode 100644 rules/sdl2.make

-- 
2.18.0


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

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

* [ptxdist] [PATCH v5 1/6] sdl2: add new package
  2018-07-26 17:39 [ptxdist] [PATCH v5 0/6] sdl2: add support for new packages Michael Grzeschik
@ 2018-07-26 17:39 ` Michael Grzeschik
  2018-07-27 13:09   ` Michael Grzeschik
  2018-07-26 17:39 ` [ptxdist] [PATCH v5 2/6] sdl2-image: " Michael Grzeschik
                   ` (4 subsequent siblings)
  5 siblings, 1 reply; 8+ messages in thread
From: Michael Grzeschik @ 2018-07-26 17:39 UTC (permalink / raw)
  To: ptxdist

Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
---
v1 -> v2: - added select to MESALIB_GL* on SDL2_OPENGL*
          - padded prompt entry with extra spaces
v2 -> v3: - added patch to add egl cflags on configure.in and enabled autogen.sh
v3 -> v4: - improved egl check with PKG_CHECK_MODULES
          - removed extract stage and added custom autogen.sh
v4 -> v5: - reworked the configuration for the package
          - added a patch to find a valid dri device in kms backend

 ...001-sdl-2.0.8-add-egl-cflags-to-test.patch |  55 +++++++
 ...-find-available-card-if-called-witho.patch | 129 +++++++++++++++
 patches/SDL2-2.0.8/autogen.sh                 |   3 +
 patches/SDL2-2.0.8/series                     |   5 +
 rules/sdl2.in                                 | 153 ++++++++++++++++++
 rules/sdl2.make                               | 153 ++++++++++++++++++
 6 files changed, 498 insertions(+)
 create mode 100644 patches/SDL2-2.0.8/0001-sdl-2.0.8-add-egl-cflags-to-test.patch
 create mode 100644 patches/SDL2-2.0.8/0002-sdl-2.0.8-KMSDRM-find-available-card-if-called-witho.patch
 create mode 100755 patches/SDL2-2.0.8/autogen.sh
 create mode 100644 patches/SDL2-2.0.8/series
 create mode 100644 rules/sdl2.in
 create mode 100644 rules/sdl2.make

diff --git a/patches/SDL2-2.0.8/0001-sdl-2.0.8-add-egl-cflags-to-test.patch b/patches/SDL2-2.0.8/0001-sdl-2.0.8-add-egl-cflags-to-test.patch
new file mode 100644
index 000000000..c86d48e5a
--- /dev/null
+++ b/patches/SDL2-2.0.8/0001-sdl-2.0.8-add-egl-cflags-to-test.patch
@@ -0,0 +1,55 @@
+From: Sergey Zhuravlevich <zhurxx@gmail.com>
+Date: Mon, 16 Jul 2018 12:03:42 +0200
+Subject: [PATCH] sdl-2.0.8: add egl-cflags to test
+
+- also call aclocal to expand PKG_CHECK_MODULES
+
+Signed-off-by: Sergey Zhuravlevich <zhurxx@gmail.com>
+Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
+---
+ autogen.sh   |  2 +-
+ configure.in | 11 +++++++++++
+ 2 files changed, 12 insertions(+), 1 deletion(-)
+
+diff --git a/autogen.sh b/autogen.sh
+index 9edfb8a7d913..2f1e2ef3d419 100755
+--- a/autogen.sh
++++ b/autogen.sh
+@@ -8,7 +8,7 @@ test -z "$srcdir" && srcdir=.
+ cd "$srcdir"
+ 
+ # Regenerate configuration files
+-cat acinclude/* >aclocal.m4
++aclocal
+ found=false
+ for autoconf in autoconf autoconf259 autoconf-2.59
+ do if which $autoconf >/dev/null 2>&1; then $autoconf && found=true; break; fi
+diff --git a/configure.in b/configure.in
+index 1c7e79338a88..06e37a1b7f98 100644
+--- a/configure.in
++++ b/configure.in
+@@ -2335,6 +2335,14 @@ dnl Find OpenGL ES
+ CheckOpenGLESX11()
+ {
+     if test x$enable_video = xyes -a x$enable_video_opengles = xyes; then
++        PKG_CHECK_MODULES(EGL, [egl], [have_egl="yes"], [have_egl="no"])
++
++        save_CFLAGS="$CFLAGS"
++        if test x$have_egl = xyes; then
++          CFLAGS="$save_CFLAGS $EGL_CFLAGS"
++          EXTRA_CFLAGS="$EXTRA_CFLAGS $EGL_CFLAGS"
++        fi
++
+         AC_MSG_CHECKING(for EGL support)
+         video_opengl_egl=no
+         AC_TRY_COMPILE([
+@@ -2347,6 +2355,9 @@ CheckOpenGLESX11()
+         video_opengl_egl=yes
+         ])
+         AC_MSG_RESULT($video_opengl_egl)
++
++        CFLAGS="$save_CFLAGS"
++
+         if test x$video_opengl_egl = xyes; then
+             AC_DEFINE(SDL_VIDEO_OPENGL_EGL, 1, [ ])
+         fi
diff --git a/patches/SDL2-2.0.8/0002-sdl-2.0.8-KMSDRM-find-available-card-if-called-witho.patch b/patches/SDL2-2.0.8/0002-sdl-2.0.8-KMSDRM-find-available-card-if-called-witho.patch
new file mode 100644
index 000000000..e889f87ae
--- /dev/null
+++ b/patches/SDL2-2.0.8/0002-sdl-2.0.8-KMSDRM-find-available-card-if-called-witho.patch
@@ -0,0 +1,129 @@
+From 212c7c68ec228a1058f39497d18c65e9312d00df Mon Sep 17 00:00:00 2001
+From: Michael Grzeschik <m.grzeschik@pengutronix.de>
+Date: Thu, 12 Jul 2018 13:48:54 +0200
+Subject: [PATCH] sdl-2.0.8: KMSDRM: find available card if called without
+ index
+
+Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
+---
+ src/video/kmsdrm/SDL_kmsdrmvideo.c | 84 ++++++++++++++++++++++++++++--
+ 1 file changed, 80 insertions(+), 4 deletions(-)
+
+diff --git a/src/video/kmsdrm/SDL_kmsdrmvideo.c b/src/video/kmsdrm/SDL_kmsdrmvideo.c
+index 7855eeddb..f63c91b0a 100644
+--- a/src/video/kmsdrm/SDL_kmsdrmvideo.c
++++ b/src/video/kmsdrm/SDL_kmsdrmvideo.c
+@@ -41,15 +41,22 @@
+ #include "SDL_kmsdrmopengles.h"
+ #include "SDL_kmsdrmmouse.h"
+ #include "SDL_kmsdrmdyn.h"
++#include <sys/stat.h>
++#include <dirent.h>
++#include <errno.h>
+ 
+-#define KMSDRM_DRI_CARD_0 "/dev/dri/card0"
++#define KMSDRM_DRI_PATH "/dev/dri/"
+ 
+ static int
+-KMSDRM_Available(void)
++check_modestting(int devindex)
+ {
+     int available = 0;
++    char device[512];
++    int drm_fd;
++
++    sprintf(device, "%scard%d", KMSDRM_DRI_PATH, devindex);
+ 
+-    int drm_fd = open(KMSDRM_DRI_CARD_0, O_RDWR | O_CLOEXEC);
++    drm_fd = open(device, O_RDWR | O_CLOEXEC);
+     if (drm_fd >= 0) {
+         if (SDL_KMSDRM_LoadSymbols()) {
+             drmModeRes *resources = KMSDRM_drmModeGetResources(drm_fd);
+@@ -65,6 +72,72 @@ KMSDRM_Available(void)
+     return available;
+ }
+ 
++static int get_dricount(void)
++{
++    int devcount = 0;
++    struct dirent *res;
++    struct stat sb;
++    DIR *folder;
++
++    if (!(stat(KMSDRM_DRI_PATH, &sb) == 0
++                && S_ISDIR(sb.st_mode))) {
++        printf("The path %s cannot be opened or is not available\n",
++               KMSDRM_DRI_PATH);
++        return 0;
++    }
++
++    if (access(KMSDRM_DRI_PATH, F_OK) == -1) {
++        printf("The path %s cannot be opened\n",
++               KMSDRM_DRI_PATH);
++        return 0;
++    }
++
++    folder = opendir(KMSDRM_DRI_PATH);
++    if (!folder)
++        return 0;
++
++    while ((res = readdir(folder))) {
++        if (res->d_type == DT_CHR)
++            devcount++;
++    }
++
++    closedir(folder);
++
++    return devcount;
++}
++
++static int
++get_driindex(void)
++{
++    int i = 0;
++    int available = 0;
++    int devcount = get_dricount();
++
++    for (i = 0; i < devcount; i++) {
++        if (check_modestting(i)) {
++            available = 1;
++            break;
++        }
++    }
++
++    if (available)
++        return i;
++
++    return -ENOENT;
++}
++
++static int
++KMSDRM_Available(void)
++{
++    int ret = -ENOENT;
++
++    ret = get_driindex();
++    if (ret >= 0)
++        return 1;
++
++    return ret;
++}
++
+ static void
+ KMSDRM_Destroy(SDL_VideoDevice * device)
+ {
+@@ -83,7 +156,10 @@ KMSDRM_Create(int devindex)
+     SDL_VideoDevice *device;
+     SDL_VideoData *vdata;
+ 
+-    if (devindex < 0 || devindex > 99) {
++    if (!devindex || devindex > 99)
++        devindex = get_driindex();
++
++    if (devindex < 0) {
+         SDL_SetError("devindex (%d) must be between 0 and 99.\n", devindex);
+         return NULL;
+     }
+-- 
+2.18.0
+
diff --git a/patches/SDL2-2.0.8/autogen.sh b/patches/SDL2-2.0.8/autogen.sh
new file mode 100755
index 000000000..a430a4eb7
--- /dev/null
+++ b/patches/SDL2-2.0.8/autogen.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+./autogen.sh
diff --git a/patches/SDL2-2.0.8/series b/patches/SDL2-2.0.8/series
new file mode 100644
index 000000000..e4e931f38
--- /dev/null
+++ b/patches/SDL2-2.0.8/series
@@ -0,0 +1,5 @@
+# generated by git-ptx-patches
+#tag:base --start-number 1
+0001-sdl-2.0.8-add-egl-cflags-to-test.patch
+0002-sdl-2.0.8-KMSDRM-find-available-card-if-called-witho.patch
+# b803bb470cfcfd4d04f208304b9fd212  - git-ptx-patches magic
diff --git a/rules/sdl2.in b/rules/sdl2.in
new file mode 100644
index 000000000..0f20181a2
--- /dev/null
+++ b/rules/sdl2.in
@@ -0,0 +1,153 @@
+## SECTION=multimedia_sdl
+
+menuconfig SDL2
+	tristate
+	prompt "SDL2                          "
+	select LIBC_M
+	select LIBC_DL
+	select LIBC_PTHREAD
+	select GCCLIBS_GCC_S
+	select LIBUNWIND
+	select CROSS_NASM		if SDL2_VIDEO
+	select ALSA_LIB			if SDL2_ALSA
+	sleect XORG_PROTO		if SDL2_XORG
+	select XORG_LIB_X11		if SDL2_XORG
+	select XORG_LIB_XXF86VM		if SDL2_XORG
+	select XORG_LIB_XRANDR		if SDL2_XORG
+	select XORG_LIB_XCURSOR		if SDL2_XORG
+	select XORG_LIB_XI		if SDL2_XORG
+	select TSLIB			if SDL2_TSLIB
+	select DBUS			if SDL2_DBUS
+	select LIBDRM			if SDL2_WAYLAND
+	select MESALIB_GLX		if SDL2_OPENGL
+	select MESALIB_GLES1		if SDL2_OPENGLES1
+	select MESALIB_GLES2		if SDL2_OPENGLES2
+	select MESALIB_EGL_DRM		if SDL2_KMS
+	select MESALIB			if SDL2_WAYLAND || SDL2_OPENGL
+	select MESALIB_GBM		if SDL2_WAYLAND
+	select MESALIB_EGL_WAYLAND	if SDL2_WAYLAND
+	select LIBXKBCOMMON		if SDL2_WAYLAND
+	select UDEV			if SDL2_UDEV
+	select UDEV_LIBUDEV		if SDL2_UDEV
+	select PULSEAUDIO		if SDL2_PULSEAUDIO
+	select WAYLAND_PROTOCOLS	if SDL2_WAYLAND
+	help
+	  Simple DirectMedia Layer is a cross-platform multimedia
+	  library designed to provide low level access to audio,
+	  keyboard, mouse, joystick, 3D hardware via OpenGL, and
+	  2D video framebuffer.
+
+if SDL2
+
+menuconfig SDL2_AUDIO
+	bool
+	prompt "SDL2 Audio Support             "
+	default y
+	help
+	  Turn on to enable audio support in libsdl2
+
+if SDL2_AUDIO
+
+config SDL2_OSS
+	bool
+	prompt "SDL2 OSS Support"
+	help
+	  Open Sound System (OSS) is the first attempt in
+	  unifying the digital audio architecture for UNIX.
+	  OSS is a set of device drivers that provide a
+	  uniform API across all the major UNIX architectures.
+
+config SDL2_ALSA
+	bool
+	prompt "SDL2 ALSA Support"
+	default y
+	help
+	  The Advanced Linux Sound Architecture (ALSA)
+	  provides audio and MIDI functionality to the
+	  Linux operating system.
+
+config SDL2_PULSEAUDIO
+	bool
+	prompt "SDL2 Pulseaudio Support"
+	default y
+	help
+	  PulseAudio is a sound system for POSIX OSes, meaning that it
+	  is a proxy for your sound applications.
+
+endif
+
+menuconfig SDL2_VIDEO
+	bool
+	prompt "SDL2 Video Support             "
+	default y
+	help
+	  Turn on to enable video support in libsdl2
+
+if SDL2_VIDEO
+
+config SDL2_KMS
+	bool
+	prompt "KMS Support"
+	help
+	  kms video support
+
+config SDL2_XORG
+	bool
+	prompt "Xorg Support"
+	help
+	  X.Org provides an open source implementation of the
+	  X Window System.
+
+config SDL2_WAYLAND
+	bool
+	prompt "Wayland Support"
+	help
+	  Wayland Window System.
+
+config SDL2_OPENGL
+	bool
+	prompt "OpenGL Support"
+	depends on SDL2_XORG
+	help
+	  OpenGL is a multi-platform software interface to
+	  graphics hardware, supporting rendering and imaging
+	  operations.
+
+config SDL2_OPENGLES
+	bool
+	default SDL2_OPENGLES1 || SDL2_OPENGLES2
+
+config SDL2_OPENGLES1
+	bool
+	prompt "OpenGLES1 Support"
+	help
+	  OpenGL ES1 graphics support
+
+config SDL2_OPENGLES2
+	bool
+	prompt "OpenGLES2 Support"
+	help
+	  OpenGL ES2 graphics support
+
+endif
+
+config SDL2_TSLIB
+	bool
+	prompt "tslib Support"
+	help
+	  Turn on support for the touchscreen library 'tslib'
+
+config SDL2_UDEV
+	bool
+	prompt "udev Support"
+	help
+	  Turn on support for the udev library
+
+config SDL2_DBUS
+	bool
+	prompt "dbus Support"
+
+	help
+	  Turn on support for the dbus library
+
+endif
diff --git a/rules/sdl2.make b/rules/sdl2.make
new file mode 100644
index 000000000..43c8e5e0b
--- /dev/null
+++ b/rules/sdl2.make
@@ -0,0 +1,153 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2018 by Sergey Zhuravlevich
+#
+# 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) += sdl2
+
+#
+# Paths and names
+#
+SDL2_VERSION	:= 2.0.8
+SDL2_MD5		:= 3800d705cef742c6a634f202c37f263f
+SDL2		:= SDL2-$(SDL2_VERSION)
+SDL2_SUFFIX	:= tar.gz
+SDL2_URL		:= https://www.libsdl.org/release/$(SDL2).$(SDL2_SUFFIX)
+SDL2_SOURCE	:= $(SRCDIR)/$(SDL2).$(SDL2_SUFFIX)
+SDL2_DIR		:= $(BUILDDIR)/$(SDL2)
+SDL2_LICENSE	:= zlib
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+#
+# autoconf
+#
+SDL2_CONF_TOOL	:= autoconf
+SDL2_CONF_OPT	:= \
+	$(CROSS_AUTOCONF_USR) \
+	--enable-shared \
+	--disable-static \
+	--enable-libtool-lock \
+	--enable-assertions=auto \
+	--enable-dependency-tracking \
+	--enable-libc \
+	--enable-gcc-atomics \
+	--enable-atomic \
+	--$(call ptx/endis,PTXCONF_SDL2_AUDIO)-audio \
+	--$(call ptx/endis,PTXCONF_SDL2_VIDEO)-video \
+	--enable-render \
+	--enable-events \
+	--enable-joystick \
+	--enable-haptic \
+	--disable-power \
+	--disable-filesystem \
+	--enable-threads \
+	--enable-timers \
+	--enable-file \
+	--enable-loadso \
+	--enable-cpuinfo \
+	--enable-assembly \
+	--disable-ssemath \
+	--disable-mmx \
+	--disable-3dnow \
+	--disable-sse \
+	--disable-sse2 \
+	--disable-sse3 \
+	--disable-jack \
+	--disable-jack-shared \
+	--disable-sndio \
+	--disable-sndio-shared \
+	--disable-fusionsound \
+	--disable-fusionsound-shared \
+	--$(call ptx/endis,PTXCONF_SDL2_OSS)-oss \
+	--$(call ptx/endis,PTXCONF_SDL2_ALSA)-alsa \
+	--disable-alsatest \
+	--disable-alsa-shared \
+	--disable-esd \
+	--disable-esdtest \
+	--disable-esd-shared \
+	--$(call ptx/endis,PTXCONF_SDL2_PULSEAUDIO)-pulseaudio \
+	--$(call ptx/endis,PTXCONF_SDL2_PULSEAUDIO)-pulseaudio-shared \
+	--disable-arts \
+	--disable-arts-shared \
+	--disable-nas \
+	--disable-nas-shared \
+	--disable-diskaudio \
+	--disable-dummyaudio \
+	--disable-libsamplerate \
+	--disable-libsamplerate-shared \
+	--$(call ptx/endis,PTXCONF_SDL2_WAYLAND)-video-wayland \
+	--disable-video-wayland-qt-touch \
+	--$(call ptx/endis,PTXCONF_SDL2_WAYLAND)-wayland-shared \
+	--disable-video-mir \
+	--disable-mir-shared \
+	--disable-video-rpi \
+	--disable-altivec \
+	--$(call ptx/endis,PTXCONF_SDL2_XORG)-video-x11 \
+	--disable-x11-shared \
+	--$(call ptx/endis,PTXCONF_SDL2_XORG)-video-x11-vm \
+	--disable-video-vivante \
+	--disable-video-x11-xinerama \
+	--$(call ptx/endis,PTXCONF_SDL2_XORG)-video-x11-xrandr \
+	--$(call ptx/endis,PTXCONF_SDL2_XORG)-video-x11-xcursor \
+	--disable-video-x11-xdbe \
+	--$(call ptx/endis,PTXCONF_SDL2_XORG)-video-x11-xinput \
+	--disable-video-x11-scrnsaver \
+	--disable-video-x11-xshape \
+	--disable-video-cocoa \
+	--disable-render-metal \
+	--disable-video-directfb \
+	--disable-directfb-shared \
+	--$(call ptx/endis,PTXCONF_SDL2_KMS)-video-kmsdrm \
+	--$(call ptx/endis,PTXCONF_SDL2_KMS)-kmsdrm-shared \
+	--enable-video-dummy \
+	--$(call ptx/endis,PTXCONF_SDL2_OPENGL)-video-opengl \
+	--$(call ptx/endis,PTXCONF_SDL2_OPENGLES)-video-opengles \
+	--$(call ptx/endis,PTXCONF_SDL2_OPENGLES1)-video-opengles1 \
+	--$(call ptx/endis,PTXCONF_SDL2_OPENGLES2)-video-opengles2 \
+	--disable-video-vulkan \
+	--$(call ptx/endis,PTXCONF_SDL2_UDEV)-libudev \
+	--$(call ptx/endis,PTXCONF_SDL2_DBUS)-dbus \
+	--disable-ime \
+	--disable-ibus \
+	--disable-fcitx \
+	--$(call ptx/endis,PTXCONF_SDL2_TSLIB)-input-tslib \
+	--enable-pthreads \
+	--enable-pthread-sem \
+	--disable-directx \
+	--enable-sdl-dlopen \
+	--enable-clock_gettime \
+	--disable-rpath \
+	--disable-render-d3d \
+	--$(call ptx/wwo,PTXCONF_SDL2_XORG)-x
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/sdl2.targetinstall:
+	@$(call targetinfo)
+
+	@$(call install_init, sdl2)
+	@$(call install_fixup, sdl2,PRIORITY,optional)
+	@$(call install_fixup, sdl2,SECTION,base)
+	@$(call install_fixup, sdl2,AUTHOR,"Sergey Zhuravlevich <zhurxx@gmail.com>")
+	@$(call install_fixup, sdl2,DESCRIPTION,missing)
+
+	@$(call install_lib, sdl2, 0, 0, 0644, libSDL2-2.0)
+
+	@$(call install_finish, sdl2)
+
+	@$(call touch)
+
+# vim: syntax=make
-- 
2.18.0


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

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

* [ptxdist] [PATCH v5 2/6] sdl2-image: add new package
  2018-07-26 17:39 [ptxdist] [PATCH v5 0/6] sdl2: add support for new packages Michael Grzeschik
  2018-07-26 17:39 ` [ptxdist] [PATCH v5 1/6] sdl2: add new package Michael Grzeschik
@ 2018-07-26 17:39 ` Michael Grzeschik
  2018-07-26 17:39 ` [ptxdist] [PATCH v5 3/6] sdl2-net: " Michael Grzeschik
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 8+ messages in thread
From: Michael Grzeschik @ 2018-07-26 17:39 UTC (permalink / raw)
  To: ptxdist

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

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

* [ptxdist] [PATCH v5 3/6] sdl2-net: add new package
  2018-07-26 17:39 [ptxdist] [PATCH v5 0/6] sdl2: add support for new packages Michael Grzeschik
  2018-07-26 17:39 ` [ptxdist] [PATCH v5 1/6] sdl2: add new package Michael Grzeschik
  2018-07-26 17:39 ` [ptxdist] [PATCH v5 2/6] sdl2-image: " Michael Grzeschik
@ 2018-07-26 17:39 ` Michael Grzeschik
  2018-07-26 17:39 ` [ptxdist] [PATCH v5 4/6] sdl2-ttf: " Michael Grzeschik
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 8+ messages in thread
From: Michael Grzeschik @ 2018-07-26 17:39 UTC (permalink / raw)
  To: ptxdist

Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
---
v1 -> v2: - removed extra padding spaces from prompt
          - removed extra space on _LDFLAGS
          - added missing license to zlib
v2 -> v3: - nothing changed
v3 -> v4: - nothing changed
v4 -> v5: - nothing changed

 rules/sdl2-net.in   | 10 ++++++++
 rules/sdl2-net.make | 58 +++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 68 insertions(+)
 create mode 100644 rules/sdl2-net.in
 create mode 100644 rules/sdl2-net.make

diff --git a/rules/sdl2-net.in b/rules/sdl2-net.in
new file mode 100644
index 000000000..22581045a
--- /dev/null
+++ b/rules/sdl2-net.in
@@ -0,0 +1,10 @@
+## SECTION=multimedia_sdl
+
+config SDL2_NET
+	tristate
+	select SDL2
+	prompt "SDL2 net"
+	help
+	  This is a small sample cross-platform networking library, with
+	  a sample chat client and server application. The chat client
+	  uses the GUIlib GUI framework library.
diff --git a/rules/sdl2-net.make b/rules/sdl2-net.make
new file mode 100644
index 000000000..f799b459b
--- /dev/null
+++ b/rules/sdl2-net.make
@@ -0,0 +1,58 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2018 by Michael Grzeschik <mgr@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_SDL2_NET) += sdl2-net
+
+#
+# Paths and names
+#
+SDL2_NET_VERSION	:= 2.0.1
+SDL2_NET_MD5		:= 5c1d9d1cfa63301b141cb5c0de2ea7c4
+SDL2_NET		:= SDL2_net-$(SDL2_NET_VERSION)
+SDL2_NET_SUFFIX	:= tar.gz
+SDL2_NET_URL		:= https://www.libsdl.org/projects/SDL_net/release/$(SDL2_NET).$(SDL2_NET_SUFFIX)
+SDL2_NET_SOURCE	:= $(SRCDIR)/$(SDL2_NET).$(SDL2_NET_SUFFIX)
+SDL2_NET_DIR		:= $(BUILDDIR)/$(SDL2_NET)
+SDL2_NET_LICENSE	:= zlib
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+SDL2_NET_CONF_TOOL	:= autoconf
+
+ifdef PTXCONF_SDL2_PULSEAUDIO
+SDL2_NET_LDFLAGS	:= \
+	-Wl,-rpath-link,$(SYSROOT)/usr/lib/pulseaudio
+endif
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/sdl2-net.targetinstall:
+	@$(call targetinfo)
+
+	@$(call install_init, sdl2-net)
+	@$(call install_fixup, sdl2-net,PRIORITY,optional)
+	@$(call install_fixup, sdl2-net,SECTION,base)
+	@$(call install_fixup, sdl2-net,AUTHOR,"Michael Grzeschik <mgr@pengutronix.de>")
+	@$(call install_fixup, sdl2-net,DESCRIPTION,missing)
+
+	@$(call install_lib, sdl2-net, 0, 0, 0644, libSDL2_net-2.0)
+
+	@$(call install_finish, sdl2-net)
+
+	@$(call touch)
+
+# vim: syntax=make
-- 
2.18.0


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

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

* [ptxdist] [PATCH v5 4/6] sdl2-ttf: add new package
  2018-07-26 17:39 [ptxdist] [PATCH v5 0/6] sdl2: add support for new packages Michael Grzeschik
                   ` (2 preceding siblings ...)
  2018-07-26 17:39 ` [ptxdist] [PATCH v5 3/6] sdl2-net: " Michael Grzeschik
@ 2018-07-26 17:39 ` Michael Grzeschik
  2018-07-26 17:39 ` [ptxdist] [PATCH v5 5/6] sdl2-mixer: " Michael Grzeschik
  2018-07-26 17:39 ` [ptxdist] [PATCH v5 6/6] sdl2-test: " Michael Grzeschik
  5 siblings, 0 replies; 8+ messages in thread
From: Michael Grzeschik @ 2018-07-26 17:39 UTC (permalink / raw)
  To: ptxdist

Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
---
v1 -> v2: - removed extra padding spaces from prompt
          - removed extra space on _LDFLAGS
          - added missing license to zlib
          - added a patch to select opengl dependency
v2 -> v3: - nothing changed
v3 -> v4: - nothing changed
v4 -> v5: - removed hunk from sdl2-test
          - reworked the opengl enable patch on configure.in
	  - added autogen.sh

 ...igure-make-opengl-support-switchable.patch | 34 +++++++++++
 patches/SDL2_ttf-2.0.14/autogen.sh            |  3 +
 patches/SDL2_ttf-2.0.14/series                |  4 ++
 rules/sdl2-ttf.in                             | 12 ++++
 rules/sdl2-ttf.make                           | 61 +++++++++++++++++++
 5 files changed, 114 insertions(+)
 create mode 100644 patches/SDL2_ttf-2.0.14/0001-configure-make-opengl-support-switchable.patch
 create mode 100755 patches/SDL2_ttf-2.0.14/autogen.sh
 create mode 100644 patches/SDL2_ttf-2.0.14/series
 create mode 100644 rules/sdl2-ttf.in
 create mode 100644 rules/sdl2-ttf.make

diff --git a/patches/SDL2_ttf-2.0.14/0001-configure-make-opengl-support-switchable.patch b/patches/SDL2_ttf-2.0.14/0001-configure-make-opengl-support-switchable.patch
new file mode 100644
index 000000000..e57fffcc0
--- /dev/null
+++ b/patches/SDL2_ttf-2.0.14/0001-configure-make-opengl-support-switchable.patch
@@ -0,0 +1,34 @@
+From: Michael Grzeschik <m.grzeschik@pengutronix.de>
+Date: Fri, 13 Jul 2018 12:24:59 +0200
+Subject: [PATCH] configure: make opengl support switchable
+
+Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
+---
+ configure.in | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/configure.in b/configure.in
+index 9b36e15cfd4d..972dadf80bd2 100644
+--- a/configure.in
++++ b/configure.in
+@@ -130,6 +130,12 @@ AM_PATH_SDL2($SDL_VERSION,
+ CFLAGS="$CFLAGS $SDL_CFLAGS"
+ LIBS="$LIBS $SDL_LIBS"
+ 
++dnl Check to see if OpenGL support is desired
++AC_ARG_ENABLE(opengl,
++AC_HELP_STRING([--enable-opengl], [include OpenGL support [[default=yes]]]),
++              , enable_opengl=yes)
++
++if test x$enable_opengl = xyes; then
+ dnl Check for OpenGL
+ case "$host" in
+     *-*-cygwin* | *-*-mingw32*)
+@@ -179,6 +185,7 @@ else
+     GL_LIBS=""
+ fi
+ AC_SUBST([GL_LIBS])
++fi
+ AC_SUBST([MATHLIB])
+ AC_SUBST([WINDRES])
+ 
diff --git a/patches/SDL2_ttf-2.0.14/autogen.sh b/patches/SDL2_ttf-2.0.14/autogen.sh
new file mode 100755
index 000000000..a430a4eb7
--- /dev/null
+++ b/patches/SDL2_ttf-2.0.14/autogen.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+./autogen.sh
diff --git a/patches/SDL2_ttf-2.0.14/series b/patches/SDL2_ttf-2.0.14/series
new file mode 100644
index 000000000..89c7959a2
--- /dev/null
+++ b/patches/SDL2_ttf-2.0.14/series
@@ -0,0 +1,4 @@
+# generated by git-ptx-patches
+#tag:base --start-number 1
+0001-configure-make-opengl-support-switchable.patch
+# 61c28fd8bd7358c69acd4d51c712869b  - git-ptx-patches magic
diff --git a/rules/sdl2-ttf.in b/rules/sdl2-ttf.in
new file mode 100644
index 000000000..a14676933
--- /dev/null
+++ b/rules/sdl2-ttf.in
@@ -0,0 +1,12 @@
+## SECTION=multimedia_sdl
+
+config SDL2_TTF
+	tristate
+	select SDL2
+	select FREETYPE
+	prompt "SDL2 ttf"
+	help
+	  This is a sample library which allows you to use TrueType
+	  fonts in your SDL applications. It comes with an example
+	  program "showfont" which displays an example string for a
+	  given TrueType font file.
diff --git a/rules/sdl2-ttf.make b/rules/sdl2-ttf.make
new file mode 100644
index 000000000..6224fbde4
--- /dev/null
+++ b/rules/sdl2-ttf.make
@@ -0,0 +1,61 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2018 by Michael Grzeschik <mgr@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_SDL2_TTF) += sdl2-ttf
+
+#
+# Paths and names
+#
+SDL2_TTF_VERSION	:= 2.0.14
+SDL2_TTF_MD5		:= e53c05e1e7f1382c316afd6c763388b1
+SDL2_TTF		:= SDL2_ttf-$(SDL2_TTF_VERSION)
+SDL2_TTF_SUFFIX	:= tar.gz
+SDL2_TTF_URL		:= https://www.libsdl.org/projects/SDL_ttf/release/$(SDL2_TTF).$(SDL2_TTF_SUFFIX)
+SDL2_TTF_SOURCE	:= $(SRCDIR)/$(SDL2_TTF).$(SDL2_TTF_SUFFIX)
+SDL2_TTF_DIR		:= $(BUILDDIR)/$(SDL2_TTF)
+SDL2_TTF_LICENSE	:= unknown
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+SDL2_TTF_CONF_TOOL	:= autoconf
+SDL2_TTF_CONF_OPT	:= \
+	$(CROSS_AUTOCONF_USR) \
+	--$(call ptx/endis,PTXCONF_SDL2_OPENGL)-opengl
+
+ifdef PTXCONF_SDL2_PULSEAUDIO
+SDL2_TTF_LDFLAGS	:= \
+	-Wl,-rpath-link,$(SYSROOT)/usr/lib/pulseaudio
+endif
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/sdl2-ttf.targetinstall:
+	@$(call targetinfo)
+
+	@$(call install_init, sdl2-ttf)
+	@$(call install_fixup, sdl2-ttf,PRIORITY,optional)
+	@$(call install_fixup, sdl2-ttf,SECTION,base)
+	@$(call install_fixup, sdl2-ttf,AUTHOR,"Michael Grzeschik <mgr@pengutronix.de>")
+	@$(call install_fixup, sdl2-ttf,DESCRIPTION,missing)
+
+	@$(call install_lib, sdl2-ttf, 0, 0, 0644, libSDL2_ttf-2.0)
+
+	@$(call install_finish, sdl2-ttf)
+
+	@$(call touch)
+
+# vim: syntax=make
-- 
2.18.0


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

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

* [ptxdist] [PATCH v5 5/6] sdl2-mixer: add new package
  2018-07-26 17:39 [ptxdist] [PATCH v5 0/6] sdl2: add support for new packages Michael Grzeschik
                   ` (3 preceding siblings ...)
  2018-07-26 17:39 ` [ptxdist] [PATCH v5 4/6] sdl2-ttf: " Michael Grzeschik
@ 2018-07-26 17:39 ` Michael Grzeschik
  2018-07-26 17:39 ` [ptxdist] [PATCH v5 6/6] sdl2-test: " Michael Grzeschik
  5 siblings, 0 replies; 8+ messages in thread
From: Michael Grzeschik @ 2018-07-26 17:39 UTC (permalink / raw)
  To: ptxdist

Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
---
v1 -> v2: - removed extra padding spaces from prompt
          - removed extra space on _LDFLAGS
          - added missing license to zlib
v2 -> v3: - nothing changed
v3 -> v4: - nothing changed
v4 -> v5: - nothing changed

 rules/sdl2-mixer.in   | 11 ++++++++
 rules/sdl2-mixer.make | 58 +++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 69 insertions(+)
 create mode 100644 rules/sdl2-mixer.in
 create mode 100644 rules/sdl2-mixer.make

diff --git a/rules/sdl2-mixer.in b/rules/sdl2-mixer.in
new file mode 100644
index 000000000..dd45b8d50
--- /dev/null
+++ b/rules/sdl2-mixer.in
@@ -0,0 +1,11 @@
+## SECTION=multimedia_sdl
+
+config SDL2_MIXER
+	tristate
+	select SDL2
+	prompt "SDL2 mixer"
+	help
+          SDL_mixer is a sample multi-channel audio mixer library. It supports any
+          number of simultaneously playing channels of 16 bit stereo audio, plus a
+          single channel of music, in FLAC, Ogg Vorbis, MP3, MOD, and MIDI
+          formats.
diff --git a/rules/sdl2-mixer.make b/rules/sdl2-mixer.make
new file mode 100644
index 000000000..9ca304865
--- /dev/null
+++ b/rules/sdl2-mixer.make
@@ -0,0 +1,58 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2018 by Michael Grzeschik <mgr@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_SDL2_MIXER) += sdl2-mixer
+
+#
+# Paths and names
+#
+SDL2_MIXER_VERSION	:= 2.0.2
+SDL2_MIXER_MD5		:= aaa0551393993c14a13f72b339c0ed6c
+SDL2_MIXER		:= SDL2_mixer-$(SDL2_MIXER_VERSION)
+SDL2_MIXER_SUFFIX	:= tar.gz
+SDL2_MIXER_URL		:= https://www.libsdl.org/projects/SDL_mixer/release/$(SDL2_MIXER).$(SDL2_MIXER_SUFFIX)
+SDL2_MIXER_SOURCE	:= $(SRCDIR)/$(SDL2_MIXER).$(SDL2_MIXER_SUFFIX)
+SDL2_MIXER_DIR		:= $(BUILDDIR)/$(SDL2_MIXER)
+SDL2_MIXER_LICENSE	:= zlib
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+SDL2_MIXER_CONF_TOOL	:= autoconf
+
+ifdef PTXCONF_SDL2_PULSEAUDIO
+SDL2_MIXER_LDFLAGS	:= \
+	-Wl,-rpath-link,$(SYSROOT)/usr/lib/pulseaudio
+endif
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/sdl2-mixer.targetinstall:
+	@$(call targetinfo)
+
+	@$(call install_init, sdl2-mixer)
+	@$(call install_fixup, sdl2-mixer,PRIORITY,optional)
+	@$(call install_fixup, sdl2-mixer,SECTION,base)
+	@$(call install_fixup, sdl2-mixer,AUTHOR,"Michael Grzeschik <mgr@pengutronix.de>")
+	@$(call install_fixup, sdl2-mixer,DESCRIPTION,missing)
+
+	@$(call install_lib, sdl2-mixer, 0, 0, 0644, libSDL2_mixer-2.0)
+
+	@$(call install_finish, sdl2-mixer)
+
+	@$(call touch)
+
+# vim: syntax=make
-- 
2.18.0


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

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

* [ptxdist] [PATCH v5 6/6] sdl2-test: add new package
  2018-07-26 17:39 [ptxdist] [PATCH v5 0/6] sdl2: add support for new packages Michael Grzeschik
                   ` (4 preceding siblings ...)
  2018-07-26 17:39 ` [ptxdist] [PATCH v5 5/6] sdl2-mixer: " Michael Grzeschik
@ 2018-07-26 17:39 ` Michael Grzeschik
  5 siblings, 0 replies; 8+ messages in thread
From: Michael Grzeschik @ 2018-07-26 17:39 UTC (permalink / raw)
  To: ptxdist

Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
---
v1 -> v2: - added a patch to select opengl dependency
          - removed extra space on _LDFLAGS
          - replaced customloops with foreach
v2 -> v3: - nothing changed
v3 -> v4: - added missing application files (dat, txt) to SDL2_TEST_DATA
          - removed sdl2- fileprefix and moved them to subdir sdl2tests
v4 -> v5: - moved this patch behind the others
          - added dependecy to sdl2-ttfa
	  - reworked the opengl enable patch on configure.in
	  - added autogen.sh

 ...001-sdl-2.0.8-tests-configure-opengl.patch |  44 +++++
 patches/SDL2_test-2.0.8/autogen.sh            |   4 +
 patches/SDL2_test-2.0.8/series                |   4 +
 rules/sdl2-test.in                            |  12 ++
 rules/sdl2-test.make                          | 173 ++++++++++++++++++
 5 files changed, 237 insertions(+)
 create mode 100644 patches/SDL2_test-2.0.8/0001-sdl-2.0.8-tests-configure-opengl.patch
 create mode 100755 patches/SDL2_test-2.0.8/autogen.sh
 create mode 100644 patches/SDL2_test-2.0.8/series
 create mode 100644 rules/sdl2-test.in
 create mode 100644 rules/sdl2-test.make

diff --git a/patches/SDL2_test-2.0.8/0001-sdl-2.0.8-tests-configure-opengl.patch b/patches/SDL2_test-2.0.8/0001-sdl-2.0.8-tests-configure-opengl.patch
new file mode 100644
index 000000000..8be0b1a89
--- /dev/null
+++ b/patches/SDL2_test-2.0.8/0001-sdl-2.0.8-tests-configure-opengl.patch
@@ -0,0 +1,44 @@
+From: Jaret Cantu <jaret.cantu@timesys.com>
+Date: Tue, 16 Jan 2018 12:16:16 -0500
+Subject: [PATCH] sdl-2.0.8: tests: configure opengl
+
+    Allow OpenGL to be configured manually
+
+    The autodetection uses the presence of a header file which
+    SDL2 always installs, regardless of whether or not OpenGL was
+    enabled.  This causes the SDL2 tests to use OpenGL when SDL2
+    itself was not configured for it.
+
+    Configure certain tests not to build, depending on the
+    configuration.  Tests which require OpenGL development files
+    will fail when no OpenGL is detected (which should be obvious,
+    but it apparently wasn't for whoever designed this).
+---
+ test/configure.in | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/test/configure.in b/test/configure.in
+index fd3f3022bc2e..8ae15159b8f8 100644
+--- a/test/configure.in
++++ b/test/configure.in
+@@ -115,6 +115,12 @@ if test x$have_x = xyes; then
+     fi
+ fi
+ 
++dnl Check to see if OpenGL support is desired
++AC_ARG_ENABLE(opengl,
++AC_HELP_STRING([--enable-opengl], [include OpenGL support [[default=yes]]]),
++              , enable_opengl=yes)
++
++if test x$enable_opengl = xyes; then
+ dnl Check for OpenGL
+ AC_MSG_CHECKING(for OpenGL support)
+ have_opengl=no
+@@ -125,6 +131,7 @@ AC_TRY_COMPILE([
+ have_opengl=yes
+ ])
+ AC_MSG_RESULT($have_opengl)
++fi
+ 
+ dnl Check for OpenGL ES
+ AC_MSG_CHECKING(for OpenGL ES support)
diff --git a/patches/SDL2_test-2.0.8/autogen.sh b/patches/SDL2_test-2.0.8/autogen.sh
new file mode 100755
index 000000000..1e5af6e71
--- /dev/null
+++ b/patches/SDL2_test-2.0.8/autogen.sh
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+./autogen.sh
+
diff --git a/patches/SDL2_test-2.0.8/series b/patches/SDL2_test-2.0.8/series
new file mode 100644
index 000000000..7064d2850
--- /dev/null
+++ b/patches/SDL2_test-2.0.8/series
@@ -0,0 +1,4 @@
+# generated by git-ptx-patches
+#tag:base --start-number 1
+0001-sdl-2.0.8-tests-configure-opengl.patch
+# c71c8697191f98668c86bc2215feebce  - git-ptx-patches magic
diff --git a/rules/sdl2-test.in b/rules/sdl2-test.in
new file mode 100644
index 000000000..ba1e84a44
--- /dev/null
+++ b/rules/sdl2-test.in
@@ -0,0 +1,12 @@
+## SECTION=multimedia_sdl
+
+config SDL2_TEST
+	tristate
+	prompt "SDL2 test"
+	select SDL2
+	select SDL2_TTF
+	help
+	  Simple DirectMedia Layer is a cross-platform multimedia
+	  library designed to provide low level access to audio,
+	  keyboard, mouse, joystick, 3D hardware via OpenGL, and
+	  2D video framebuffer.
diff --git a/rules/sdl2-test.make b/rules/sdl2-test.make
new file mode 100644
index 000000000..0b8dd3d5e
--- /dev/null
+++ b/rules/sdl2-test.make
@@ -0,0 +1,173 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2018 by Michael Grzeschik
+#
+# 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_TEST) += sdl2-test
+
+#
+# Paths and names
+#
+SDL2_TEST_VERSION	= $(SDL2_VERSION)
+SDL2_TEST_MD5		= $(SDL2_MD5)
+SDL2_TEST		= SDL2_test-$(SDL2_VERSION)
+SDL2_TEST_SUFFIX	= $(SDL2_SUFFIX)
+SDL2_TEST_URL		= $(SDL2_URL)
+SDL2_TEST_SOURCE	= $(SDL2_SOURCE)
+SDL2_TEST_DIR		= $(BUILDDIR)/$(SDL2_TEST)
+SDL2_TEST_SUBDIR	:= test
+SDL2_TESTS_LICENSE	:= zlib
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+SDL2_TEST_ENV		:= \
+	$(CROSS_ENV) \
+	SDL_LIBS="-lSDL2 -lunwind -lunwind-generic"
+
+#
+# autoconf
+#
+SDL2_TEST_CONF_TOOL	:= autoconf
+SDL2_TEST_CONF_OPT	:= \
+	$(CROSS_AUTOCONF_USR) \
+	--$(call ptx/endis,PTXCONF_SDL2_OPENGL)-opengl
+
+ifdef PTXCONF_SDL2_PULSEAUDIO
+SDL2_TEST_LDFLAGS	:= \
+	-Wl,-rpath-link,$(SYSROOT)/usr/lib/pulseaudio
+endif
+
+# ----------------------------------------------------------------------------
+# Install
+# ----------------------------------------------------------------------------
+
+SDL2_TEST_TOOLS := \
+	checkkeys \
+	controllermap \
+	loopwave \
+	loopwavequeue \
+	testatomic \
+	testaudiocapture \
+	testaudiohotplug \
+	testaudioinfo \
+	testautomation \
+	testbounds \
+	testcustomcursor \
+	testdisplayinfo \
+	testdraw2 \
+	testdrawchessboard \
+	testdropfile \
+	testerror \
+	testfile \
+	testfilesystem \
+	testgamecontroller \
+	testgesture \
+	testhaptic \
+	testhittesting \
+	testhotplug \
+	testiconv \
+	testime \
+	testintersections \
+	testjoystick \
+	testkeys \
+	testloadso \
+	testlock \
+	testmessage \
+	testmultiaudio \
+	testnative \
+	testoverlay2 \
+	testplatform \
+	testpower \
+	testqsort \
+	testrelative \
+	testrendercopyex \
+	testrendertarget \
+	testresample \
+	testrumble \
+	testscale \
+	testsem \
+	testshape \
+	testsprite2 \
+	testspriteminimal \
+	teststreaming \
+	testthread \
+	testtimer \
+	testver \
+	testviewport \
+	testvulkan \
+	testwm2 \
+	testyuv \
+	torturethread
+
+ifdef PTXCONF_SDL2_OPENGL
+SDL2_TEST_TOOLS += \
+	testgl2 \
+	testshader
+endif
+
+ifdef PTXCONF_SDL2_OPENGLES1
+SDL2_TEST_TOOLS += testgles
+endif
+
+ifdef PTXCONF_SDL2_OPENGLES2
+SDL2_TEST_TOOLS += testgles2
+endif
+
+SDL2_TEST_DATA := \
+	axis.bmp \
+	button.bmp \
+	controllermap.bmp \
+	icon.bmp \
+	sample.bmp \
+	testyuv.bmp \
+	sample.wav \
+	picture.xbm \
+	moose.dat \
+	utf8.txt
+
+$(STATEDIR)/sdl2-test.install:
+	@$(call targetinfo)
+	@$(foreach file, $(SDL2_TEST_TOOLS), \
+	     install -vD -m 0755 $(SDL2_TEST_DIR)/$(SDL2_TEST_SUBDIR)/$(file) \
+	       $(SDL2_TEST_PKGDIR)/usr/bin/$(file)$(ptx/nl))
+	@$(foreach file, $(SDL2_TEST_DATA), \
+	     install -vD -m 0644 $(SDL2_TEST_DIR)/$(SDL2_TEST_SUBDIR)/$(file) \
+	       $(SDL2_TEST_PKGDIR)/usr/bin/$(file)$(ptx/nl))
+	@$(call touch)
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/sdl2-test.targetinstall:
+	@$(call targetinfo)
+
+	@$(call install_init, sdl2-test)
+	@$(call install_fixup, sdl2-test,PRIORITY,optional)
+	@$(call install_fixup, sdl2-test,SECTION,base)
+	@$(call install_fixup, sdl2-test,AUTHOR,"Michael Grzeschik <mgr@pengutronix.de>")
+	@$(call install_fixup, sdl2-test,DESCRIPTION,missing)
+
+	@$(foreach file, $(SDL2_TEST_TOOLS), \
+		$(call install_copy, sdl2-test, 0, 0, 755, $(SDL2_TEST_PKGDIR)/usr/bin/$(file), \
+				/usr/bin/sdl2tests/$(file))$(ptx/nl))
+
+	@$(foreach file, $(SDL2_TEST_DATA), \
+		$(call install_copy, sdl2-test, 0, 0, 644, $(SDL2_TEST_PKGDIR)/usr/bin/$(file), \
+				/usr/bin/sdl2tests/$(file))$(ptx/nl))
+
+	@$(call install_finish, sdl2-test)
+
+	@$(call touch)
+
+# vim: syntax=make
-- 
2.18.0


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

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

* Re: [ptxdist] [PATCH v5 1/6] sdl2: add new package
  2018-07-26 17:39 ` [ptxdist] [PATCH v5 1/6] sdl2: add new package Michael Grzeschik
@ 2018-07-27 13:09   ` Michael Grzeschik
  0 siblings, 0 replies; 8+ messages in thread
From: Michael Grzeschik @ 2018-07-27 13:09 UTC (permalink / raw)
  To: ptxdist


[-- Attachment #1.1: Type: text/plain, Size: 18007 bytes --]

On Thu, Jul 26, 2018 at 07:39:20PM +0200, Michael Grzeschik wrote:
> Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
> ---
> v1 -> v2: - added select to MESALIB_GL* on SDL2_OPENGL*
>           - padded prompt entry with extra spaces
> v2 -> v3: - added patch to add egl cflags on configure.in and enabled autogen.sh
> v3 -> v4: - improved egl check with PKG_CHECK_MODULES
>           - removed extract stage and added custom autogen.sh
> v4 -> v5: - reworked the configuration for the package
>           - added a patch to find a valid dri device in kms backend
> 
>  ...001-sdl-2.0.8-add-egl-cflags-to-test.patch |  55 +++++++
>  ...-find-available-card-if-called-witho.patch | 129 +++++++++++++++
>  patches/SDL2-2.0.8/autogen.sh                 |   3 +
>  patches/SDL2-2.0.8/series                     |   5 +
>  rules/sdl2.in                                 | 153 ++++++++++++++++++
>  rules/sdl2.make                               | 153 ++++++++++++++++++
>  6 files changed, 498 insertions(+)
>  create mode 100644 patches/SDL2-2.0.8/0001-sdl-2.0.8-add-egl-cflags-to-test.patch
>  create mode 100644 patches/SDL2-2.0.8/0002-sdl-2.0.8-KMSDRM-find-available-card-if-called-witho.patch
>  create mode 100755 patches/SDL2-2.0.8/autogen.sh
>  create mode 100644 patches/SDL2-2.0.8/series
>  create mode 100644 rules/sdl2.in
>  create mode 100644 rules/sdl2.make
> 
> diff --git a/patches/SDL2-2.0.8/0001-sdl-2.0.8-add-egl-cflags-to-test.patch b/patches/SDL2-2.0.8/0001-sdl-2.0.8-add-egl-cflags-to-test.patch
> new file mode 100644
> index 000000000..c86d48e5a
> --- /dev/null
> +++ b/patches/SDL2-2.0.8/0001-sdl-2.0.8-add-egl-cflags-to-test.patch
> @@ -0,0 +1,55 @@
> +From: Sergey Zhuravlevich <zhurxx@gmail.com>
> +Date: Mon, 16 Jul 2018 12:03:42 +0200
> +Subject: [PATCH] sdl-2.0.8: add egl-cflags to test
> +
> +- also call aclocal to expand PKG_CHECK_MODULES
> +
> +Signed-off-by: Sergey Zhuravlevich <zhurxx@gmail.com>
> +Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
> +---
> + autogen.sh   |  2 +-
> + configure.in | 11 +++++++++++
> + 2 files changed, 12 insertions(+), 1 deletion(-)
> +
> +diff --git a/autogen.sh b/autogen.sh
> +index 9edfb8a7d913..2f1e2ef3d419 100755
> +--- a/autogen.sh
> ++++ b/autogen.sh
> +@@ -8,7 +8,7 @@ test -z "$srcdir" && srcdir=.
> + cd "$srcdir"
> + 
> + # Regenerate configuration files
> +-cat acinclude/* >aclocal.m4
> ++aclocal
> + found=false
> + for autoconf in autoconf autoconf259 autoconf-2.59
> + do if which $autoconf >/dev/null 2>&1; then $autoconf && found=true; break; fi
> +diff --git a/configure.in b/configure.in
> +index 1c7e79338a88..06e37a1b7f98 100644
> +--- a/configure.in
> ++++ b/configure.in
> +@@ -2335,6 +2335,14 @@ dnl Find OpenGL ES
> + CheckOpenGLESX11()
> + {
> +     if test x$enable_video = xyes -a x$enable_video_opengles = xyes; then
> ++        PKG_CHECK_MODULES(EGL, [egl], [have_egl="yes"], [have_egl="no"])
> ++
> ++        save_CFLAGS="$CFLAGS"
> ++        if test x$have_egl = xyes; then
> ++          CFLAGS="$save_CFLAGS $EGL_CFLAGS"
> ++          EXTRA_CFLAGS="$EXTRA_CFLAGS $EGL_CFLAGS"
> ++        fi
> ++
> +         AC_MSG_CHECKING(for EGL support)
> +         video_opengl_egl=no
> +         AC_TRY_COMPILE([
> +@@ -2347,6 +2355,9 @@ CheckOpenGLESX11()
> +         video_opengl_egl=yes
> +         ])
> +         AC_MSG_RESULT($video_opengl_egl)
> ++
> ++        CFLAGS="$save_CFLAGS"
> ++
> +         if test x$video_opengl_egl = xyes; then
> +             AC_DEFINE(SDL_VIDEO_OPENGL_EGL, 1, [ ])
> +         fi
> diff --git a/patches/SDL2-2.0.8/0002-sdl-2.0.8-KMSDRM-find-available-card-if-called-witho.patch b/patches/SDL2-2.0.8/0002-sdl-2.0.8-KMSDRM-find-available-card-if-called-witho.patch
> new file mode 100644
> index 000000000..e889f87ae
> --- /dev/null
> +++ b/patches/SDL2-2.0.8/0002-sdl-2.0.8-KMSDRM-find-available-card-if-called-witho.patch
> @@ -0,0 +1,129 @@
> +From 212c7c68ec228a1058f39497d18c65e9312d00df Mon Sep 17 00:00:00 2001
> +From: Michael Grzeschik <m.grzeschik@pengutronix.de>
> +Date: Thu, 12 Jul 2018 13:48:54 +0200
> +Subject: [PATCH] sdl-2.0.8: KMSDRM: find available card if called without
> + index
> +
> +Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
> +---
> + src/video/kmsdrm/SDL_kmsdrmvideo.c | 84 ++++++++++++++++++++++++++++--
> + 1 file changed, 80 insertions(+), 4 deletions(-)
> +
> +diff --git a/src/video/kmsdrm/SDL_kmsdrmvideo.c b/src/video/kmsdrm/SDL_kmsdrmvideo.c
> +index 7855eeddb..f63c91b0a 100644
> +--- a/src/video/kmsdrm/SDL_kmsdrmvideo.c
> ++++ b/src/video/kmsdrm/SDL_kmsdrmvideo.c
> +@@ -41,15 +41,22 @@
> + #include "SDL_kmsdrmopengles.h"
> + #include "SDL_kmsdrmmouse.h"
> + #include "SDL_kmsdrmdyn.h"
> ++#include <sys/stat.h>
> ++#include <dirent.h>
> ++#include <errno.h>
> + 
> +-#define KMSDRM_DRI_CARD_0 "/dev/dri/card0"
> ++#define KMSDRM_DRI_PATH "/dev/dri/"
> + 
> + static int
> +-KMSDRM_Available(void)
> ++check_modestting(int devindex)
> + {
> +     int available = 0;
> ++    char device[512];
> ++    int drm_fd;
> ++
> ++    sprintf(device, "%scard%d", KMSDRM_DRI_PATH, devindex);
> + 
> +-    int drm_fd = open(KMSDRM_DRI_CARD_0, O_RDWR | O_CLOEXEC);
> ++    drm_fd = open(device, O_RDWR | O_CLOEXEC);
> +     if (drm_fd >= 0) {
> +         if (SDL_KMSDRM_LoadSymbols()) {
> +             drmModeRes *resources = KMSDRM_drmModeGetResources(drm_fd);
> +@@ -65,6 +72,72 @@ KMSDRM_Available(void)
> +     return available;
> + }
> + 
> ++static int get_dricount(void)
> ++{
> ++    int devcount = 0;
> ++    struct dirent *res;
> ++    struct stat sb;
> ++    DIR *folder;
> ++
> ++    if (!(stat(KMSDRM_DRI_PATH, &sb) == 0
> ++                && S_ISDIR(sb.st_mode))) {
> ++        printf("The path %s cannot be opened or is not available\n",
> ++               KMSDRM_DRI_PATH);
> ++        return 0;
> ++    }
> ++
> ++    if (access(KMSDRM_DRI_PATH, F_OK) == -1) {
> ++        printf("The path %s cannot be opened\n",
> ++               KMSDRM_DRI_PATH);
> ++        return 0;
> ++    }
> ++
> ++    folder = opendir(KMSDRM_DRI_PATH);
> ++    if (!folder)
> ++        return 0;
> ++
> ++    while ((res = readdir(folder))) {
> ++        if (res->d_type == DT_CHR)
> ++            devcount++;
> ++    }
> ++
> ++    closedir(folder);
> ++
> ++    return devcount;
> ++}
> ++
> ++static int
> ++get_driindex(void)
> ++{
> ++    int i = 0;
> ++    int available = 0;
> ++    int devcount = get_dricount();
> ++
> ++    for (i = 0; i < devcount; i++) {
> ++        if (check_modestting(i)) {
> ++            available = 1;
> ++            break;
> ++        }
> ++    }
> ++
> ++    if (available)
> ++        return i;
> ++
> ++    return -ENOENT;
> ++}
> ++
> ++static int
> ++KMSDRM_Available(void)
> ++{
> ++    int ret = -ENOENT;
> ++
> ++    ret = get_driindex();
> ++    if (ret >= 0)
> ++        return 1;
> ++
> ++    return ret;
> ++}
> ++
> + static void
> + KMSDRM_Destroy(SDL_VideoDevice * device)
> + {
> +@@ -83,7 +156,10 @@ KMSDRM_Create(int devindex)
> +     SDL_VideoDevice *device;
> +     SDL_VideoData *vdata;
> + 
> +-    if (devindex < 0 || devindex > 99) {
> ++    if (!devindex || devindex > 99)
> ++        devindex = get_driindex();
> ++
> ++    if (devindex < 0) {
> +         SDL_SetError("devindex (%d) must be between 0 and 99.\n", devindex);
> +         return NULL;
> +     }
> +-- 
> +2.18.0
> +
> diff --git a/patches/SDL2-2.0.8/autogen.sh b/patches/SDL2-2.0.8/autogen.sh
> new file mode 100755
> index 000000000..a430a4eb7
> --- /dev/null
> +++ b/patches/SDL2-2.0.8/autogen.sh
> @@ -0,0 +1,3 @@
> +#!/bin/sh
> +
> +./autogen.sh
> diff --git a/patches/SDL2-2.0.8/series b/patches/SDL2-2.0.8/series
> new file mode 100644
> index 000000000..e4e931f38
> --- /dev/null
> +++ b/patches/SDL2-2.0.8/series
> @@ -0,0 +1,5 @@
> +# generated by git-ptx-patches
> +#tag:base --start-number 1
> +0001-sdl-2.0.8-add-egl-cflags-to-test.patch
> +0002-sdl-2.0.8-KMSDRM-find-available-card-if-called-witho.patch
> +# b803bb470cfcfd4d04f208304b9fd212  - git-ptx-patches magic
> diff --git a/rules/sdl2.in b/rules/sdl2.in
> new file mode 100644
> index 000000000..0f20181a2
> --- /dev/null
> +++ b/rules/sdl2.in
> @@ -0,0 +1,153 @@
> +## SECTION=multimedia_sdl
> +
> +menuconfig SDL2
> +	tristate
> +	prompt "SDL2                          "
> +	select LIBC_M
> +	select LIBC_DL
> +	select LIBC_PTHREAD
> +	select GCCLIBS_GCC_S
> +	select LIBUNWIND
> +	select CROSS_NASM		if SDL2_VIDEO
> +	select ALSA_LIB			if SDL2_ALSA
> +	sleect XORG_PROTO		if SDL2_XORG
        ^^^^^^
Whoops! this should be a select. I must have typed something
wrong while reviewing my mails. Hope you fix it while
applying.

Thanks,
Michael

> +	select XORG_LIB_X11		if SDL2_XORG
> +	select XORG_LIB_XXF86VM		if SDL2_XORG
> +	select XORG_LIB_XRANDR		if SDL2_XORG
> +	select XORG_LIB_XCURSOR		if SDL2_XORG
> +	select XORG_LIB_XI		if SDL2_XORG
> +	select TSLIB			if SDL2_TSLIB
> +	select DBUS			if SDL2_DBUS
> +	select LIBDRM			if SDL2_WAYLAND
> +	select MESALIB_GLX		if SDL2_OPENGL
> +	select MESALIB_GLES1		if SDL2_OPENGLES1
> +	select MESALIB_GLES2		if SDL2_OPENGLES2
> +	select MESALIB_EGL_DRM		if SDL2_KMS
> +	select MESALIB			if SDL2_WAYLAND || SDL2_OPENGL
> +	select MESALIB_GBM		if SDL2_WAYLAND
> +	select MESALIB_EGL_WAYLAND	if SDL2_WAYLAND
> +	select LIBXKBCOMMON		if SDL2_WAYLAND
> +	select UDEV			if SDL2_UDEV
> +	select UDEV_LIBUDEV		if SDL2_UDEV
> +	select PULSEAUDIO		if SDL2_PULSEAUDIO
> +	select WAYLAND_PROTOCOLS	if SDL2_WAYLAND
> +	help
> +	  Simple DirectMedia Layer is a cross-platform multimedia
> +	  library designed to provide low level access to audio,
> +	  keyboard, mouse, joystick, 3D hardware via OpenGL, and
> +	  2D video framebuffer.
> +
> +if SDL2
> +
> +menuconfig SDL2_AUDIO
> +	bool
> +	prompt "SDL2 Audio Support             "
> +	default y
> +	help
> +	  Turn on to enable audio support in libsdl2
> +
> +if SDL2_AUDIO
> +
> +config SDL2_OSS
> +	bool
> +	prompt "SDL2 OSS Support"
> +	help
> +	  Open Sound System (OSS) is the first attempt in
> +	  unifying the digital audio architecture for UNIX.
> +	  OSS is a set of device drivers that provide a
> +	  uniform API across all the major UNIX architectures.
> +
> +config SDL2_ALSA
> +	bool
> +	prompt "SDL2 ALSA Support"
> +	default y
> +	help
> +	  The Advanced Linux Sound Architecture (ALSA)
> +	  provides audio and MIDI functionality to the
> +	  Linux operating system.
> +
> +config SDL2_PULSEAUDIO
> +	bool
> +	prompt "SDL2 Pulseaudio Support"
> +	default y
> +	help
> +	  PulseAudio is a sound system for POSIX OSes, meaning that it
> +	  is a proxy for your sound applications.
> +
> +endif
> +
> +menuconfig SDL2_VIDEO
> +	bool
> +	prompt "SDL2 Video Support             "
> +	default y
> +	help
> +	  Turn on to enable video support in libsdl2
> +
> +if SDL2_VIDEO
> +
> +config SDL2_KMS
> +	bool
> +	prompt "KMS Support"
> +	help
> +	  kms video support
> +
> +config SDL2_XORG
> +	bool
> +	prompt "Xorg Support"
> +	help
> +	  X.Org provides an open source implementation of the
> +	  X Window System.
> +
> +config SDL2_WAYLAND
> +	bool
> +	prompt "Wayland Support"
> +	help
> +	  Wayland Window System.
> +
> +config SDL2_OPENGL
> +	bool
> +	prompt "OpenGL Support"
> +	depends on SDL2_XORG
> +	help
> +	  OpenGL is a multi-platform software interface to
> +	  graphics hardware, supporting rendering and imaging
> +	  operations.
> +
> +config SDL2_OPENGLES
> +	bool
> +	default SDL2_OPENGLES1 || SDL2_OPENGLES2
> +
> +config SDL2_OPENGLES1
> +	bool
> +	prompt "OpenGLES1 Support"
> +	help
> +	  OpenGL ES1 graphics support
> +
> +config SDL2_OPENGLES2
> +	bool
> +	prompt "OpenGLES2 Support"
> +	help
> +	  OpenGL ES2 graphics support
> +
> +endif
> +
> +config SDL2_TSLIB
> +	bool
> +	prompt "tslib Support"
> +	help
> +	  Turn on support for the touchscreen library 'tslib'
> +
> +config SDL2_UDEV
> +	bool
> +	prompt "udev Support"
> +	help
> +	  Turn on support for the udev library
> +
> +config SDL2_DBUS
> +	bool
> +	prompt "dbus Support"
> +
> +	help
> +	  Turn on support for the dbus library
> +
> +endif
> diff --git a/rules/sdl2.make b/rules/sdl2.make
> new file mode 100644
> index 000000000..43c8e5e0b
> --- /dev/null
> +++ b/rules/sdl2.make
> @@ -0,0 +1,153 @@
> +# -*-makefile-*-
> +#
> +# Copyright (C) 2018 by Sergey Zhuravlevich
> +#
> +# 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) += sdl2
> +
> +#
> +# Paths and names
> +#
> +SDL2_VERSION	:= 2.0.8
> +SDL2_MD5		:= 3800d705cef742c6a634f202c37f263f
> +SDL2		:= SDL2-$(SDL2_VERSION)
> +SDL2_SUFFIX	:= tar.gz
> +SDL2_URL		:= https://www.libsdl.org/release/$(SDL2).$(SDL2_SUFFIX)
> +SDL2_SOURCE	:= $(SRCDIR)/$(SDL2).$(SDL2_SUFFIX)
> +SDL2_DIR		:= $(BUILDDIR)/$(SDL2)
> +SDL2_LICENSE	:= zlib
> +
> +# ----------------------------------------------------------------------------
> +# Prepare
> +# ----------------------------------------------------------------------------
> +
> +#
> +# autoconf
> +#
> +SDL2_CONF_TOOL	:= autoconf
> +SDL2_CONF_OPT	:= \
> +	$(CROSS_AUTOCONF_USR) \
> +	--enable-shared \
> +	--disable-static \
> +	--enable-libtool-lock \
> +	--enable-assertions=auto \
> +	--enable-dependency-tracking \
> +	--enable-libc \
> +	--enable-gcc-atomics \
> +	--enable-atomic \
> +	--$(call ptx/endis,PTXCONF_SDL2_AUDIO)-audio \
> +	--$(call ptx/endis,PTXCONF_SDL2_VIDEO)-video \
> +	--enable-render \
> +	--enable-events \
> +	--enable-joystick \
> +	--enable-haptic \
> +	--disable-power \
> +	--disable-filesystem \
> +	--enable-threads \
> +	--enable-timers \
> +	--enable-file \
> +	--enable-loadso \
> +	--enable-cpuinfo \
> +	--enable-assembly \
> +	--disable-ssemath \
> +	--disable-mmx \
> +	--disable-3dnow \
> +	--disable-sse \
> +	--disable-sse2 \
> +	--disable-sse3 \
> +	--disable-jack \
> +	--disable-jack-shared \
> +	--disable-sndio \
> +	--disable-sndio-shared \
> +	--disable-fusionsound \
> +	--disable-fusionsound-shared \
> +	--$(call ptx/endis,PTXCONF_SDL2_OSS)-oss \
> +	--$(call ptx/endis,PTXCONF_SDL2_ALSA)-alsa \
> +	--disable-alsatest \
> +	--disable-alsa-shared \
> +	--disable-esd \
> +	--disable-esdtest \
> +	--disable-esd-shared \
> +	--$(call ptx/endis,PTXCONF_SDL2_PULSEAUDIO)-pulseaudio \
> +	--$(call ptx/endis,PTXCONF_SDL2_PULSEAUDIO)-pulseaudio-shared \
> +	--disable-arts \
> +	--disable-arts-shared \
> +	--disable-nas \
> +	--disable-nas-shared \
> +	--disable-diskaudio \
> +	--disable-dummyaudio \
> +	--disable-libsamplerate \
> +	--disable-libsamplerate-shared \
> +	--$(call ptx/endis,PTXCONF_SDL2_WAYLAND)-video-wayland \
> +	--disable-video-wayland-qt-touch \
> +	--$(call ptx/endis,PTXCONF_SDL2_WAYLAND)-wayland-shared \
> +	--disable-video-mir \
> +	--disable-mir-shared \
> +	--disable-video-rpi \
> +	--disable-altivec \
> +	--$(call ptx/endis,PTXCONF_SDL2_XORG)-video-x11 \
> +	--disable-x11-shared \
> +	--$(call ptx/endis,PTXCONF_SDL2_XORG)-video-x11-vm \
> +	--disable-video-vivante \
> +	--disable-video-x11-xinerama \
> +	--$(call ptx/endis,PTXCONF_SDL2_XORG)-video-x11-xrandr \
> +	--$(call ptx/endis,PTXCONF_SDL2_XORG)-video-x11-xcursor \
> +	--disable-video-x11-xdbe \
> +	--$(call ptx/endis,PTXCONF_SDL2_XORG)-video-x11-xinput \
> +	--disable-video-x11-scrnsaver \
> +	--disable-video-x11-xshape \
> +	--disable-video-cocoa \
> +	--disable-render-metal \
> +	--disable-video-directfb \
> +	--disable-directfb-shared \
> +	--$(call ptx/endis,PTXCONF_SDL2_KMS)-video-kmsdrm \
> +	--$(call ptx/endis,PTXCONF_SDL2_KMS)-kmsdrm-shared \
> +	--enable-video-dummy \
> +	--$(call ptx/endis,PTXCONF_SDL2_OPENGL)-video-opengl \
> +	--$(call ptx/endis,PTXCONF_SDL2_OPENGLES)-video-opengles \
> +	--$(call ptx/endis,PTXCONF_SDL2_OPENGLES1)-video-opengles1 \
> +	--$(call ptx/endis,PTXCONF_SDL2_OPENGLES2)-video-opengles2 \
> +	--disable-video-vulkan \
> +	--$(call ptx/endis,PTXCONF_SDL2_UDEV)-libudev \
> +	--$(call ptx/endis,PTXCONF_SDL2_DBUS)-dbus \
> +	--disable-ime \
> +	--disable-ibus \
> +	--disable-fcitx \
> +	--$(call ptx/endis,PTXCONF_SDL2_TSLIB)-input-tslib \
> +	--enable-pthreads \
> +	--enable-pthread-sem \
> +	--disable-directx \
> +	--enable-sdl-dlopen \
> +	--enable-clock_gettime \
> +	--disable-rpath \
> +	--disable-render-d3d \
> +	--$(call ptx/wwo,PTXCONF_SDL2_XORG)-x
> +
> +# ----------------------------------------------------------------------------
> +# Target-Install
> +# ----------------------------------------------------------------------------
> +
> +$(STATEDIR)/sdl2.targetinstall:
> +	@$(call targetinfo)
> +
> +	@$(call install_init, sdl2)
> +	@$(call install_fixup, sdl2,PRIORITY,optional)
> +	@$(call install_fixup, sdl2,SECTION,base)
> +	@$(call install_fixup, sdl2,AUTHOR,"Sergey Zhuravlevich <zhurxx@gmail.com>")
> +	@$(call install_fixup, sdl2,DESCRIPTION,missing)
> +
> +	@$(call install_lib, sdl2, 0, 0, 0644, libSDL2-2.0)
> +
> +	@$(call install_finish, sdl2)
> +
> +	@$(call touch)
> +
> +# vim: syntax=make
> -- 
> 2.18.0
> 
> 
> _______________________________________________
> ptxdist mailing list
> ptxdist@pengutronix.de

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

[-- Attachment #2: Type: text/plain, Size: 91 bytes --]

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

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

end of thread, other threads:[~2018-07-27 13:09 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-26 17:39 [ptxdist] [PATCH v5 0/6] sdl2: add support for new packages Michael Grzeschik
2018-07-26 17:39 ` [ptxdist] [PATCH v5 1/6] sdl2: add new package Michael Grzeschik
2018-07-27 13:09   ` Michael Grzeschik
2018-07-26 17:39 ` [ptxdist] [PATCH v5 2/6] sdl2-image: " Michael Grzeschik
2018-07-26 17:39 ` [ptxdist] [PATCH v5 3/6] sdl2-net: " Michael Grzeschik
2018-07-26 17:39 ` [ptxdist] [PATCH v5 4/6] sdl2-ttf: " Michael Grzeschik
2018-07-26 17:39 ` [ptxdist] [PATCH v5 5/6] sdl2-mixer: " Michael Grzeschik
2018-07-26 17:39 ` [ptxdist] [PATCH v5 6/6] sdl2-test: " Michael Grzeschik

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