pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/devel/SDL2 Fix compilation on NetBSD.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/e8c75a59795b
branches:  trunk
changeset: 354449:e8c75a59795b
user:      wiz <wiz%pkgsrc.org@localhost>
date:      Sun Oct 30 10:37:17 2016 +0000

description:
Fix compilation on NetBSD.

diffstat:

 devel/SDL2/distinfo                                          |   5 +-
 devel/SDL2/patches/patch-src_audio_bsd_SDL__bsdaudio.c       |  13 +++++-
 devel/SDL2/patches/patch-src_joystick_bsd_SDL__sysjoystick.c |  26 ++++++++++++
 3 files changed, 41 insertions(+), 3 deletions(-)

diffs (74 lines):

diff -r 0ded0639a2a2 -r e8c75a59795b devel/SDL2/distinfo
--- a/devel/SDL2/distinfo       Sun Oct 30 10:36:03 2016 +0000
+++ b/devel/SDL2/distinfo       Sun Oct 30 10:37:17 2016 +0000
@@ -1,9 +1,10 @@
-$NetBSD: distinfo,v 1.20 2016/10/28 19:13:44 adam Exp $
+$NetBSD: distinfo,v 1.21 2016/10/30 10:37:17 wiz Exp $
 
 SHA1 (SDL2-2.0.5.tar.gz) = c4f87580630387796df4ac87c362b4f9a721457e
 RMD160 (SDL2-2.0.5.tar.gz) = 91283ce74bd451e83651910259cf226cae70e4bb
 SHA512 (SDL2-2.0.5.tar.gz) = 6401f5df08c08316c09bc6ac5b28345c5184bb25770baa5c94c0a582ae130ddf73bb736e44bb31f4e427c1ddbbeec4755a6a5f530b6b4c3d0f13ebc78ddc1750
 Size (SDL2-2.0.5.tar.gz) = 4209352 bytes
-SHA1 (patch-src_audio_bsd_SDL__bsdaudio.c) = cd4a2874aa5c6b2a584247239c78e05ab8aa255d
+SHA1 (patch-src_audio_bsd_SDL__bsdaudio.c) = a165f34d6ac26d7948a9c36981ea18e2b8bcfa9e
+SHA1 (patch-src_joystick_bsd_SDL__sysjoystick.c) = 37f19752cbba8def12a210deafec66965e3ad9ac
 SHA1 (patch-src_video_SDL__egl.c) = d65856e98b2e49dd364440372ce37679a6f2982b
 SHA1 (patch-src_video_x11_SDL__x11opengl.c) = a435634da8b8bd5e74a281b9a26e8fb8a294e56b
diff -r 0ded0639a2a2 -r e8c75a59795b devel/SDL2/patches/patch-src_audio_bsd_SDL__bsdaudio.c
--- a/devel/SDL2/patches/patch-src_audio_bsd_SDL__bsdaudio.c    Sun Oct 30 10:36:03 2016 +0000
+++ b/devel/SDL2/patches/patch-src_audio_bsd_SDL__bsdaudio.c    Sun Oct 30 10:37:17 2016 +0000
@@ -1,8 +1,10 @@
-$NetBSD: patch-src_audio_bsd_SDL__bsdaudio.c,v 1.3 2016/10/28 19:13:44 adam Exp $
+$NetBSD: patch-src_audio_bsd_SDL__bsdaudio.c,v 1.4 2016/10/30 10:37:17 wiz Exp $
 
 # Remove delay as there is already an inherent delay in writing audio.
 https://bugzilla.libsdl.org/show_bug.cgi?id=3177
 
+# audio_prinfo needs 'struct' on NetBSD.
+
 --- src/audio/bsd/SDL_bsdaudio.c.orig  2016-10-20 03:56:26.000000000 +0000
 +++ src/audio/bsd/SDL_bsdaudio.c
 @@ -190,10 +190,6 @@ BSDAUDIO_PlayDevice(_THIS)
@@ -16,3 +18,12 @@
      } while (p < this->hidden->mixlen);
  
      /* If timer synchronization is enabled, set the next write frame */
+@@ -280,7 +276,7 @@ BSDAUDIO_OpenDevice(_THIS, void *handle,
+     const int flags = iscapture ? OPEN_FLAGS_INPUT : OPEN_FLAGS_OUTPUT;
+     SDL_AudioFormat format = 0;
+     audio_info_t info;
+-    audio_prinfo *prinfo = iscapture ? &info.play : &info.record;
++    struct audio_prinfo *prinfo = iscapture ? &info.play : &info.record;
+ 
+     /* We don't care what the devname is...we'll try to open anything. */
+     /*  ...but default to first name in the list... */
diff -r 0ded0639a2a2 -r e8c75a59795b devel/SDL2/patches/patch-src_joystick_bsd_SDL__sysjoystick.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/SDL2/patches/patch-src_joystick_bsd_SDL__sysjoystick.c      Sun Oct 30 10:37:17 2016 +0000
@@ -0,0 +1,26 @@
+$NetBSD: patch-src_joystick_bsd_SDL__sysjoystick.c,v 1.5 2016/10/30 10:37:17 wiz Exp $
+
+Move variable declarations to top, for C90.
+
+--- src/joystick/bsd/SDL_sysjoystick.c.orig    2016-10-20 03:56:26.000000000 +0000
++++ src/joystick/bsd/SDL_sysjoystick.c
+@@ -289,6 +289,10 @@ SDL_SYS_JoystickOpen(SDL_Joystick * joy,
+     struct report *rep = NULL;
+     int fd;
+     int i;
++#if defined(__NetBSD__)
++    usb_device_descriptor_t udd;
++    struct usb_string_desc usd;
++#endif
+ 
+     fd = open(path, O_RDONLY);
+     if (fd == -1) {
+@@ -338,8 +342,6 @@ SDL_SYS_JoystickOpen(SDL_Joystick * joy,
+         rep->rid = -1;          /* XXX */
+     }
+ #if defined(__NetBSD__)
+-    usb_device_descriptor_t udd;
+-    struct usb_string_desc usd;
+     if (ioctl(fd, USB_GET_DEVICE_DESC, &udd) == -1)
+         goto desc_failed;
+ 



Home | Main Index | Thread Index | Old Index