Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 24 Apr 2015 04:17:17 +0000 (UTC)
From:      Kubilay Kocak <koobs@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r384621 - head/textproc/gnugrep
Message-ID:  <201504240417.t3O4HHW0013821@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: koobs
Date: Fri Apr 24 04:17:16 2015
New Revision: 384621
URL: https://svnweb.freebsd.org/changeset/ports/384621

Log:
  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)

Modified:
  head/textproc/gnugrep/Makefile

Modified: head/textproc/gnugrep/Makefile
==============================================================================
--- head/textproc/gnugrep/Makefile	Fri Apr 24 03:07:55 2015	(r384620)
+++ head/textproc/gnugrep/Makefile	Fri Apr 24 04:17:16 2015	(r384621)
@@ -3,6 +3,7 @@
 
 PORTNAME=	grep
 PORTVERSION=	2.21
+PORTREVISION=	1
 CATEGORIES=	textproc
 MASTER_SITES=	GNU
 PKGNAMEPREFIX=	gnu
@@ -11,24 +12,34 @@ MAINTAINER=	johans@FreeBSD.org
 COMMENT=	GNU grep
 
 LICENSE=	GPLv3
+LICENSE_FILE=	${WRKSRC}/COPYING
 
 CONFLICTS=	bsd-grep-[0-9]*
 
-USES=		cpe charsetfix tar:xz
+USES=		charsetfix cpe tar:xz
 GNU_CONFIGURE=	yes
-CPPFLAGS+=	-I${LOCALBASE}/include
-LDFLAGS+=	-L${LOCALBASE}/lib
 
 INFO=		grep
 CPE_VENDOR=	gnu
 
-OPTIONS_DEFINE=	PCRE NLS
-OPTIONS_DEFAULT=PCRE NLS
-OPTIONS_SUB=	yes
+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
+
 PCRE_LIB_DEPENDS=	libpcre.so:${PORTSDIR}/devel/pcre
 PCRE_CONFIGURE_ENABLE=	perl-regexp
-NLS_USES=	gettext
-NLS_CONFIGURE_ENABLE=	nls
+PCRE_CPPFLAGS=		-I${LOCALBASE}/include
+PCRE_LDFLAGS=		-L${LOCALBASE}/lib
+PCRE_CONFIGURE_OFF=	--disable-perl-regexp
 
 .include <bsd.port.options.mk>
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201504240417.t3O4HHW0013821>