--- /dev/null
+Adds support for --(enable|disable)-nls configure option.
+
+This enables\disables the generation of language files and
+sets the ENABLE_NLS define appropriately.
+
+Default value is enabled to preserve current behavior.
+
+Patch by Zentaro Kavanagh <zentaro@google.com>
+https://crbug.com/654842
+
+https://github.com/krb5/krb5/pull/584
+
+--- src/configure.in
++++ src/configure.in
+@@ -118,15 +118,22 @@
+ ])
+ AC_SUBST(LIBUTIL)
+
+-AC_CHECK_HEADER(libintl.h, [
+- AC_SEARCH_LIBS(dgettext, intl, [
+- AC_DEFINE(ENABLE_NLS, 1,
+- [Define if translation functions should be used.])])])
+-
+-AC_CHECK_PROG(MSGFMT,msgfmt,msgfmt)
++# Determine if NLS is desired and supported.
+ po=
+-if test x"$MSGFMT" != x; then
+- po=po
++AC_ARG_ENABLE([nls],
++AC_HELP_STRING([--disable-nls],
++ [Disable Native Language Support(NLS).]), ,
++ enableval=yes)
++if test "$enableval" = yes ; then
++ AC_CHECK_HEADER(libintl.h, [
++ AC_SEARCH_LIBS(dgettext, intl, [
++ AC_DEFINE(ENABLE_NLS, 1,
++ [Define if translation functions should be used.])])])
++
++ AC_CHECK_PROG(MSGFMT,msgfmt,msgfmt)
++ if test x"$MSGFMT" != x; then
++ po=po
++ fi
+ fi
+ AC_SUBST(po)
+
LICENSE="openafs-krb5-a BSD MIT OPENLDAP BSD-2 HPND BSD-4 ISC RSA CC-BY-SA-3.0 || ( BSD-2 GPL-2+ )"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
-IUSE="doc +keyutils libressl openldap +pkinit selinux +threads test xinetd"
+IUSE="doc +keyutils libressl nls openldap +pkinit selinux +threads test xinetd"
CDEPEND="
!!app-crypt/heimdal
epatch "${FILESDIR}/${PN}-1.12_warn_cflags.patch"
epatch "${FILESDIR}/${PN}-config_LDFLAGS.patch"
epatch "${FILESDIR}/${PN}-1.14.2-redeclared-ttyname.patch"
+ epatch "${FILESDIR}/${PN}-1.14.4-disable-nls.patch"
# Make sure we always use the system copies.
rm -rf util/{et,ss,verto}
econf \
$(use_with openldap ldap) \
"$(multilib_native_use_with test tcl "${EPREFIX}/usr")" \
+ $(use_enable nls) \
$(use_enable pkinit) \
$(use_enable threads thread-support) \
--without-hesiod \
LICENSE="openafs-krb5-a BSD MIT OPENLDAP BSD-2 HPND BSD-4 ISC RSA CC-BY-SA-3.0 || ( BSD-2 GPL-2+ )"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
-IUSE="doc +keyutils libressl openldap +pkinit selinux +threads test xinetd"
+IUSE="doc +keyutils libressl nls openldap +pkinit selinux +threads test xinetd"
CDEPEND="
!!app-crypt/heimdal
eapply "${FILESDIR}/${PN}-1.12_warn_cflags.patch"
eapply -p2 "${FILESDIR}/${PN}-config_LDFLAGS.patch"
eapply -p0 "${FILESDIR}/${PN}-1.14.2-redeclared-ttyname.patch"
+ eapply "${FILESDIR}/${PN}-1.14.4-disable-nls.patch"
# Make sure we always use the system copies.
rm -rf util/{et,ss,verto}
econf \
$(use_with openldap ldap) \
"$(multilib_native_use_with test tcl "${EPREFIX}/usr")" \
+ $(use_enable nls) \
$(use_enable pkinit) \
$(use_enable threads thread-support) \
--without-hesiod \