Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1 | SUMMARY = "Simple DirectMedia Layer" |
| 2 | DESCRIPTION = "Simple DirectMedia Layer is a cross-platform multimedia \ |
| 3 | library designed to provide low level access to audio, keyboard, mouse, \ |
| 4 | joystick, 3D hardware via OpenGL, and 2D video framebuffer." |
| 5 | HOMEPAGE = "http://www.libsdl.org" |
| 6 | BUGTRACKER = "http://bugzilla.libsdl.org/" |
| 7 | |
| 8 | SECTION = "libs" |
| 9 | |
| 10 | LICENSE = "Zlib" |
| 11 | LIC_FILES_CHKSUM = "file://COPYING.txt;md5=67dcb7fae16952557bc5f96e9eb5d188" |
| 12 | |
| 13 | PROVIDES = "virtual/libsdl2" |
| 14 | |
| 15 | DEPENDS_class-nativesdk = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'virtual/nativesdk-libx11 nativesdk-libxrandr nativesdk-libxrender nativesdk-libxext', '', d)}" |
| 16 | |
| 17 | SRC_URI = "http://www.libsdl.org/release/SDL2-${PV}.tar.gz" |
| 18 | |
| 19 | S = "${WORKDIR}/SDL2-${PV}" |
| 20 | |
| 21 | SRC_URI[md5sum] = "fe6c61d2e9df9ef570e7e80c6e822537" |
| 22 | SRC_URI[sha256sum] = "a5a69a6abf80bcce713fa873607735fe712f44276a7f048d60a61bb2f6b3c90c" |
| 23 | |
| 24 | inherit autotools lib_package binconfig pkgconfig |
| 25 | |
| 26 | EXTRA_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 |
| 35 | PACKAGECONFIG_GL ?= "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'opengl', '', d)}" |
| 36 | |
| 37 | PACKAGECONFIG ??= " \ |
| 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 | " |
| 45 | PACKAGECONFIG[alsa] = "--enable-alsa --disable-alsatest,--disable-alsa,alsa-lib," |
| 46 | PACKAGECONFIG[directfb] = "--enable-video-directfb --disable-video-directfb,directfb" |
| 47 | PACKAGECONFIG[gles2] = "--enable-video-opengles,--disable-video-opengles,virtual/libgles2" |
| 48 | PACKAGECONFIG[opengl] = "--enable-video-opengl,--disable-video-opengl,virtual/libgl" |
| 49 | PACKAGECONFIG[pulseaudio] = "--enable-pulseaudio,--disable-pulseaudio,pulseaudio" |
| 50 | PACKAGECONFIG[tslib] = "--enable-input-tslib,--disable-input-tslib,tslib" |
| 51 | PACKAGECONFIG[wayland] = "--enable-video-wayland,--disable-video-wayland,wayland" |
| 52 | PACKAGECONFIG[x11] = "--enable-video-x11,--disable-video-x11,virtual/libx11 libxext libxrandr libxrender" |
| 53 | |
| 54 | EXTRA_AUTORECONF += "--include=acinclude --exclude=autoheader" |
| 55 | |
| 56 | do_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 | } |