update to SDL 2.0.18
similar diff proposed by Brad I added a fix for audio assertion failure and removed the code where SDL would pretend to be Linux for compatibility reasons with FNA games - this has been addressed upstream and the need for this workaround is gone. Many consumers tested with build and runtime; no issues found. Release notes at: https://discourse.libsdl.org/t/sdl-2-0-18-released/33768
This commit is contained in:
parent
32ad89751c
commit
c7bf7dfa26
@ -1,15 +1,14 @@
|
||||
# $OpenBSD: Makefile,v 1.37 2021/11/15 20:02:05 rsadowski Exp $
|
||||
# $OpenBSD: Makefile,v 1.38 2021/12/18 05:34:57 thfr Exp $
|
||||
|
||||
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
|
||||
|
@ -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
|
||||
|
@ -1,9 +1,9 @@
|
||||
$OpenBSD: patch-Makefile_in,v 1.10 2021/08/20 16:59:32 thfr Exp $
|
||||
$OpenBSD: patch-Makefile_in,v 1.11 2021/12/18 05:34:57 thfr Exp $
|
||||
|
||||
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@
|
||||
|
@ -1,27 +1,17 @@
|
||||
$OpenBSD: patch-src_SDL_c,v 1.6 2021/08/20 16:59:32 thfr Exp $
|
||||
$OpenBSD: patch-src_SDL_c,v 1.7 2021/12/18 05:34:57 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;
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -517,7 +515,7 @@ SDL_GetPlatform()
|
||||
#elif __NETBSD__
|
||||
return "NetBSD";
|
||||
#elif __OPENBSD__
|
||||
- return "OpenBSD";
|
||||
+ return "Linux";
|
||||
#elif __OS2__
|
||||
return "OS/2";
|
||||
#elif __OSF__
|
||||
|
30
devel/sdl2/patches/patch-src_audio_sndio_SDL_sndioaudio_c
Normal file
30
devel/sdl2/patches/patch-src_audio_sndio_SDL_sndioaudio_c
Normal file
@ -0,0 +1,30 @@
|
||||
$OpenBSD: patch-src_audio_sndio_SDL_sndioaudio_c,v 1.3 2021/12/18 05:34:57 thfr Exp $
|
||||
|
||||
fix assertion failure with SDL 2.0.18's new hotplugging support
|
||||
GH PR https://github.com/libsdl-org/SDL/pull/5094
|
||||
|
||||
Index: src/audio/sndio/SDL_sndioaudio.c
|
||||
--- src/audio/sndio/SDL_sndioaudio.c.orig
|
||||
+++ src/audio/sndio/SDL_sndioaudio.c
|
||||
@@ -350,6 +350,13 @@ SNDIO_Deinitialize(void)
|
||||
UnloadSNDIOLibrary();
|
||||
}
|
||||
|
||||
+static void
|
||||
+SNDIO_DetectDevices(void)
|
||||
+{
|
||||
+ SDL_AddAudioDevice(SDL_FALSE, DEFAULT_OUTPUT_DEVNAME, NULL, (void *) 0x1);
|
||||
+ SDL_AddAudioDevice(SDL_TRUE, DEFAULT_INPUT_DEVNAME, NULL, (void *) 0x2);
|
||||
+}
|
||||
+
|
||||
static int
|
||||
SNDIO_Init(SDL_AudioDriverImpl * impl)
|
||||
{
|
||||
@@ -366,6 +373,7 @@ SNDIO_Init(SDL_AudioDriverImpl * impl)
|
||||
impl->CaptureFromDevice = SNDIO_CaptureFromDevice;
|
||||
impl->FlushCapture = SNDIO_FlushCapture;
|
||||
impl->Deinitialize = SNDIO_Deinitialize;
|
||||
+ impl->DetectDevices = SNDIO_DetectDevices;
|
||||
|
||||
impl->AllowsArbitraryDeviceNames = 1;
|
||||
impl->HasCaptureSupport = SDL_TRUE;
|
@ -1,4 +1,4 @@
|
||||
$OpenBSD: patch-src_joystick_SDL_gamecontrollerdb_h,v 1.2 2021/08/20 16:59:32 thfr Exp $
|
||||
$OpenBSD: patch-src_joystick_SDL_gamecontrollerdb_h,v 1.3 2021/12/18 05:34:57 thfr Exp $
|
||||
|
||||
enable controller detection by GUID on OpenBSD
|
||||
use both LINUX and MACOSX guids to match both XInput and DInput devices
|
||||
@ -15,7 +15,7 @@ Index: src/joystick/SDL_gamecontrollerdb.h
|
||||
"03000000c82d00000090000001000000,8BitDo FC30 Pro,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a5,rightx:a2,righty:a3,start:b11,x:b3,y:b4,hint:SDL_GAMECONTROLLER_USE_BUTTON_LABELS:=1,",
|
||||
"03000000c82d00000090000001000000,8BitDo FC30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a5,rightx:a2,righty:a3,start:b11,x:b4,y:b3,hint:!SDL_GAMECONTROLLER_USE_BUTTON_LABELS:=1,",
|
||||
"03000000c82d00001038000000010000,8BitDo FC30 Pro,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,hint:SDL_GAMECONTROLLER_USE_BUTTON_LABELS:=1,",
|
||||
@@ -493,7 +493,7 @@ static const char *s_ControllerMappings [] =
|
||||
@@ -494,7 +494,7 @@ static const char *s_ControllerMappings [] =
|
||||
"03000000830500006020000000010000,iBuffalo SNES Controller,a:b1,b:b0,back:b6,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b4,rightshoulder:b5,start:b7,x:b3,y:b2,hint:!SDL_GAMECONTROLLER_USE_BUTTON_LABELS:=1,",
|
||||
"03000000830500006020000000000000,iBuffalo USB 2-axis 8-button Gamepad,a:b1,b:b0,back:b6,leftshoulder:b4,leftx:a0,lefty:a1,rightshoulder:b5,start:b7,x:b3,y:b2,",
|
||||
#endif
|
||||
|
@ -1,4 +1,4 @@
|
||||
$OpenBSD: patch-src_joystick_bsd_SDL_bsdjoystick_c,v 1.3 2021/08/20 16:59:32 thfr Exp $
|
||||
$OpenBSD: patch-src_joystick_bsd_SDL_bsdjoystick_c,v 1.4 2021/12/18 05:34:57 thfr Exp $
|
||||
|
||||
assign buttons correctly
|
||||
get GUID using USB_GET_DEVICEINFO
|
||||
@ -53,7 +53,7 @@ Index: src/joystick/bsd/SDL_bsdjoystick.c
|
||||
+ struct usb_device_info di;
|
||||
+#endif
|
||||
|
||||
fd = open(path, O_RDONLY);
|
||||
fd = open(path, O_RDONLY | O_CLOEXEC);
|
||||
if (fd == -1) {
|
||||
@@ -434,6 +446,17 @@ BSD_JoystickOpen(SDL_Joystick *joy, int device_index)
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
@comment $OpenBSD: PLIST,v 1.10 2021/01/06 22:32:08 thfr Exp $
|
||||
@comment $OpenBSD: PLIST,v 1.11 2021/12/18 05:34:57 thfr Exp $
|
||||
bin/sdl2-config
|
||||
include/SDL2/
|
||||
include/SDL2/SDL.h
|
||||
@ -18,6 +18,7 @@ include/SDL2/SDL_filesystem.h
|
||||
include/SDL2/SDL_gamecontroller.h
|
||||
include/SDL2/SDL_gesture.h
|
||||
include/SDL2/SDL_haptic.h
|
||||
include/SDL2/SDL_hidapi.h
|
||||
include/SDL2/SDL_hints.h
|
||||
include/SDL2/SDL_joystick.h
|
||||
include/SDL2/SDL_keyboard.h
|
||||
@ -77,6 +78,7 @@ include/SDL2/SDL_video.h
|
||||
include/SDL2/SDL_vulkan.h
|
||||
include/SDL2/begin_code.h
|
||||
include/SDL2/close_code.h
|
||||
lib/cmake/
|
||||
lib/cmake/SDL2/
|
||||
lib/cmake/SDL2/sdl2-config-version.cmake
|
||||
lib/cmake/SDL2/sdl2-config.cmake
|
||||
@ -88,5 +90,6 @@ lib/libSDL2_test.la
|
||||
@static-lib lib/libSDL2main.a
|
||||
lib/libSDL2main.la
|
||||
lib/pkgconfig/sdl2.pc
|
||||
share/aclocal/
|
||||
share/aclocal/sdl2.m4
|
||||
share/doc/pkg-readmes/${PKGSTEM}
|
||||
|
Loading…
x
Reference in New Issue
Block a user