blob: a0a0b1509a29cfcd63c3d0dc9204e75a3ea82cff [file] [log] [blame]
Brad Bishop19323692019-04-05 15:28:33 -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 = "Zlib"
11LIC_FILES_CHKSUM = "file://COPYING.txt;md5=02ee26814dd044bd7838ae24e05b880f"
12
13PROVIDES = "virtual/libsdl2"
14
15SRC_URI = "http://www.libsdl.org/release/SDL2-${PV}.tar.gz \
16 file://more-gen-depends.patch \
17"
18
19S = "${WORKDIR}/SDL2-${PV}"
20
21SRC_URI[md5sum] = "f2ecfba915c54f7200f504d8b48a5dfe"
22SRC_URI[sha256sum] = "255186dc676ecd0c1dbf10ec8a2cc5d6869b5079d8a38194c2aecdff54b324b1"
23
Brad Bishopf3fd2882019-06-21 08:06:37 -040024inherit autotools lib_package binconfig-disabled pkgconfig
25
26BINCONFIG = "${bindir}/sdl2-config"
Brad Bishop19323692019-04-05 15:28:33 -040027
Brad Bishopc342db32019-05-15 21:57:59 -040028CVE_PRODUCT = "simple_directmedia_layer sdl"
29
Brad Bishop19323692019-04-05 15:28:33 -040030EXTRA_OECONF = "--disable-oss --disable-esd --disable-arts \
31 --disable-diskaudio --disable-nas --disable-esd-shared --disable-esdtest \
32 --disable-video-dummy \
33 --enable-pthreads \
34 --enable-sdl-dlopen \
35 --disable-rpath \
36 --disable-sndio \
37 "
38
39# opengl packageconfig factored out to make it easy for distros
40# and BSP layers to pick either (desktop) opengl, gles2, or no GL
41PACKAGECONFIG_GL ?= "${@bb.utils.filter('DISTRO_FEATURES', 'opengl', d)}"
42
43PACKAGECONFIG_class-native = "x11"
44PACKAGECONFIG_class-nativesdk = "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}"
45PACKAGECONFIG ??= " \
46 ${PACKAGECONFIG_GL} \
47 ${@bb.utils.filter('DISTRO_FEATURES', 'alsa directfb pulseaudio x11', d)} \
48 ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland gles2', '', d)} \
49"
50PACKAGECONFIG[alsa] = "--enable-alsa --disable-alsatest,--disable-alsa,alsa-lib,"
51PACKAGECONFIG[directfb] = "--enable-video-directfb,--disable-video-directfb,directfb"
52PACKAGECONFIG[gles2] = "--enable-video-opengles,--disable-video-opengles,virtual/libgles2"
53PACKAGECONFIG[jack] = "--enable-jack,--disable-jack,jack"
54PACKAGECONFIG[kmsdrm] = "--enable-video-kmsdrm,--disable-video-kmsdrm,libdrm virtual/libgbm"
55PACKAGECONFIG[opengl] = "--enable-video-opengl,--disable-video-opengl,virtual/libgl"
56PACKAGECONFIG[pulseaudio] = "--enable-pulseaudio,--disable-pulseaudio,pulseaudio"
57PACKAGECONFIG[tslib] = "--enable-input-tslib,--disable-input-tslib,tslib"
58PACKAGECONFIG[wayland] = "--enable-video-wayland,--disable-video-wayland,wayland-native wayland wayland-protocols libxkbcommon"
59PACKAGECONFIG[x11] = "--enable-video-x11,--disable-video-x11,virtual/libx11 libxext libxrandr libxrender"
60
61EXTRA_AUTORECONF += "--include=acinclude --exclude=autoheader"
62
63do_configure_prepend() {
64 # Remove old libtool macros.
65 MACROS="libtool.m4 lt~obsolete.m4 ltoptions.m4 ltsugar.m4 ltversion.m4"
66 for i in ${MACROS}; do
67 rm -f ${S}/acinclude/$i
68 done
69 export SYSROOT=$PKG_CONFIG_SYSROOT_DIR
70}
71
72FILES_${PN}-dev += "${libdir}/cmake"
73
74BBCLASSEXTEND = "native nativesdk"