ports/64491: [patch] make gnupg obey WITHOUT_NLS
Sebastian Klemke
packet at adrenochrome.nl
Sat Mar 20 03:10:16 UTC 2004
>Number: 64491
>Category: ports
>Synopsis: [patch] make gnupg obey 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: Fri Mar 19 19:10:16 PST 2004
>Closed-Date:
>Last-Modified:
>Originator: Sebastian Klemke
>Release: FreeBSD 5.2.1-RELEASE-p3 i386
>Organization:
>Environment:
System: FreeBSD roterstern.wired.nerdheim.de 5.2.1-RELEASE-p3 FreeBSD 5.2.1-RELEASE-p3 #0: Thu Mar 18 01:30:43 CET 2004 root at roterstern.wired.nerdheim.de:/usr/obj/usr/src/sys/ROTERSTERN i386
>Description:
gnupg always builds gettext and its locales, even if WITHOUT_NLS is set
>How-To-Repeat:
cd /usr/ports && make install clean WITHOUT_NLS=yes
>Fix:
The included patch makes the gnupg port recognize WITHOUT_NLS, not
setting USE_GETTEXT to yes and configuring with --disable-nls. It does
not touch portrevision. I have tested this patch with and without
WITHOUT_NLS set and it works as expected.
--- gnupg.patch begins here ---
diff -urN gnupg.orig/Makefile gnupg/Makefile
--- gnupg.orig/Makefile Fri Mar 19 16:55:18 2004
+++ gnupg/Makefile Fri Mar 19 17:04:17 2004
@@ -18,7 +18,11 @@
COMMENT= The GNU Privacy Guard
USE_BZIP2= YES
-USE_GETTEXT= yes
+
+.if !defined(WITHOUT_NLS)
+USE_GETTEXT= YES
+.endif
+
USE_GMAKE= YES
GNU_CONFIGURE= YES
CONFIGURE_TARGET= --build ${MACHINE_ARCH}-portbld-freebsd${OSREL}
@@ -26,6 +30,12 @@
MACHINE_ARCH= i586
.endif
CFLAGS:= ${CFLAGS:S/-pipe//g}
+.if !defined(WITHOUT_NLS)
+PLIST_SUB= NLS=""
+.else
+CONFIGURE_ARGS+=--disable-nls
+PLIST_SUB= NLS="@comment "
+.endif
MAN1= gpg.1 gpgv.1
MAN7= gnupg.7
diff -urN gnupg.orig/pkg-plist gnupg/pkg-plist
--- gnupg.orig/pkg-plist Fri Mar 19 16:55:18 2004
+++ gnupg/pkg-plist Fri Mar 19 17:00:05 2004
@@ -24,32 +24,32 @@
%%PORTDOCS%%share/doc/gnupg/THANKS
%%PORTDOCS%%share/doc/gnupg/TODO
%%PORTDOCS%%share/doc/gnupg/VERSION
-share/locale/be/LC_MESSAGES/gnupg.mo
-share/locale/ca/LC_MESSAGES/gnupg.mo
-share/locale/cs/LC_MESSAGES/gnupg.mo
-share/locale/da/LC_MESSAGES/gnupg.mo
-share/locale/de/LC_MESSAGES/gnupg.mo
-share/locale/el/LC_MESSAGES/gnupg.mo
-share/locale/eo/LC_MESSAGES/gnupg.mo
-share/locale/es/LC_MESSAGES/gnupg.mo
-share/locale/et/LC_MESSAGES/gnupg.mo
-share/locale/fi/LC_MESSAGES/gnupg.mo
-share/locale/fr/LC_MESSAGES/gnupg.mo
-share/locale/gl/LC_MESSAGES/gnupg.mo
-share/locale/hu/LC_MESSAGES/gnupg.mo
-share/locale/id/LC_MESSAGES/gnupg.mo
-share/locale/it/LC_MESSAGES/gnupg.mo
-share/locale/ja/LC_MESSAGES/gnupg.mo
-share/locale/nl/LC_MESSAGES/gnupg.mo
-share/locale/pl/LC_MESSAGES/gnupg.mo
-share/locale/pt/LC_MESSAGES/gnupg.mo
-share/locale/pt_BR/LC_MESSAGES/gnupg.mo
-share/locale/ro/LC_MESSAGES/gnupg.mo
-share/locale/ru/LC_MESSAGES/gnupg.mo
-share/locale/sk/LC_MESSAGES/gnupg.mo
-share/locale/sv/LC_MESSAGES/gnupg.mo
-share/locale/tr/LC_MESSAGES/gnupg.mo
-share/locale/zh_TW/LC_MESSAGES/gnupg.mo
+%%NLS%%share/locale/be/LC_MESSAGES/gnupg.mo
+%%NLS%%share/locale/ca/LC_MESSAGES/gnupg.mo
+%%NLS%%share/locale/cs/LC_MESSAGES/gnupg.mo
+%%NLS%%share/locale/da/LC_MESSAGES/gnupg.mo
+%%NLS%%share/locale/de/LC_MESSAGES/gnupg.mo
+%%NLS%%share/locale/el/LC_MESSAGES/gnupg.mo
+%%NLS%%share/locale/eo/LC_MESSAGES/gnupg.mo
+%%NLS%%share/locale/es/LC_MESSAGES/gnupg.mo
+%%NLS%%share/locale/et/LC_MESSAGES/gnupg.mo
+%%NLS%%share/locale/fi/LC_MESSAGES/gnupg.mo
+%%NLS%%share/locale/fr/LC_MESSAGES/gnupg.mo
+%%NLS%%share/locale/gl/LC_MESSAGES/gnupg.mo
+%%NLS%%share/locale/hu/LC_MESSAGES/gnupg.mo
+%%NLS%%share/locale/id/LC_MESSAGES/gnupg.mo
+%%NLS%%share/locale/it/LC_MESSAGES/gnupg.mo
+%%NLS%%share/locale/ja/LC_MESSAGES/gnupg.mo
+%%NLS%%share/locale/nl/LC_MESSAGES/gnupg.mo
+%%NLS%%share/locale/pl/LC_MESSAGES/gnupg.mo
+%%NLS%%share/locale/pt/LC_MESSAGES/gnupg.mo
+%%NLS%%share/locale/pt_BR/LC_MESSAGES/gnupg.mo
+%%NLS%%share/locale/ro/LC_MESSAGES/gnupg.mo
+%%NLS%%share/locale/ru/LC_MESSAGES/gnupg.mo
+%%NLS%%share/locale/sk/LC_MESSAGES/gnupg.mo
+%%NLS%%share/locale/sv/LC_MESSAGES/gnupg.mo
+%%NLS%%share/locale/tr/LC_MESSAGES/gnupg.mo
+%%NLS%%share/locale/zh_TW/LC_MESSAGES/gnupg.mo
@dirrm share/gnupg
@unexec rmdir %D/share/locale/be/LC_MESSAGES 2>/dev/null || true
@unexec rmdir %D/share/locale/be 2>/dev/null || true
--- gnupg.patch ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list