Hi,

Here a diff to switch sdl1 to use ujoy(4) devices. Tested by me with
dxx-rebirth. I'd like to take MAINTAINER while here.

ok?

Index: Makefile
===================================================================
RCS file: /cvs/ports/devel/sdl/Makefile,v
retrieving revision 1.104
diff -u -p -r1.104 Makefile
--- Makefile    12 Jul 2019 21:02:18 -0000      1.104
+++ Makefile    23 Jan 2021 05:38:23 -0000
@@ -5,8 +5,9 @@ COMMENT=        cross-platform multimedia libra
 VERSION=       1.2.15
 DISTNAME=      SDL-${VERSION}
 PKGNAME=       ${DISTNAME:L}
-REVISION=      10
+REVISION=      11
 CATEGORIES=    devel
+MAINTAINER=    Thomas Frohwein <[email protected]>
 MASTER_SITES=  ${HOMEPAGE}release/
 
 SHARED_LIBS=   SDL     8.0
@@ -67,6 +68,7 @@ NO_TEST=      Yes
 pre-configure:
        @mkdir -p ${WRKSRC}/src/audio/sndio
        @cp ${FILESDIR}/SDL_sndioaudio.{c,h} ${WRKSRC}/src/audio/sndio
-       @cd ${WRKSRC} && AUTOCONF_VERSION=${AUTOCONF_VERSION} PATH=${PORTPATH} 
./autogen.sh
+       @cd ${WRKSRC} && AUTOCONF_VERSION=${AUTOCONF_VERSION} PATH=${PORTPATH} \
+               ./autogen.sh
 
 .include <bsd.port.mk>
Index: patches/patch-src_joystick_bsd_SDL_sysjoystick_c
===================================================================
RCS file: 
/cvs/ports/devel/sdl/patches/patch-src_joystick_bsd_SDL_sysjoystick_c,v
retrieving revision 1.11
diff -u -p -r1.11 patch-src_joystick_bsd_SDL_sysjoystick_c
--- patches/patch-src_joystick_bsd_SDL_sysjoystick_c    16 May 2012 14:01:19 
-0000      1.11
+++ patches/patch-src_joystick_bsd_SDL_sysjoystick_c    23 Jan 2021 05:38:23 
-0000
@@ -1,9 +1,11 @@
 $OpenBSD: patch-src_joystick_bsd_SDL_sysjoystick_c,v 1.11 2012/05/16 14:01:19 
edd Exp $
 
 It is easy to exhaust uhid devices in this day and age.
+use ujoy(4) device nodes
 
---- src/joystick/bsd/SDL_sysjoystick.c.orig    Tue May 15 17:09:10 2012
-+++ src/joystick/bsd/SDL_sysjoystick.c Tue May 15 17:09:29 2012
+Index: src/joystick/bsd/SDL_sysjoystick.c
+--- src/joystick/bsd/SDL_sysjoystick.c.orig
++++ src/joystick/bsd/SDL_sysjoystick.c
 @@ -77,7 +77,7 @@
  #include "../SDL_sysjoystick.h"
  #include "../SDL_joystick_c.h"
@@ -13,3 +15,12 @@ It is easy to exhaust uhid devices in th
  #define MAX_JOY_JOYS  2
  #define MAX_JOYS      (MAX_UHID_JOYS + MAX_JOY_JOYS)
  
+@@ -170,7 +170,7 @@ SDL_SYS_JoystickInit(void)
+       for (i = 0; i < MAX_UHID_JOYS; i++) {
+               SDL_Joystick nj;
+ 
+-              SDL_snprintf(s, SDL_arraysize(s), "/dev/uhid%d", i);
++              SDL_snprintf(s, SDL_arraysize(s), "/dev/ujoy/%d", i);
+ 
+               nj.index = SDL_numjoysticks;
+               joynames[nj.index] = strdup(s);
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/devel/sdl/pkg/PLIST,v
retrieving revision 1.17
diff -u -p -r1.17 PLIST
--- pkg/PLIST   22 May 2015 11:31:13 -0000      1.17
+++ pkg/PLIST   23 Jan 2021 05:38:23 -0000
@@ -37,10 +37,10 @@ include/SDL/SDL_version.h
 include/SDL/SDL_video.h
 include/SDL/begin_code.h
 include/SDL/close_code.h
-lib/libSDL.a
+@static-lib lib/libSDL.a
 lib/libSDL.la
 @lib lib/libSDL.so.${LIBSDL_VERSION}
-lib/libSDLmain.a
+@static-lib lib/libSDLmain.a
 lib/libSDLmain.la
 lib/pkgconfig/sdl.pc
 @man man/man3/SDLKey.3

Reply via email to