| Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [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=02ee26814dd044bd7838ae24e05b880f" | 
|  | 12 |  | 
|  | 13 | PROVIDES = "virtual/libsdl2" | 
|  | 14 |  | 
| Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 15 | SRC_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 Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 18 | " | 
|  | 19 |  | 
|  | 20 | S = "${WORKDIR}/SDL2-${PV}" | 
|  | 21 |  | 
|  | 22 | SRC_URI[md5sum] = "3800d705cef742c6a634f202c37f263f" | 
|  | 23 | SRC_URI[sha256sum] = "edc77c57308661d576e843344d8638e025a7818bff73f8fbfab09c3c5fd092ec" | 
|  | 24 |  | 
|  | 25 | inherit autotools lib_package binconfig pkgconfig | 
|  | 26 |  | 
|  | 27 | EXTRA_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 Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 33 | --disable-sndio \ | 
| Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 34 | " | 
|  | 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 | 
|  | 38 | PACKAGECONFIG_GL ?= "${@bb.utils.filter('DISTRO_FEATURES', 'opengl', d)}" | 
|  | 39 |  | 
| Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 40 | PACKAGECONFIG_class-native = "x11" | 
|  | 41 | PACKAGECONFIG_class-nativesdk = "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}" | 
| Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 42 | PACKAGECONFIG ??= " \ | 
|  | 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 | " | 
|  | 47 | PACKAGECONFIG[alsa]       = "--enable-alsa --disable-alsatest,--disable-alsa,alsa-lib," | 
|  | 48 | PACKAGECONFIG[directfb]   = "--enable-video-directfb,--disable-video-directfb,directfb" | 
|  | 49 | PACKAGECONFIG[gles2]      = "--enable-video-opengles,--disable-video-opengles,virtual/libgles2" | 
|  | 50 | PACKAGECONFIG[opengl]     = "--enable-video-opengl,--disable-video-opengl,virtual/libgl" | 
|  | 51 | PACKAGECONFIG[pulseaudio] = "--enable-pulseaudio,--disable-pulseaudio,pulseaudio" | 
|  | 52 | PACKAGECONFIG[tslib]      = "--enable-input-tslib,--disable-input-tslib,tslib" | 
|  | 53 | PACKAGECONFIG[wayland]    = "--enable-video-wayland,--disable-video-wayland,wayland-native wayland wayland-protocols libxkbcommon" | 
|  | 54 | PACKAGECONFIG[x11]        = "--enable-video-x11,--disable-video-x11,virtual/libx11 libxext libxrandr libxrender" | 
|  | 55 |  | 
|  | 56 | EXTRA_AUTORECONF += "--include=acinclude --exclude=autoheader" | 
|  | 57 |  | 
|  | 58 | do_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 |  | 
|  | 67 | FILES_${PN}-dev += "${libdir}/cmake" | 
| Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 68 |  | 
|  | 69 | BBCLASSEXTEND = "native nativesdk" |