2009-04-09 02:48:06 +02:00
|
|
|
# $NetBSD: Makefile,v 1.37 2009/04/09 00:48:08 joerg Exp $
|
1998-10-15 15:19:21 +02:00
|
|
|
|
2007-02-22 20:26:05 +01:00
|
|
|
DISTNAME= nawk-20050424
|
2008-09-08 15:47:55 +02:00
|
|
|
PKGREVISION= 3
|
1998-10-15 15:19:21 +02:00
|
|
|
CATEGORIES= lang
|
2006-07-14 16:23:06 +02:00
|
|
|
MASTER_SITES= # empty
|
|
|
|
DISTFILES= # empty
|
|
|
|
|
|
|
|
MAINTAINER= jlam@NetBSD.org
|
1998-10-15 15:19:21 +02:00
|
|
|
HOMEPAGE= http://cm.bell-labs.com/who/bwk/
|
2001-02-17 10:06:56 +01:00
|
|
|
COMMENT= Brian Kernighan's pattern-directed scanning and processing language
|
1998-10-15 15:19:21 +02:00
|
|
|
|
Update lang/nawk to 20050425. Pkgsrc changes include:
Grab distfile from ${MASTER_SITE_LOCAL} where it's in a
${PKGNAME}-specific directory since the distfile has no version
number.
Use the .shar instead of .tar.gz distfile to remove the need
for dependencies to build this package.
Changes from nawk-20040207 include:
Apr 24, 2005:
modified lib.c so that values of $0 et al are preserved in the END
block, apparently as required by posix. thanks to havard eidnes
for the report and code.
Jan 14, 2005:
fixed infinite loop in parsing, originally found by brian tsang.
thanks to arnold robbins for a suggestion that started me
rethinking it.
Dec 31, 2004:
prevent overflow of -f array in main, head off potential error in
call of SYNTAX(), test malloc return in lib.c, all with thanks to
todd miller.
Dec 22, 2004:
cranked up size of NCHARS; coverity thinks it can be overrun with
smaller size, and i think that's right. added some assertions to b.c
to catch places where it might overrun. the RE code is still fragile.
Dec 5, 2004:
fixed a couple of overflow problems with ridiculous field numbers:
e.g., print $(2^32-1). thanks to ruslan ermilov, giorgos keramidas
and david o'brien at freebsd.org for patches. this really should
be re-done from scratch.
Nov 21, 2004:
fixed another 25-year-old RE bug, in split. it's another failure
to (re-)initialize. thanks to steve fisher for spotting this and
providing a good test case.
2005-05-18 07:22:43 +02:00
|
|
|
PKG_INSTALLATION_TYPES= overwrite pkgviews
|
2008-03-04 17:38:11 +01:00
|
|
|
PKG_DESTDIR_SUPPORT= user-destdir
|
Update to 20th June 1999 sources, fixing PR 9935 from Greg Woods.
The checksum on the old package corresponded to the 19990620 source,
whilst the package thought it was 19980211. Fix package name accordingly.
Unfortunately, there is no version number or date on the awk distfile,
so put the distfile in its own uniquely-named directory.
Just for the record, there are a number of bug fixes in the 19990620
source:
Jun 20, 1999:
added *bp in gettok in lex.c; appears possible to exit function
without terminating the string. thanks to russ cox.
Jun 2, 1999:
added function stdinit() to run to initialize files[] array,
in case stdin, etc., are not constants; some compilers care.
May 10, 1999:
replaced the ERROR ... FATAL, etc., macros with functions
based on vprintf, to avoid problems caused by overrunning
fixed-size errbuf array. thanks to ralph corderoy for the
impetus, and for pointing out a string termination bug in
qstring as well.
Apr 21, 1999:
fixed bug that caused occasional core dumps with commandline
variable with value ending in \. (thanks to nelson beebe for
the test case.)
Apr 16, 1999:
with code kindly provided by Bruce Lilly, awk now parses
/=/ and similar constructs more sensibly in more places.
Apr 5, 1999:
changed true/false to True/False in run.c to make it
easier to compile with C++. Added some casts on malloc
and realloc to be honest about casts; ditto. changed
ltype int to long in struct rrow to reduce some 64-bit
complaints; other changes scattered throughout for the
same purpose. thanks to Nelson Beebe for these portability
improvements.
removed some horrible pointer-int casting in b.c and elsewhere
by adding ptoi and itonp to localize the casts, which are
all benign. fixed one incipient bug that showed up on sgi
in 64-bit mode.
reset lineno for new source file; include filename in error
message. also fixed line number error in continuation lines.
(thanks to Nelson Beebe for both of these.)
Mar 24, 1999:
Nelson Beebe notes that irix 5.3 yacc dies with a bogus
error; use a newer version or switch to bison, since sgi
is unlikely to fix it.
Mar 5, 1999:
changed isnumber to is_number to avoid the problem caused by
versions of ctype.h that include the name isnumber.
distribution now includes a script for building on a Mac,
thanks to Dan Allen.
Feb 20, 1999:
fixed memory leaks in run.c (call) and tran.c (setfval).
thanks to Stephen Nutt for finding these and providing the fixes.
Jan 13, 1999:
replaced srand argument by (unsigned int) in run.c;
avoids problem on Mac and potentially on Unix & Windows.
thanks to Dan Allen.
added a few (int) casts to silence useless compiler warnings.
e.g., errorflag= in run.c jump().
added proctab.c to the bundle outout; one less thing
to have to compile out of the box.
added calls to _popen and _pclose to the win95 stub for
pipes (thanks to Steve Adams for this helpful suggestion).
seems to work, though properties are not well understood
by me, and it appears that under some circumstances the
pipe output is truncated. Be careful.
Oct 19, 1998:
fixed a couple of bugs in getrec: could fail to update $0
after a getline var; because inputFS wasn't initialized,
could split $0 on every character, a misleading diversion.
fixed caching bug in makedfa: LRU was actually removing
least often used.
thanks to ross ridge for finding these, and for providing
great bug reports.
2000-04-20 10:26:11 +02:00
|
|
|
|
2008-06-19 20:36:51 +02:00
|
|
|
BOOTSTRAP_PKG= yes
|
|
|
|
|
Update lang/nawk to 20050425. Pkgsrc changes include:
Grab distfile from ${MASTER_SITE_LOCAL} where it's in a
${PKGNAME}-specific directory since the distfile has no version
number.
Use the .shar instead of .tar.gz distfile to remove the need
for dependencies to build this package.
Changes from nawk-20040207 include:
Apr 24, 2005:
modified lib.c so that values of $0 et al are preserved in the END
block, apparently as required by posix. thanks to havard eidnes
for the report and code.
Jan 14, 2005:
fixed infinite loop in parsing, originally found by brian tsang.
thanks to arnold robbins for a suggestion that started me
rethinking it.
Dec 31, 2004:
prevent overflow of -f array in main, head off potential error in
call of SYNTAX(), test malloc return in lib.c, all with thanks to
todd miller.
Dec 22, 2004:
cranked up size of NCHARS; coverity thinks it can be overrun with
smaller size, and i think that's right. added some assertions to b.c
to catch places where it might overrun. the RE code is still fragile.
Dec 5, 2004:
fixed a couple of overflow problems with ridiculous field numbers:
e.g., print $(2^32-1). thanks to ruslan ermilov, giorgos keramidas
and david o'brien at freebsd.org for patches. this really should
be re-done from scratch.
Nov 21, 2004:
fixed another 25-year-old RE bug, in split. it's another failure
to (re-)initialize. thanks to steve fisher for spotting this and
providing a good test case.
2005-05-18 07:22:43 +02:00
|
|
|
CFLAGS+= ${CPPFLAGS}
|
2006-07-14 16:23:06 +02:00
|
|
|
MAKE_FLAGS+= CC=${CC:Q} CFLAGS=${CFLAGS:M*:Q}
|
|
|
|
|
2004-12-03 16:14:50 +01:00
|
|
|
BUILD_TARGET= a.out
|
1998-10-15 15:19:21 +02:00
|
|
|
|
2006-05-06 05:09:03 +02:00
|
|
|
INSTALLATION_DIRS= bin ${PKGMANDIR}/man1
|
2004-01-05 12:53:39 +01:00
|
|
|
|
2006-07-14 16:23:06 +02:00
|
|
|
do-extract:
|
|
|
|
@${CP} -R ${FILESDIR} ${WRKSRC}
|
2002-12-11 11:21:17 +01:00
|
|
|
|
1998-10-15 15:19:21 +02:00
|
|
|
do-install:
|
2008-03-04 17:38:11 +01:00
|
|
|
${INSTALL_PROGRAM} ${WRKSRC}/a.out ${DESTDIR}${PREFIX}/bin/nawk
|
|
|
|
${INSTALL_MAN} ${WRKSRC}/nawk.1 \
|
|
|
|
${DESTDIR}${PREFIX}/${PKGMANDIR}/man1/nawk.1
|
1998-10-15 15:19:21 +02:00
|
|
|
|
|
|
|
.include "../../mk/bsd.pkg.mk"
|