summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lang/nqc/Makefile8
-rw-r--r--lang/nqc/files/patch-compiler_lexer.cpp10
2 files changed, 14 insertions, 4 deletions
diff --git a/lang/nqc/Makefile b/lang/nqc/Makefile
index 9117fb900a50..1603ee949ff8 100644
--- a/lang/nqc/Makefile
+++ b/lang/nqc/Makefile
@@ -9,9 +9,10 @@ MASTER_SITES= http://bricxcc.sourceforge.net/nqc/release/ \
EXTRACT_SUFX= .tgz
MAINTAINER= jhay@FreeBSD.org
-COMMENT= A compiler for writing programs for the Lego RCX
+COMMENT= Compiler for writing programs for the Lego RCX
-USE_GMAKE= yes
+USES= gmake
+USE_DOS2UNIX= yes
NO_WRKSUBDIR= yes
MAN1= nqc.1
@@ -24,8 +25,7 @@ do-install:
.include <bsd.port.pre.mk>
-.if ${OSVERSION} >= 800064
-USE_DOS2UNIX= rcxlib/RCX_USBTowerPipe_fbsd.cpp
+.if ${OPSYS} == FreeBSD && ${OSVERSION} >= 800064
EXTRA_PATCHES+= ${FILESDIR}/extra-patch-rcxlib-RCX_USBTowerPipe_fbsd.cpp
.endif
diff --git a/lang/nqc/files/patch-compiler_lexer.cpp b/lang/nqc/files/patch-compiler_lexer.cpp
new file mode 100644
index 000000000000..1e952df48c10
--- /dev/null
+++ b/lang/nqc/files/patch-compiler_lexer.cpp
@@ -0,0 +1,10 @@
+--- compiler/lexer.cpp.orig 2013-11-03 11:24:46.670522000 +0000
++++ compiler/lexer.cpp
+@@ -11,6 +11,7 @@
+ #define YY_FLEX_MINOR_VERSION 5
+
+ #include <stdio.h>
++#include <unistd.h>
+
+ #if defined(__MWERKS__) && !__MACH__ && !YY_NEVER_INTERACTIVE
+ #include <unix.h>