aboutsummaryrefslogtreecommitdiffstats
path: root/lang
diff options
context:
space:
mode:
authorjhay <jhay@FreeBSD.org>2012-01-15 00:50:08 +0800
committerjhay <jhay@FreeBSD.org>2012-01-15 00:50:08 +0800
commitaf360041be91b349196606ead1bb964f7d10984b (patch)
tree50f87fb1b02ecec86278cdbff377912d8cc1ba0d /lang
parenteaf5405479a37a8c825a0670a4cca143aae1b359 (diff)
downloadfreebsd-ports-gnome-af360041be91b349196606ead1bb964f7d10984b.tar.gz
freebsd-ports-gnome-af360041be91b349196606ead1bb964f7d10984b.tar.zst
freebsd-ports-gnome-af360041be91b349196606ead1bb964f7d10984b.zip
Make nqc compile on FreeBSD 8 and later.
PR: 163844 Submitted by: Jason Bacon <jwbacon@tds.net>
Diffstat (limited to 'lang')
-rw-r--r--lang/nqc/Makefile3
-rw-r--r--lang/nqc/files/extra-patch-rcxlib-RCX_USBTowerPipe_fbsd.cpp29
2 files changed, 31 insertions, 1 deletions
diff --git a/lang/nqc/Makefile b/lang/nqc/Makefile
index e3105b307671..b0e1a543b2e2 100644
--- a/lang/nqc/Makefile
+++ b/lang/nqc/Makefile
@@ -28,7 +28,8 @@ do-install:
.include <bsd.port.pre.mk>
.if ${OSVERSION} >= 800064
-BROKEN= does not build
+USE_DOS2UNIX= rcxlib/RCX_USBTowerPipe_fbsd.cpp
+EXTRA_PATCHES+= ${FILESDIR}/extra-patch-rcxlib-RCX_USBTowerPipe_fbsd.cpp
.endif
.include <bsd.port.post.mk>
diff --git a/lang/nqc/files/extra-patch-rcxlib-RCX_USBTowerPipe_fbsd.cpp b/lang/nqc/files/extra-patch-rcxlib-RCX_USBTowerPipe_fbsd.cpp
new file mode 100644
index 000000000000..2a4424f49261
--- /dev/null
+++ b/lang/nqc/files/extra-patch-rcxlib-RCX_USBTowerPipe_fbsd.cpp
@@ -0,0 +1,29 @@
+--- rcxlib/RCX_USBTowerPipe_fbsd.cpp.orig 2012-01-05 18:08:27.000000000 -0600
++++ rcxlib/RCX_USBTowerPipe_fbsd.cpp 2012-01-05 18:13:13.000000000 -0600
+@@ -20,6 +20,7 @@
+ #include <cstring>
+ #include <unistd.h>
+ #include <dev/usb/usb.h>
++#include <dev/usb/usb_ioctl.h>
+
+ #include "RCX_Pipe.h"
+
+@@ -308,15 +309,15 @@
+ return -1;
+ }
+ iov = 1;
+- err = ioctl(fdRd, USB_SET_SHORT_XFER, &iov);
++ err = ioctl(fdRd, USB_SET_RX_SHORT_XFER, &iov);
+ if (fdRd == -1) {
+- perror("ioctl USB_SET_SHORT_XFER");
++ perror("ioctl USB_SET_RX_SHORT_XFER");
+ return -1;
+ }
+ iov = 5000;
+- err = ioctl(fdRd, USB_SET_TIMEOUT, &iov);
++ err = ioctl(fdRd, USB_SET_RX_TIMEOUT, &iov);
+ if (fdRd == -1) {
+- perror("ioctl USB_SET_TIMEOUT");
++ perror("ioctl USB_SET_RX_TIMEOUT");
+ return -1;
+ }