2017-01-14 02:03:39 +01:00
|
|
|
# $NetBSD: Makefile,v 1.64 2017/01/14 01:03:39 ryoon Exp $
|
1999-12-10 18:33:39 +01:00
|
|
|
|
2017-01-14 02:03:39 +01:00
|
|
|
DISTNAME= gawk-4.1.4
|
1999-12-12 22:19:04 +01:00
|
|
|
CATEGORIES= lang
|
1999-12-10 18:33:39 +01:00
|
|
|
MASTER_SITES= ${MASTER_SITE_GNU:=gawk/}
|
2012-05-29 16:16:24 +02:00
|
|
|
EXTRACT_SUFX= .tar.xz
|
1999-12-10 18:33:39 +01:00
|
|
|
|
2003-07-17 23:41:05 +02:00
|
|
|
MAINTAINER= bouyer@NetBSD.org
|
1999-12-10 18:33:39 +01:00
|
|
|
HOMEPAGE= http://www.gnu.org/software/gawk/gawk.html
|
2001-02-17 10:06:56 +01:00
|
|
|
COMMENT= GNU awk
|
2009-08-09 13:35:47 +02:00
|
|
|
LICENSE= gnu-gpl-v3
|
1999-12-10 18:33:39 +01:00
|
|
|
|
2003-07-05 17:14:38 +02:00
|
|
|
CONFLICTS= ja-gawk-[0-9]*
|
|
|
|
|
2009-08-12 20:07:15 +02:00
|
|
|
USE_LIBTOOL= yes
|
2005-09-05 18:58:22 +02:00
|
|
|
USE_PKGLOCALEDIR= yes
|
2013-12-15 10:42:14 +01:00
|
|
|
USE_TOOLS+= msgfmt msgmerge xgettext
|
2013-01-31 23:01:43 +01:00
|
|
|
GNU_CONFIGURE= yes
|
2002-12-12 04:17:13 +01:00
|
|
|
TEST_TARGET= check
|
Changes 3.1.6:
1. `gawk 'program' /non/existant/file' no longer core dumps.
2. gawk now only uses the locale's decimal point
3. `gawk -v BINMODE=1 ...' works again.
4. Internal file names like `/dev/user' now work again. (Note that these
file names are obsolete and will go away eventually.)
5. Problems with wide strings in non "C" locales have been straightened
out everywhere. (At least, we think so.)
6. Use of `ansi2knr' is no longer supported. Please use an ANSI C compiler.
7. Updated to Autoconf 2.61, Automake 1.10, and Gettext 0.16.1.
8. The getopt* and regex* files were synchronized with current GLIBC CVS.
See the ChangeLog for the versions and minor edits made.
9. There are additional --lint-old warnings.
10. Gawk now uses getaddrinfo(3) to look up names and IP addresses. This
allows the use of an IPv6 format address and paves the way for
eventual addition of `/inet6/...' and `/inet4/...' hostnames.
11. We believe gawk to now be valgrind clean. At least when run against
the test suite.
12. A number of issues dealing with the formatting and printing of very
large numbers in integer formats have been dealt with and fixed.
13. Gawk now converts "+inf", "-inf", "+nan" and "-nan" into the corresponding
magic IEEE floating point values. Only those strings (case independent)
work. With --posix, gawk calls the system strtod directly. You asked
for it, you got it, you deal with it.
14. Defining YYDEBUG enables the -D command line option.
15. Gawk should now work out of the box on Tandem NSK/OSS systems.
16. Lint messages rationalized: many more of the messages are now printed
only once, instead of every time they are encountered.
17. The strftime() function now accepts an optional third argument, which
if non-zero or non-null, indicates that the time should be formatted
as UTC instead of as local time.
18. The precedence of concatenation and `| getline' (in something like
"echo " "date" | getline stuff) has been reverted to the earlier
behavior and now once again matches Unix awk.
19. New configure time flag --disable-directories-fatal which causes
gawk to silently skip directories on the command line. This behavior
is also enabled for --traditional, since it's what Unix awk does.
20. A new option, --use-lc-numeric, forces use of the locale's decimal
point without the rest of the draconian restrictions imposed by
--posix. This softens somewhat the stance taken in item 2.
21. Everything relevant has been updated to the GPL 3.
22. Array growth should be faster now, at no cost in space.
23. Lots more tests.
24. One new translation.
25. Various bugs fixed, see the ChangeLog for details.
2007-11-02 08:17:59 +01:00
|
|
|
INFO_FILES= yes
|
2003-07-04 22:57:21 +02:00
|
|
|
|
Update to 4.0. Provided by Sergey Litvinov <slitvinov@gmail.com>
on pkgsrc-users.
Changes:
Changes from 3.1.8 to 4.0.0
---------------------------
1. The special files /dev/pid, /dev/ppid, /dev/pgrpid and /dev/user are
now completely gone. Use PROCINFO instead.
2. The POSIX 2008 behavior for `sub' and `gsub' are now the default.
THIS CHANGES BEHAVIOR!!!!
3. The \s and \S escape sequences are now recognized in regular expressions.
4. The split() function accepts an optional fourth argument which is an array
to hold the values of the separators.
5. The new -b / --characters-as-bytes option means "hands off my data"; gawk
won't try to treat input as a multibyte string.
6. There is a new --sandbox option; see the doc.
7. Indirect function calls are now available.
8. Interval expressions are now part of default regular expressions for
GNU Awk syntax.
9. --gen-po is now correctly named --gen-pot.
10. switch / case is now enabled by default. There's no longer a need
for a configure-time option.
11. Gawk now supports BEGINFILE and ENDFILE. See the doc for details.
12. Directories named on the command line now produce a warning, not
a fatal error, unless --posix or --traditional.
13. The new FPAT variable allows you to specify a regexp that matches
the fields, instead of matching the field separator. The new patsplit()
function gives the same capability for splitting.
14. All long options now have short options, for use in `#!' scripts.
15. Support for IPv6 is added via the /inet6/... special file. /inet4/...
forces IPv4 and /inet chooses the system default (probably IPv4).
16. Added a warning for /[:space:]/ that should be /[[:space:]]/.
17. Merged with John Haque's byte code internals. Adds dgawk debugger and
possibly improved performance.
18. `break' and `continue' are no longer valid outside a loop, even with
--traditional.
19. POSIX character classes work with --traditional (BWK awk supports them).
20. Nuked redundant --compat, --copyleft, and --usage long options.
21. Arrays of arrays added. See the doc.
22. Per the GNU Coding Standards, dynamic extensions must now define
a global symbol indicating that they are GPL-compatible. See
the documentation and example extensions.
THIS CHANGES BEHAVIOR!!!!
23. In POSIX mode, string comparisons use strcoll/wcscoll.
THIS CHANGES BEHAVIOR!!!!
24. The option for raw sockets was removed, since it was never implemented.
25. Gawk now treats ranges of the form [d-h] as if they were in the C
locale, no matter what kind of regexp is being used, and even if
--posix. The latest POSIX standard allows this, and the documentation
has been updated. Maybe this will stop all the questions about
[a-z] matching uppercase letters.
THIS CHANGES BEHAVIOR!!!!
26. PROCINFO["strftime"] now holds the default format for strftime().
27. Updated to latest infrastructure: Autoconf 2.68, Automake 1.11.1,
Gettext 0.18.1, Bison 2.5.
28. Many code cleanups. Removed code for many old, unsupported systems:
- Atari
- Amiga
- BeOS
- Cray
- MIPS RiscOS
- MS-DOS with Microsoft Compiler
- MS-Windows with Microsoft Compiler
- NeXT
- SunOS 3.x, Sun 386 (Road Runner)
- Tandem (non-POSIX)
- Prestandard VAX C compiler for VAX/VMS
- Probably others that I've forgotten
29. If PROCINFO["sorted_in"] exists, for(iggy in foo) loops sort the
indices before looping over them. The value of this element
provides control over how the indices are sorted before the loop
traversal starts. See the manual.
30. A new isarray() function exists to distinguish if an item is an array
or not, to make it possible to traverse multidimensional arrays.
31. asort() and asorti() take a third argument specifying how to sort.
See the doc.
2012-03-17 04:16:20 +01:00
|
|
|
MAKE_ENV+= PKGLOCALEDIR=${PKGLOCALEDIR}
|
2003-06-07 18:03:05 +02:00
|
|
|
|
2005-07-13 17:21:57 +02:00
|
|
|
LDFLAGS.IRIX+= -lgen
|
2009-12-21 00:03:15 +01:00
|
|
|
CPPFLAGS.OSF1+= -D_OSF_SOURCE
|
2005-07-13 17:21:57 +02:00
|
|
|
|
Update to version 3.1.0 (lots of new features and bug fixes).
Enable this package for all platforms.
Added GAWK_ENABLE_PORTALS to mk/bsd.pkg.defaults.mk to enable/disable gawk
handling file names that start with `/p/' as a 4.4 BSD type portal file.
Changes from 3.0.4 to 3.0.5:
- bug fix release only.
Changes from 3.0.5 to 3.0.6:
- bug fix release only.
Changes from 3.0.6 to 3.1.0:
- A new PROCINFO array provides info about the process. The non-I/O /dev/xxx
files are now obsolete, and their use always generates a warning.
- A new `mktime' builtin function was added for creating time stamps. The
`mktime' function written in awk was removed from the user's guide.
- New `--gen-po' option creates GNU gettext .po files for strings marked
with a leading underscore.
- Gawk now completely interprets special file names internally, ignoring the
existence of real /dev/stdin, /dev/stdout files, etc.
- The mmap code was removed. It was a worthwhile experiment that just
didn't work out.
- The BINMODE variable is new; on non-UNIX systems it affects how gawk
opens files for text vs. binary.
- Gawk no longer supports `next file' as two words.
- On systems that support it, gawk now sets the `close on exec' flag on all
files and pipes it opens. This makes sure that child processes run via
system() or pipes have plenty of file descriptors available.
- If `--posix' is in effect, newlines are not allowed after ?:.
- Weird OFMT/CONVFMT formats no longer cause fatal errors.
- Diagnostics about array parameters now include the parameter's name,
not just its number.
- It is now possible to open a two-way pipe via the `|&' operator.
See the discussion in the manual about putting `sort' into such a pipeline,
though. (NOTE! This is borrowed from ksh: it is not the same as
the same operator in csh!)
- The close() function now takes an optional second string argument
that allows closing one or the other end of the two-way pipe to
a co-process. This is needed to use `sort' in a co-process, see
the doc.
- If TCP/IP is available, special file names beginning with `/inet'
can be used with `|&' for IPC.
- With `--enable-portals' on the configure command line, gawk will also
treat file names that start with `/p/' as a 4.4 BSD type portal file,
i.e., a two-way pipe for `|&'.
- Unrecognized escapes, such as "\q" now always generate a warning.
- The LINT variable is new; it provides dynamic control over the --lint
option.
- Lint warnings can be made fatal by using --lint=fatal or `LINT = "fatal"'.
Use this if you're really serious about portable code.
- A number of lint warnings have been added. Most notably, gawk will
detect if a variable is used before assigned to. Warnings for
when a string that isn't a number gets converted to a number are
in the code but disabled; they seem to be too picky in practice.
Also, gawk will now warn about function parameter names that shadow
global variable names.
- It is now possible to dynamically add builtin functions on systems
that support dlopen. This facility is not (yet) as portable or well
integrated as it might be. *** WARNING *** THIS FEATURE WILL EVOLVE!
- Profiling has been added! A separate version of gawk, named pgawk, is
built and generates a run-time execution profile. The --profile option
can be used to change the default output file. In regular gawk, this
option pretty-prints the parse tree.
- Gawk has been internationalized, using GNU gettext. Translations for
future distributions are most welcome.
- New asort() function for sorting arrays. See the doc for details.
- The match function takes an optional array third argument to hold
the text matched by parenthesized sub-expressions.
- The bit op functions and octal and hex source code constants are on by
default, no longer a configure-time option. Recognition of non-decimal
data is now enabled at runtime with --non-decimal-data command line option.
- Internationalization features available at the awk level: new TEXTDOMAIN
variable and bindtextdomain() and dcgettext() functions. printf formats
may contain the "%2$3.5d" kind of notation for use in translations. See
the texinfo manual for details.
- The return value from close() has been rationalized. Most notably,
closing something that wasn't open returns -1 but remains non-fatal.
- The array effeciency change from 3.0.5 was reverted; the semantics were
not right. Additionally, index values of previously stored elements
can no longer change dynamically.
- The new option --dump-variables dumps a list of all global variables and
their final types and values to a file you give, or to `awkvars.out'.
- Gawk now uses a recent version of random.c courtesy of the FreeBSD
project.
- The gawk source code now uses ANSI C function definitions (new style),
with ansi2knr to translate code for old compilers.
- `for (iggy in foo)' loops should be more robust now in the face of
adding/deleting elements in the middle; they loop over just the elements
that are present in the array when the loop starts.
2002-04-04 15:58:25 +02:00
|
|
|
.include "../../mk/bsd.prefs.mk"
|
|
|
|
|
2012-06-15 02:29:27 +02:00
|
|
|
.include "options.mk"
|
Update to version 3.1.0 (lots of new features and bug fixes).
Enable this package for all platforms.
Added GAWK_ENABLE_PORTALS to mk/bsd.pkg.defaults.mk to enable/disable gawk
handling file names that start with `/p/' as a 4.4 BSD type portal file.
Changes from 3.0.4 to 3.0.5:
- bug fix release only.
Changes from 3.0.5 to 3.0.6:
- bug fix release only.
Changes from 3.0.6 to 3.1.0:
- A new PROCINFO array provides info about the process. The non-I/O /dev/xxx
files are now obsolete, and their use always generates a warning.
- A new `mktime' builtin function was added for creating time stamps. The
`mktime' function written in awk was removed from the user's guide.
- New `--gen-po' option creates GNU gettext .po files for strings marked
with a leading underscore.
- Gawk now completely interprets special file names internally, ignoring the
existence of real /dev/stdin, /dev/stdout files, etc.
- The mmap code was removed. It was a worthwhile experiment that just
didn't work out.
- The BINMODE variable is new; on non-UNIX systems it affects how gawk
opens files for text vs. binary.
- Gawk no longer supports `next file' as two words.
- On systems that support it, gawk now sets the `close on exec' flag on all
files and pipes it opens. This makes sure that child processes run via
system() or pipes have plenty of file descriptors available.
- If `--posix' is in effect, newlines are not allowed after ?:.
- Weird OFMT/CONVFMT formats no longer cause fatal errors.
- Diagnostics about array parameters now include the parameter's name,
not just its number.
- It is now possible to open a two-way pipe via the `|&' operator.
See the discussion in the manual about putting `sort' into such a pipeline,
though. (NOTE! This is borrowed from ksh: it is not the same as
the same operator in csh!)
- The close() function now takes an optional second string argument
that allows closing one or the other end of the two-way pipe to
a co-process. This is needed to use `sort' in a co-process, see
the doc.
- If TCP/IP is available, special file names beginning with `/inet'
can be used with `|&' for IPC.
- With `--enable-portals' on the configure command line, gawk will also
treat file names that start with `/p/' as a 4.4 BSD type portal file,
i.e., a two-way pipe for `|&'.
- Unrecognized escapes, such as "\q" now always generate a warning.
- The LINT variable is new; it provides dynamic control over the --lint
option.
- Lint warnings can be made fatal by using --lint=fatal or `LINT = "fatal"'.
Use this if you're really serious about portable code.
- A number of lint warnings have been added. Most notably, gawk will
detect if a variable is used before assigned to. Warnings for
when a string that isn't a number gets converted to a number are
in the code but disabled; they seem to be too picky in practice.
Also, gawk will now warn about function parameter names that shadow
global variable names.
- It is now possible to dynamically add builtin functions on systems
that support dlopen. This facility is not (yet) as portable or well
integrated as it might be. *** WARNING *** THIS FEATURE WILL EVOLVE!
- Profiling has been added! A separate version of gawk, named pgawk, is
built and generates a run-time execution profile. The --profile option
can be used to change the default output file. In regular gawk, this
option pretty-prints the parse tree.
- Gawk has been internationalized, using GNU gettext. Translations for
future distributions are most welcome.
- New asort() function for sorting arrays. See the doc for details.
- The match function takes an optional array third argument to hold
the text matched by parenthesized sub-expressions.
- The bit op functions and octal and hex source code constants are on by
default, no longer a configure-time option. Recognition of non-decimal
data is now enabled at runtime with --non-decimal-data command line option.
- Internationalization features available at the awk level: new TEXTDOMAIN
variable and bindtextdomain() and dcgettext() functions. printf formats
may contain the "%2$3.5d" kind of notation for use in translations. See
the texinfo manual for details.
- The return value from close() has been rationalized. Most notably,
closing something that wasn't open returns -1 but remains non-fatal.
- The array effeciency change from 3.0.5 was reverted; the semantics were
not right. Additionally, index values of previously stored elements
can no longer change dynamically.
- The new option --dump-variables dumps a list of all global variables and
their final types and values to a file you give, or to `awkvars.out'.
- Gawk now uses a recent version of random.c courtesy of the FreeBSD
project.
- The gawk source code now uses ANSI C function definitions (new style),
with ansi2knr to translate code for old compilers.
- `for (iggy in foo)' loops should be more robust now in the face of
adding/deleting elements in the middle; they loop over just the elements
that are present in the array when the loop starts.
2002-04-04 15:58:25 +02:00
|
|
|
|
2009-09-23 20:23:05 +02:00
|
|
|
.if !empty(MACHINE_PLATFORM:MDarwin-*-x86_64)
|
|
|
|
CFLAGS+= -Dvm_region=vm_region_64
|
|
|
|
.endif
|
|
|
|
|
2013-10-19 21:47:39 +02:00
|
|
|
PLIST_VARS+= extension
|
|
|
|
.if "${OPSYS}" != "MirBSD"
|
|
|
|
PLIST.extension= yes
|
2014-02-05 21:25:09 +01:00
|
|
|
.endif
|
2013-10-19 21:47:39 +02:00
|
|
|
|
2012-12-31 01:27:36 +01:00
|
|
|
INSTALLATION_DIRS+= ${PKGGNUDIR}bin ${PKGGNUDIR}${PKGMANDIR}/man1
|
2012-05-31 12:44:30 +02:00
|
|
|
|
|
|
|
post-install:
|
Changes from 4.0.2 to 4.1.0
---------------------------
1. The three executables gawk, pgawk, and dgawk, have been merged into
one, named just gawk. As a result:
* The -R option is gone
* Use -D to run the debugger. An optional file argument is a
list of commands to run first.
* Use -o to do pretty-printing only.
* Use -p to do profiling.
This considerably reduces gawk's "footprint" and eases the documentation
burden as well.
2. Gawk now supports high precision arithmetic with MPFR. The default is
still double precision, but setting PREC changes things, or using
the -M / --bignum options. This support is not compiled in if the MPFR
library is not available.
3. The new -i option (from xgawk) is used for loading awk library files.
This differs from -f in that the first non-option argument is treated
as a script.
4. The new -l option (from xgawk) is used for loading dynamic extensions.
5. The dynamic extension interface has been completely redone! There is
now a defined API for C extensions to use. A C extension acts like
a function written in awk, except that it cannot do everything that awk
code can. However, this allows interfacing to any facility that is
available from C. This is a major development, see the doc, which has
a nice shiny new chapter describing everything.
This support is not compiled in if dynamic loading of shared libraries
is not supported.
The old extension mechanism is still supported for compatiblity, but
it will most definitely be removed at the next major release.
6. The "inplace" extension, built using the new facility, can be used to
simulate the GNU "sed -i" feature.
7. The and(), or() and xor() functions now take any number of arguments,
with a minimum of two.
8. New arrays: SYMTAB, FUNCTAB, and PROCINFO["identifiers"]. SYMTAB allows
indirect access to any defined variable or array; it is possible to
"walk" the symbol table, if that should be necessary.
9. Support for building gawk with a cross compiler has been improved.
10. Infrastructure upgrades: bison 2.7.1, gettext 0.18.2.1, automake 1.13.1,
libtool 2.4.2 for the extensions.
2013-05-15 13:55:20 +02:00
|
|
|
${LN} -fs ${PREFIX}/bin/gawk ${DESTDIR}${PREFIX}/${PKGGNUDIR}bin/awk
|
|
|
|
${LN} -fs ${PREFIX}/${PKGMANDIR}/man1/gawk.1 ${DESTDIR}${PREFIX}/${PKGGNUDIR}${PKGMANDIR}/man1/awk.1
|
2012-05-31 12:44:30 +02:00
|
|
|
|
2006-04-06 08:21:32 +02:00
|
|
|
BUILDLINK_API_DEPENDS.gettext+= gettext-lib>=0.10.36
|
2004-10-14 05:20:20 +02:00
|
|
|
|
2004-04-25 08:58:43 +02:00
|
|
|
.include "../../devel/gettext-lib/buildlink3.mk"
|
2013-12-15 10:42:14 +01:00
|
|
|
.include "../../devel/gmp/buildlink3.mk"
|
|
|
|
.include "../../math/mpfr/buildlink3.mk"
|
1999-12-10 18:33:39 +01:00
|
|
|
.include "../../mk/bsd.pkg.mk"
|