Sunday, December 12, 2021

Re: UPDATE: SDL 2.0.18

Refined diff at the bottom that includes a fix of the audio assertion
failure [1].

Also removes the workaround from 2018 where SDL2 claims to be Linux
[2]. This isn't needed anymore with updates that have rolled out to FNA
and the associated games and infrastructure.

Tested build and runtime with many consumers, among them:
ffmpeg(ffplay), mpv, ocp, citra, emulationstation, ppsspp, snes9x,
amnesia-tdd, barony, scummvm, blobby, eduke32, hashlink, openmw,
quakespasm, sdl-jstest, teeworlds, shotcut, lagrange.

Additional testing of only the ports build with: wxWidgets, libqrencode,
sdl2-{gfx,mixer,net,ttf}, smpeg2, advancemame, emulators/dolphin.

No issues except for the now fixed audio assertion failure. Also tested
with the XBox 360 gamepad which still works.

Additional testing or comments welcome, but this works well enough so
far that I would probably update it soon.

[1] https://github.com/libsdl-org/SDL/pull/5094
[2] https://marc.info/?l=openbsd-ports-cvs&m=151536581216331&w=2

Index: Makefile
===================================================================
RCS file: /cvs/ports/devel/sdl2/Makefile,v
retrieving revision 1.37
diff -u -p -r1.37 Makefile
--- Makefile 15 Nov 2021 20:02:05 -0000 1.37
+++ Makefile 12 Dec 2021 17:27:05 -0000
@@ -2,14 +2,13 @@

COMMENT= cross-platform multimedia library

-V= 2.0.16
+V= 2.0.18
DISTNAME= SDL2-${V}
PKGNAME= sdl2-${V}
CATEGORIES= devel
MASTER_SITES= https://www.libsdl.org/release/
-REVISION=
0

-SHARED_LIBS= SDL2 0.10 # 0.16
+SHARED_LIBS= SDL2 0.11 # 0.18

HOMEPAGE= https://www.libsdl.org/

@@ -22,7 +21,7 @@ PERMIT_PACKAGE= Yes

WANTLIB+= X11 Xcursor Xext Xfixes Xi Xinerama Xrandr Xrender Xss
WANTLIB+= Xxf86vm m pthread samplerate sndio usbhid xcb
-# GL and X11 libraries are dlopen'd by SDL
+# GL library is dlopen'd
WANTLIB+= GL

LIB_DEPENDS= audio/libsamplerate
Index: distinfo
===================================================================
RCS file: /cvs/ports/devel/sdl2/distinfo,v
retrieving revision 1.12
diff -u -p -r1.12 distinfo
--- distinfo 20 Aug 2021 16:59:32 -0000 1.12
+++ distinfo 12 Dec 2021 17:27:05 -0000
@@ -1,2 +1,2 @@
-SHA256 (SDL2-2.0.16.tar.gz) = Zb6f9gBANLWyzpkntaTbGBSTDxacSy2uCh5GlwdfKHs=
-SIZE (SDL2-2.0.16.tar.gz) = 7227262
+SHA256 (SDL2-2.0.18.tar.gz) = lNQM1z2/oQu26t+8KPNVmSuy1u9nYa2dQHTv+V7lcRw=
+SIZE (SDL2-2.0.18.tar.gz) = 7294032
Index: patches/patch-Makefile_in
===================================================================
RCS file: /cvs/ports/devel/sdl2/patches/patch-Makefile_in,v
retrieving revision 1.10
diff -u -p -r1.10 patch-Makefile_in
--- patches/patch-Makefile_in 20 Aug 2021 16:59:32 -0000 1.10
+++ patches/patch-Makefile_in 12 Dec 2021 17:27:05 -0000
@@ -3,7 +3,7 @@ $OpenBSD: patch-Makefile_in,v 1.10 2021/
Index: Makefile.in
--- Makefile.in.orig
+++ Makefile.in
-@@ -132,7 +132,7 @@ LT_AGE = @LT_AGE@
+@@ -133,7 +133,7 @@ LT_AGE = @LT_AGE@
LT_CURRENT = @LT_CURRENT@
LT_RELEASE = @LT_RELEASE@
LT_REVISION = @LT_REVISION@
Index: patches/patch-src_SDL_c
===================================================================
RCS file: /cvs/ports/devel/sdl2/patches/patch-src_SDL_c,v
retrieving revision 1.6
diff -u -p -r1.6 patch-src_SDL_c
--- patches/patch-src_SDL_c 20 Aug 2021 16:59:32 -0000 1.6
+++ patches/patch-src_SDL_c 12 Dec 2021 17:27:05 -0000
@@ -1,27 +1,17 @@
$OpenBSD: patch-src_SDL_c,v 1.6 2021/08/20 16:59:32 thfr Exp $

Disable breaking if no haptic feedback support which disallows gamecontroller API
-pretend to be Linux in SDL_GetPlatform to allow compatibility with FNA games
-until OpenBSD support has been rolled out (estimated end of 2018).

Index: src/SDL.c
--- src/SDL.c.orig
+++ src/SDL.c
-@@ -280,8 +280,6 @@ SDL_InitSubSystem(Uint32 flags)
- }
+@@ -279,9 +279,6 @@ SDL_InitSubSystem(Uint32 flags)
}
- SDL_PrivateSubsystemRefCountIncr(SDL_INIT_HAPTIC);
+ SDL_PrivateSubsystemRefCountIncr(SDL_INIT_GAMECONTROLLER);
+ flags_initialized |= SDL_INIT_GAMECONTROLLER;
-#else
-- return SDL_SetError("SDL not built with haptic (force feedback) support");
+- SDL_SetError("SDL not built with joystick support");
+- goto quit_and_error;

No comments:

Post a Comment