tech-pkg archive

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

devel/SDL and devel/SDL2 build fixes under NetBSD-current



Hi,

Recent change in NetBSD-current,
http://mail-index.netbsd.org/source-changes/2017/12/10/msg090374.html
introduces /usr/include/dev/hid/hid.h and SDL and SDL2 joystick
support requires inclusion of it.

Can I fix these issues during freeze?

Patches for devel/SDL and devel/SDL2 are here.
Index: distinfo
===================================================================
RCS file: /cvsroot/pkgsrc/devel/SDL/distinfo,v
retrieving revision 1.79
diff -u -r1.79 distinfo
--- distinfo	27 Oct 2017 01:28:53 -0000	1.79
+++ distinfo	23 Dec 2017 06:58:39 -0000
@@ -9,7 +9,7 @@
 SHA1 (patch-src_audio_bsd_SDL__bsdaudio.c) = 7f5fbf4d839e52fce028810dc807b404fcd51442
 SHA1 (patch-src_audio_dma_SDL__dmaaudio.c) = cede64d04e8872b11851bfcacbc99059df973881
 SHA1 (patch-src_audio_sun_SDL__sunaudio.c) = 4b492b40d39e6444037dfda55766e4a149cc6c30
-SHA1 (patch-src_joystick_bsd_SDL__sysjoystick.c) = 46029dda8975dcb891a5b14b718c27b034ce5b06
+SHA1 (patch-src_joystick_bsd_SDL__sysjoystick.c) = a20608d6a4cc8f2c8f5fb2d77a572f373178151b
 SHA1 (patch-src_video_quartz_SDL__QuartzVideo.h) = 19d952bade06dbd646e94f42139c38436969b1a8
 SHA1 (patch-src_video_wscons_SDL__wsconsevents.c) = 1c874c46edb325907eda3bfa7580c788294f6d21
 SHA1 (patch-src_video_wscons_SDL__wsconsevents__c.h) = 97206e2aca0b620005217d9d07ad1177516cac92
Index: patches/patch-src_joystick_bsd_SDL__sysjoystick.c
===================================================================
RCS file: /cvsroot/pkgsrc/devel/SDL/patches/patch-src_joystick_bsd_SDL__sysjoystick.c,v
retrieving revision 1.5
diff -u -r1.5 patch-src_joystick_bsd_SDL__sysjoystick.c
--- patches/patch-src_joystick_bsd_SDL__sysjoystick.c	3 Mar 2015 19:14:04 -0000	1.5
+++ patches/patch-src_joystick_bsd_SDL__sysjoystick.c	23 Dec 2017 06:58:39 -0000
@@ -2,7 +2,20 @@
 
 --- src/joystick/bsd/SDL_sysjoystick.c.orig	2012-01-19 06:30:06.000000000 +0000
 +++ src/joystick/bsd/SDL_sysjoystick.c
-@@ -77,7 +77,7 @@
+@@ -46,6 +46,12 @@
+ #ifdef __DragonFly__
+ #include <bus/usb/usb.h>
+ #include <bus/usb/usbhid.h>
++#elif defined(__NetBSD__)
++#include <dev/usb/usb.h>
++#include <dev/usb/usbhid.h>
++#if __NetBSD_Version__ >= 899000900
++#include <dev/hid/hid.h>
++#endif
+ #else
+ #include <dev/usb/usb.h>
+ #include <dev/usb/usbhid.h>
+@@ -77,7 +83,7 @@
  #include "../SDL_sysjoystick.h"
  #include "../SDL_joystick_c.h"
  
@@ -11,7 +24,7 @@
  #define MAX_JOY_JOYS	2
  #define MAX_JOYS	(MAX_UHID_JOYS + MAX_JOY_JOYS)
  
-@@ -148,9 +148,11 @@ static char *joydevnames[MAX_JOYS];
+@@ -148,9 +154,11 @@ static char *joydevnames[MAX_JOYS];
  static int	report_alloc(struct report *, struct report_desc *, int);
  static void	report_free(struct report *);
  
@@ -25,7 +38,7 @@
  #define REP_BUF_DATA(rep) ((rep)->buf->ugd_data)
  #else
  #define REP_BUF_DATA(rep) ((rep)->buf->data)
-@@ -314,6 +316,45 @@ SDL_SYS_JoystickOpen(SDL_Joystick *joy)
+@@ -314,6 +322,45 @@ SDL_SYS_JoystickOpen(SDL_Joystick *joy)
  #endif
  		rep->rid = -1; /* XXX */
  	}
@@ -71,7 +84,7 @@
  	if (report_alloc(rep, hw->repdesc, REPORT_INPUT) < 0) {
  		goto usberr;
  	}
-@@ -386,10 +427,21 @@ SDL_SYS_JoystickOpen(SDL_Joystick *joy)
+@@ -386,10 +433,21 @@ SDL_SYS_JoystickOpen(SDL_Joystick *joy)
  		if (hw->axis_map[i] > 0)
  			hw->axis_map[i] = joy->naxes++;
  
@@ -93,7 +106,7 @@
  	return (0);
  usberr:
  	close(hw->fd);
-@@ -459,63 +511,62 @@ SDL_SYS_JoystickUpdate(SDL_Joystick *joy
+@@ -459,63 +517,62 @@ SDL_SYS_JoystickUpdate(SDL_Joystick *joy
  	
  	rep = &joy->hwdata->inreport;
  

Index: distinfo
===================================================================
RCS file: /cvsroot/pkgsrc/devel/SDL2/distinfo,v
retrieving revision 1.27
diff -u -r1.27 distinfo
--- distinfo	23 Oct 2017 20:48:43 -0000	1.27
+++ distinfo	23 Dec 2017 06:59:33 -0000
@@ -6,6 +6,6 @@
 Size (SDL2-2.0.7.tar.gz) = 4432499 bytes
 SHA1 (patch-configure) = 5637a66f8890586026034f5324829e61c94ac5be
 SHA1 (patch-src_audio_netbsd_SDL__netbsdaudio.c) = 7a1f32ea7029f8dc99aecfaead7c68f2fd6cb230
-SHA1 (patch-src_joystick_bsd_SDL__sysjoystick.c) = 37f19752cbba8def12a210deafec66965e3ad9ac
+SHA1 (patch-src_joystick_bsd_SDL__sysjoystick.c) = 152b5df76a91c7e7acde126b1464fdd464cf1ba2
 SHA1 (patch-src_video_SDL__egl.c) = eea0cb838e34066cd80373c0becc9eecbc8b1570
 SHA1 (patch-src_video_x11_SDL__x11opengl.c) = 70b63021c12c52760c0811c673b259844bdfcdc0
Index: patches/patch-src_joystick_bsd_SDL__sysjoystick.c
===================================================================
RCS file: /cvsroot/pkgsrc/devel/SDL2/patches/patch-src_joystick_bsd_SDL__sysjoystick.c,v
retrieving revision 1.5
diff -u -r1.5 patch-src_joystick_bsd_SDL__sysjoystick.c
--- patches/patch-src_joystick_bsd_SDL__sysjoystick.c	30 Oct 2016 10:37:17 -0000	1.5
+++ patches/patch-src_joystick_bsd_SDL__sysjoystick.c	23 Dec 2017 06:59:33 -0000
@@ -2,9 +2,22 @@
 
 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.orig	2017-10-23 19:27:46.000000000 +0000
 +++ src/joystick/bsd/SDL_sysjoystick.c
-@@ -289,6 +289,10 @@ SDL_SYS_JoystickOpen(SDL_Joystick * joy,
+@@ -45,6 +45,12 @@
+ #ifdef __DragonFly__
+ #include <bus/usb/usb.h>
+ #include <bus/usb/usbhid.h>
++#elif defined(__NetBSD__)
++#include <dev/usb/usb.h>
++#include <dev/usb/usbhid.h>
++#if __NetBSD_Version__ >= 899000900
++#include <dev/hid/hid.h>
++#endif
+ #else
+ #include <dev/usb/usb.h>
+ #include <dev/usb/usbhid.h>
+@@ -291,6 +297,10 @@ SDL_SYS_JoystickOpen(SDL_Joystick * joy,
      struct report *rep = NULL;
      int fd;
      int i;
@@ -15,7 +28,7 @@
  
      fd = open(path, O_RDONLY);
      if (fd == -1) {
-@@ -338,8 +342,6 @@ SDL_SYS_JoystickOpen(SDL_Joystick * joy,
+@@ -340,8 +350,6 @@ SDL_SYS_JoystickOpen(SDL_Joystick * joy,
          rep->rid = -1;          /* XXX */
      }
  #if defined(__NetBSD__)

--
Ryo ONODERA // ryo%tetera.org@localhost
PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB  FD1B F404 27FA C7D1 15F3


Home | Main Index | Thread Index | Old Index