pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/devel/SDL2



Module Name:    pkgsrc
Committed By:   mrg
Date:           Tue Mar  9 20:41:08 UTC 2021

Modified Files:
        pkgsrc/devel/SDL2: Makefile distinfo
Added Files:
        pkgsrc/devel/SDL2/patches: patch-src_audio_netbsd_SDL_netbsdaudio.c

Log Message:
check return value of ioctl() and return an error if it fails.

stops mpv continuing thinking it has a valid setup audio
device that makes it seem to have hung.

bump pkg version.


To generate a diff of this commit:
cvs rdiff -u -r1.55 -r1.56 pkgsrc/devel/SDL2/Makefile
cvs rdiff -u -r1.44 -r1.45 pkgsrc/devel/SDL2/distinfo
cvs rdiff -u -r0 -r1.1 \
    pkgsrc/devel/SDL2/patches/patch-src_audio_netbsd_SDL_netbsdaudio.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/devel/SDL2/Makefile
diff -u pkgsrc/devel/SDL2/Makefile:1.55 pkgsrc/devel/SDL2/Makefile:1.56
--- pkgsrc/devel/SDL2/Makefile:1.55     Sun Feb  7 06:30:17 2021
+++ pkgsrc/devel/SDL2/Makefile  Tue Mar  9 20:41:08 2021
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.55 2021/02/07 06:30:17 ryoon Exp $
+# $NetBSD: Makefile,v 1.56 2021/03/09 20:41:08 mrg Exp $
 
 DISTNAME=      SDL2-2.0.14
-PKGREVISION=   1
+PKGREVISION=   2
 CATEGORIES=    devel
 MASTER_SITES=  https://www.libsdl.org/release/
 

Index: pkgsrc/devel/SDL2/distinfo
diff -u pkgsrc/devel/SDL2/distinfo:1.44 pkgsrc/devel/SDL2/distinfo:1.45
--- pkgsrc/devel/SDL2/distinfo:1.44     Sat Jan  2 15:54:03 2021
+++ pkgsrc/devel/SDL2/distinfo  Tue Mar  9 20:41:08 2021
@@ -1,6 +1,7 @@
-$NetBSD: distinfo,v 1.44 2021/01/02 15:54:03 nia Exp $
+$NetBSD: distinfo,v 1.45 2021/03/09 20:41:08 mrg Exp $
 
 SHA1 (SDL2-2.0.14.tar.gz) = 212b17d988c417a1a905ab09c50d1845cc48ddb7
 RMD160 (SDL2-2.0.14.tar.gz) = 24ddf4bab53fae92fb0c96c7d3e6ceecca91c5df
 SHA512 (SDL2-2.0.14.tar.gz) = ebc482585bd565bf3003fbcedd91058b2183e333b9ea566d2f386da0298ff970645d9d25c1aa4459c7c96e9ea839fd1c5f2da0242a56892865b2e456cdd027ee
 Size (SDL2-2.0.14.tar.gz) = 6089974 bytes
+SHA1 (patch-src_audio_netbsd_SDL_netbsdaudio.c) = e62b5b57d90b2f79c58b665e6f9f5f45893206f8

Added files:

Index: pkgsrc/devel/SDL2/patches/patch-src_audio_netbsd_SDL_netbsdaudio.c
diff -u /dev/null pkgsrc/devel/SDL2/patches/patch-src_audio_netbsd_SDL_netbsdaudio.c:1.1
--- /dev/null   Tue Mar  9 20:41:08 2021
+++ pkgsrc/devel/SDL2/patches/patch-src_audio_netbsd_SDL_netbsdaudio.c  Tue Mar  9 20:41:08 2021
@@ -0,0 +1,25 @@
+$NetBSD: patch-src_audio_netbsd_SDL_netbsdaudio.c,v 1.1 2021/03/09 20:41:08 mrg Exp $
+
+check the return value of ioctl() on audio device and report error
+if it doesn't work.  stops eg mpv from hanging when it thinks that
+it opened the audio device.
+
+--- src/audio/netbsd/SDL_netbsdaudio.c.orig    2020-12-21 11:44:36.000000000 -0600
++++ src/audio/netbsd/SDL_netbsdaudio.c 2021-03-09 14:27:27.994211006 -0600
+@@ -291,9 +291,14 @@
+     info.lowat = 3;
+     prinfo->sample_rate = this->spec.freq;
+     prinfo->channels = this->spec.channels;
+-    (void) ioctl(this->hidden->audio_fd, AUDIO_SETINFO, &info);
+ 
+-    (void) ioctl(this->hidden->audio_fd, AUDIO_GETINFO, &info);
++    if (ioctl(this->hidden->audio_fd, AUDIO_SETINFO, &info) < 0) {
++        return SDL_SetError("Couldn't AUDIO_SETINFO %s: %s", devname, strerror(errno));
++    }
++
++    if (ioctl(this->hidden->audio_fd, AUDIO_GETINFO, &info) < 0) {
++        return SDL_SetError("Couldn't AUDIO_GETINFO %s: %s", devname, strerror(errno));
++    }
+     this->spec.freq = prinfo->sample_rate;
+     this->spec.channels = prinfo->channels;
+ 



Home | Main Index | Thread Index | Old Index