blob: 814e6cd0dd09306c507f1dc9c8aecee852ec8515 [file] [log] [blame]
Brad Bishop26bdd442019-08-16 17:08:17 -04001SUMMARY = "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
Andrew Geissler9aee5002022-03-30 16:27:02 +000010LICENSE = "LGPL-2.1-only"
Brad Bishop26bdd442019-08-16 17:08:17 -040011LIC_FILES_CHKSUM = "file://COPYING;md5=27818cd7fd83877a8e3ef82b82798ef4"
12
Brad Bishop26bdd442019-08-16 17:08:17 -040013PR = "r3"
14
15SRC_URI = "http://www.libsdl.org/release/SDL-${PV}.tar.gz \
16 file://libsdl-1.2.15-xdata32.patch \
17 file://pkgconfig.patch \
18 file://0001-build-Pass-tag-CC-explictly-when-using-libtool.patch \
19 file://CVE-2019-7577.patch \
20 file://CVE-2019-7574.patch \
21 file://CVE-2019-7572.patch \
22 file://CVE-2019-7578.patch \
23 file://CVE-2019-7575.patch \
24 file://CVE-2019-7635.patch \
25 file://CVE-2019-7637.patch \
26 file://CVE-2019-7638.patch \
27 file://CVE-2019-7576.patch \
William A. Kennington IIIb95905d2021-06-02 12:40:56 -070028 file://CVE-2019-13616.patch \
Brad Bishop26bdd442019-08-16 17:08:17 -040029 "
30
31UPSTREAM_CHECK_REGEX = "SDL-(?P<pver>\d+(\.\d+)+)\.tar"
32
33S = "${WORKDIR}/SDL-${PV}"
34
35SRC_URI[md5sum] = "9d96df8417572a2afb781a7c4c811a85"
36SRC_URI[sha256sum] = "d6d316a793e5e348155f0dd93b979798933fb98aa1edebcc108829d6474aad00"
37
38BINCONFIG = "${bindir}/sdl-config"
39
40inherit autotools lib_package binconfig-disabled pkgconfig
41
42CVE_PRODUCT = "simple_directmedia_layer sdl"
43
44EXTRA_OECONF = "--disable-static --enable-cdrom --enable-threads --enable-timers \
45 --enable-file --disable-oss --disable-esd --disable-arts \
46 --disable-diskaudio --disable-nas \
47 --disable-mintaudio --disable-nasm --disable-video-dga \
48 --disable-video-fbcon --disable-video-ps2gs --disable-video-ps3 \
49 --disable-xbios --disable-gem --disable-video-dummy \
50 --enable-input-events --enable-pthreads \
51 --disable-video-svga \
52 --disable-video-picogui --disable-video-qtopia --enable-sdl-dlopen \
53 --disable-rpath"
54
55PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'alsa directfb pulseaudio x11', d)} \
56 ${@bb.utils.contains('DISTRO_FEATURES', 'x11 opengl', 'opengl', '', d)}"
Patrick Williams213cb262021-08-07 19:21:33 -050057PACKAGECONFIG:class-native = "x11"
58PACKAGECONFIG:class-nativesdk = "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}"
Brad Bishop26bdd442019-08-16 17:08:17 -040059
60PACKAGECONFIG[alsa] = "--enable-alsa --disable-alsatest,--disable-alsa,alsa-lib"
61PACKAGECONFIG[pulseaudio] = "--enable-pulseaudio,--disable-pulseaudio,pulseaudio"
62PACKAGECONFIG[tslib] = "--enable-input-tslib, --disable-input-tslib, tslib"
63PACKAGECONFIG[directfb] = "--enable-video-directfb, --disable-video-directfb, directfb"
64PACKAGECONFIG[opengl] = "--enable-video-opengl, --disable-video-opengl, virtual/libgl libglu"
65PACKAGECONFIG[x11] = "--enable-video-x11 --disable-x11-shared, --disable-video-x11, virtual/libx11 libxext libxrandr libxrender"
66
67# The following two options should only enabled with mingw support
68PACKAGECONFIG[stdio-redirect] = "--enable-stdio-redirect,--disable-stdio-redirect"
69PACKAGECONFIG[directx] = "--enable-directx,--disable-directx"
70
71EXTRA_AUTORECONF += "--include=acinclude --exclude=autoheader"
72
Patrick Williams213cb262021-08-07 19:21:33 -050073do_configure:prepend() {
Brad Bishop26bdd442019-08-16 17:08:17 -040074 # Remove old libtool macros.
75 MACROS="libtool.m4 lt~obsolete.m4 ltoptions.m4 ltsugar.m4 ltversion.m4"
76 for i in ${MACROS}; do
77 rm -f ${S}/acinclude/$i
78 done
79 export SYSROOT=$PKG_CONFIG_SYSROOT_DIR
80}
81
82BBCLASSEXTEND = "native nativesdk"
Patrick Williams8dd68482022-10-04 07:57:18 -050083
Patrick Williams2a254922023-08-11 09:48:11 -050084CVE_STATUS[CVE-2019-14906] = "not-applicable-platform: Applies on RHEL only"