Date: Tuesday, August 31, 2021 @ 23:29:36 Author: heftig Revision: 1010238
archrelease: copy trunk to community-testing-x86_64 Added: sdl/repos/community-testing-x86_64/ sdl/repos/community-testing-x86_64/0001-SDL-1.2.15-no-default-backing-store.patch (from rev 1010237, sdl/trunk/0001-SDL-1.2.15-no-default-backing-store.patch) sdl/repos/community-testing-x86_64/0002-x11-Bypass-SetGammaRamp-when-changing-gamma.patch (from rev 1010237, sdl/trunk/0002-x11-Bypass-SetGammaRamp-when-changing-gamma.patch) sdl/repos/community-testing-x86_64/0003-sdl-1.2.14-fix-mouse-clicking.patch (from rev 1010237, sdl/trunk/0003-sdl-1.2.14-fix-mouse-clicking.patch) sdl/repos/community-testing-x86_64/0004-sdl-1.2.14-disable-mmx.patch (from rev 1010237, sdl/trunk/0004-sdl-1.2.14-disable-mmx.patch) sdl/repos/community-testing-x86_64/PKGBUILD (from rev 1010237, sdl/trunk/PKGBUILD) --------------------------------------------------------+ 0001-SDL-1.2.15-no-default-backing-store.patch | 33 ++++++++ 0002-x11-Bypass-SetGammaRamp-when-changing-gamma.patch | 41 ++++++++++ 0003-sdl-1.2.14-fix-mouse-clicking.patch | 34 ++++++++ 0004-sdl-1.2.14-disable-mmx.patch | 23 +++++ PKGBUILD | 59 +++++++++++++++ 5 files changed, 190 insertions(+) Copied: sdl/repos/community-testing-x86_64/0001-SDL-1.2.15-no-default-backing-store.patch (from rev 1010237, sdl/trunk/0001-SDL-1.2.15-no-default-backing-store.patch) =================================================================== --- community-testing-x86_64/0001-SDL-1.2.15-no-default-backing-store.patch (rev 0) +++ community-testing-x86_64/0001-SDL-1.2.15-no-default-backing-store.patch 2021-08-31 23:29:36 UTC (rev 1010238) @@ -0,0 +1,33 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: "Jan Alexander Steffens (heftig)" <jan.steff...@gmail.com> +Date: Tue, 31 Aug 2021 22:40:44 +0000 +Subject: [PATCH] SDL-1.2.15-no-default-backing-store + +Do not harness backing store by default + +xorg-server 1.15 enables backing store if composite extension is enabled +(default settings). Harnessing backing store through compositor leads to +tearing effect. + +This patch reverts default harnessing backing store to conditional use if +SDL_VIDEO_X11_BACKINGSTORE environment variable exists. + +<https://bugzilla.libsdl.org/show_bug.cgi?id=2383> +<https://bugzilla.redhat.com/show_bug.cgi?id=1073057> +--- + src/video/x11/SDL_x11video.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/video/x11/SDL_x11video.c b/src/video/x11/SDL_x11video.c +index bbf0d5d0..c365e7a2 100644 +--- a/src/video/x11/SDL_x11video.c ++++ b/src/video/x11/SDL_x11video.c +@@ -1093,7 +1093,7 @@ static int X11_CreateWindow(_THIS, SDL_Surface *screen, + } + } + +-#if 0 /* This is an experiment - are the graphics faster now? - nope. */ ++#if 1 /* This is an experiment - are the graphics faster now? - nope. */ + if ( SDL_getenv("SDL_VIDEO_X11_BACKINGSTORE") ) + #endif + /* Cache the window in the server, when possible */ Copied: sdl/repos/community-testing-x86_64/0002-x11-Bypass-SetGammaRamp-when-changing-gamma.patch (from rev 1010237, sdl/trunk/0002-x11-Bypass-SetGammaRamp-when-changing-gamma.patch) =================================================================== --- community-testing-x86_64/0002-x11-Bypass-SetGammaRamp-when-changing-gamma.patch (rev 0) +++ community-testing-x86_64/0002-x11-Bypass-SetGammaRamp-when-changing-gamma.patch 2021-08-31 23:29:36 UTC (rev 1010238) @@ -0,0 +1,41 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <petr.pi...@atlas.cz> +Date: Tue, 1 Jan 2013 21:25:15 +0100 +Subject: [PATCH] x11: Bypass SetGammaRamp when changing gamma + +Recent Xorg has broken dynamic colors setting, so calling SDL_SetGamme() +does not have any effect here. Recent means xorg-server >= 1.7, since 2010. +See <https://bugs.freedesktop.org/show_bug.cgi?id=27222>. +--- + src/video/SDL_gamma.c | 15 ++------------- + 1 file changed, 2 insertions(+), 13 deletions(-) + +diff --git a/src/video/SDL_gamma.c b/src/video/SDL_gamma.c +index 4fd03701..464ab882 100644 +--- a/src/video/SDL_gamma.c ++++ b/src/video/SDL_gamma.c +@@ -92,22 +92,11 @@ static void CalculateGammaFromRamp(float *gamma, Uint16 *ramp) + + int SDL_SetGamma(float red, float green, float blue) + { +- int succeeded; ++ int succeeded = -1; + SDL_VideoDevice *video = current_video; + SDL_VideoDevice *this = current_video; + +- succeeded = -1; +- /* Prefer using SetGammaRamp(), as it's more flexible */ +- { +- Uint16 ramp[3][256]; +- +- CalculateGammaRamp(red, ramp[0]); +- CalculateGammaRamp(green, ramp[1]); +- CalculateGammaRamp(blue, ramp[2]); +- succeeded = SDL_SetGammaRamp(ramp[0], ramp[1], ramp[2]); +- } +- if ( (succeeded < 0) && video->SetGamma ) { +- SDL_ClearError(); ++ if ( video->SetGamma ) { + succeeded = video->SetGamma(this, red, green, blue); + } + return succeeded; Copied: sdl/repos/community-testing-x86_64/0003-sdl-1.2.14-fix-mouse-clicking.patch (from rev 1010237, sdl/trunk/0003-sdl-1.2.14-fix-mouse-clicking.patch) =================================================================== --- community-testing-x86_64/0003-sdl-1.2.14-fix-mouse-clicking.patch (rev 0) +++ community-testing-x86_64/0003-sdl-1.2.14-fix-mouse-clicking.patch 2021-08-31 23:29:36 UTC (rev 1010238) @@ -0,0 +1,34 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: "Jan Alexander Steffens (heftig)" <jan.steff...@gmail.com> +Date: Tue, 31 Aug 2021 22:41:53 +0000 +Subject: [PATCH] sdl-1.2.14-fix-mouse-clicking + +--- + src/video/x11/SDL_x11events.c | 13 ++++++++----- + 1 file changed, 8 insertions(+), 5 deletions(-) + +diff --git a/src/video/x11/SDL_x11events.c b/src/video/x11/SDL_x11events.c +index be19a69a..9f13b464 100644 +--- a/src/video/x11/SDL_x11events.c ++++ b/src/video/x11/SDL_x11events.c +@@ -451,12 +451,15 @@ printf("Mode: NotifyGrab\n"); + if ( xevent.xcrossing.mode == NotifyUngrab ) + printf("Mode: NotifyUngrab\n"); + #endif +- if ( this->input_grab == SDL_GRAB_OFF ) { +- posted = SDL_PrivateAppActive(1, SDL_APPMOUSEFOCUS); ++ if ( (xevent.xcrossing.mode != NotifyGrab) && ++ (xevent.xcrossing.mode != NotifyUngrab) ) { ++ if ( this->input_grab == SDL_GRAB_OFF ) { ++ posted = SDL_PrivateAppActive(1, SDL_APPMOUSEFOCUS); ++ } ++ posted = SDL_PrivateMouseMotion(0, 0, ++ xevent.xcrossing.x, ++ xevent.xcrossing.y); + } +- posted = SDL_PrivateMouseMotion(0, 0, +- xevent.xcrossing.x, +- xevent.xcrossing.y); + } + break; + Copied: sdl/repos/community-testing-x86_64/0004-sdl-1.2.14-disable-mmx.patch (from rev 1010237, sdl/trunk/0004-sdl-1.2.14-disable-mmx.patch) =================================================================== --- community-testing-x86_64/0004-sdl-1.2.14-disable-mmx.patch (rev 0) +++ community-testing-x86_64/0004-sdl-1.2.14-disable-mmx.patch 2021-08-31 23:29:36 UTC (rev 1010238) @@ -0,0 +1,23 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: "Jan Alexander Steffens (heftig)" <jan.steff...@gmail.com> +Date: Tue, 31 Aug 2021 22:42:24 +0000 +Subject: [PATCH] sdl-1.2.14-disable-mmx + +and another one from FS#26020 +--- + src/video/SDL_yuv_sw.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/video/SDL_yuv_sw.c b/src/video/SDL_yuv_sw.c +index c555ce06..86f436b1 100644 +--- a/src/video/SDL_yuv_sw.c ++++ b/src/video/SDL_yuv_sw.c +@@ -89,6 +89,8 @@ + #include "SDL_yuvfuncs.h" + #include "SDL_yuv_sw_c.h" + ++#undef __OPTIMIZE__ ++ + /* The functions used to manipulate software video overlays */ + static struct private_yuvhwfuncs sw_yuvfuncs = { + SDL_LockYUV_SW, Copied: sdl/repos/community-testing-x86_64/PKGBUILD (from rev 1010237, sdl/trunk/PKGBUILD) =================================================================== --- community-testing-x86_64/PKGBUILD (rev 0) +++ community-testing-x86_64/PKGBUILD 2021-08-31 23:29:36 UTC (rev 1010238) @@ -0,0 +1,59 @@ +# Contributor: Jan Alexander Steffens (heftig) <hef...@archlinux.org> +# Contributor: Allan McRae <al...@archlinux.org> +# Contributor: dorphell <dorph...@archlinux.org> + +pkgname=sdl +pkgver=1.2.15+387+gfbfcca32 +pkgrel=1 +pkgdesc="A library for portable low-level access to a video framebuffer, audio output, mouse, and keyboard" +arch=('x86_64') +url="https://www.libsdl.org" +license=('LGPL') +depends=('glibc' 'libxext' 'libxrender' 'libx11') +makedepends=('alsa-lib' 'mesa' 'libpulse' 'glu' 'git') +optdepends=('alsa-lib: ALSA audio driver' + 'libpulse: PulseAudio audio driver') +options=('staticlibs') +_commit=fbfcca3277a5f13dd78f7d44ffe2dc65d4e2d048 # main +source=("git+https://github.com/libsdl-org/SDL-1.2#commit=$_commit" + 0001-SDL-1.2.15-no-default-backing-store.patch + 0002-x11-Bypass-SetGammaRamp-when-changing-gamma.patch + 0003-sdl-1.2.14-fix-mouse-clicking.patch + 0004-sdl-1.2.14-disable-mmx.patch) +sha256sums=('SKIP' + 'b242b28ab9b2d823d96f0939c6fb2fbaabb110b9e61be754f6cf502a34d57a2f' + '0a5d00c1f75158b1838706a0733a51c8c1014983528bafb4a477327f7595e135' + '70e339886440f94f03a320c4b8605a2704f3e3117aa9e998f32b0cebc3e4bc59' + 'a99bb91981e091bb01bbedf5138008ef16155c9a6b24349a771555c9bb57fdcd') +validpgpkeys=('1528635D8053A57F77D1E08630A59377A7763BE6') # Sam Lantinga <slou...@libsdl.org> + +pkgver() { + cd SDL-1.2 + git describe --tags | sed 's/^release-//;s/-/+/g' +} + +prepare() { + cd SDL-1.2 + + git apply -3 ../0001-SDL-1.2.15-no-default-backing-store.patch + + # https://bugs.freedesktop.org/show_bug.cgi?id=27222 + git apply -3 ../0002-x11-Bypass-SetGammaRamp-when-changing-gamma.patch + + git apply -3 ../0003-sdl-1.2.14-fix-mouse-clicking.patch + git apply -3 ../0004-sdl-1.2.14-disable-mmx.patch + + ./autogen.sh +} + +build() { + cd SDL-1.2 + ./configure --prefix=/usr --disable-nasm --enable-alsa \ + --with-x --disable-rpath --disable-static + make +} + +package() { + cd SDL-1.2 + make DESTDIR="$pkgdir" install +}