Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/devel/SDL2 SDL2: Fix build on NetBSD 8
details: https://anonhg.NetBSD.org/pkgsrc/rev/10e34561da26
branches: trunk
changeset: 429080:10e34561da26
user: nia <nia%pkgsrc.org@localhost>
date: Thu Apr 16 04:12:39 2020 +0000
description:
SDL2: Fix build on NetBSD 8
diffstat:
devel/SDL2/Makefile | 4 ++--
devel/SDL2/patches/patch-src_audio_netbsd_SDL__netbsdaudio.c | 12 ++++++++----
2 files changed, 10 insertions(+), 6 deletions(-)
diffs (61 lines):
diff -r 5420572cd839 -r 10e34561da26 devel/SDL2/Makefile
--- a/devel/SDL2/Makefile Wed Apr 15 22:55:50 2020 +0000
+++ b/devel/SDL2/Makefile Thu Apr 16 04:12:39 2020 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.49 2020/04/08 14:41:33 nia Exp $
+# $NetBSD: Makefile,v 1.50 2020/04/16 04:12:39 nia Exp $
DISTNAME= SDL2-2.0.12
-PKGREVISION= 2
+PKGREVISION= 3
CATEGORIES= devel
MASTER_SITES= https://www.libsdl.org/release/
diff -r 5420572cd839 -r 10e34561da26 devel/SDL2/patches/patch-src_audio_netbsd_SDL__netbsdaudio.c
--- a/devel/SDL2/patches/patch-src_audio_netbsd_SDL__netbsdaudio.c Wed Apr 15 22:55:50 2020 +0000
+++ b/devel/SDL2/patches/patch-src_audio_netbsd_SDL__netbsdaudio.c Thu Apr 16 04:12:39 2020 +0000
@@ -1,4 +1,4 @@
-$NetBSD: patch-src_audio_netbsd_SDL__netbsdaudio.c,v 1.5 2020/04/08 14:41:33 nia Exp $
+$NetBSD: patch-src_audio_netbsd_SDL__netbsdaudio.c,v 1.6 2020/04/16 04:12:39 nia Exp $
Use the preferred hardware sample rate
https://bugzilla.libsdl.org/show_bug.cgi?id=5080
@@ -17,15 +17,19 @@
struct audio_prinfo *prinfo = iscapture ? &info.record : &info.play;
/* We don't care what the devname is...we'll try to open anything. */
-@@ -232,8 +232,16 @@ NETBSDAUDIO_OpenDevice(_THIS, void *hand
+@@ -232,8 +232,20 @@ NETBSDAUDIO_OpenDevice(_THIS, void *hand
}
AUDIO_INITINFO(&info);
+ AUDIO_INITINFO(&hwinfo);
+
++#ifdef AUDIO_GETFORMAT
+ if (ioctl(this->hidden->audio_fd, AUDIO_GETFORMAT, &hwinfo) == -1) {
+ return SDL_SetError("Couldn't get device format %s: %s", devname, strerror(errno));
+ }
++#else
++ hwinfo.record.sample_rate = hwinfo.play.sample_rate = 48000;
++#endif
prinfo->encoding = AUDIO_ENCODING_NONE;
+ prinfo->channels = this->spec.channels;
@@ -34,7 +38,7 @@
for (format = SDL_FirstAudioFormat(this->spec.format); format;) {
switch (format) {
-@@ -261,6 +269,14 @@ NETBSDAUDIO_OpenDevice(_THIS, void *hand
+@@ -261,6 +273,14 @@ NETBSDAUDIO_OpenDevice(_THIS, void *hand
prinfo->encoding = AUDIO_ENCODING_ULINEAR_BE;
prinfo->precision = 16;
break;
@@ -49,7 +53,7 @@
}
if (prinfo->encoding != AUDIO_ENCODING_NONE) {
break;
-@@ -274,21 +290,18 @@ NETBSDAUDIO_OpenDevice(_THIS, void *hand
+@@ -274,21 +294,18 @@ NETBSDAUDIO_OpenDevice(_THIS, void *hand
this->spec.format = format;
Home |
Main Index |
Thread Index |
Old Index