blob: 97f64f3847cf9fe39c4aa798f3123e95b517cb3a [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -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=67dcb7fae16952557bc5f96e9eb5d188"
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 = "http://www.libsdl.org/release/SDL2-${PV}.tar.gz"
18
19S = "${WORKDIR}/SDL2-${PV}"
20
21SRC_URI[md5sum] = "fe6c61d2e9df9ef570e7e80c6e822537"
22SRC_URI[sha256sum] = "a5a69a6abf80bcce713fa873607735fe712f44276a7f048d60a61bb2f6b3c90c"
23
24inherit autotools lib_package binconfig pkgconfig
25
26EXTRA_OECONF = "--disable-oss --disable-esd --disable-arts \
27 --disable-diskaudio --disable-nas --disable-esd-shared --disable-esdtest \
28 --disable-video-dummy \
29 --enable-pthreads \
30 --enable-sdl-dlopen \
31 --disable-rpath"
32
33# opengl packageconfig factored out to make it easy for distros
34# and BSP layers to pick either (desktop) opengl, gles2, or no GL
35PACKAGECONFIG_GL ?= "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'opengl', '', d)}"
36
37PACKAGECONFIG ??= " \
38 ${PACKAGECONFIG_GL} \
39 ${@bb.utils.contains('DISTRO_FEATURES', 'alsa', 'alsa', '', d)} \
40 ${@bb.utils.contains('DISTRO_FEATURES', 'directfb', 'directfb', '', d)} \
41 ${@bb.utils.contains('DISTRO_FEATURES', 'pulseaudio', 'pulseaudio', '', d)} \
42 ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', '', d)} \
43 ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)} \
44"
45PACKAGECONFIG[alsa] = "--enable-alsa --disable-alsatest,--disable-alsa,alsa-lib,"
46PACKAGECONFIG[directfb] = "--enable-video-directfb --disable-video-directfb,directfb"
47PACKAGECONFIG[gles2] = "--enable-video-opengles,--disable-video-opengles,virtual/libgles2"
48PACKAGECONFIG[opengl] = "--enable-video-opengl,--disable-video-opengl,virtual/libgl"
49PACKAGECONFIG[pulseaudio] = "--enable-pulseaudio,--disable-pulseaudio,pulseaudio"
50PACKAGECONFIG[tslib] = "--enable-input-tslib,--disable-input-tslib,tslib"
51PACKAGECONFIG[wayland] = "--enable-video-wayland,--disable-video-wayland,wayland"
52PACKAGECONFIG[x11] = "--enable-video-x11,--disable-video-x11,virtual/libx11 libxext libxrandr libxrender"
53
54EXTRA_AUTORECONF += "--include=acinclude --exclude=autoheader"
55
56do_configure_prepend() {
57 # Remove old libtool macros.
58 MACROS="libtool.m4 lt~obsolete.m4 ltoptions.m4 ltsugar.m4 ltversion.m4"
59 for i in ${MACROS}; do
60 rm -f ${S}/acinclude/$i
61 done
62 export SYSROOT=$PKG_CONFIG_SYSROOT_DIR
63}