ports/149290: [patch] textproc/gnugrep: respect WITHOUT_NLS
Anonymous
swell.k at gmail.com
Wed Aug 4 18:30:08 UTC 2010
>Number: 149290
>Category: ports
>Synopsis: [patch] textproc/gnugrep: respect WITHOUT_NLS
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Wed Aug 04 18:30:07 UTC 2010
>Closed-Date:
>Last-Modified:
>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 at 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:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list