2013-06-11 16:59:30 +02:00
|
|
|
# Created by: Gabor Kovesdan <gabor@FreeBSD.org>
|
2010-02-06 14:47:54 +01:00
|
|
|
# $FreeBSD$
|
|
|
|
|
|
|
|
PORTNAME= grep
|
2016-02-05 11:14:32 +01:00
|
|
|
PORTVERSION= 2.23
|
2010-08-15 02:51:33 +02:00
|
|
|
CATEGORIES= textproc
|
2012-05-23 18:50:37 +02:00
|
|
|
MASTER_SITES= GNU
|
2010-02-06 14:47:54 +01:00
|
|
|
PKGNAMEPREFIX= gnu
|
|
|
|
|
2013-06-24 20:53:26 +02:00
|
|
|
MAINTAINER= johans@FreeBSD.org
|
2010-02-06 14:47:54 +01:00
|
|
|
COMMENT= GNU grep
|
|
|
|
|
2016-02-05 11:14:32 +01:00
|
|
|
LICENSE= GPLv3+
|
textproc/gnugrep: Add missing libiconv dependency
GNU Grep's automatically searches for and detects (via configure) the
presence of gettext and libiconv. If libiconv is already installed it
results in libiconv being detected without the dependency being
registered. If libiconv is ever removed, the following error is
observed:
Error: Shared object "libiconv.so.2" not found, required by "grep"
This change adds explicit configure arguments to disable gettext and
libiconv detection when their respective OPTIONS are disabled.
Additionally it adds an ICONV option consistent with other
ports, and replaces global CPPFLAGS and LDFLAGS values
with GETTEXT and ICONV option-specific library and include configure
arguments for the respective search path prefixes.
Note: CPPFLAGS and LDFLAGS are still required for PCRE detection, as
the configure script does not provide equivalent -prefix=[PATH] options
for libpcre. These flags are now PCRE option conditional.
While I'm here:
- Sort USES and OPTIONS and improve readability by seperating those
sections by whitespace.
- Add LICENSE_FILE
Tested on: 9.3, 10.1, i386, amd64, all PCRE, ICONV, NLS permutations
Approved: portmgr (blanket, framework compliance)
2015-04-24 06:17:16 +02:00
|
|
|
LICENSE_FILE= ${WRKSRC}/COPYING
|
2011-08-08 13:10:44 +02:00
|
|
|
|
2012-05-23 18:50:37 +02:00
|
|
|
CONFLICTS= bsd-grep-[0-9]*
|
|
|
|
|
textproc/gnugrep: Add missing libiconv dependency
GNU Grep's automatically searches for and detects (via configure) the
presence of gettext and libiconv. If libiconv is already installed it
results in libiconv being detected without the dependency being
registered. If libiconv is ever removed, the following error is
observed:
Error: Shared object "libiconv.so.2" not found, required by "grep"
This change adds explicit configure arguments to disable gettext and
libiconv detection when their respective OPTIONS are disabled.
Additionally it adds an ICONV option consistent with other
ports, and replaces global CPPFLAGS and LDFLAGS values
with GETTEXT and ICONV option-specific library and include configure
arguments for the respective search path prefixes.
Note: CPPFLAGS and LDFLAGS are still required for PCRE detection, as
the configure script does not provide equivalent -prefix=[PATH] options
for libpcre. These flags are now PCRE option conditional.
While I'm here:
- Sort USES and OPTIONS and improve readability by seperating those
sections by whitespace.
- Add LICENSE_FILE
Tested on: 9.3, 10.1, i386, amd64, all PCRE, ICONV, NLS permutations
Approved: portmgr (blanket, framework compliance)
2015-04-24 06:17:16 +02:00
|
|
|
USES= charsetfix cpe tar:xz
|
2010-02-06 14:47:54 +01:00
|
|
|
GNU_CONFIGURE= yes
|
2010-08-15 02:51:33 +02:00
|
|
|
|
2010-02-06 14:47:54 +01:00
|
|
|
INFO= grep
|
2015-03-09 22:04:37 +01:00
|
|
|
CPE_VENDOR= gnu
|
2010-02-06 14:47:54 +01:00
|
|
|
|
textproc/gnugrep: Add missing libiconv dependency
GNU Grep's automatically searches for and detects (via configure) the
presence of gettext and libiconv. If libiconv is already installed it
results in libiconv being detected without the dependency being
registered. If libiconv is ever removed, the following error is
observed:
Error: Shared object "libiconv.so.2" not found, required by "grep"
This change adds explicit configure arguments to disable gettext and
libiconv detection when their respective OPTIONS are disabled.
Additionally it adds an ICONV option consistent with other
ports, and replaces global CPPFLAGS and LDFLAGS values
with GETTEXT and ICONV option-specific library and include configure
arguments for the respective search path prefixes.
Note: CPPFLAGS and LDFLAGS are still required for PCRE detection, as
the configure script does not provide equivalent -prefix=[PATH] options
for libpcre. These flags are now PCRE option conditional.
While I'm here:
- Sort USES and OPTIONS and improve readability by seperating those
sections by whitespace.
- Add LICENSE_FILE
Tested on: 9.3, 10.1, i386, amd64, all PCRE, ICONV, NLS permutations
Approved: portmgr (blanket, framework compliance)
2015-04-24 06:17:16 +02:00
|
|
|
OPTIONS_DEFINE= ICONV NLS PCRE
|
|
|
|
OPTIONS_DEFAULT= ICONV NLS PCRE
|
|
|
|
OPTIONS_SUB= yes
|
|
|
|
|
|
|
|
ICONV_CONFIGURE_USES= iconv
|
|
|
|
ICONV_CONFIGURE_ON= --with-libiconv-prefix=${LOCALBASE}
|
|
|
|
ICONV_CONFIGURE_OFF= --without-libiconv-prefix
|
|
|
|
|
|
|
|
NLS_USES= gettext
|
|
|
|
NLS_CONFIGURE_ENABLE= nls
|
|
|
|
NLS_CONFIGURE_ON= --with-libintl-prefix=${LOCALBASE}
|
|
|
|
NLS_CONFIGURE_OFF= --without-libintl-prefix
|
|
|
|
|
2014-01-02 18:33:44 +01:00
|
|
|
PCRE_LIB_DEPENDS= libpcre.so:${PORTSDIR}/devel/pcre
|
|
|
|
PCRE_CONFIGURE_ENABLE= perl-regexp
|
textproc/gnugrep: Add missing libiconv dependency
GNU Grep's automatically searches for and detects (via configure) the
presence of gettext and libiconv. If libiconv is already installed it
results in libiconv being detected without the dependency being
registered. If libiconv is ever removed, the following error is
observed:
Error: Shared object "libiconv.so.2" not found, required by "grep"
This change adds explicit configure arguments to disable gettext and
libiconv detection when their respective OPTIONS are disabled.
Additionally it adds an ICONV option consistent with other
ports, and replaces global CPPFLAGS and LDFLAGS values
with GETTEXT and ICONV option-specific library and include configure
arguments for the respective search path prefixes.
Note: CPPFLAGS and LDFLAGS are still required for PCRE detection, as
the configure script does not provide equivalent -prefix=[PATH] options
for libpcre. These flags are now PCRE option conditional.
While I'm here:
- Sort USES and OPTIONS and improve readability by seperating those
sections by whitespace.
- Add LICENSE_FILE
Tested on: 9.3, 10.1, i386, amd64, all PCRE, ICONV, NLS permutations
Approved: portmgr (blanket, framework compliance)
2015-04-24 06:17:16 +02:00
|
|
|
PCRE_CPPFLAGS= -I${LOCALBASE}/include
|
|
|
|
PCRE_LDFLAGS= -L${LOCALBASE}/lib
|
|
|
|
PCRE_CONFIGURE_OFF= --disable-perl-regexp
|
2010-02-06 14:47:54 +01:00
|
|
|
|
2012-05-23 18:50:37 +02:00
|
|
|
.include <bsd.port.options.mk>
|
2010-02-06 14:47:54 +01:00
|
|
|
|
|
|
|
post-patch:
|
2015-11-22 12:33:57 +01:00
|
|
|
@${REINPLACE_CMD} 's:@grep@:${LOCALBASE}/bin/&:' ${WRKSRC}/src/egrep.sh
|
2012-10-06 18:12:29 +02:00
|
|
|
.if empty(PORT_OPTIONS:MNLS)
|
2010-08-15 02:51:33 +02:00
|
|
|
@${REINPLACE_CMD} '/install-exec-local:/s/install-exec-localcharset//' \
|
|
|
|
${WRKSRC}/lib/Makefile.in
|
|
|
|
.endif
|
2011-06-25 22:55:15 +02:00
|
|
|
@${REINPLACE_CMD} 's|mkinstalldirs = .*|mkinstalldirs = ${MKDIR}|g' \
|
2010-05-30 07:02:52 +02:00
|
|
|
${WRKSRC}/po/Makefile.in.in
|
2010-02-06 14:47:54 +01:00
|
|
|
|
2012-05-23 18:50:37 +02:00
|
|
|
.include <bsd.port.mk>
|