mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-22 00:35:15 +00:00
- STAGE-clean
- Add LICENSE - Fix compiler warning
This commit is contained in:
parent
11be90420e
commit
b107f36bd2
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=344101
@ -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>
|
||||
|
31
lang/nbfc/files/patch-Makefile
Normal file
31
lang/nbfc/files/patch-Makefile
Normal file
@ -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
|
10
lang/nbfc/files/patch-bf.y
Normal file
10
lang/nbfc/files/patch-bf.y
Normal file
@ -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);
|
Loading…
Reference in New Issue
Block a user