mirror of
https://git.freebsd.org/ports.git
synced 2025-06-16 10:10:31 -04:00
The following list of changes are roughly what has occurred since the last update: Features: - With bsdgrep -r, the working directory is implied if no directory is specified - bsdgrep will now behave as bsdgrep -r does when it's named rgrep - bsdgrep now understands -z/--null-data to use \0 as EOL - GNU regex compatibility is now indicated with a "GNU compatible" in the version string Fixes: - --mmap no longer hangs when coming across an EOF without an accompanying EOL - -o/--color matching generally improved, now produces earliest / longest matches - Context output now more closely aligns with GNU grep - Zero-length matches no longer exhibit broken behavior - Every output line now honors -b/-H/-n flags Other fixes are also present. While here, move to the version as reported by `grep -V` -- I intend to bump the version in base sensible as bugfixes/features roll in. Tested with: Poudriere (amd64, head) Tested with: Poudriere (amd64, 11.1) Tested with: Poudriere (amd64, 10.4) Glanced at by: Portlint -AC PR: 227639, 197531 Approved by: portmgr (feld)
83 lines
1.8 KiB
Text
83 lines
1.8 KiB
Text
--- Makefile.orig 2017-10-19 20:07:52 UTC
|
|
+++ Makefile
|
|
@@ -2,31 +2,13 @@
|
|
# $FreeBSD: head/usr.bin/grep/Makefile 322515 2017-08-14 19:21:37Z ngie $
|
|
# $OpenBSD: Makefile,v 1.6 2003/06/25 15:00:04 millert Exp $
|
|
|
|
-.include <src.opts.mk>
|
|
-
|
|
-.if ${MK_BSD_GREP} == "yes"
|
|
PROG= grep
|
|
-.else
|
|
-PROG= bsdgrep
|
|
-CLEANFILES+= bsdgrep.1
|
|
|
|
-bsdgrep.1: grep.1
|
|
- ${CP} ${.ALLSRC} ${.TARGET}
|
|
-.endif
|
|
SRCS= file.c grep.c queue.c util.c
|
|
-
|
|
-.if ${MK_BSD_GREP_FASTMATCH} == "yes"
|
|
-# Extra files ported backported for some regex improvements
|
|
-.PATH: ${.CURDIR}/regex
|
|
-SRCS+= fastmatch.c hashtable.c tre-compile.c tre-fastmatch.c
|
|
-CFLAGS+=-I${.CURDIR}/regex
|
|
-.else
|
|
CFLAGS+= -DWITHOUT_FASTMATCH
|
|
-.endif
|
|
|
|
CFLAGS.gcc+= --param max-inline-insns-single=500
|
|
|
|
-.if ${MK_BSD_GREP} == "yes"
|
|
LINKS= ${BINDIR}/grep ${BINDIR}/egrep \
|
|
${BINDIR}/grep ${BINDIR}/fgrep \
|
|
${BINDIR}/grep ${BINDIR}/rgrep \
|
|
@@ -40,14 +22,11 @@ MLINKS= grep.1 egrep.1 \
|
|
grep.1 zgrep.1 \
|
|
grep.1 zegrep.1 \
|
|
grep.1 zfgrep.1
|
|
-.endif
|
|
|
|
-LIBADD= z
|
|
+LDADD= -lz
|
|
|
|
-.if ${MK_LZMA_SUPPORT} != "no"
|
|
-LIBADD+= lzma
|
|
+LDADD+= -llzma
|
|
|
|
-.if ${MK_BSD_GREP} == "yes"
|
|
LINKS+= ${BINDIR}/${PROG} ${BINDIR}/xzgrep \
|
|
${BINDIR}/${PROG} ${BINDIR}/xzegrep \
|
|
${BINDIR}/${PROG} ${BINDIR}/xzfgrep \
|
|
@@ -61,29 +40,19 @@ MLINKS+= grep.1 xzgrep.1 \
|
|
grep.1 lzgrep.1 \
|
|
grep.1 lzegrep.1 \
|
|
grep.1 lzfgrep.1
|
|
-.endif
|
|
-.else
|
|
-CFLAGS+= -DWITHOUT_LZMA
|
|
-.endif
|
|
|
|
-.if ${MK_BZIP2_SUPPORT} != "no"
|
|
-LIBADD+= bz2
|
|
+LDADD+= -lbz2
|
|
|
|
-.if ${MK_BSD_GREP} == "yes"
|
|
LINKS+= ${BINDIR}/grep ${BINDIR}/bzgrep \
|
|
${BINDIR}/grep ${BINDIR}/bzegrep \
|
|
${BINDIR}/grep ${BINDIR}/bzfgrep
|
|
MLINKS+= grep.1 bzgrep.1 \
|
|
grep.1 bzegrep.1 \
|
|
grep.1 bzfgrep.1
|
|
-.endif
|
|
-.else
|
|
-CFLAGS+= -DWITHOUT_BZIP2
|
|
-.endif
|
|
|
|
.if ${MK_GNU_GREP_COMPAT} != "no"
|
|
CFLAGS+= -I${SYSROOT:U${DESTDIR}}/usr/include/gnu -DWITH_GNU
|
|
-LIBADD+= gnuregex
|
|
+LDADD+= -lgnuregex
|
|
.endif
|
|
|
|
.if ${MK_NLS} != "no"
|