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 | |
Patrick Williams | 03907ee | 2022-05-01 06:28:52 -0500 | [diff] [blame] | 10 | LICENSE = "Zlib & BSD-2-Clause" |
| 11 | LIC_FILES_CHKSUM = "\ |
| 12 | file://LICENSE.txt;md5=68a088513da90254b2fbe664f42af315 \ |
| 13 | file://src/hidapi/LICENSE.txt;md5=7c3949a631240cb6c31c50f3eb696077 \ |
| 14 | file://src/hidapi/LICENSE-bsd.txt;md5=b5fa085ce0926bb50d0621620a82361f \ |
| 15 | file://src/video/yuv2rgb/LICENSE;md5=79f8f3418d91531e05f0fc94ca67e071 \ |
| 16 | " |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 17 | |
| 18 | # arm-neon adds MIT license |
| 19 | LICENSE:append = " ${@bb.utils.contains('PACKAGECONFIG', 'arm-neon', '& MIT', '', d)}" |
| 20 | 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)}" |
| 21 | |
| 22 | PROVIDES = "virtual/libsdl2" |
| 23 | |
| 24 | SRC_URI = "http://www.libsdl.org/release/SDL2-${PV}.tar.gz \ |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 25 | " |
Patrick Williams | de0582f | 2022-04-08 10:23:27 -0500 | [diff] [blame] | 26 | 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] | 27 | |
| 28 | S = "${WORKDIR}/SDL2-${PV}" |
| 29 | |
Patrick Williams | 2390b1b | 2022-11-03 13:47:49 -0500 | [diff] [blame] | 30 | SRC_URI[sha256sum] = "bc121588b1105065598ce38078026a414c28ea95e66ed2adab4c44d80b309e1b" |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 31 | |
Patrick Williams | 92b42cb | 2022-09-03 06:53:57 -0500 | [diff] [blame] | 32 | inherit cmake lib_package binconfig-disabled pkgconfig upstream-version-is-even |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 33 | |
| 34 | BINCONFIG = "${bindir}/sdl2-config" |
| 35 | |
| 36 | CVE_PRODUCT = "simple_directmedia_layer sdl" |
| 37 | |
| 38 | EXTRA_OECMAKE = "-DSDL_OSS=OFF -DSDL_ESD=OFF -DSDL_ARTS=OFF \ |
| 39 | -DSDL_DISKAUDIO=OFF -DSDL_NAS=OFF -DSDL_ESD_SHARED=OFF \ |
| 40 | -DSDL_DUMMYVIDEO=OFF \ |
| 41 | -DSDL_RPI=OFF \ |
| 42 | -DSDL_PTHREADS=ON \ |
| 43 | -DSDL_RPATH=OFF \ |
| 44 | -DSDL_SNDIO=OFF \ |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 45 | -DSDL_X11_XCURSOR=OFF \ |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 46 | -DSDL_X11_XDBE=OFF \ |
| 47 | -DSDL_X11_XFIXES=OFF \ |
| 48 | -DSDL_X11_XINPUT=OFF \ |
| 49 | -DSDL_X11_XRANDR=OFF \ |
| 50 | -DSDL_X11_XSCRNSAVER=OFF \ |
| 51 | -DSDL_X11_XSHAPE=OFF \ |
| 52 | " |
| 53 | |
| 54 | # opengl packageconfig factored out to make it easy for distros |
| 55 | # and BSP layers to pick either (desktop) opengl, gles2, or no GL |
| 56 | PACKAGECONFIG_GL ?= "${@bb.utils.filter('DISTRO_FEATURES', 'opengl', d)}" |
| 57 | |
| 58 | PACKAGECONFIG:class-native = "x11 ${PACKAGECONFIG_GL}" |
| 59 | PACKAGECONFIG:class-nativesdk = "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)} ${PACKAGECONFIG_GL}" |
| 60 | PACKAGECONFIG ??= " \ |
| 61 | ${PACKAGECONFIG_GL} \ |
Andrew Geissler | 87f5cff | 2022-09-30 13:13:31 -0500 | [diff] [blame] | 62 | ${@bb.utils.filter('DISTRO_FEATURES', 'alsa directfb pulseaudio x11 vulkan', d)} \ |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 63 | ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland gles2', '', d)} \ |
| 64 | ${@bb.utils.contains("TUNE_FEATURES", "neon","arm-neon","",d)} \ |
| 65 | " |
| 66 | PACKAGECONFIG[alsa] = "-DSDL_ALSA=ON,-DSDL_ALSA=OFF,alsa-lib," |
| 67 | PACKAGECONFIG[arm-neon] = "-DSDL_ARMNEON=ON,-DSDL_ARMNEON=OFF" |
| 68 | PACKAGECONFIG[directfb] = "-DSDL_DIRECTFB=ON,-DSDL_DIRECTFB=OFF,directfb,directfb" |
| 69 | PACKAGECONFIG[gles2] = "-DSDL_OPENGLES=ON,-DSDL_OPENGLES=OFF,virtual/libgles2" |
| 70 | PACKAGECONFIG[jack] = "-DSDL_JACK=ON,-DSDL_JACK=OFF,jack" |
| 71 | PACKAGECONFIG[kmsdrm] = "-DSDL_KMSDRM=ON,-DSDL_KMSDRM=OFF,libdrm virtual/libgbm" |
Andrew Geissler | d583833 | 2022-05-27 11:33:10 -0500 | [diff] [blame] | 72 | # The hidraw support doesn't catch Xbox, PS4 and Nintendo controllers, |
| 73 | # so we'll just use libusb when it's available. |
| 74 | PACKAGECONFIG[libusb] = ",,libusb1" |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 75 | PACKAGECONFIG[opengl] = "-DSDL_OPENGL=ON,-DSDL_OPENGL=OFF,virtual/egl" |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 76 | PACKAGECONFIG[pulseaudio] = "-DSDL_PULSEAUDIO=ON,-DSDL_PULSEAUDIO=OFF,pulseaudio" |
Andrew Geissler | 87f5cff | 2022-09-30 13:13:31 -0500 | [diff] [blame] | 77 | PACKAGECONFIG[vulkan] = "-DSDL_VULKAN=ON,-DSDL_VULKAN=OFF" |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 78 | PACKAGECONFIG[wayland] = "-DSDL_WAYLAND=ON,-DSDL_WAYLAND=OFF,wayland-native wayland wayland-protocols libxkbcommon" |
| 79 | PACKAGECONFIG[x11] = "-DSDL_X11=ON,-DSDL_X11=OFF,virtual/libx11 libxext libxrandr libxrender" |
| 80 | |
| 81 | CFLAGS:append:class-native = " -DNO_SHARED_MEMORY" |
| 82 | |
Andrew Geissler | 87f5cff | 2022-09-30 13:13:31 -0500 | [diff] [blame] | 83 | FILES:${PN} += "${datadir}/licenses/SDL2/LICENSE.txt" |
| 84 | |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 85 | BBCLASSEXTEND = "native nativesdk" |