SDL2: Update with the latest round of patches sent to bugzilla - Drop patches that are no longer relevant. - Add support for 32-bit LPCM audio on NetBSD. - Fix a wayland protocol handling issue.diff -r1.47 -r1.48 pkgsrc/devel/SDL2/Makefile
(nia)
@@ -1,16 +1,17 @@ | @@ -1,16 +1,17 @@ | |||
1 | # $NetBSD: Makefile,v 1.47 2020/03/17 12:49:29 nia Exp $ | 1 | # $NetBSD: Makefile,v 1.48 2020/04/05 16:22:42 nia Exp $ | |
2 | 2 | |||
3 | DISTNAME= SDL2-2.0.12 | 3 | DISTNAME= SDL2-2.0.12 | |
4 | PKGREVISION= 1 | |||
4 | CATEGORIES= devel | 5 | CATEGORIES= devel | |
5 | MASTER_SITES= https://www.libsdl.org/release/ | 6 | MASTER_SITES= https://www.libsdl.org/release/ | |
6 | 7 | |||
7 | MAINTAINER= nia@NetBSD.org | 8 | MAINTAINER= nia@NetBSD.org | |
8 | HOMEPAGE= https://www.libsdl.org/ | 9 | HOMEPAGE= https://www.libsdl.org/ | |
9 | COMMENT= Simple DirectMedia Layer - cross-platform multimedia library | 10 | COMMENT= Simple DirectMedia Layer - cross-platform multimedia library | |
10 | LICENSE= zlib | 11 | LICENSE= zlib | |
11 | 12 | |||
12 | USE_LANGUAGES= c c++ | 13 | USE_LANGUAGES= c c++ | |
13 | USE_LIBTOOL= yes | 14 | USE_LIBTOOL= yes | |
14 | USE_TOOLS+= gmake pkg-config | 15 | USE_TOOLS+= gmake pkg-config | |
15 | GNU_CONFIGURE= yes | 16 | GNU_CONFIGURE= yes | |
16 | 17 |
@@ -1,11 +1,12 @@ | @@ -1,11 +1,12 @@ | |||
1 | $NetBSD: distinfo,v 1.38 2020/03/17 12:49:29 nia Exp $ | 1 | $NetBSD: distinfo,v 1.39 2020/04/05 16:22:42 nia Exp $ | |
2 | 2 | |||
3 | SHA1 (SDL2-2.0.12.tar.gz) = e8ba91bf5eb438dbcf1fedf0530a1bcbe30d3bb6 | 3 | SHA1 (SDL2-2.0.12.tar.gz) = e8ba91bf5eb438dbcf1fedf0530a1bcbe30d3bb6 | |
4 | RMD160 (SDL2-2.0.12.tar.gz) = 0f2c979da6151b622a6445e7fc8d4e3ea8987105 | 4 | RMD160 (SDL2-2.0.12.tar.gz) = 0f2c979da6151b622a6445e7fc8d4e3ea8987105 | |
5 | SHA512 (SDL2-2.0.12.tar.gz) = 3f1f04af0f3d9dda9c84a2e9274ae8d83ea0da3fc367970a820036cc4dc1dbf990cfc37e4975ae05f0b45a4ffa739c6c19e470c00bf3f2bce9b8b63717b8b317 | 5 | SHA512 (SDL2-2.0.12.tar.gz) = 3f1f04af0f3d9dda9c84a2e9274ae8d83ea0da3fc367970a820036cc4dc1dbf990cfc37e4975ae05f0b45a4ffa739c6c19e470c00bf3f2bce9b8b63717b8b317 | |
6 | Size (SDL2-2.0.12.tar.gz) = 5720162 bytes | 6 | Size (SDL2-2.0.12.tar.gz) = 5720162 bytes | |
7 | SHA1 (patch-configure) = 3038dc62450f6b64197ee4aa42d8ec9518a608bd | 7 | SHA1 (patch-configure) = 3038dc62450f6b64197ee4aa42d8ec9518a608bd | |
8 | SHA1 (patch-src_joystick_bsd_SDL__sysjoystick.c) = 1c5756e47ad906235369b46b36d7b0b1ee776156 | 8 | SHA1 (patch-src_audio_netbsd_SDL__netbsdaudio.c) = 2100f4259a0054730475cc2bf062771b093bd083 | |
9 | SHA1 (patch-src_video_cocoa_SDL__cocoawindow.m) = 1d5ac9c17ceadf668925734b5cad311e26f2fc58 | 9 | SHA1 (patch-src_video_wayland_SDL__waylandevents.c) = 57e42371e072048e5b377aeb58bb1ffce72784f0 | |
10 | SHA1 (patch-src_video_wayland_SDL__waylandevents.c) = 15ba8caf1b0036ffe859669cc1ed4a535d164e7b | 10 | SHA1 (patch-src_video_wayland_SDL__waylandevents__c.h) = 3a723a81f05052bd50e8cb1592ba747b5f59ea1a | |
11 | SHA1 (patch-src_video_wayland_SDL__waylandvideo.c) = 823e434710f8b946b13ea7a6751cf1c30ec48600 | |||
11 | SHA1 (patch-src_video_x11_SDL__x11opengl.c) = d506a17a0d7e3571e2ae4385cc864f9a2e4eeb3c | 12 | SHA1 (patch-src_video_x11_SDL__x11opengl.c) = d506a17a0d7e3571e2ae4385cc864f9a2e4eeb3c |
$NetBSD: patch-src_audio_netbsd_SDL__netbsdaudio.c,v 1.4 2020/04/05 16:22:42 nia Exp $
https://bugzilla.libsdl.org/show_bug.cgi?id=5076
--- src/audio/netbsd/SDL_netbsdaudio.c.orig 2020-03-11 01:36:18.000000000 +0000
+++ src/audio/netbsd/SDL_netbsdaudio.c
@@ -261,6 +261,14 @@ NETBSDAUDIO_OpenDevice(_THIS, void *hand
prinfo->encoding = AUDIO_ENCODING_ULINEAR_BE;
prinfo->precision = 16;
break;
+ case AUDIO_S32LSB:
+ prinfo->encoding = AUDIO_ENCODING_SLINEAR_LE;
+ prinfo->precision = 32;
+ break;
+ case AUDIO_S32MSB:
+ prinfo->encoding = AUDIO_ENCODING_SLINEAR_BE;
+ prinfo->precision = 32;
+ break;
}
if (prinfo->encoding != AUDIO_ENCODING_NONE) {
break;
@@ -1,22 +1,56 @@ | @@ -1,22 +1,56 @@ | |||
1 | $NetBSD: patch-src_video_wayland_SDL__waylandevents.c,v 1.4 2020/03/17 12:49:29 nia Exp $ | 1 | $NetBSD: patch-src_video_wayland_SDL__waylandevents.c,v 1.5 2020/04/05 16:22:42 nia Exp $ | |
2 | 2 | |||
3 | Allow building with Wayland on operating systems without evdev. | 3 | Allow building with Wayland on operating systems without evdev. | |
4 | 4 | |||
5 | Fix wl_seat version fallback. | |||
6 | ||||
7 | https://bugzilla.libsdl.org/show_bug.cgi?id=5074 | |||
8 | ||||
5 | --- src/video/wayland/SDL_waylandevents.c.orig 2020-03-11 01:36:18.000000000 +0000 | 9 | --- src/video/wayland/SDL_waylandevents.c.orig 2020-03-11 01:36:18.000000000 +0000 | |
6 | +++ src/video/wayland/SDL_waylandevents.c | 10 | +++ src/video/wayland/SDL_waylandevents.c | |
7 | @@ -43,7 +43,15 @@ | 11 | @@ -43,7 +43,15 @@ | |
8 | #include "xdg-shell-client-protocol.h" | 12 | #include "xdg-shell-client-protocol.h" | |
9 | #include "xdg-shell-unstable-v6-client-protocol.h" | 13 | #include "xdg-shell-unstable-v6-client-protocol.h" | |
10 | 14 | |||
11 | +#if defined(__linux__) || defined(__FreeBSD__) | 15 | +#if defined(__linux__) || defined(__FreeBSD__) | |
12 | #include <linux/input.h> | 16 | #include <linux/input.h> | |
13 | +#else | 17 | +#else | |
14 | +#define BTN_LEFT (0x110) | 18 | +#define BTN_LEFT (0x110) | |
15 | +#define BTN_RIGHT (0x111) | 19 | +#define BTN_RIGHT (0x111) | |
16 | +#define BTN_MIDDLE (0x112) | 20 | +#define BTN_MIDDLE (0x112) | |
17 | +#define BTN_SIDE (0x113) | 21 | +#define BTN_SIDE (0x113) | |
18 | +#define BTN_EXTRA (0x114) | 22 | +#define BTN_EXTRA (0x114) | |
19 | +#endif | 23 | +#endif | |
20 | #include <sys/select.h> | 24 | #include <sys/select.h> | |
21 | #include <sys/mman.h> | 25 | #include <sys/mman.h> | |
22 | #include <poll.h> | 26 | #include <poll.h> | |
27 | @@ -437,7 +445,7 @@ pointer_handle_axis(void *data, struct w | |||
28 | { | |||
29 | struct SDL_WaylandInput *input = data; | |||
30 | ||||
31 | - if(wl_seat_interface.version >= 5) | |||
32 | + if(wl_seat_get_version(input->seat) >= 5) | |||
33 | pointer_handle_axis_common(input, SDL_FALSE, axis, value); | |||
34 | else | |||
35 | pointer_handle_axis_common_v1(input, time, axis, value); | |||
36 | @@ -998,7 +1006,7 @@ static const struct wl_data_device_liste | |||
37 | }; | |||
38 | ||||
39 | void | |||
40 | -Wayland_display_add_input(SDL_VideoData *d, uint32_t id) | |||
41 | +Wayland_display_add_input(SDL_VideoData *d, uint32_t id, uint32_t version) | |||
42 | { | |||
43 | struct SDL_WaylandInput *input; | |||
44 | SDL_WaylandDataDevice *data_device = NULL; | |||
45 | @@ -1008,10 +1016,7 @@ Wayland_display_add_input(SDL_VideoData | |||
46 | return; | |||
47 | ||||
48 | input->display = d; | |||
49 | - if (wl_seat_interface.version >= 5) | |||
50 | - input->seat = wl_registry_bind(d->registry, id, &wl_seat_interface, 5); | |||
51 | - else | |||
52 | - input->seat = wl_registry_bind(d->registry, id, &wl_seat_interface, 1); | |||
53 | + input->seat = wl_registry_bind(d->registry, id, &wl_seat_interface, SDL_min(5, version)); | |||
54 | input->sx_w = wl_fixed_from_int(0); | |||
55 | input->sy_w = wl_fixed_from_int(0); | |||
56 | d->input = input; |
$NetBSD: patch-src_video_wayland_SDL__waylandevents__c.h,v 1.1 2020/04/05 16:22:42 nia Exp $
https://bugzilla.libsdl.org/show_bug.cgi?id=5074
--- src/video/wayland/SDL_waylandevents_c.h.orig 2020-03-11 01:36:18.000000000 +0000
+++ src/video/wayland/SDL_waylandevents_c.h
@@ -32,7 +32,7 @@ struct SDL_WaylandInput;
extern void Wayland_PumpEvents(_THIS);
-extern void Wayland_display_add_input(SDL_VideoData *d, uint32_t id);
+extern void Wayland_display_add_input(SDL_VideoData *d, uint32_t id, uint32_t version);
extern void Wayland_display_destroy_input(SDL_VideoData *d);
extern SDL_WaylandDataDevice* Wayland_get_data_device(struct SDL_WaylandInput *input);
$NetBSD: patch-src_video_wayland_SDL__waylandvideo.c,v 1.3 2020/04/05 16:22:42 nia Exp $
https://bugzilla.libsdl.org/show_bug.cgi?id=5074
--- src/video/wayland/SDL_waylandvideo.c.orig 2020-03-11 01:36:18.000000000 +0000
+++ src/video/wayland/SDL_waylandvideo.c
@@ -364,7 +364,7 @@ display_handle_global(void *data, struct
} else if (strcmp(interface, "wl_output") == 0) {
Wayland_add_display(d, id);
} else if (strcmp(interface, "wl_seat") == 0) {
- Wayland_display_add_input(d, id);
+ Wayland_display_add_input(d, id, version);
} else if (strcmp(interface, "xdg_wm_base") == 0) {
d->shell.xdg = wl_registry_bind(d->registry, id, &xdg_wm_base_interface, 1);
xdg_wm_base_add_listener(d->shell.xdg, &shell_listener_xdg, NULL);