From swell.k@gmail.com  Wed Aug  4 18:29:34 2010
Return-Path: <swell.k@gmail.com>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id A3FC51065675
	for <FreeBSD-gnats-submit@freebsd.org>; Wed,  4 Aug 2010 18:29:34 +0000 (UTC)
	(envelope-from swell.k@gmail.com)
Received: from mail-pz0-f54.google.com (mail-pz0-f54.google.com [209.85.210.54])
	by mx1.freebsd.org (Postfix) with ESMTP id 78A528FC08
	for <FreeBSD-gnats-submit@freebsd.org>; Wed,  4 Aug 2010 18:29:34 +0000 (UTC)
Received: by pzk7 with SMTP id 7so2443538pzk.13
        for <FreeBSD-gnats-submit@freebsd.org>; Wed, 04 Aug 2010 11:29:34 -0700 (PDT)
Received: by 10.142.136.1 with SMTP id j1mr8370244wfd.343.1280946574108;
        Wed, 04 Aug 2010 11:29:34 -0700 (PDT)
Received: from localhost ([95.143.193.145])
        by mx.google.com with ESMTPS id e18sm4147369vcf.12.2010.08.04.11.29.32
        (version=SSLv3 cipher=RC4-MD5);
        Wed, 04 Aug 2010 11:29:33 -0700 (PDT)
Message-Id: <86y6cmi64a.fsf@gmail.com>
Date: Wed, 04 Aug 2010 22:29:25 +0400
From: Anonymous <swell.k@gmail.com>
To: FreeBSD-gnats-submit@freebsd.org
Subject: [patch] textproc/gnugrep: respect WITHOUT_NLS

>Number:         149290
>Category:       ports
>Synopsis:       [patch] textproc/gnugrep: respect WITHOUT_NLS
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    gabor
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed Aug 04 18:30:07 UTC 2010
>Closed-Date:    Sun Aug 15 00:52:49 UTC 2010
>Last-Modified:  Sun Aug 15 01:00:02 UTC 2010
>Originator:     Anonymous
>Release:        FreeBSD 9.0-CURRENT amd64
>Organization:
>Environment:
>Description:
- move CONFLICTS and USE_XZ closer to the top (cosmetic)
- push PLIST_FILES to pkg-plist (cosmetic)
- mark whole post-patch target .SILENT (cosmetic)
- hide --disable-nls behind WITHOUT_NLS
- don't create/update charset.alias for WITHOUT_NLS
>How-To-Repeat:
>Fix:
--- a.diff begins here ---
Index: textproc/gnugrep/Makefile
===================================================================
RCS file: /a/.cvsup/ports/textproc/gnugrep/Makefile,v
retrieving revision 1.5
diff -u -p -r1.5 Makefile
--- textproc/gnugrep/Makefile	4 Jun 2010 08:09:20 -0000	1.5
+++ textproc/gnugrep/Makefile	4 Aug 2010 18:26:47 -0000
@@ -16,25 +16,29 @@ PKGNAMEPREFIX=	gnu
 MAINTAINER=	gabor@FreeBSD.org
 COMMENT=	GNU grep
 
-USE_GETTEXT=	yes
+CONFLICTS=	bsd-grep-*
+
+USE_XZ=		yes
 GNU_CONFIGURE=	yes
+
 MAN1=		egrep.1 \
 		fgrep.1 \
 		grep.1
 INFO=		grep
-PLIST_FILES=    bin/egrep \
-		bin/fgrep \
-		bin/grep
 
 OPTIONS=	PCRE	"Compile with Perl-compatible regex support"	off
 
-CONFLICTS=	bsd-grep-*
-
-USE_XZ=		yes
-
 .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
@@ -42,8 +46,12 @@ LIB_DEPENDS+=	pcre.0:${PORTSDIR}/devel/p
 CONFIGURE_ARGS+=	--disable-perl-regexp
 .endif
 
-post-patch:
-	@${REINPLACE_CMD} 's|mkinstalldirs = .*|mkinstalldirs = mkdir -p|g' \
+post-patch:	.SILENT
+.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>
Index: textproc/gnugrep/pkg-plist
===================================================================
RCS file: textproc/gnugrep/pkg-plist
diff -N textproc/gnugrep/pkg-plist
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ textproc/gnugrep/pkg-plist	4 Aug 2010 18:19:56 -0000
@@ -0,0 +1,47 @@
+bin/egrep
+bin/fgrep
+bin/grep
+%%NLS%%share/locale/af/LC_MESSAGES/grep.mo
+%%NLS%%share/locale/be/LC_MESSAGES/grep.mo
+%%NLS%%share/locale/bg/LC_MESSAGES/grep.mo
+%%NLS%%share/locale/ca/LC_MESSAGES/grep.mo
+%%NLS%%share/locale/cs/LC_MESSAGES/grep.mo
+%%NLS%%share/locale/da/LC_MESSAGES/grep.mo
+%%NLS%%share/locale/de/LC_MESSAGES/grep.mo
+%%NLS%%share/locale/el/LC_MESSAGES/grep.mo
+%%NLS%%share/locale/eo/LC_MESSAGES/grep.mo
+%%NLS%%share/locale/es/LC_MESSAGES/grep.mo
+%%NLS%%share/locale/et/LC_MESSAGES/grep.mo
+%%NLS%%share/locale/eu/LC_MESSAGES/grep.mo
+%%NLS%%share/locale/fi/LC_MESSAGES/grep.mo
+%%NLS%%share/locale/fr/LC_MESSAGES/grep.mo
+%%NLS%%share/locale/ga/LC_MESSAGES/grep.mo
+%%NLS%%share/locale/gl/LC_MESSAGES/grep.mo
+%%NLS%%share/locale/he/LC_MESSAGES/grep.mo
+%%NLS%%share/locale/hr/LC_MESSAGES/grep.mo
+%%NLS%%share/locale/hu/LC_MESSAGES/grep.mo
+%%NLS%%share/locale/id/LC_MESSAGES/grep.mo
+%%NLS%%share/locale/it/LC_MESSAGES/grep.mo
+%%NLS%%share/locale/ja/LC_MESSAGES/grep.mo
+%%NLS%%share/locale/ko/LC_MESSAGES/grep.mo
+%%NLS%%share/locale/ky/LC_MESSAGES/grep.mo
+%%NLS%%share/locale/lt/LC_MESSAGES/grep.mo
+%%NLS%%share/locale/nb/LC_MESSAGES/grep.mo
+%%NLS%%share/locale/nl/LC_MESSAGES/grep.mo
+%%NLS%%share/locale/pl/LC_MESSAGES/grep.mo
+%%NLS%%share/locale/pt/LC_MESSAGES/grep.mo
+%%NLS%%share/locale/pt_BR/LC_MESSAGES/grep.mo
+%%NLS%%share/locale/ro/LC_MESSAGES/grep.mo
+%%NLS%%share/locale/ru/LC_MESSAGES/grep.mo
+%%NLS%%share/locale/sk/LC_MESSAGES/grep.mo
+%%NLS%%share/locale/sl/LC_MESSAGES/grep.mo
+%%NLS%%share/locale/sr/LC_MESSAGES/grep.mo
+%%NLS%%share/locale/sv/LC_MESSAGES/grep.mo
+%%NLS%%share/locale/th/LC_MESSAGES/grep.mo
+%%NLS%%share/locale/tr/LC_MESSAGES/grep.mo
+%%NLS%%share/locale/uk/LC_MESSAGES/grep.mo
+%%NLS%%share/locale/vi/LC_MESSAGES/grep.mo
+%%NLS%%share/locale/zh_CN/LC_MESSAGES/grep.mo
+%%NLS%%share/locale/zh_TW/LC_MESSAGES/grep.mo
+%%NLS%%@dirrmtry share/locale/ky/LC_MESSAGES
+%%NLS%%@dirrmtry share/locale/ky
--- a.diff ends here ---
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->gabor 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Wed Aug 4 18:30:18 UTC 2010 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=149290 

From: Anonymous <swell.k@gmail.com>
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/149290: [patch] textproc/gnugrep: respect WITHOUT_NLS
Date: Wed, 04 Aug 2010 23:00:22 +0400

 Oops, -lintl in LDFLAGS is not needed. configure script already checks
 gettext in libc/libintl.
 
 And because HAVE_LIBINTL_H is not really used there is no need for
 
   CPPFLAGS=-I${LOCALBASE}/include
 
 in CONFIGURE_ENV. Works fine without it.
State-Changed-From-To: open->closed 
State-Changed-By: gabor 
State-Changed-When: Sun Aug 15 00:51:50 UTC 2010 
State-Changed-Why:  
Committed, thanks! I've changed .SILENT to @'s because this it the 
conventional way how se silence commands and I've also bumped 
PORTREVISION. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=149290 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/149290: commit references a PR
Date: Sun, 15 Aug 2010 00:51:42 +0000 (UTC)

 gabor       2010-08-15 00:51:33 UTC
 
   FreeBSD ports repository
 
   Modified files:
     textproc/gnugrep     Makefile 
   Added files:
     textproc/gnugrep     pkg-plist 
   Log:
   - 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
   
   Revision  Changes    Path
   1.6       +18 -10    ports/textproc/gnugrep/Makefile
   1.1       +47 -0     ports/textproc/gnugrep/pkg-plist (new)
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
>Unformatted:
