aboutsummaryrefslogtreecommitdiff
path: root/graphics/freeglut
diff options
context:
space:
mode:
authorNiclas Zeising <zeising@FreeBSD.org>2018-10-25 18:48:23 +0000
committerNiclas Zeising <zeising@FreeBSD.org>2018-10-25 18:48:23 +0000
commit77a52f9d83e7814c34abc592e19503333affc6e0 (patch)
tree2c6107509f2d08a1f167dcbd6aee817e3e12be56 /graphics/freeglut
parent18198f0f12e2c1477de1374e17fdb3150ac9a2b0 (diff)
downloadports-77a52f9d83e7814c34abc592e19503333affc6e0.tar.gz
ports-77a52f9d83e7814c34abc592e19503333affc6e0.zip
graphics/freeglut: Fix build after joy(4) removal
Fix build of graphics/freeglut after the removal of the joy(4) driver in FreeBSD CURRENT. The same fix is applied for all FreeBSD versions though. Simply remove the include of sys/joystick.h, and instead bring in the definition of struct joystick from that file into the freeglut source. None of the ioctls in sys/joystick.h are ever used in freeglut. Please note that juystick support in freeglut on FreeBSD is not really tested, so no promises are made about it. Reported by: goshanecr on the FreeBSD forum in collaboration with: imp
Notes
Notes: svn path=/head/; revision=482977
Diffstat (limited to 'graphics/freeglut')
-rw-r--r--graphics/freeglut/Makefile2
-rw-r--r--graphics/freeglut/files/patch-src_x11_fg__internal__x11.h19
2 files changed, 15 insertions, 6 deletions
diff --git a/graphics/freeglut/Makefile b/graphics/freeglut/Makefile
index 53bf528796d3..5b6e94471706 100644
--- a/graphics/freeglut/Makefile
+++ b/graphics/freeglut/Makefile
@@ -3,7 +3,7 @@
PORTNAME= freeglut
PORTVERSION= 3.0.0
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= graphics
MASTER_SITES= SF
diff --git a/graphics/freeglut/files/patch-src_x11_fg__internal__x11.h b/graphics/freeglut/files/patch-src_x11_fg__internal__x11.h
index 41e551317b72..bae5f3272bf9 100644
--- a/graphics/freeglut/files/patch-src_x11_fg__internal__x11.h
+++ b/graphics/freeglut/files/patch-src_x11_fg__internal__x11.h
@@ -1,6 +1,6 @@
--- src/x11/fg_internal_x11.h.orig 2014-10-20 15:27:04 UTC
+++ src/x11/fg_internal_x11.h
-@@ -136,8 +136,42 @@ struct tagSFG_PlatformWindowState
+@@ -136,11 +136,50 @@ struct tagSFG_PlatformWindowState
#include <string.h>
# if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__)
@@ -35,15 +35,24 @@
+# endif
+# include <dev/usb/usb.h>
+# include <dev/usb/usbhid.h>
-+
+
+/* Compatibility with older usb.h revisions */
+# if !defined(USB_MAX_DEVNAMES) && defined(MAXDEVNAMES)
+# define USB_MAX_DEVNAMES MAXDEVNAMES
+# endif
-
++
# if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
- # include <sys/joystick.h>
-@@ -189,6 +223,30 @@ struct tagSFG_PlatformWindowState
+-# include <sys/joystick.h>
++struct joystick {
++ int x;
++ int y;
++ int b1;
++ int b2;
++};
+ # else
+ /*
+ * XXX NetBSD/amd64 systems may find that they have to steal the
+@@ -189,6 +228,30 @@ struct tagSFG_PlatformWindowState
*/
# define _JS_MAX_AXES 16
typedef struct tagSFG_PlatformJoystick SFG_PlatformJoystick;