On Mon, Jul 16, 2018 at 02:54:43PM +0200, Michael Grzeschik wrote: > Signed-off-by: Michael Grzeschik <m.grzesc...@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 > > ...001-sdl-2.0.8-add-egl-cflags-to-test.patch | 41 ++++ > patches/SDL2-2.0.8/series | 4 + > rules/sdl2.in | 206 ++++++++++++++++++ > rules/sdl2.make | 164 ++++++++++++++ > 4 files changed, 415 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/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..84313d2aa > --- /dev/null > +++ b/patches/SDL2-2.0.8/0001-sdl-2.0.8-add-egl-cflags-to-test.patch > @@ -0,0 +1,41 @@ > +From: Sergey Zhuravlevich <zhu...@gmail.com> > +Date: Mon, 16 Jul 2018 12:03:42 +0200 > +Subject: [PATCH] sdl-2.0.8: add egl-cflags to test > + > +Signed-off-by: Sergey Zhuravlevich <zhu...@gmail.com> > +--- > + configure.in | 14 ++++++++++++++ > + 1 file changed, 14 insertions(+) > + > +diff --git a/configure.in b/configure.in > +index 1c7e79338a88..bfa14fbd4fa7 100644 > +--- a/configure.in > ++++ b/configure.in > +@@ -2335,6 +2335,17 @@ dnl Find OpenGL ES > + CheckOpenGLESX11() > + { > + if test x$enable_video = xyes -a x$enable_video_opengles = xyes; then > ++ AC_PATH_PROG(PKG_CONFIG, pkg-config, no) > ++ if test x$PKG_CONFIG != xno; then > ++ if $PKG_CONFIG --exists egl ; then > ++ EGL_CFLAGS=`$PKG_CONFIG --cflags egl` > ++ EXTRA_CFLAGS="$EXTRA_CFLAGS $EGL_CFLAGS" > ++ fi > ++ fi > ++ > ++ save_CFLAGS="$CFLAGS" > ++ CFLAGS="$save_CFLAGS $EGL_CFLAGS" > ++ > + AC_MSG_CHECKING(for EGL support) > + video_opengl_egl=no > + AC_TRY_COMPILE([ > +@@ -2347,6 +2358,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/series b/patches/SDL2-2.0.8/series > new file mode 100644 > index 000000000..3693c2785 > --- /dev/null > +++ b/patches/SDL2-2.0.8/series > @@ -0,0 +1,4 @@ > +# generated by git-ptx-patches > +#tag:base --start-number 1 > +0001-sdl-2.0.8-add-egl-cflags-to-test.patch > +# 57d72a951bd7f961008ad5274d82876a - git-ptx-patches magic > diff --git a/rules/sdl2.in b/rules/sdl2.in > new file mode 100644 > index 000000000..54edea6ab > --- /dev/null > +++ b/rules/sdl2.in > @@ -0,0 +1,206 @@ > +## 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 > + select XORG_LIB_X11 if SDL2_XORG > + select XORG_LIB_XT if SDL2_XORG > + select XORG_LIB_XVMC if SDL2_XORG && SDL2_VIDEO > + select DIRECTFB if SDL2_DIRECTFB > + 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 if SDL2_WAYLAND > + select MESALIB_GBM if SDL2_WAYLAND > + select MESALIB_EGL if SDL2_WAYLAND > + select MESALIB_EGL_DRM 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 if SDL2_WAYLAND > + 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 > + > +config SDL2_TIMERS > + bool > + prompt "SDL2 Timers Support" > + default y > + help > + FIXME > + > +config SDL2_FILE > + bool > + prompt "SDL2 File Support" > + default y > + help > + FIXME > + > +config SDL2_CPUINFO > + bool > + prompt "SDL2 CPU Info Support" > + default y > + help > + FIXME > + > +menuconfig SDL2_AUDIO > + bool > + prompt "SDL2 Audio Support " > + default y > + help > + FIXME > + > +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 > + > +endif > + > +menuconfig SDL2_VIDEO > + bool > + prompt "SDL2 Video Support " > + default y > + help > + FIXME > + > +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_DIRECTFB > + bool > + depends on STAGING > + prompt "DirectFB Support" > + default y > + help > + DirectFB is a thin library that provides hardware > + graphics acceleration, input device handling and > + abstraction, integrated windowing system with support > + for translucent windows and multiple display layers, > + not only on top of the Linux Framebuffer Device. > + > +config SDL2_OPENGL > + bool > + prompt "OpenGL Support" > + help > + OpenGL is a multi-platform software interface to > + graphics hardware, supporting rendering and imaging > + operations. > + > +config SDL2_OPENGLES > + bool > + prompt "OpenGLES Support" > + help > + OpenGL ES graphics support > + > +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_EVENT > + bool > + prompt "SDL2 Event Support" > + default y > + help > + FIXME > + > +config SDL2_JOYSTICK > + bool > + prompt "SDL2 Joystick Support" > + help > + FIXME > + > +config SDL2_THREADS > + bool > + prompt "SDL2 Thread Support " > + default y > + help > + Turn on multithreading support > + > +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..51cbf91e7 > --- /dev/null > +++ b/rules/sdl2.make > @@ -0,0 +1,164 @@ > +# -*-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 > +# > ---------------------------------------------------------------------------- > + > +$(STATEDIR)/sdl2.extract.post: > + @$(call targetinfo) > + cd $(SDL2_DIR) && \ > + $(SDL2_PATH) $(SDL2_ENV) \ > + ./autogen.sh > + @$(call touch)
No, this must be handled with the patches. If the default one does not work, then use a custom one, like patches/SDL-1.2.15/autogen.sh for example. Michael > + > +# > ---------------------------------------------------------------------------- > +# 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 \ > + --disable-render \ > + --$(call ptx/endis,PTXCONF_SDL2_EVENT)-events \ > + --$(call ptx/endis,PTXCONF_SDL2_JOYSTICK)-joystick \ > + --disable-haptic \ > + --disable-power \ > + --disable-filesystem \ > + --$(call ptx/endis,PTXCONF_SDL2_THREADS)-threads \ > + --$(call ptx/endis,PTXCONF_SDL2_TIMERS)-timers \ > + --$(call ptx/endis,PTXCONF_SDL2_FILE)-file \ > + --enable-loadso \ > + --$(call ptx/endis,PTXCONF_SDL2_CPUINFO)-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 \ > + --disable-video-x11-xrandr \ > + --disable-video-x11-xcursor \ > + --disable-video-x11-xdbe \ > + --$(call ptx/endis,PTXCONF_SDL2_XORG)-video-x11-xinput \ > + --$(call ptx/endis,PTXCONF_SDL2_XORG)-video-x11-scrnsaver \ > + --$(call ptx/endis,PTXCONF_SDL2_XORG)-video-x11-xshape \ > + --disable-video-cocoa \ > + --disable-render-metal \ > + --$(call ptx/endis,PTXCONF_SDL2_DIRECTFB)-video-directfb \ > + --$(call ptx/endis,PTXCONF_SDL2_DIRECTFB)-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 > <zhu...@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 | _______________________________________________ ptxdist mailing list ptxdist@pengutronix.de