aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--games/bzflag/Makefile7
-rw-r--r--games/bzflag/files/patch-usbjoy.cxx29
2 files changed, 31 insertions, 5 deletions
diff --git a/games/bzflag/Makefile b/games/bzflag/Makefile
index 8a74df9ecf75..431393e068fb 100644
--- a/games/bzflag/Makefile
+++ b/games/bzflag/Makefile
@@ -15,10 +15,9 @@ EXTRACT_SUFX= .tgz
MAINTAINER= nsayer@FreeBSD.org
-BROKEN= "Does not build"
-
USE_XLIB= yes
USE_MESA= yes
+USE_REINPLACE= yes
MAKE_ENV= PORTCFLAGS="${CFLAGS}" PORTCXXFLAGS="${CXXFLAGS}" \
PORTPREFIX="${PREFIX}" PTHREAD_LIBS="${PTHREAD_LIBS}" \
@@ -28,6 +27,10 @@ MAN6= bzflag.6 bzfrelay.6 bzfls.6 bzfs.6
do-configure:
@${CP} ${FILESDIR}/config-sys ${WRKSRC}/
+ ${REINPLACE_CMD} "s,libusb.h,libusbhid.h,g" \
+ ${WRKSRC}/src/platform/XWindow.h
+ ${REINPLACE_CMD} "s,malloc.h,stdlib.h,g" \
+ ${WRKSRC}/src/bzflag/HUDRenderer.cxx
post-build:
@(cd ${WRKSRC}/man && ${MAKE} targets)
diff --git a/games/bzflag/files/patch-usbjoy.cxx b/games/bzflag/files/patch-usbjoy.cxx
index 747f862c60c3..e0b4e59eaa45 100644
--- a/games/bzflag/files/patch-usbjoy.cxx
+++ b/games/bzflag/files/patch-usbjoy.cxx
@@ -1,6 +1,6 @@
---- src/platform/usbjoy.cxx.orig Thu Nov 15 02:27:11 2001
-+++ src/platform/usbjoy.cxx Sat Jan 26 05:48:50 2002
-@@ -46,7 +46,7 @@
+--- src/platform/usbjoy.cxx Wed Sep 18 22:28:34 2002
++++ src/platform/usbjoy.cxx.new Wed Sep 18 22:28:22 2002
+@@ -46,14 +46,14 @@
int data_buf_offset;
};
@@ -9,3 +9,26 @@
usb_joystick::usb_joystick(const char *name)
{
+ report_desc_t rd;
+ hid_data *d;
+ hid_item h;
+- int report_id;
++ hid_kind_t k;
+
+ status = FALSE;
+ hids = NULL;
+@@ -67,11 +67,12 @@
+ return;
+ }
+
+- data_buf_size = hid_report_size(rd, hid_input, &report_id);
++ k = hid_input;
++ data_buf_size = hid_report_size(rd, hid_input, k);
+ if ((data_buf = (char *)malloc(data_buf_size)) == NULL) {
+ hid_dispose_report_desc(rd);
+ }
+- data_buf_offset = (report_id != 0);
++ data_buf_offset = 0;
+
+ int is_joystick = 0;
+ int interesting_hid = FALSE;