pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/devel/SDL Better DragonFlyBSD support from Joerg Sonne...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/ee2a10e15767
branches:  trunk
changeset: 494879:ee2a10e15767
user:      wiz <wiz%pkgsrc.org@localhost>
date:      Tue May 31 17:37:50 2005 +0000

description:
Better DragonFlyBSD support from Joerg Sonnenberger.
. find USB headers
. fix joystick support

diffstat:

 devel/SDL/distinfo         |   8 +++---
 devel/SDL/patches/patch-aa |  51 ++++++++++++++++++++++++++++++++---------
 devel/SDL/patches/patch-aj |  54 +++++++++++++++++++++++++++++++++++++++----
 devel/SDL/patches/patch-am |  56 ++++++++++++++++++++++++++++++++++++++++-----
 4 files changed, 141 insertions(+), 28 deletions(-)

diffs (truncated from 342 to 300 lines):

diff -r 8bff04c26155 -r ee2a10e15767 devel/SDL/distinfo
--- a/devel/SDL/distinfo        Tue May 31 17:24:23 2005 +0000
+++ b/devel/SDL/distinfo        Tue May 31 17:37:50 2005 +0000
@@ -1,16 +1,16 @@
-$NetBSD: distinfo,v 1.39 2005/05/20 20:08:40 wiz Exp $
+$NetBSD: distinfo,v 1.40 2005/05/31 17:37:50 wiz Exp $
 
 SHA1 (SDL-1.2.8.tar.gz) = 26f2104a60a28914b809d3cb77d5790bfdfd024c
 RMD160 (SDL-1.2.8.tar.gz) = 91aa02f6b52792b3ec7f5478bcaebda1542980dc
 Size (SDL-1.2.8.tar.gz) = 2602449 bytes
-SHA1 (patch-aa) = 0853dfa9d64d0848de0d084541b6ffd38ffdedad
+SHA1 (patch-aa) = f41d0de165d41826a6de2fdf9521d4f41f97221a
 SHA1 (patch-ab) = 6693545cafa5f5e73fb3f6f34d1a0b59a17872d2
 SHA1 (patch-ac) = 8471da99fcd2771e319556c95f6d1295dce002bb
 SHA1 (patch-ad) = 230544c0aa2f8d827a9d49c4962afe2e4936074e
 SHA1 (patch-af) = f5e824addf308f9c467de02e3b262afbc0ef77c0
-SHA1 (patch-aj) = f857e5dba94ff6d3893f6218cbc0c9e011f02cf7
+SHA1 (patch-aj) = 9b7bae7224129813a88bb9b5ae5364e167e0551a
 SHA1 (patch-al) = d8b4ee9d33c4b34db87b098f4945018ae995ae99
-SHA1 (patch-am) = 54ddcc39e8e23bbff09ffc0d56b783ec7404eea3
+SHA1 (patch-am) = 0fd647ff90fbee55c8d10f7e29f3dbd1da8ad83b
 SHA1 (patch-ar) = 61e759bb3eb05890160573dfe63431792f1823bd
 SHA1 (patch-as) = f69ca8796afeda35e57c89aa7a161de2de7bf6d8
 SHA1 (patch-ba) = 4c87c3812c9f8bdabb974a6a17f6243cedcc887e
diff -r 8bff04c26155 -r ee2a10e15767 devel/SDL/patches/patch-aa
--- a/devel/SDL/patches/patch-aa        Tue May 31 17:24:23 2005 +0000
+++ b/devel/SDL/patches/patch-aa        Tue May 31 17:37:50 2005 +0000
@@ -1,8 +1,22 @@
-$NetBSD: patch-aa,v 1.10 2005/05/20 20:08:40 wiz Exp $
+$NetBSD: patch-aa,v 1.11 2005/05/31 17:37:50 wiz Exp $
 
 --- src/joystick/bsd/SDL_sysjoystick.c.orig    2004-12-13 08:54:32.000000000 +0100
 +++ src/joystick/bsd/SDL_sysjoystick.c
-@@ -55,12 +55,14 @@ static char rcsid =
+@@ -44,8 +44,13 @@ static char rcsid =
+ #if defined(HAVE_USB_H)
+ #include <usb.h>
+ #endif
++#ifdef __DragonFly__
++#include <bus/usb/usb.h>
++#include <bus/usb/usbhid.h>
++#else
+ #include <dev/usb/usb.h>
+ #include <dev/usb/usbhid.h>
++#endif
+ 
+ #if defined(HAVE_USBHID_H)
+ #include <usbhid.h>
+@@ -55,12 +60,14 @@ static char rcsid =
  #include <libusbhid.h>
  #endif
  
@@ -19,7 +33,7 @@
  #include <machine/joystick.h>
  #endif
  
-@@ -239,6 +241,7 @@ SDL_SYS_JoystickOpen(SDL_Joystick *joy)
+@@ -239,6 +246,7 @@ SDL_SYS_JoystickOpen(SDL_Joystick *joy)
        struct hid_data *hdata;
        struct report *rep;
        int fd;
@@ -27,7 +41,7 @@
  
        fd = open(path, O_RDONLY);
        if (fd == -1) {
-@@ -303,6 +306,8 @@ SDL_SYS_JoystickOpen(SDL_Joystick *joy)
+@@ -303,6 +311,8 @@ SDL_SYS_JoystickOpen(SDL_Joystick *joy)
        joy->nbuttons = 0;
        joy->nhats = 0;
        joy->nballs = 0;
@@ -36,7 +50,7 @@
  
        while (hid_get_item(hdata, &hitem) > 0) {
                char *sp;
-@@ -329,8 +334,7 @@ SDL_SYS_JoystickOpen(SDL_Joystick *joy)
+@@ -329,8 +339,7 @@ SDL_SYS_JoystickOpen(SDL_Joystick *joy)
                            unsigned usage = HID_USAGE(hitem.usage);
                            int joyaxe = usage_to_joyaxe(usage);
                            if (joyaxe >= 0) {
@@ -46,7 +60,7 @@
                            } else if (usage == HUG_HAT_SWITCH) {
                                joy->nhats++;
                            }
-@@ -348,6 +352,9 @@ SDL_SYS_JoystickOpen(SDL_Joystick *joy)
+@@ -348,6 +357,9 @@ SDL_SYS_JoystickOpen(SDL_Joystick *joy)
                }
        }
        hid_end_parse(hdata);
@@ -56,7 +70,7 @@
  
  usbend:
        /* The poll blocks the event thread. */
-@@ -370,7 +377,7 @@ SDL_SYS_JoystickUpdate(SDL_Joystick *joy
+@@ -370,7 +382,7 @@ SDL_SYS_JoystickUpdate(SDL_Joystick *joy
        int nbutton, naxe = -1;
        Sint32 v;
  
@@ -65,7 +79,7 @@
        struct joystick gameport;
        static int x, y, xmin = 0xffff, ymin = 0xffff, xmax = 0, ymax = 0;
   
-@@ -419,7 +426,7 @@ SDL_SYS_JoystickUpdate(SDL_Joystick *joy
+@@ -419,7 +431,7 @@ SDL_SYS_JoystickUpdate(SDL_Joystick *joy
                }
                return;
        }
@@ -74,7 +88,7 @@
        
        rep = &joy->hwdata->inreport;
  
-@@ -457,7 +464,8 @@ SDL_SYS_JoystickUpdate(SDL_Joystick *joy
+@@ -457,7 +469,8 @@ SDL_SYS_JoystickUpdate(SDL_Joystick *joy
                            } else if (usage == HUG_HAT_SWITCH) {
                                v = (Sint32)hid_get_data(REP_BUF_DATA(rep),
                                                         &hitem);
@@ -84,8 +98,23 @@
                            }
                            break;
                        }
-@@ -530,9 +538,9 @@ report_alloc(struct report *r, struct re
- #endif
+@@ -518,7 +531,9 @@ report_alloc(struct report *r, struct re
+ {
+       int len;
+ 
+-#ifdef __FreeBSD__
++#ifdef __DragonFly__
++      len = hid_report_size(rd, r->rid, repinfo[repind].kind);
++#elif defined(__FreeBSD__)
+ # if (__FreeBSD_version >= 460000)
+ #  if (__FreeBSD_version <= 500111)
+       len = hid_report_size(rd, r->rid, repinfo[repind].kind);
+@@ -527,12 +542,12 @@ report_alloc(struct report *r, struct re
+ #  endif
+ # else
+       len = hid_report_size(rd, repinfo[repind].kind, &r->rid);
+-#endif
++# endif
  #else
  # ifdef USBHID_NEW
 -      len = hid_report_size(rd, repinfo[repind].kind, &r->rid);
diff -r 8bff04c26155 -r ee2a10e15767 devel/SDL/patches/patch-aj
--- a/devel/SDL/patches/patch-aj        Tue May 31 17:24:23 2005 +0000
+++ b/devel/SDL/patches/patch-aj        Tue May 31 17:37:50 2005 +0000
@@ -1,4 +1,4 @@
-$NetBSD: patch-aj,v 1.21 2005/05/20 20:08:40 wiz Exp $
+$NetBSD: patch-aj,v 1.22 2005/05/31 17:37:50 wiz Exp $
 
 --- configure.in.orig  2004-12-13 10:02:08.000000000 +0100
 +++ configure.in
@@ -145,7 +145,49 @@
          fi
  
          AC_MSG_CHECKING(for usbhid)
-@@ -1835,6 +1844,26 @@ CheckUSBHID()
+@@ -1756,8 +1765,13 @@ CheckUSBHID()
+           #if defined(HAVE_USB_H)
+           #include <usb.h>
+           #endif
++        #ifdef __DragonFly__
++          #include <bus/usb/usb.h>
++          #include <bus/usb/usbhid.h>
++        #else
+           #include <dev/usb/usb.h>
+           #include <dev/usb/usbhid.h>
++        #endif
+           #if defined(HAVE_USBHID_H)
+           #include <usbhid.h>
+           #elif defined(HAVE_LIBUSB_H)
+@@ -1782,8 +1796,13 @@ CheckUSBHID()
+               #if defined(HAVE_USB_H)
+               #include <usb.h>
+               #endif
++            #ifdef __DragonFly__
++              #include <bus/usb/usb.h>
++              #include <bus/usb/usbhid.h>
++            #else
+               #include <dev/usb/usb.h>
+               #include <dev/usb/usbhid.h>
++            #endif
+               #if defined(HAVE_USBHID_H)
+               #include <usbhid.h>
+               #elif defined(HAVE_LIBUSB_H)
+@@ -1809,8 +1828,13 @@ CheckUSBHID()
+               #if defined(HAVE_USB_H)
+               #include <usb.h>
+               #endif
++            #ifdef __DragonFly__
++              #include <bus/usb/usb.h>
++              #include <bus/usb/usbhid.h>
++            #else
+               #include <dev/usb/usb.h>
+               #include <dev/usb/usbhid.h>
++            #endif
+               #if defined(HAVE_USBHID_H)
+               #include <usbhid.h>
+               #elif defined(HAVE_LIBUSB_H)
+@@ -1835,6 +1859,26 @@ CheckUSBHID()
      fi
  }
  
@@ -172,7 +214,7 @@
  dnl Check for altivec instruction support using gas syntax
  CheckAltivec()
  {
-@@ -1992,7 +2021,7 @@ case "$target" in
+@@ -1992,7 +2036,7 @@ case "$target" in
              COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c)
          fi
          ;;
@@ -181,7 +223,7 @@
          ARCH=freebsd
          CheckDummyVideo
          CheckDiskAudio
-@@ -2043,16 +2072,18 @@ case "$target" in
+@@ -2043,16 +2087,18 @@ case "$target" in
          CheckESD
          CheckNAS
          CheckX11
@@ -203,7 +245,7 @@
          fi
          # Set up files for the cdrom library
          if test x$enable_cdrom = xyes; then
-@@ -2061,9 +2092,6 @@ case "$target" in
+@@ -2061,9 +2107,6 @@ case "$target" in
          fi
          # Set up files for the thread library
          if test x$enable_threads = xyes; then
@@ -213,7 +255,7 @@
              CopyUnixThreadSource
          fi
          # Set up files for the timer library
-@@ -2724,7 +2752,7 @@ AM_CONDITIONAL([ENABLE_STATIC], [test "$
+@@ -2724,7 +2767,7 @@ AM_CONDITIONAL([ENABLE_STATIC], [test "$
  
  # Set runtime shared library paths as needed
  
diff -r 8bff04c26155 -r ee2a10e15767 devel/SDL/patches/patch-am
--- a/devel/SDL/patches/patch-am        Tue May 31 17:24:23 2005 +0000
+++ b/devel/SDL/patches/patch-am        Tue May 31 17:37:50 2005 +0000
@@ -1,4 +1,4 @@
-$NetBSD: patch-am,v 1.16 2005/05/20 20:08:40 wiz Exp $
+$NetBSD: patch-am,v 1.17 2005/05/31 17:37:50 wiz Exp $
 
 --- configure.orig     2004-12-13 10:04:51.000000000 +0100
 +++ configure
@@ -899,7 +899,49 @@
          fi
  
          echo "$as_me:$LINENO: checking for usbhid" >&5
-@@ -29514,6 +29518,70 @@ echo "${ECHO_T}$have_usbhid_new" >&6
+@@ -29307,8 +29311,13 @@ cat >>conftest.$ac_ext <<_ACEOF
+           #if defined(HAVE_USB_H)
+           #include <usb.h>
+           #endif
++        #ifdef __DragonFly__
++          #include <bus/usb/usb.h>
++          #include <bus/usb/usbhid.h>
++        #else
+           #include <dev/usb/usb.h>
+           #include <dev/usb/usbhid.h>
++        #endif
+           #if defined(HAVE_USBHID_H)
+           #include <usbhid.h>
+           #elif defined(HAVE_LIBUSB_H)
+@@ -29378,8 +29387,13 @@ cat >>conftest.$ac_ext <<_ACEOF
+               #if defined(HAVE_USB_H)
+               #include <usb.h>
+               #endif
++            #ifdef __DragonFly__
++              #include <bus/usb/usb.h>
++              #include <bus/usb/usbhid.h>
++            #else
+               #include <dev/usb/usb.h>
+               #include <dev/usb/usbhid.h>
++            #endif
+               #if defined(HAVE_USBHID_H)
+               #include <usbhid.h>
+               #elif defined(HAVE_LIBUSB_H)
+@@ -29450,8 +29464,13 @@ cat >>conftest.$ac_ext <<_ACEOF
+               #if defined(HAVE_USB_H)
+               #include <usb.h>
+               #endif
++            #ifdef __DragonFly__
++              #include <bus/usb/usb.h>
++              #include <bus/usb/usbhid.h>
++            #else
+               #include <dev/usb/usb.h>
+               #include <dev/usb/usbhid.h>
++            #endif
+               #if defined(HAVE_USBHID_H)
+               #include <usbhid.h>
+               #elif defined(HAVE_LIBUSB_H)
+@@ -29514,6 +29533,70 @@ echo "${ECHO_T}$have_usbhid_new" >&6
      fi
  }
  
@@ -970,7 +1012,7 @@
  CheckAltivec()
  {



Home | Main Index | Thread Index | Old Index