blob: 862abe1d54b14f657151235728234f7036db1d16 [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 Bishop19323692019-04-05 15:28:33 -040019"
20
21S = "${WORKDIR}/SDL2-${PV}"
22
Brad Bishop08902b02019-08-20 09:16:51 -040023SRC_URI[md5sum] = "5a2114f2a6f348bdab5bf52b994811db"
24SRC_URI[sha256sum] = "b4656c13a1f0d0023ae2f4a9cf08ec92fffb464e0f24238337784159b8b91d57"
Brad Bishop19323692019-04-05 15:28:33 -040025
Brad Bishopf3fd2882019-06-21 08:06:37 -040026inherit autotools lib_package binconfig-disabled pkgconfig
27
28BINCONFIG = "${bindir}/sdl2-config"
Brad Bishop19323692019-04-05 15:28:33 -040029
Brad Bishopc342db32019-05-15 21:57:59 -040030CVE_PRODUCT = "simple_directmedia_layer sdl"
31
Brad Bishop19323692019-04-05 15:28:33 -040032EXTRA_OECONF = "--disable-oss --disable-esd --disable-arts \
33 --disable-diskaudio --disable-nas --disable-esd-shared --disable-esdtest \
34 --disable-video-dummy \
35 --enable-pthreads \
36 --enable-sdl-dlopen \
37 --disable-rpath \
38 --disable-sndio \
39 "
40
41# opengl packageconfig factored out to make it easy for distros
42# and BSP layers to pick either (desktop) opengl, gles2, or no GL
43PACKAGECONFIG_GL ?= "${@bb.utils.filter('DISTRO_FEATURES', 'opengl', d)}"
44
45PACKAGECONFIG_class-native = "x11"
46PACKAGECONFIG_class-nativesdk = "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}"
47PACKAGECONFIG ??= " \
48 ${PACKAGECONFIG_GL} \
49 ${@bb.utils.filter('DISTRO_FEATURES', 'alsa directfb pulseaudio x11', d)} \
50 ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland gles2', '', d)} \
51"
52PACKAGECONFIG[alsa] = "--enable-alsa --disable-alsatest,--disable-alsa,alsa-lib,"
53PACKAGECONFIG[directfb] = "--enable-video-directfb,--disable-video-directfb,directfb"
54PACKAGECONFIG[gles2] = "--enable-video-opengles,--disable-video-opengles,virtual/libgles2"
55PACKAGECONFIG[jack] = "--enable-jack,--disable-jack,jack"
56PACKAGECONFIG[kmsdrm] = "--enable-video-kmsdrm,--disable-video-kmsdrm,libdrm virtual/libgbm"
57PACKAGECONFIG[opengl] = "--enable-video-opengl,--disable-video-opengl,virtual/libgl"
58PACKAGECONFIG[pulseaudio] = "--enable-pulseaudio,--disable-pulseaudio,pulseaudio"
59PACKAGECONFIG[tslib] = "--enable-input-tslib,--disable-input-tslib,tslib"
60PACKAGECONFIG[wayland] = "--enable-video-wayland,--disable-video-wayland,wayland-native wayland wayland-protocols libxkbcommon"
61PACKAGECONFIG[x11] = "--enable-video-x11,--disable-video-x11,virtual/libx11 libxext libxrandr libxrender"
62
63EXTRA_AUTORECONF += "--include=acinclude --exclude=autoheader"
64
65do_configure_prepend() {
66 # Remove old libtool macros.
67 MACROS="libtool.m4 lt~obsolete.m4 ltoptions.m4 ltsugar.m4 ltversion.m4"
68 for i in ${MACROS}; do
69 rm -f ${S}/acinclude/$i
70 done
71 export SYSROOT=$PKG_CONFIG_SYSROOT_DIR
72}
73
74FILES_${PN}-dev += "${libdir}/cmake"
75
76BBCLASSEXTEND = "native nativesdk"