diff options
author | John Marino <marino@FreeBSD.org> | 2014-11-10 19:18:49 +0000 |
---|---|---|
committer | John Marino <marino@FreeBSD.org> | 2014-11-10 19:18:49 +0000 |
commit | 6a297545759b37a6662eb3ebe740c8063a53ea8a (patch) | |
tree | 82a9c92e0bc2205af224561c850c48f9d3e69407 /lang | |
parent | Add patch from upstream to unbreak on i386 with clang (diff) |
While here, set the DIST_SUBDIR to something unique since the distfile
has the same name between versions. Also reset maintainship as
Hiro doesn't use nawk on FreeBSD and updates are infrequent.
PR: 187543
Submitted by: Pedro Giffuni
Tweaks by: marino@
Notes
Notes:
svn path=/head/; revision=372409
Diffstat (limited to 'lang')
-rw-r--r-- | lang/nawk/Makefile | 6 | ||||
-rw-r--r-- | lang/nawk/distinfo | 4 | ||||
-rw-r--r-- | lang/nawk/files/patch-awk.h | 15 | ||||
-rw-r--r-- | lang/nawk/files/patch-lex.c | 39 | ||||
-rw-r--r-- | lang/nawk/files/patch-main.c | 19 | ||||
-rw-r--r-- | lang/nawk/files/patch-makefile | 24 | ||||
-rw-r--r-- | lang/nawk/files/patch-proto.h | 10 | ||||
-rw-r--r-- | lang/nawk/files/patch-run.c | 85 | ||||
-rw-r--r-- | lang/nawk/files/patch-tran.c | 23 |
9 files changed, 18 insertions, 207 deletions
diff --git a/lang/nawk/Makefile b/lang/nawk/Makefile index 455a71eb530e..b14a833fb3ef 100644 --- a/lang/nawk/Makefile +++ b/lang/nawk/Makefile @@ -2,13 +2,13 @@ # $FreeBSD$ PORTNAME= nawk -PORTVERSION= 20110810 +PORTVERSION= 20121220 CATEGORIES= lang MASTER_SITES= http://www.cs.princeton.edu/~bwk/btl.mirror/ DISTNAME= awk -DIST_SUBDIR= ${PORTNAME} +DIST_SUBDIR= nawk-${PORTVERSION} -MAINTAINER= ota@j.email.ne.jp +MAINTAINER= ports@FreeBSD.org COMMENT= Brian Kernighan's pattern scanning and processing language NO_WRKSUBDIR= yes diff --git a/lang/nawk/distinfo b/lang/nawk/distinfo index a9a1fc0ab01b..e303da344f56 100644 --- a/lang/nawk/distinfo +++ b/lang/nawk/distinfo @@ -1,2 +1,2 @@ -SHA256 (nawk/awk.tar.gz) = 48af177922700c313aa9d22100d230d2d0280d56b8598d80f583d57b44bf63a8 -SIZE (nawk/awk.tar.gz) = 108035 +SHA256 (nawk-20121220/awk.tar.gz) = 8dc092165c5a4e1449f964286483d06d0dbfba4b0bd003cb5dab30de8f6d9b83 +SIZE (nawk-20121220/awk.tar.gz) = 88970 diff --git a/lang/nawk/files/patch-awk.h b/lang/nawk/files/patch-awk.h deleted file mode 100644 index ebc52be054ea..000000000000 --- a/lang/nawk/files/patch-awk.h +++ /dev/null @@ -1,15 +0,0 @@ ---- awk.h.orig 2004/12/30 01:52:48 1.11 -+++ awk.h 2008/06/04 14:04:42 1.12 -@@ -127,6 +127,12 @@ - #define FTOUPPER 12 - #define FTOLOWER 13 - #define FFLUSH 14 -+#define FAND 15 -+#define FFOR 16 -+#define FXOR 17 -+#define FCOMPL 18 -+#define FLSHIFT 19 -+#define FRSHIFT 20 - - /* Node: parse tree is made of nodes, with Cell's at bottom */ - diff --git a/lang/nawk/files/patch-lex.c b/lang/nawk/files/patch-lex.c deleted file mode 100644 index ca3c00b0d662..000000000000 --- a/lang/nawk/files/patch-lex.c +++ /dev/null @@ -1,39 +0,0 @@ ---- lex.c.orig 2006/04/16 02:10:18 1.9 -+++ lex.c 2008/06/04 14:04:42 1.10 -@@ -48,9 +48,11 @@ - { "BEGIN", XBEGIN, XBEGIN }, - { "END", XEND, XEND }, - { "NF", VARNF, VARNF }, -+ { "and", FAND, BLTIN }, - { "atan2", FATAN, BLTIN }, - { "break", BREAK, BREAK }, - { "close", CLOSE, CLOSE }, -+ { "compl", FCOMPL, BLTIN }, - { "continue", CONTINUE, CONTINUE }, - { "cos", FCOS, BLTIN }, - { "delete", DELETE, DELETE }, -@@ -70,13 +72,16 @@ - { "int", FINT, BLTIN }, - { "length", FLENGTH, BLTIN }, - { "log", FLOG, BLTIN }, -+ { "lshift", FLSHIFT, BLTIN }, - { "match", MATCHFCN, MATCHFCN }, - { "next", NEXT, NEXT }, - { "nextfile", NEXTFILE, NEXTFILE }, -+ { "or", FFOR, BLTIN }, - { "print", PRINT, PRINT }, - { "printf", PRINTF, PRINTF }, - { "rand", FRAND, BLTIN }, - { "return", RETURN, RETURN }, -+ { "rshift", FRSHIFT, BLTIN }, - { "sin", FSIN, BLTIN }, - { "split", SPLIT, SPLIT }, - { "sprintf", SPRINTF, SPRINTF }, -@@ -88,6 +93,7 @@ - { "tolower", FTOLOWER, BLTIN }, - { "toupper", FTOUPPER, BLTIN }, - { "while", WHILE, WHILE }, -+ { "xor", FXOR, BLTIN }, - }; - - #define DEBUG diff --git a/lang/nawk/files/patch-main.c b/lang/nawk/files/patch-main.c deleted file mode 100644 index 1a884f897a3d..000000000000 --- a/lang/nawk/files/patch-main.c +++ /dev/null @@ -1,19 +0,0 @@ ---- main.c.orig 2011-05-06 12:27:59.000000000 +0000 -+++ main.c 2011-05-08 11:25:32.000000000 +0000 -@@ -34,6 +34,8 @@ - #include "awk.h" - #include "ytab.h" - -+#include <fenv.h> -+ - extern char **environ; - extern int nfields; - -@@ -68,6 +70,7 @@ - exit(1); - } - signal(SIGFPE, fpecatch); -+ feenableexcept(FE_DIVBYZERO|FE_INEXACT|FE_OVERFLOW); - - srand_seed = 1; - srand(srand_seed); diff --git a/lang/nawk/files/patch-makefile b/lang/nawk/files/patch-makefile index d8bd6d3b6cf6..28c892bdeb22 100644 --- a/lang/nawk/files/patch-makefile +++ b/lang/nawk/files/patch-makefile @@ -1,6 +1,6 @@ ---- makefile.orig 2011-06-11 14:13:08.000000000 +0000 -+++ makefile 2011-08-09 10:58:25.000000000 +0000 -@@ -22,18 +22,9 @@ +--- makefile.orig 2012-12-20 13:58:45 UTC ++++ makefile +@@ -22,19 +22,9 @@ # THIS SOFTWARE. # ****************************************************************/ @@ -8,16 +8,18 @@ -CFLAGS = -O2 -CFLAGS = - --CC = gcc -Wall -g --CC = cc -CC = gcc -Wall -g -Wwrite-strings -CC = gcc -fprofile-arcs -ftest-coverage # then gcov f1.c; cat f1.c.gcov +-CC = gcc -g -Wall -pedantic -CC = gcc -O4 -Wall -pedantic -fno-strict-aliasing -+CC ?= cc - --YACC = bison -y --YACC = yacc -+YACC ?= yacc - YFLAGS = -d +- +-YACC = bison -d -y +-YACC = yacc -d -S +-#YFLAGS = -d -S +- # -S uses sprintf in yacc parser instead of sprint ++ ++CC?= cc ++YACC?= yacc -d OFILES = b.o main.o parse.o proctab.o tran.o lib.o run.o lex.o + diff --git a/lang/nawk/files/patch-proto.h b/lang/nawk/files/patch-proto.h deleted file mode 100644 index 3abcc89b79d3..000000000000 --- a/lang/nawk/files/patch-proto.h +++ /dev/null @@ -1,10 +0,0 @@ ---- proto.h.orig 2003/10/26 11:34:23 1.5 -+++ proto.h 2007/11/06 23:07:52 1.5.22.1 -@@ -112,6 +112,7 @@ extern double getfval(Cell *); - extern char *getsval(Cell *); - extern char *getpssval(Cell *); /* for print */ - extern char *tostring(const char *); -+extern char *tostringN(const char *, size_t n); - extern char *qstring(const char *, int); - - extern void recinit(unsigned int); diff --git a/lang/nawk/files/patch-run.c b/lang/nawk/files/patch-run.c deleted file mode 100644 index c4bc08f29ea0..000000000000 --- a/lang/nawk/files/patch-run.c +++ /dev/null @@ -1,85 +0,0 @@ ---- run.c.orig 2011-04-30 20:09:59.000000000 +0000 -+++ run.c 2011-05-08 11:35:23.000000000 +0000 -@@ -1506,13 +1506,71 @@ - nextarg = nextarg->nnext; - } - break; -+ case FCOMPL: -+ u = ~((int)getfval(x)); -+ break; -+ case FAND: -+ if (nextarg == 0) { -+ WARNING("and requires two arguments; returning 0"); -+ u = 0; -+ break; -+ } -+ y = execute(a[1]->nnext); -+ u = ((int)getfval(x)) & ((int)getfval(y)); -+ tempfree(y); -+ nextarg = nextarg->nnext; -+ break; -+ case FFOR: -+ if (nextarg == 0) { -+ WARNING("or requires two arguments; returning 0"); -+ u = 0; -+ break; -+ } -+ y = execute(a[1]->nnext); -+ u = ((int)getfval(x)) | ((int)getfval(y)); -+ tempfree(y); -+ nextarg = nextarg->nnext; -+ break; -+ case FXOR: -+ if (nextarg == 0) { -+ WARNING("or requires two arguments; returning 0"); -+ u = 0; -+ break; -+ } -+ y = execute(a[1]->nnext); -+ u = ((int)getfval(x)) ^ ((int)getfval(y)); -+ tempfree(y); -+ nextarg = nextarg->nnext; -+ break; -+ case FLSHIFT: -+ if (nextarg == 0) { -+ WARNING("or requires two arguments; returning 0"); -+ u = 0; -+ break; -+ } -+ y = execute(a[1]->nnext); -+ u = ((int)getfval(x)) << ((int)getfval(y)); -+ tempfree(y); -+ nextarg = nextarg->nnext; -+ break; -+ case FRSHIFT: -+ if (nextarg == 0) { -+ WARNING("or requires two arguments; returning 0"); -+ u = 0; -+ break; -+ } -+ y = execute(a[1]->nnext); -+ u = ((int)getfval(x)) >> ((int)getfval(y)); -+ tempfree(y); -+ nextarg = nextarg->nnext; -+ break; - case FSYSTEM: - fflush(stdout); /* in case something is buffered already */ - u = (Awkfloat) system(getsval(x)) / 256; /* 256 is unix-dep */ - break; - case FRAND: -- /* in principle, rand() returns something in 0..RAND_MAX */ -- u = (Awkfloat) (rand() % RAND_MAX) / RAND_MAX; -+ /* in principle, random() returns something in 0..RAND_MAX */ -+ u = (Awkfloat) (random() % RAND_MAX) / RAND_MAX; - break; - case FSRAND: - if (isrec(x)) /* no argument provided */ -@@ -1520,7 +1578,7 @@ - else - u = getfval(x); - tmp = u; -- srand((unsigned int) u); -+ srandom((unsigned int) u); - u = srand_seed; - srand_seed = tmp; - break; diff --git a/lang/nawk/files/patch-tran.c b/lang/nawk/files/patch-tran.c deleted file mode 100644 index 94ae657a6eca..000000000000 --- a/lang/nawk/files/patch-tran.c +++ /dev/null @@ -1,23 +0,0 @@ -diff -u -p -r1.6 -r1.9.10.1 ---- tran.c.orig 2005/07/03 15:18:11 1.6 -+++ tran.c 2007/11/06 23:07:52 1.9.10.1 -@@ -210,7 +210,10 @@ Cell *setsymtab(const char *n, const cha - int h; - Cell *p; - -- if (n != NULL && (p = lookup(n, tp)) != NULL) { -+ if (n == NULL) -+ n = ""; -+ -+ if ((p = lookup(n, tp)) != NULL) { - dprintf( ("setsymtab found %p: n=%s s=\"%s\" f=%g t=%o\n", - p, NN(p->nval), NN(p->sval), p->fval, p->tval) ); - return(p); -@@ -282,6 +285,7 @@ Awkfloat setfval(Cell *vp, Awkfloat f) / - { - int fldno; - -+ f += 0.0; /* normalise negative zero to positive zero */ - if ((vp->tval & (NUM | STR)) == 0) - funnyvar(vp, "assign to"); - if (isfld(vp)) { |