mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-27 00:57:50 +00:00
lang/nawk: Upgrade version 20110810 => 20121220
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@
This commit is contained in:
parent
4c87ce3ec5
commit
6a29754575
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=372409
@ -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
|
||||
|
@ -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
|
||||
|
@ -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 */
|
||||
|
@ -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
|
@ -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);
|
@ -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
|
||||
|
||||
|
@ -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);
|
@ -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;
|
@ -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)) {
|
Loading…
Reference in New Issue
Block a user