Add BSD grep to the base system and make it our default grep.
authorGabor Kovesdan <gabor@FreeBSD.org>
Thu, 22 Jul 2010 19:11:57 +0000 (19:11 +0000)
committerGabor Kovesdan <gabor@FreeBSD.org>
Thu, 22 Jul 2010 19:11:57 +0000 (19:11 +0000)
commit4dc88ebedf943d69252e1bb441d756cf85540592
tree318bb6f174fac904c08b62b93207c79c56437b11
parent582a734e13770204c7ffac8f60c089d5a47b6bd1
Add BSD grep to the base system and make it our default grep.

Deliverables: Small and clean code (1,4 KSLOC vs GNU's 8,5 KSLOC),
              lower memory usage than GNU grep, GNU compatibility,
              BSD license.

TODO:         Performance is somewhat behind GNU grep but it is only
              significant for bigger searches.  The reason is complex, the
              most important factor is that GNU grep uses lots of
              optimizations to improve the speed of the regex library.
              First, we need a modern regex library (practically by adopting
              TRE), add support for GNU-style non-standard regexes and then
              reevalute the performance issues and look for bottlenecks.  In
              the meantime, for those, who need better performance, it is
              possible to build GNU grep by setting WITH_GNU_GREP.

Approved by:            delphij (mentor)
Obtained from:          OpenBSD (http://www.openbsd.org/cgi-bin/cvsweb/src/usr.bin/grep/),
                        freegrep (http://github.com/howardjp/freegrep)
Sponsored by:           Google SoC 2008
Portbuild tests run by: kris, pav, erwin
Acknowledgements to:    fjoe (as SoC 2008 mentor),
                        everyone who helped in reviewing and testing
19 files changed:
UPDATING
share/mk/bsd.own.mk
tools/build/options/WITHOUT_GNU_GREP [deleted file]
tools/build/options/WITH_GNU_GREP [new file with mode: 0644]
usr.bin/Makefile
usr.bin/grep/Makefile [new file with mode: 0644]
usr.bin/grep/fastgrep.c [new file with mode: 0644]
usr.bin/grep/file.c [new file with mode: 0644]
usr.bin/grep/grep.1 [new file with mode: 0644]
usr.bin/grep/grep.c [new file with mode: 0644]
usr.bin/grep/grep.h [new file with mode: 0644]
usr.bin/grep/nls/C.msg [new file with mode: 0644]
usr.bin/grep/nls/Makefile.inc [new file with mode: 0644]
usr.bin/grep/nls/es_ES.ISO8859-1.msg [new file with mode: 0644]
usr.bin/grep/nls/gl_ES.ISO8859-1.msg [new file with mode: 0644]
usr.bin/grep/nls/hu_HU.ISO8859-2.msg [new file with mode: 0644]
usr.bin/grep/nls/pt_BR.ISO8859-1.msg [new file with mode: 0644]
usr.bin/grep/queue.c [new file with mode: 0644]
usr.bin/grep/util.c [new file with mode: 0644]