blob: ac4a356043db27f80564aa1392d27e9d78bef820 [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"
Brad Bishop08902b02019-08-20 09:16:51 -040011LIC_FILES_CHKSUM = "file://COPYING.txt;md5=504a9454ceb89fd75a2583473b11409e"
Brad Bishop19323692019-04-05 15:28:33 -040012
13PROVIDES = "virtual/libsdl2"
14
15SRC_URI = "http://www.libsdl.org/release/SDL2-${PV}.tar.gz \
16 file://more-gen-depends.patch \
Brad Bishop64c979e2019-11-04 13:55:29 -050017 file://0001-Fixed-bug-4538-validate-image-size-when-loading-BMP-.patch \
18 file://0002-Fixed-bug-4797-SDL-fails-to-compile-with-Mesa-Master.patch \
Brad Bishop1d80a2e2019-11-15 16:35:03 -050019 file://0001-configure-check-for-build-dir-when-building-version-.patch \
Brad Bishop19323692019-04-05 15:28:33 -040020"
21
22S = "${WORKDIR}/SDL2-${PV}"
23
Brad Bishop08902b02019-08-20 09:16:51 -040024SRC_URI[md5sum] = "5a2114f2a6f348bdab5bf52b994811db"
25SRC_URI[sha256sum] = "b4656c13a1f0d0023ae2f4a9cf08ec92fffb464e0f24238337784159b8b91d57"
Brad Bishop19323692019-04-05 15:28:33 -040026
Brad Bishopf3fd2882019-06-21 08:06:37 -040027inherit autotools lib_package binconfig-disabled pkgconfig
28
29BINCONFIG = "${bindir}/sdl2-config"
Brad Bishop19323692019-04-05 15:28:33 -040030
Brad Bishopc342db32019-05-15 21:57:59 -040031CVE_PRODUCT = "simple_directmedia_layer sdl"
32
Brad Bishop19323692019-04-05 15:28:33 -040033EXTRA_OECONF = "--disable-oss --disable-esd --disable-arts \
34 --disable-diskaudio --disable-nas --disable-esd-shared --disable-esdtest \
35 --disable-video-dummy \
36 --enable-pthreads \
37 --enable-sdl-dlopen \
38 --disable-rpath \
39 --disable-sndio \
40 "
41
42# opengl packageconfig factored out to make it easy for distros
43# and BSP layers to pick either (desktop) opengl, gles2, or no GL
44PACKAGECONFIG_GL ?= "${@bb.utils.filter('DISTRO_FEATURES', 'opengl', d)}"
45
46PACKAGECONFIG_class-native = "x11"
47PACKAGECONFIG_class-nativesdk = "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}"
48PACKAGECONFIG ??= " \
49 ${PACKAGECONFIG_GL} \
50 ${@bb.utils.filter('DISTRO_FEATURES', 'alsa directfb pulseaudio x11', d)} \
51 ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland gles2', '', d)} \
52"
53PACKAGECONFIG[alsa] = "--enable-alsa --disable-alsatest,--disable-alsa,alsa-lib,"
54PACKAGECONFIG[directfb] = "--enable-video-directfb,--disable-video-directfb,directfb"
55PACKAGECONFIG[gles2] = "--enable-video-opengles,--disable-video-opengles,virtual/libgles2"
56PACKAGECONFIG[jack] = "--enable-jack,--disable-jack,jack"
57PACKAGECONFIG[kmsdrm] = "--enable-video-kmsdrm,--disable-video-kmsdrm,libdrm virtual/libgbm"
58PACKAGECONFIG[opengl] = "--enable-video-opengl,--disable-video-opengl,virtual/libgl"
59PACKAGECONFIG[pulseaudio] = "--enable-pulseaudio,--disable-pulseaudio,pulseaudio"
60PACKAGECONFIG[tslib] = "--enable-input-tslib,--disable-input-tslib,tslib"
61PACKAGECONFIG[wayland] = "--enable-video-wayland,--disable-video-wayland,wayland-native wayland wayland-protocols libxkbcommon"
62PACKAGECONFIG[x11] = "--enable-video-x11,--disable-video-x11,virtual/libx11 libxext libxrandr libxrender"
63
64EXTRA_AUTORECONF += "--include=acinclude --exclude=autoheader"
65
66do_configure_prepend() {
67 # Remove old libtool macros.
68 MACROS="libtool.m4 lt~obsolete.m4 ltoptions.m4 ltsugar.m4 ltversion.m4"
69 for i in ${MACROS}; do
70 rm -f ${S}/acinclude/$i
71 done
72 export SYSROOT=$PKG_CONFIG_SYSROOT_DIR
73}
74
75FILES_${PN}-dev += "${libdir}/cmake"
76
77BBCLASSEXTEND = "native nativesdk"