Tweak textproc/gnugrep version 2.12_1
[dports.git] / textproc / gnugrep / Makefile
1 # New ports collection makefile for:    grep
2 # Date created:                         5 February 2010
3 # Whom:                                 Gabor Kovesdan <gabor@FreeBSD.org>
4 #
5 # $FreeBSD: textproc/gnugrep/Makefile 316464 2013-04-24 18:10:30Z ak $
6 #
7
8 PORTNAME=       grep
9 PORTVERSION=    2.12
10 PORTREVISION=   1
11 CATEGORIES=     textproc
12 MASTER_SITES=   GNU
13 PKGNAMEPREFIX=  gnu
14
15 MAINTAINER=     gabor@FreeBSD.org
16 COMMENT=        GNU grep
17
18 LICENSE=        GPLv3
19
20 CONFLICTS=      bsd-grep-[0-9]*
21
22 USE_XZ=         yes
23 GNU_CONFIGURE=  yes
24
25 MAN1=           egrep.1 \
26                 fgrep.1 \
27                 grep.1
28 INFO=           grep
29
30 OPTIONS_DEFINE= PCRE
31
32 .include <bsd.port.options.mk>
33
34 .if ${PORT_OPTIONS:MNLS}
35 USES+=          gettext
36 LDFLAGS+=       -lintl -L${LOCALBASE}/lib
37 PLIST_SUB+=     NLS=
38 .else
39 CONFIGURE_ARGS+=        --disable-nls
40 PLIST_SUB+=     NLS="@comment "
41 .endif
42
43 .if ${PORT_OPTIONS:MPCRE}
44 LIB_DEPENDS+=   pcre.3:${PORTSDIR}/devel/pcre
45 .else
46 CONFIGURE_ARGS+=        --disable-perl-regexp
47 .endif
48
49 post-patch:
50 .if empty(PORT_OPTIONS:MNLS)
51         @${REINPLACE_CMD} '/install-exec-local:/s/install-exec-localcharset//' \
52                 ${WRKSRC}/lib/Makefile.in
53 .endif
54         @${REINPLACE_CMD} 's|mkinstalldirs = .*|mkinstalldirs = ${MKDIR}|g' \
55                 ${WRKSRC}/po/Makefile.in.in
56
57 .include <bsd.port.mk>