Brad Bishop | 1932369 | 2019-04-05 15:28:33 -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" |
Brad Bishop | 08902b0 | 2019-08-20 09:16:51 -0400 | [diff] [blame] | 11 | LIC_FILES_CHKSUM = "file://COPYING.txt;md5=504a9454ceb89fd75a2583473b11409e" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 12 | |
| 13 | PROVIDES = "virtual/libsdl2" |
| 14 | |
| 15 | SRC_URI = "http://www.libsdl.org/release/SDL2-${PV}.tar.gz \ |
| 16 | file://more-gen-depends.patch \ |
Brad Bishop | 64c979e | 2019-11-04 13:55:29 -0500 | [diff] [blame] | 17 | file://0001-Fixed-bug-4538-validate-image-size-when-loading-BMP-.patch \ |
| 18 | file://0002-Fixed-bug-4797-SDL-fails-to-compile-with-Mesa-Master.patch \ |
Brad Bishop | 1d80a2e | 2019-11-15 16:35:03 -0500 | [diff] [blame^] | 19 | file://0001-configure-check-for-build-dir-when-building-version-.patch \ |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 20 | " |
| 21 | |
| 22 | S = "${WORKDIR}/SDL2-${PV}" |
| 23 | |
Brad Bishop | 08902b0 | 2019-08-20 09:16:51 -0400 | [diff] [blame] | 24 | SRC_URI[md5sum] = "5a2114f2a6f348bdab5bf52b994811db" |
| 25 | SRC_URI[sha256sum] = "b4656c13a1f0d0023ae2f4a9cf08ec92fffb464e0f24238337784159b8b91d57" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 26 | |
Brad Bishop | f3fd288 | 2019-06-21 08:06:37 -0400 | [diff] [blame] | 27 | inherit autotools lib_package binconfig-disabled pkgconfig |
| 28 | |
| 29 | BINCONFIG = "${bindir}/sdl2-config" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 30 | |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 31 | CVE_PRODUCT = "simple_directmedia_layer sdl" |
| 32 | |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 33 | EXTRA_OECONF = "--disable-oss --disable-esd --disable-arts \ |
| 34 | --disable-diskaudio --disable-nas --disable-esd-shared --disable-esdtest \ |
| 35 | --disable-video-dummy \ |
| 36 | --enable-pthreads \ |
| 37 | --enable-sdl-dlopen \ |
| 38 | --disable-rpath \ |
| 39 | --disable-sndio \ |
| 40 | " |
| 41 | |
| 42 | # opengl packageconfig factored out to make it easy for distros |
| 43 | # and BSP layers to pick either (desktop) opengl, gles2, or no GL |
| 44 | PACKAGECONFIG_GL ?= "${@bb.utils.filter('DISTRO_FEATURES', 'opengl', d)}" |
| 45 | |
| 46 | PACKAGECONFIG_class-native = "x11" |
| 47 | PACKAGECONFIG_class-nativesdk = "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}" |
| 48 | PACKAGECONFIG ??= " \ |
| 49 | ${PACKAGECONFIG_GL} \ |
| 50 | ${@bb.utils.filter('DISTRO_FEATURES', 'alsa directfb pulseaudio x11', d)} \ |
| 51 | ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland gles2', '', d)} \ |
| 52 | " |
| 53 | PACKAGECONFIG[alsa] = "--enable-alsa --disable-alsatest,--disable-alsa,alsa-lib," |
| 54 | PACKAGECONFIG[directfb] = "--enable-video-directfb,--disable-video-directfb,directfb" |
| 55 | PACKAGECONFIG[gles2] = "--enable-video-opengles,--disable-video-opengles,virtual/libgles2" |
| 56 | PACKAGECONFIG[jack] = "--enable-jack,--disable-jack,jack" |
| 57 | PACKAGECONFIG[kmsdrm] = "--enable-video-kmsdrm,--disable-video-kmsdrm,libdrm virtual/libgbm" |
| 58 | PACKAGECONFIG[opengl] = "--enable-video-opengl,--disable-video-opengl,virtual/libgl" |
| 59 | PACKAGECONFIG[pulseaudio] = "--enable-pulseaudio,--disable-pulseaudio,pulseaudio" |
| 60 | PACKAGECONFIG[tslib] = "--enable-input-tslib,--disable-input-tslib,tslib" |
| 61 | PACKAGECONFIG[wayland] = "--enable-video-wayland,--disable-video-wayland,wayland-native wayland wayland-protocols libxkbcommon" |
| 62 | PACKAGECONFIG[x11] = "--enable-video-x11,--disable-video-x11,virtual/libx11 libxext libxrandr libxrender" |
| 63 | |
| 64 | EXTRA_AUTORECONF += "--include=acinclude --exclude=autoheader" |
| 65 | |
| 66 | do_configure_prepend() { |
| 67 | # Remove old libtool macros. |
| 68 | MACROS="libtool.m4 lt~obsolete.m4 ltoptions.m4 ltsugar.m4 ltversion.m4" |
| 69 | for i in ${MACROS}; do |
| 70 | rm -f ${S}/acinclude/$i |
| 71 | done |
| 72 | export SYSROOT=$PKG_CONFIG_SYSROOT_DIR |
| 73 | } |
| 74 | |
| 75 | FILES_${PN}-dev += "${libdir}/cmake" |
| 76 | |
| 77 | BBCLASSEXTEND = "native nativesdk" |