blob: 812a9abf3c86efc2ca01487652301f8a672e932d [file] [log] [blame]
Brad Bishop316dfdd2018-06-25 12:45:53 -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
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080015SRC_URI = "http://www.libsdl.org/release/SDL2-${PV}.tar.gz \
16 file://more-gen-depends.patch \
17 file://0001-GLES2-Get-sin-cos-out-of-vertex-shader.patch \
Brad Bishop316dfdd2018-06-25 12:45:53 -040018"
19
20S = "${WORKDIR}/SDL2-${PV}"
21
22SRC_URI[md5sum] = "3800d705cef742c6a634f202c37f263f"
23SRC_URI[sha256sum] = "edc77c57308661d576e843344d8638e025a7818bff73f8fbfab09c3c5fd092ec"
24
25inherit autotools lib_package binconfig pkgconfig
26
27EXTRA_OECONF = "--disable-oss --disable-esd --disable-arts \
28 --disable-diskaudio --disable-nas --disable-esd-shared --disable-esdtest \
29 --disable-video-dummy \
30 --enable-pthreads \
31 --enable-sdl-dlopen \
32 --disable-rpath \
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080033 --disable-sndio \
Brad Bishop316dfdd2018-06-25 12:45:53 -040034 "
35
36# opengl packageconfig factored out to make it easy for distros
37# and BSP layers to pick either (desktop) opengl, gles2, or no GL
38PACKAGECONFIG_GL ?= "${@bb.utils.filter('DISTRO_FEATURES', 'opengl', d)}"
39
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080040PACKAGECONFIG_class-native = "x11"
41PACKAGECONFIG_class-nativesdk = "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}"
Brad Bishop316dfdd2018-06-25 12:45:53 -040042PACKAGECONFIG ??= " \
43 ${PACKAGECONFIG_GL} \
44 ${@bb.utils.filter('DISTRO_FEATURES', 'alsa directfb pulseaudio x11', d)} \
45 ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland gles2', '', d)} \
46"
47PACKAGECONFIG[alsa] = "--enable-alsa --disable-alsatest,--disable-alsa,alsa-lib,"
48PACKAGECONFIG[directfb] = "--enable-video-directfb,--disable-video-directfb,directfb"
49PACKAGECONFIG[gles2] = "--enable-video-opengles,--disable-video-opengles,virtual/libgles2"
50PACKAGECONFIG[opengl] = "--enable-video-opengl,--disable-video-opengl,virtual/libgl"
51PACKAGECONFIG[pulseaudio] = "--enable-pulseaudio,--disable-pulseaudio,pulseaudio"
52PACKAGECONFIG[tslib] = "--enable-input-tslib,--disable-input-tslib,tslib"
53PACKAGECONFIG[wayland] = "--enable-video-wayland,--disable-video-wayland,wayland-native wayland wayland-protocols libxkbcommon"
54PACKAGECONFIG[x11] = "--enable-video-x11,--disable-video-x11,virtual/libx11 libxext libxrandr libxrender"
55
56EXTRA_AUTORECONF += "--include=acinclude --exclude=autoheader"
57
58do_configure_prepend() {
59 # Remove old libtool macros.
60 MACROS="libtool.m4 lt~obsolete.m4 ltoptions.m4 ltsugar.m4 ltversion.m4"
61 for i in ${MACROS}; do
62 rm -f ${S}/acinclude/$i
63 done
64 export SYSROOT=$PKG_CONFIG_SYSROOT_DIR
65}
66
67FILES_${PN}-dev += "${libdir}/cmake"
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080068
69BBCLASSEXTEND = "native nativesdk"