freebsd-ports/textproc/gnugrep/Makefile
Gabor Kovesdan 03a3c6ca54 - Add support for NLS with the conventional WITHOUT_NLS knob to disable it
- Silence post-patch target
- Bump PORTREVISION
- Cosmetic changes

PR:		ports/149290
Submitted by:	swell.k@gmail.com
2010-08-15 00:51:33 +00:00

57 lines
1.2 KiB
Makefile

# New ports collection makefile for: grep
# Date created: 5 February 2010
# Whom: Gabor Kovesdan <gabor@FreeBSD.org>
#
# $FreeBSD$
#
PORTNAME= grep
PORTVERSION= 2.6.3
PORTREVISION= 3
CATEGORIES= textproc
MASTER_SITES= ${MASTER_SITE_GNU}
MASTER_SITE_SUBDIR= ${PORTNAME}
PKGNAMEPREFIX= gnu
MAINTAINER= gabor@FreeBSD.org
COMMENT= GNU grep
CONFLICTS= bsd-grep-*
USE_XZ= yes
GNU_CONFIGURE= yes
MAN1= egrep.1 \
fgrep.1 \
grep.1
INFO= grep
OPTIONS= PCRE "Compile with Perl-compatible regex support" off
.include <bsd.port.pre.mk>
.if !defined(WITHOUT_NLS)
USE_GETTEXT= yes
CONFIGURE_ENV+= LDFLAGS="${LDFLAGS}"
LDFLAGS+= -lintl -L${LOCALBASE}/lib
PLIST_SUB+= NLS=
.else
CONFIGURE_ARGS+= --disable-nls
PLIST_SUB+= NLS="@comment "
.endif
.if defined(WITH_PCRE)
LIB_DEPENDS+= pcre.0:${PORTSDIR}/devel/pcre
.else
CONFIGURE_ARGS+= --disable-perl-regexp
.endif
post-patch:
.if defined(WITHOUT_NLS)
@${REINPLACE_CMD} '/install-exec-local:/s/install-exec-localcharset//' \
${WRKSRC}/lib/Makefile.in
.endif
@${REINPLACE_CMD} 's|mkinstalldirs = .*|mkinstalldirs = mkdir -p|g' \
${WRKSRC}/po/Makefile.in.in
.include <bsd.port.post.mk>