blob: 12d3aaf6f073b7ff9916a411c7fe54918cf2dcb0 [file] [log] [blame]
Brad Bishop6e60e8b2018-02-01 10:27:11 -05001SUMMARY = "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=b2304ad7e91711027590d3f102a754b7"
12
13PROVIDES = "virtual/libsdl2"
14
15DEPENDS_class-nativesdk = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'virtual/nativesdk-libx11 nativesdk-libxrandr nativesdk-libxrender nativesdk-libxext', '', d)}"
16
17SRC_URI = " \
18 http://www.libsdl.org/release/SDL2-${PV}.tar.gz \
19 file://linkage.patch \
20 file://0001-prepend-our-sysroot-path-so-that-make-finds-our-wayl.patch \
21 file://0002-Avoid-finding-build-host-s-wayland-scanner.patch \
22 file://fix-build-failure-on-ppc.patch \
23"
24
25S = "${WORKDIR}/SDL2-${PV}"
26
27SRC_URI[md5sum] = "d4055424d556b4a908aa76fad63abd3c"
28SRC_URI[sha256sum] = "442038cf55965969f2ff06d976031813de643af9c9edc9e331bd761c242e8785"
29
30inherit autotools lib_package binconfig pkgconfig
31
32EXTRA_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 WAYLAND_PROTOCOLS_SYSROOT_DIR=${RECIPE_SYSROOT}"
39
40# opengl packageconfig factored out to make it easy for distros
41# and BSP layers to pick either (desktop) opengl, gles2, or no GL
42PACKAGECONFIG_GL ?= "${@bb.utils.filter('DISTRO_FEATURES', 'opengl', d)}"
43
44PACKAGECONFIG ??= " \
45 ${PACKAGECONFIG_GL} \
46 ${@bb.utils.filter('DISTRO_FEATURES', 'alsa directfb pulseaudio x11', d)} \
47 ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland gles2', '', d)} \
48"
49PACKAGECONFIG[alsa] = "--enable-alsa --disable-alsatest,--disable-alsa,alsa-lib,"
50PACKAGECONFIG[directfb] = "--enable-video-directfb,--disable-video-directfb,directfb"
51PACKAGECONFIG[gles2] = "--enable-video-opengles,--disable-video-opengles,virtual/libgles2"
52PACKAGECONFIG[opengl] = "--enable-video-opengl,--disable-video-opengl,virtual/libgl"
53PACKAGECONFIG[pulseaudio] = "--enable-pulseaudio,--disable-pulseaudio,pulseaudio"
54PACKAGECONFIG[tslib] = "--enable-input-tslib,--disable-input-tslib,tslib"
55PACKAGECONFIG[wayland] = "--enable-video-wayland,--disable-video-wayland,wayland-native wayland wayland-protocols libxkbcommon"
56PACKAGECONFIG[x11] = "--enable-video-x11,--disable-video-x11,virtual/libx11 libxext libxrandr libxrender"
57
58EXTRA_AUTORECONF += "--include=acinclude --exclude=autoheader"
59
60do_configure_prepend() {
61 # Remove old libtool macros.
62 MACROS="libtool.m4 lt~obsolete.m4 ltoptions.m4 ltsugar.m4 ltversion.m4"
63 for i in ${MACROS}; do
64 rm -f ${S}/acinclude/$i
65 done
66 export SYSROOT=$PKG_CONFIG_SYSROOT_DIR
67}
68
69FILES_${PN}-dev += "${libdir}/cmake"