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