summaryrefslogtreecommitdiffstats
path: root/meta/recipes-graphics/libsdl2
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-graphics/libsdl2')
-rw-r--r--meta/recipes-graphics/libsdl2/libsdl2/more-gen-depends.patch60
-rw-r--r--meta/recipes-graphics/libsdl2/libsdl2_2.0.14.bb80
-rw-r--r--meta/recipes-graphics/libsdl2/libsdl2_2.30.2.bb85
3 files changed, 85 insertions, 140 deletions
diff --git a/meta/recipes-graphics/libsdl2/libsdl2/more-gen-depends.patch b/meta/recipes-graphics/libsdl2/libsdl2/more-gen-depends.patch
deleted file mode 100644
index 8ca52ebde7..0000000000
--- a/meta/recipes-graphics/libsdl2/libsdl2/more-gen-depends.patch
+++ /dev/null
@@ -1,60 +0,0 @@
1From e0f4b6d18ce6f025c78773e909b9c395ad833c7a Mon Sep 17 00:00:00 2001
2From: Ross Burton <ross.burton@intel.com>
3Date: Mon, 29 Jul 2019 08:38:32 +0800
4Subject: [PATCH] configure: fix dependencies
5
6Many source files include e.g. wayland-protocols.h which should be found in the
7sysroot but SDL wants to build its own headers from the XML definitions.
8
9However the rules to generate those headers are only dependencies of the
10top-level libSDL2.la object so can be built in parallel with the rest of the
11objects, which can lead to interesting errors if the header is parsed by the
12compiler whilst it's being written by another process:
13
14| gen/wayland-client-protocol.h:3: error: unterminated #ifndef
15| #ifndef WAYLAND_CLIENT_PROTOCOL_H
16
17Solve this by adding more dependencies so the generated files are built before
18the primary objects.
19
20Upstream-Status: Pending
21Signed-off-by: Ross Burton <ross.burton@intel.com>
22[Moved to configure.ac]
23Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
24---
25 configure.ac | 6 +++---
26 1 file changed, 3 insertions(+), 3 deletions(-)
27
28diff --git a/configure.ac b/configure.ac
29index 9e782c6..997915a 100644
30--- a/configure.ac
31+++ b/configure.ac
32@@ -4061,7 +4061,7 @@ DEPENDS=`echo $SOURCES | tr ' ' '\n'`
33 for EXT in asm cc m c S; do
34 OBJECTS=`echo "$OBJECTS" | sed 's,[[^ ]]*/\([[^ ]]*\)\.'$EXT',$(objects)/\1.lo,g'`
35 DEPENDS=`echo "$DEPENDS" | sed "s,^\\([[^ ]]*\\)/\\([[^ ]]*\\)\\.$EXT\\$,\\\\
36-\\$(objects)/\\2.lo: \\1/\\2.$EXT \\$(objects)/.created\\\\
37+\\$(objects)/\\2.lo: \\1/\\2.$EXT \\$(objects)/.created \\$(GEN_OBJECTS)\\\\
38 \\$(RUN_CMD_CC)\\$(LIBTOOL) --tag=CC --mode=compile \\$(CC) \\$(CFLAGS) \\$(EXTRA_CFLAGS) $DEPENDENCY_TRACKING_OPTIONS -c \\$< -o \\$@,g"`
39 done
40
41@@ -4078,14 +4078,14 @@ SDLMAIN_OBJECTS=`echo $SDLMAIN_SOURCES`
42 SDLMAIN_DEPENDS=`echo $SDLMAIN_SOURCES`
43 SDLMAIN_OBJECTS=`echo "$SDLMAIN_OBJECTS" | sed 's,[[^ ]]*/\([[^ ]]*\)\.c,$(objects)/\1.lo,g'`
44 SDLMAIN_DEPENDS=`echo "$SDLMAIN_DEPENDS" | sed "s,\\([[^ ]]*\\)/\\([[^ ]]*\\)\\.c,\\\\
45-\\$(objects)/\\2.lo: \\1/\\2.c \\$(objects)/.created\\\\
46+\\$(objects)/\\2.lo: \\1/\\2.c \\$(objects)/.created \\$(GEN_OBJECTS)\\\\
47 \\$(RUN_CMD_CC)\\$(LIBTOOL) --tag=CC --mode=compile \\$(CC) \\$(CFLAGS) \\$(EXTRA_CFLAGS) $DEPENDENCY_TRACKING_OPTIONS -c \\$< -o \\$@,g"`
48
49 SDLTEST_OBJECTS=`echo $SDLTEST_SOURCES`
50 SDLTEST_DEPENDS=`echo $SDLTEST_SOURCES`
51 SDLTEST_OBJECTS=`echo "$SDLTEST_OBJECTS" | sed 's,[[^ ]]*/\([[^ ]]*\)\.c,$(objects)/\1.lo,g'`
52 SDLTEST_DEPENDS=`echo "$SDLTEST_DEPENDS" | sed "s,\\([[^ ]]*\\)/\\([[^ ]]*\\)\\.c,\\\\
53-\\$(objects)/\\2.lo: \\1/\\2.c \\$(objects)/.created\\\\
54+\\$(objects)/\\2.lo: \\1/\\2.c \\$(objects)/.created \\$(GEN_OBJECTS)\\\\
55 \\$(RUN_CMD_CC)\\$(LIBTOOL) --tag=CC --mode=compile \\$(CC) \\$(CFLAGS) \\$(EXTRA_CFLAGS) $DEPENDENCY_TRACKING_OPTIONS -c \\$< -o \\$@,g"`
56
57 # Set runtime shared library paths as needed
58--
592.7.4
60
diff --git a/meta/recipes-graphics/libsdl2/libsdl2_2.0.14.bb b/meta/recipes-graphics/libsdl2/libsdl2_2.0.14.bb
deleted file mode 100644
index 872592fdae..0000000000
--- a/meta/recipes-graphics/libsdl2/libsdl2_2.0.14.bb
+++ /dev/null
@@ -1,80 +0,0 @@
1SUMMARY = "Simple DirectMedia Layer"
2DESCRIPTION = "Simple DirectMedia Layer is a cross-platform multimedia \
3library designed to provide low level access to audio, keyboard, mouse, \
4joystick, 3D hardware via OpenGL, and 2D video framebuffer."
5HOMEPAGE = "http://www.libsdl.org"
6BUGTRACKER = "http://bugzilla.libsdl.org/"
7
8SECTION = "libs"
9
10LICENSE = "Zlib"
11LIC_FILES_CHKSUM = "file://COPYING.txt;md5=2d4af6adb4d89aad0cdedbcc18c9a32f"
12
13# arm-neon adds MIT license
14LICENSE_append = " ${@bb.utils.contains('PACKAGECONFIG', 'arm-neon', '& MIT', '', d)}"
15LIC_FILES_CHKSUM_append = " ${@bb.utils.contains('PACKAGECONFIG', 'arm-neon', 'file://src/video/arm/pixman-arm-neon-asm.h;md5=9a9cc1e51abbf1da58f4d9528ec9d49b;beginline=1;endline=24', '', d)}"
16
17PROVIDES = "virtual/libsdl2"
18
19SRC_URI = "http://www.libsdl.org/release/SDL2-${PV}.tar.gz \
20 file://more-gen-depends.patch \
21"
22
23S = "${WORKDIR}/SDL2-${PV}"
24
25SRC_URI[sha256sum] = "d8215b571a581be1332d2106f8036fcb03d12a70bae01e20f424976d275432bc"
26
27inherit autotools lib_package binconfig-disabled pkgconfig
28
29BINCONFIG = "${bindir}/sdl2-config"
30
31CVE_PRODUCT = "simple_directmedia_layer sdl"
32
33EXTRA_OECONF = "--disable-oss --disable-esd --disable-arts \
34 --disable-diskaudio --disable-nas --disable-esd-shared --disable-esdtest \
35 --disable-video-dummy \
36 --disable-video-rpi \
37 --enable-pthreads \
38 --enable-sdl-dlopen \
39 --disable-rpath \
40 --disable-sndio \
41 --disable-fcitx --disable-ibus \
42 "
43
44# opengl packageconfig factored out to make it easy for distros
45# and BSP layers to pick either (desktop) opengl, gles2, or no GL
46PACKAGECONFIG_GL ?= "${@bb.utils.filter('DISTRO_FEATURES', 'opengl', d)}"
47
48PACKAGECONFIG_class-native = "x11 ${PACKAGECONFIG_GL}"
49PACKAGECONFIG_class-nativesdk = "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)} ${PACKAGECONFIG_GL}"
50PACKAGECONFIG ??= " \
51 ${PACKAGECONFIG_GL} \
52 ${@bb.utils.filter('DISTRO_FEATURES', 'alsa directfb pulseaudio x11', d)} \
53 ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland gles2', '', d)} \
54 ${@bb.utils.contains("TUNE_FEATURES", "neon","arm-neon","",d)} \
55"
56PACKAGECONFIG[alsa] = "--enable-alsa --disable-alsatest,--disable-alsa,alsa-lib,"
57PACKAGECONFIG[arm-neon] = "--enable-arm-neon,--disable-arm-neon"
58PACKAGECONFIG[directfb] = "--enable-video-directfb,--disable-video-directfb,directfb,directfb"
59PACKAGECONFIG[gles2] = "--enable-video-opengles,--disable-video-opengles,virtual/libgles2"
60PACKAGECONFIG[jack] = "--enable-jack,--disable-jack,jack"
61PACKAGECONFIG[kmsdrm] = "--enable-video-kmsdrm,--disable-video-kmsdrm,libdrm virtual/libgbm"
62PACKAGECONFIG[opengl] = "--enable-video-opengl,--disable-video-opengl,virtual/libgl"
63PACKAGECONFIG[pulseaudio] = "--enable-pulseaudio,--disable-pulseaudio,pulseaudio"
64PACKAGECONFIG[wayland] = "--enable-video-wayland,--disable-video-wayland,wayland-native wayland wayland-protocols libxkbcommon"
65PACKAGECONFIG[x11] = "--enable-video-x11,--disable-video-x11,virtual/libx11 libxext libxrandr libxrender"
66
67EXTRA_AUTORECONF += "--include=acinclude --exclude=autoheader"
68
69do_configure_prepend() {
70 # Remove old libtool macros.
71 MACROS="libtool.m4 lt~obsolete.m4 ltoptions.m4 ltsugar.m4 ltversion.m4"
72 for i in ${MACROS}; do
73 rm -f ${S}/acinclude/$i
74 done
75 export SYSROOT=$PKG_CONFIG_SYSROOT_DIR
76}
77
78FILES_${PN}-dev += "${libdir}/cmake"
79
80BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-graphics/libsdl2/libsdl2_2.30.2.bb b/meta/recipes-graphics/libsdl2/libsdl2_2.30.2.bb
new file mode 100644
index 0000000000..f9dacb288c
--- /dev/null
+++ b/meta/recipes-graphics/libsdl2/libsdl2_2.30.2.bb
@@ -0,0 +1,85 @@
1SUMMARY = "Simple DirectMedia Layer"
2DESCRIPTION = "Simple DirectMedia Layer is a cross-platform multimedia \
3library designed to provide low level access to audio, keyboard, mouse, \
4joystick, 3D hardware via OpenGL, and 2D video framebuffer."
5HOMEPAGE = "http://www.libsdl.org"
6BUGTRACKER = "http://bugzilla.libsdl.org/"
7
8SECTION = "libs"
9
10LICENSE = "Zlib & BSD-2-Clause"
11LIC_FILES_CHKSUM = "\
12 file://LICENSE.txt;md5=25231a5b96ccdd8f39eb53c07717be64 \
13 file://src/hidapi/LICENSE.txt;md5=7c3949a631240cb6c31c50f3eb696077 \
14 file://src/hidapi/LICENSE-bsd.txt;md5=b5fa085ce0926bb50d0621620a82361f \
15 file://src/video/yuv2rgb/LICENSE;md5=79f8f3418d91531e05f0fc94ca67e071 \
16"
17
18# arm-neon adds MIT license
19LICENSE:append = " ${@bb.utils.contains('PACKAGECONFIG', 'arm-neon', '& MIT', '', d)}"
20LIC_FILES_CHKSUM:append = " ${@bb.utils.contains('PACKAGECONFIG', 'arm-neon', 'file://src/video/arm/pixman-arm-neon-asm.h;md5=9a9cc1e51abbf1da58f4d9528ec9d49b;beginline=1;endline=24', '', d)}"
21
22PROVIDES = "virtual/libsdl2"
23
24SRC_URI = "http://www.libsdl.org/release/SDL2-${PV}.tar.gz"
25
26S = "${WORKDIR}/SDL2-${PV}"
27
28SRC_URI[sha256sum] = "891d66ac8cae51361d3229e3336ebec1c407a8a2a063b61df14f5fdf3ab5ac31"
29
30inherit cmake lib_package binconfig-disabled pkgconfig upstream-version-is-even
31
32BINCONFIG = "${bindir}/sdl2-config"
33
34CVE_PRODUCT = "simple_directmedia_layer sdl"
35
36EXTRA_OECMAKE = "-DSDL_OSS=OFF -DSDL_ESD=OFF -DSDL_ARTS=OFF \
37 -DSDL_DISKAUDIO=OFF -DSDL_NAS=OFF -DSDL_ESD_SHARED=OFF \
38 -DSDL_DUMMYVIDEO=OFF \
39 -DSDL_RPI=OFF \
40 -DSDL_PTHREADS=ON \
41 -DSDL_RPATH=OFF \
42 -DSDL_SNDIO=OFF \
43 -DSDL_X11_XCURSOR=OFF \
44 -DSDL_X11_XDBE=OFF \
45 -DSDL_X11_XFIXES=OFF \
46 -DSDL_X11_XINPUT=OFF \
47 -DSDL_X11_XRANDR=OFF \
48 -DSDL_X11_XSCRNSAVER=OFF \
49 -DSDL_X11_XSHAPE=OFF \
50"
51
52# opengl packageconfig factored out to make it easy for distros
53# and BSP layers to pick either (desktop) opengl, gles2, or no GL
54PACKAGECONFIG_GL ?= "${@bb.utils.filter('DISTRO_FEATURES', 'opengl', d)}"
55
56PACKAGECONFIG:class-native = "x11 ${PACKAGECONFIG_GL}"
57PACKAGECONFIG:class-nativesdk = "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)} ${PACKAGECONFIG_GL}"
58PACKAGECONFIG ??= " \
59 ${PACKAGECONFIG_GL} \
60 ${@bb.utils.filter('DISTRO_FEATURES', 'alsa directfb pulseaudio pipewire x11 vulkan', d)} \
61 ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland gles2', '', d)} \
62 ${@bb.utils.contains("TUNE_FEATURES", "neon","arm-neon","",d)} \
63"
64PACKAGECONFIG[alsa] = "-DSDL_ALSA=ON,-DSDL_ALSA=OFF,alsa-lib,"
65PACKAGECONFIG[arm-neon] = "-DSDL_ARMNEON=ON,-DSDL_ARMNEON=OFF"
66PACKAGECONFIG[directfb] = "-DSDL_DIRECTFB=ON,-DSDL_DIRECTFB=OFF,directfb,directfb"
67PACKAGECONFIG[gles2] = "-DSDL_OPENGLES=ON,-DSDL_OPENGLES=OFF,virtual/libgles2"
68PACKAGECONFIG[jack] = "-DSDL_JACK=ON,-DSDL_JACK=OFF,jack"
69PACKAGECONFIG[kmsdrm] = "-DSDL_KMSDRM=ON,-DSDL_KMSDRM=OFF,libdrm virtual/libgbm"
70# The hidraw support doesn't catch Xbox, PS4 and Nintendo controllers,
71# so we'll just use libusb when it's available.
72PACKAGECONFIG[libusb] = ",,libusb1"
73PACKAGECONFIG[libdecor] = "-DSDL_WAYLAND_LIBDECOR=ON,-DSDL_WAYLAND_LIBDECOR=OFF,libdecor,libdecor"
74PACKAGECONFIG[opengl] = "-DSDL_OPENGL=ON,-DSDL_OPENGL=OFF,virtual/egl"
75PACKAGECONFIG[pipewire] = "-DSDL_PIPEWIRE_SHARED=ON,-DSDL_PIPEWIRE_SHARED=OFF,pipewire"
76PACKAGECONFIG[pulseaudio] = "-DSDL_PULSEAUDIO=ON,-DSDL_PULSEAUDIO=OFF,pulseaudio"
77PACKAGECONFIG[vulkan] = "-DSDL_VULKAN=ON,-DSDL_VULKAN=OFF"
78PACKAGECONFIG[wayland] = "-DSDL_WAYLAND=ON,-DSDL_WAYLAND=OFF,wayland-native wayland wayland-protocols libxkbcommon"
79PACKAGECONFIG[x11] = "-DSDL_X11=ON,-DSDL_X11=OFF,virtual/libx11 libxext libxrandr libxrender"
80
81CFLAGS:append:class-native = " -DNO_SHARED_MEMORY"
82
83FILES:${PN} += "${datadir}/licenses/SDL2/LICENSE.txt"
84
85BBCLASSEXTEND = "native nativesdk"