summaryrefslogtreecommitdiffstats
path: root/games
diff options
context:
space:
mode:
authorwill <will@FreeBSD.org>2002-09-19 03:38:11 +0000
committerwill <will@FreeBSD.org>2002-09-19 03:38:11 +0000
commit5cb8927352f27999b8066ba65c6a8447f26626ed (patch)
tree079606325545190f9026ddc066b65214d35575fb /games
parentf980f44431f395844c0b1cf30ae90b6f3be62f0e (diff)
downloadFreeBSD-ports-5cb8927352f27999b8066ba65c6a8447f26626ed.zip
FreeBSD-ports-5cb8927352f27999b8066ba65c6a8447f26626ed.tar.gz
Fix bzflag and remove BROKEN. This has been broken since joe MFC'd the
change from libusb.h to libusbhid.h at least, which is five months. The patch committed here may not be correct, but it compiles and I don't have a USB joystick to test with, and 4.7-R ports freeze is in two days...
Diffstat (limited to 'games')
-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 8a74df9..431393e 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 747f862..e0b4e59 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;
OpenPOWER on IntegriCloud