Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -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=b2304ad7e91711027590d3f102a754b7" |
| 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 = " \ |
| 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 | |
| 25 | S = "${WORKDIR}/SDL2-${PV}" |
| 26 | |
| 27 | SRC_URI[md5sum] = "d4055424d556b4a908aa76fad63abd3c" |
| 28 | SRC_URI[sha256sum] = "442038cf55965969f2ff06d976031813de643af9c9edc9e331bd761c242e8785" |
| 29 | |
| 30 | inherit autotools lib_package binconfig pkgconfig |
| 31 | |
| 32 | EXTRA_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 |
| 42 | PACKAGECONFIG_GL ?= "${@bb.utils.filter('DISTRO_FEATURES', 'opengl', d)}" |
| 43 | |
| 44 | PACKAGECONFIG ??= " \ |
| 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 | " |
| 49 | PACKAGECONFIG[alsa] = "--enable-alsa --disable-alsatest,--disable-alsa,alsa-lib," |
| 50 | PACKAGECONFIG[directfb] = "--enable-video-directfb,--disable-video-directfb,directfb" |
| 51 | PACKAGECONFIG[gles2] = "--enable-video-opengles,--disable-video-opengles,virtual/libgles2" |
| 52 | PACKAGECONFIG[opengl] = "--enable-video-opengl,--disable-video-opengl,virtual/libgl" |
| 53 | PACKAGECONFIG[pulseaudio] = "--enable-pulseaudio,--disable-pulseaudio,pulseaudio" |
| 54 | PACKAGECONFIG[tslib] = "--enable-input-tslib,--disable-input-tslib,tslib" |
| 55 | PACKAGECONFIG[wayland] = "--enable-video-wayland,--disable-video-wayland,wayland-native wayland wayland-protocols libxkbcommon" |
| 56 | PACKAGECONFIG[x11] = "--enable-video-x11,--disable-video-x11,virtual/libx11 libxext libxrandr libxrender" |
| 57 | |
| 58 | EXTRA_AUTORECONF += "--include=acinclude --exclude=autoheader" |
| 59 | |
| 60 | do_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 | |
| 69 | FILES_${PN}-dev += "${libdir}/cmake" |