temp/sdl2: fork from Alpine, upgrade to 2.0.15 (MR 1914)
2.0.15 is a development 'version' (it'll never be released), and will be replaced by 2.0.16 when that is released. The reason for forking this is because there are some issues that are resolved here that prevent SDL2 from working on the Librem 5. The fixes cannot be easily backported to 2.0.14, hence the fork and upgrade. fixes #950
This commit is contained in:
parent
d228df99c1
commit
1c5ce5f16f
4 changed files with 146 additions and 0 deletions
28
temp/sdl2/0001-cmake-reset-SDL_INTERFACE_AGE-to-0.patch
Normal file
28
temp/sdl2/0001-cmake-reset-SDL_INTERFACE_AGE-to-0.patch
Normal file
|
@ -0,0 +1,28 @@
|
|||
From e87ab6c7187cea90f29cd776fb8e1affb42ee15c Mon Sep 17 00:00:00 2001
|
||||
From: Clayton Craft <clayton@craftyguy.net>
|
||||
Date: Sun, 31 Jan 2021 23:56:18 -0800
|
||||
Subject: [PATCH] cmake: reset SDL_INTERFACE_AGE to 0
|
||||
|
||||
This indicated 'new functions were added' and so the lib should be
|
||||
backwards compatible. Resetting it to 0 will allow installing this in
|
||||
place of 2.0.14, without having to rebuild all SDL2 apps against it.
|
||||
---
|
||||
CMakeLists.txt | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 847629552..7a7383274 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -54,7 +54,7 @@ include(${SDL2_SOURCE_DIR}/cmake/sdlchecks.cmake)
|
||||
set(SDL_MAJOR_VERSION 2)
|
||||
set(SDL_MINOR_VERSION 0)
|
||||
set(SDL_MICRO_VERSION 15)
|
||||
-set(SDL_INTERFACE_AGE 1)
|
||||
+set(SDL_INTERFACE_AGE 0)
|
||||
set(SDL_BINARY_AGE 15)
|
||||
set(SDL_VERSION "${SDL_MAJOR_VERSION}.${SDL_MINOR_VERSION}.${SDL_MICRO_VERSION}")
|
||||
# the following should match the versions in Xcode project file:
|
||||
--
|
||||
2.30.0
|
||||
|
90
temp/sdl2/APKBUILD
Normal file
90
temp/sdl2/APKBUILD
Normal file
|
@ -0,0 +1,90 @@
|
|||
# forked from Alpine Linux
|
||||
pkgname=sdl2
|
||||
pkgver=2.0.15_hg20210201
|
||||
pkgrel=0
|
||||
_snapshot_ver=14845
|
||||
_pkgver=${pkgver%_hg*}
|
||||
pkgdesc="development library designed to provide low level access to audio, keyboard, mouse, joystick and graphics"
|
||||
url="https://www.libsdl.org"
|
||||
arch="all"
|
||||
license="Zlib"
|
||||
depends_dev="directfb-dev mesa-dev samurai"
|
||||
makedepends="
|
||||
alsa-lib-dev
|
||||
cmake
|
||||
eudev-dev
|
||||
jack-dev
|
||||
libx11-dev
|
||||
libxcursor-dev
|
||||
libxext-dev
|
||||
libxi-dev
|
||||
libxkbcommon-dev
|
||||
libxrandr-dev
|
||||
libxrender-dev
|
||||
libxscrnsaver-dev
|
||||
libusb-dev
|
||||
pulseaudio-dev
|
||||
wayland-dev
|
||||
wayland-protocols
|
||||
$depends_dev
|
||||
"
|
||||
subpackages="$pkgname-dev"
|
||||
source="https://www.libsdl.org/tmp/SDL-$_pkgver-$_snapshot_ver.tar.gz
|
||||
directfb-cflags.patch
|
||||
khronos.patch
|
||||
0001-cmake-reset-SDL_INTERFACE_AGE-to-0.patch
|
||||
"
|
||||
options="!check !strip" # No good way to run the available tests
|
||||
builddir="$srcdir/SDL-$_pkgver-$_snapshot_ver"
|
||||
|
||||
# secfixes:
|
||||
# 2.0.10-r0:
|
||||
# - CVE-2019-7572
|
||||
# - CVE-2019-7573
|
||||
# - CVE-2019-7574
|
||||
# - CVE-2019-7575
|
||||
# - CVE-2019-7576
|
||||
# - CVE-2019-7578
|
||||
# - CVE-2019-7635
|
||||
# - CVE-2019-7636
|
||||
# - CVE-2019-7637
|
||||
# - CVE-2019-7638
|
||||
|
||||
build() {
|
||||
# NOTE: Please do not remove the -DVIDEO_DIRECTFB=ON flag.
|
||||
# Some apps, used for booting Alpine derivatives, require this to function!
|
||||
if [ "$CBUILD" != "$CHOST" ]; then
|
||||
CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux"
|
||||
fi
|
||||
cmake -B build \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||
-DCMAKE_INSTALL_LIBDIR=lib \
|
||||
-DCMAKE_BUILD_TYPE=None \
|
||||
-DBUILD_SHARED_LIBS=True \
|
||||
-DSDL_TEST=OFF \
|
||||
-DALSA=ON \
|
||||
-DJACK=ON \
|
||||
-DCLOCK_GETTIME=ON \
|
||||
-DARTS=OFF \
|
||||
-DESD=OFF \
|
||||
-DNAS=OFF \
|
||||
-DRPATH=OFF \
|
||||
-DVIDEO_X11=ON \
|
||||
-DVIDEO_DIRECTFB=ON \
|
||||
-DVIDEO_WAYLAND=ON \
|
||||
-DCMAKE_C_FLAGS="$CFLAGS" \
|
||||
-DSDL_STATIC=ON \
|
||||
-DSDL_SHARED=ON \
|
||||
-DPULSEAUDIO_SHARED=ON \
|
||||
"$CMAKE_CROSSOPTS"
|
||||
make -C build
|
||||
}
|
||||
|
||||
package() {
|
||||
make -C build DESTDIR="$pkgdir" install
|
||||
}
|
||||
|
||||
sha512sums="ff3c7eca4f7ca652c48cff44e33d59894e220796b4982375bcb09c9fa7936c77c1c1a73759ee1b6ceed5b532b52f7e08e3d771c64524c34d22e42bfaedd4f350 SDL-2.0.15-14845.tar.gz
|
||||
8efdd02e0e71908b913f4c05b1f02aa94315c2bbffff87d1a46db94723dd7f0ea177e1e00de6c212ad31a00a22aa0fd87f63c3865c4dff2dc98f302046084caf directfb-cflags.patch
|
||||
76c93659a122def05f341ba30507b546b201c84823236ca731ac801f092e769574e8f051770a76050a77ac846ed851abab604e0a6d578b382f4792ab47aa60ed khronos.patch
|
||||
af3cd40185178cb3ce879e823d4c623155a6d969caff083345f7d77b0899be509f66deddd27557fc6bdc8d94d2f71988e3d38b407a2cd4d8c0c3becb34d3cd14 0001-cmake-reset-SDL_INTERFACE_AGE-to-0.patch"
|
10
temp/sdl2/directfb-cflags.patch
Normal file
10
temp/sdl2/directfb-cflags.patch
Normal file
|
@ -0,0 +1,10 @@
|
|||
--- a/cmake/sdlchecks.cmake
|
||||
+++ b/cmake/sdlchecks.cmake
|
||||
@@ -692,6 +692,7 @@ macro(CheckDirectFB)
|
||||
set(SDL_VIDEO_DRIVER_DIRECTFB 1)
|
||||
set(SDL_VIDEO_RENDER_DIRECTFB 1)
|
||||
list(APPEND EXTRA_CFLAGS ${PKG_DIRECTFB_CFLAGS})
|
||||
+ list(JOIN PKG_DIRECTFB_CFLAGS " " SDL_CFLAGS)
|
||||
if(DIRECTFB_SHARED)
|
||||
if(NOT HAVE_DLOPEN)
|
||||
message_warn("You must have SDL_LoadObject() support for dynamic DirectFB loading")
|
18
temp/sdl2/khronos.patch
Normal file
18
temp/sdl2/khronos.patch
Normal file
|
@ -0,0 +1,18 @@
|
|||
From: sndirsch@suse.com
|
||||
Date: 2019-10-09 14:00:03+0000
|
||||
References: https://bugzilla.opensuse.org/show_bug.cgi?id=1153455
|
||||
|
||||
--- a/include/SDL_opengl_glext.h
|
||||
+++ b/include/SDL_opengl_glext.h
|
||||
@@ -472,8 +472,9 @@
|
||||
typedef long GLsizeiptr;
|
||||
typedef long GLintptr;
|
||||
#else
|
||||
-typedef ptrdiff_t GLsizeiptr;
|
||||
-typedef ptrdiff_t GLintptr;
|
||||
+#include <KHR/khrplatform.h>
|
||||
+typedef khronos_ssize_t GLsizeiptr;
|
||||
+typedef khronos_intptr_t GLintptr;
|
||||
#endif
|
||||
#define GL_BUFFER_SIZE 0x8764
|
||||
#define GL_BUFFER_USAGE 0x8765
|
Loading…
Reference in a new issue