aboutsummaryrefslogtreecommitdiff
path: root/lang/nbfc
diff options
context:
space:
mode:
authorPietro Cerutti <gahr@FreeBSD.org>2014-02-13 13:27:12 +0000
committerPietro Cerutti <gahr@FreeBSD.org>2014-02-13 13:27:12 +0000
commitb107f36bd2b89920a188f433acf6443f179e3de0 (patch)
treea90d8ce646dee0fd0d762cd229b19ee6af0200ef /lang/nbfc
parent11be90420e0323bd506f11c8984abef5f0a258e1 (diff)
downloadports-b107f36bd2b89920a188f433acf6443f179e3de0.tar.gz
ports-b107f36bd2b89920a188f433acf6443f179e3de0.zip
Notes
Diffstat (limited to 'lang/nbfc')
-rw-r--r--lang/nbfc/Makefile15
-rw-r--r--lang/nbfc/files/patch-Makefile31
-rw-r--r--lang/nbfc/files/patch-bf.y10
3 files changed, 51 insertions, 5 deletions
diff --git a/lang/nbfc/Makefile b/lang/nbfc/Makefile
index 235d16677c6e..f4a707fd7968 100644
--- a/lang/nbfc/Makefile
+++ b/lang/nbfc/Makefile
@@ -9,13 +9,18 @@ MASTER_SITES= http://koeln.ccc.de/ablage/brainfuck/
MAINTAINER= gahr@FreeBSD.org
COMMENT= New Brainfuck Compiler
-MAN1= nbfc.1
+LICENSE= BSD2CLAUSE
-PLIST_FILES= bin/nbfc
+PLIST_FILES= bin/nbfc \
+ man/man1/nbfc.1.gz
+
+MAKE_ENV+= FLEX=${FLEX} \
+ YACC=${YACC} \
+ STAGEDIR=${STAGEDIR}
-NO_STAGE= yes
post-patch:
- ${REINPLACE_CMD} -e 's|/usr|${PREFIX}|g; s|bison -y|${YACC} -|g; s|gcc|${CC} ${CFLAGS}|g' \
- ${WRKSRC}/Makefile
+ # -O4 kills llvm
+ ${REINPLACE_CMD} -e 's|/usr/bin/gcc|${CC}|; s|O4|O3|g' \
+ ${WRKSRC}/config.h
.include <bsd.port.mk>
diff --git a/lang/nbfc/files/patch-Makefile b/lang/nbfc/files/patch-Makefile
new file mode 100644
index 000000000000..2cc0604a5fcd
--- /dev/null
+++ b/lang/nbfc/files/patch-Makefile
@@ -0,0 +1,31 @@
+--- Makefile.orig 2014-02-13 14:22:14.000000000 +0100
++++ Makefile 2014-02-13 14:23:21.000000000 +0100
+@@ -1,20 +1,20 @@
+ all: compiler.o y.tab.o lex.yy.o
+- gcc -Wall -O4 -g -o nbfc compiler.o lex.yy.o y.tab.o -lfl
++ ${CC} ${CFLAGS} -o nbfc compiler.o lex.yy.o y.tab.o -lfl
+
+ lex.yy.o: bf.l
+- flex bf.l
+- gcc -c lex.yy.c
++ ${FLEX} bf.l
++ ${CC} ${CFLAGS} -c lex.yy.c
+
+ y.tab.o: bf.y
+- bison -yd bf.y
+- gcc -c y.tab.c
++ ${YACC} -yd bf.y
++ ${CC} ${CFLAGS} -c y.tab.c
+
+ compiler.o: compiler.c
+- gcc -c compiler.c
++ ${CC} ${CFLAGS} -c compiler.c
+
+ install:
+- install -c nbfc /usr/bin/nbfc
+- install -c nbfc.1 /usr/man/man1/nbfc.1
++ install -s -c nbfc ${STAGEDIR}${PREFIX}/bin/nbfc
++ install -c nbfc.1 ${STAGEDIR}${PREFIX}/man/man1/nbfc.1
+
+ clean:
+ rm -f *.o
diff --git a/lang/nbfc/files/patch-bf.y b/lang/nbfc/files/patch-bf.y
new file mode 100644
index 000000000000..4d20cbcbd106
--- /dev/null
+++ b/lang/nbfc/files/patch-bf.y
@@ -0,0 +1,10 @@
+--- bf.y.orig 2014-02-13 14:19:06.000000000 +0100
++++ bf.y 2014-02-13 14:19:18.000000000 +0100
+@@ -20,6 +20,7 @@
+ | PUTC {process("putchar(array[p]);");}
+ %%
+ #include "bf.h"
++extern int yylex (void);
+
+ int process(char * string) {
+ emmit(string);