Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [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://LICENSE.txt;md5=68a088513da90254b2fbe664f42af315" |
| 12 | |
| 13 | # arm-neon adds MIT license |
| 14 | LICENSE:append = " ${@bb.utils.contains('PACKAGECONFIG', 'arm-neon', '& MIT', '', d)}" |
| 15 | LIC_FILES_CHKSUM:append = " ${@bb.utils.contains('PACKAGECONFIG', 'arm-neon', 'file://src/video/arm/pixman-arm-neon-asm.h;md5=9a9cc1e51abbf1da58f4d9528ec9d49b;beginline=1;endline=24', '', d)}" |
| 16 | |
| 17 | PROVIDES = "virtual/libsdl2" |
| 18 | |
| 19 | SRC_URI = "http://www.libsdl.org/release/SDL2-${PV}.tar.gz \ |
| 20 | file://optional-libunwind-generic.patch \ |
| 21 | file://0001-sdlchecks.cmake-pass-cflags-to-the-appropriate-cmake.patch \ |
| 22 | " |
Patrick Williams | de0582f | 2022-04-08 10:23:27 -0500 | [diff] [blame^] | 23 | SRC_URI:append:class-native = " file://0001-Disable-libunwind-in-native-OE-builds-by-not-looking.patch" |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 24 | |
| 25 | S = "${WORKDIR}/SDL2-${PV}" |
| 26 | |
| 27 | SRC_URI[sha256sum] = "c56aba1d7b5b0e7e999e4a7698c70b63a3394ff9704b5f6e1c57e0c16f04dd06" |
| 28 | |
| 29 | inherit cmake lib_package binconfig-disabled pkgconfig |
| 30 | |
| 31 | BINCONFIG = "${bindir}/sdl2-config" |
| 32 | |
| 33 | CVE_PRODUCT = "simple_directmedia_layer sdl" |
| 34 | |
| 35 | EXTRA_OECMAKE = "-DSDL_OSS=OFF -DSDL_ESD=OFF -DSDL_ARTS=OFF \ |
| 36 | -DSDL_DISKAUDIO=OFF -DSDL_NAS=OFF -DSDL_ESD_SHARED=OFF \ |
| 37 | -DSDL_DUMMYVIDEO=OFF \ |
| 38 | -DSDL_RPI=OFF \ |
| 39 | -DSDL_PTHREADS=ON \ |
| 40 | -DSDL_RPATH=OFF \ |
| 41 | -DSDL_SNDIO=OFF \ |
| 42 | -DSDL_X11_XVM=OFF \ |
| 43 | -DSDL_X11_XCURSOR=OFF \ |
| 44 | -DSDL_X11_XINERAMA=OFF \ |
| 45 | -DSDL_X11_XDBE=OFF \ |
| 46 | -DSDL_X11_XFIXES=OFF \ |
| 47 | -DSDL_X11_XINPUT=OFF \ |
| 48 | -DSDL_X11_XRANDR=OFF \ |
| 49 | -DSDL_X11_XSCRNSAVER=OFF \ |
| 50 | -DSDL_X11_XSHAPE=OFF \ |
| 51 | " |
| 52 | |
| 53 | # opengl packageconfig factored out to make it easy for distros |
| 54 | # and BSP layers to pick either (desktop) opengl, gles2, or no GL |
| 55 | PACKAGECONFIG_GL ?= "${@bb.utils.filter('DISTRO_FEATURES', 'opengl', d)}" |
| 56 | |
| 57 | PACKAGECONFIG:class-native = "x11 ${PACKAGECONFIG_GL}" |
| 58 | PACKAGECONFIG:class-nativesdk = "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)} ${PACKAGECONFIG_GL}" |
| 59 | PACKAGECONFIG ??= " \ |
| 60 | ${PACKAGECONFIG_GL} \ |
| 61 | ${@bb.utils.filter('DISTRO_FEATURES', 'alsa directfb pulseaudio x11', d)} \ |
| 62 | ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland gles2', '', d)} \ |
| 63 | ${@bb.utils.contains("TUNE_FEATURES", "neon","arm-neon","",d)} \ |
| 64 | " |
| 65 | PACKAGECONFIG[alsa] = "-DSDL_ALSA=ON,-DSDL_ALSA=OFF,alsa-lib," |
| 66 | PACKAGECONFIG[arm-neon] = "-DSDL_ARMNEON=ON,-DSDL_ARMNEON=OFF" |
| 67 | PACKAGECONFIG[directfb] = "-DSDL_DIRECTFB=ON,-DSDL_DIRECTFB=OFF,directfb,directfb" |
| 68 | PACKAGECONFIG[gles2] = "-DSDL_OPENGLES=ON,-DSDL_OPENGLES=OFF,virtual/libgles2" |
| 69 | PACKAGECONFIG[jack] = "-DSDL_JACK=ON,-DSDL_JACK=OFF,jack" |
| 70 | PACKAGECONFIG[kmsdrm] = "-DSDL_KMSDRM=ON,-DSDL_KMSDRM=OFF,libdrm virtual/libgbm" |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 71 | PACKAGECONFIG[opengl] = "-DSDL_OPENGL=ON,-DSDL_OPENGL=OFF,virtual/egl" |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 72 | PACKAGECONFIG[pulseaudio] = "-DSDL_PULSEAUDIO=ON,-DSDL_PULSEAUDIO=OFF,pulseaudio" |
| 73 | PACKAGECONFIG[wayland] = "-DSDL_WAYLAND=ON,-DSDL_WAYLAND=OFF,wayland-native wayland wayland-protocols libxkbcommon" |
| 74 | PACKAGECONFIG[x11] = "-DSDL_X11=ON,-DSDL_X11=OFF,virtual/libx11 libxext libxrandr libxrender" |
| 75 | |
| 76 | CFLAGS:append:class-native = " -DNO_SHARED_MEMORY" |
| 77 | |
| 78 | BBCLASSEXTEND = "native nativesdk" |