From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-936121-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id 196B0139694
	for <garchives@archives.gentoo.org>; Fri,  3 Mar 2017 13:12:35 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 3493EE0C0C;
	Fri,  3 Mar 2017 13:12:32 +0000 (UTC)
Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id F0425E0C0C
	for <gentoo-commits@lists.gentoo.org>; Fri,  3 Mar 2017 13:12:31 +0000 (UTC)
Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id ADB54341791
	for <gentoo-commits@lists.gentoo.org>; Fri,  3 Mar 2017 13:12:30 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 21CB55AFA
	for <gentoo-commits@lists.gentoo.org>; Fri,  3 Mar 2017 13:12:29 +0000 (UTC)
From: "Lars Wendler" <polynomial-c@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Lars Wendler" <polynomial-c@gentoo.org>
Message-ID: <1488546742.0ab0eccf1cba817194be494894987b02337eef3f.polynomial-c@gentoo>
Subject: [gentoo-commits] repo/gentoo:master commit in: app-shells/fish/, app-shells/fish/files/
X-VCS-Repository: repo/gentoo
X-VCS-Files: app-shells/fish/files/fish-2.5.0-honor-linguas.patch app-shells/fish/fish-2.5.0.ebuild
X-VCS-Directories: app-shells/fish/files/ app-shells/fish/
X-VCS-Committer: polynomial-c
X-VCS-Committer-Name: Lars Wendler
X-VCS-Revision: 0ab0eccf1cba817194be494894987b02337eef3f
X-VCS-Branch: master
Date: Fri,  3 Mar 2017 13:12:29 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Archives-Salt: 57d2e17e-3fec-47a4-bd7b-d09dd545ccb6
X-Archives-Hash: e436a0965175bbcc21c864f2ade2ee1e

commit:     0ab0eccf1cba817194be494894987b02337eef3f
Author:     Georgy Yakovlev <ya <AT> sysdump <DOT> net>
AuthorDate: Fri Feb 24 06:34:59 2017 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Fri Mar  3 13:12:22 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0ab0eccf

app-shells/fish: add nls support

This adds nls useflag and includes
backported upstream patch to honor LINGUAS.
Fixes bug 409969.
Closes: https://github.com/gentoo/gentoo/pull/4072

 .../fish/files/fish-2.5.0-honor-linguas.patch      | 32 ++++++++++++++++++++++
 app-shells/fish/fish-2.5.0.ebuild                  |  9 ++++--
 2 files changed, 38 insertions(+), 3 deletions(-)

diff --git a/app-shells/fish/files/fish-2.5.0-honor-linguas.patch b/app-shells/fish/files/fish-2.5.0-honor-linguas.patch
new file mode 100644
index 00000000000..843036d6e5d
--- /dev/null
+++ b/app-shells/fish/files/fish-2.5.0-honor-linguas.patch
@@ -0,0 +1,32 @@
+diff --git a/Makefile.in b/Makefile.in
+index 35e63ae..b73c612 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -195,11 +195,16 @@ ifeq ($(shell uname), Darwin)
+ endif
+ 
+ #
+-# All translation message catalogs
++# All translation message catalogs, filter files based on LINGUAS.
+ #
+ TRANSLATIONS_SRC := $(wildcard po/*.po)
+-ifdef HAVE_GETTEXT
++ifeq ($(HAVE_GETTEXT), 1)
+ 	TRANSLATIONS := $(TRANSLATIONS_SRC:.po=.gmo)
++ifdef LINGUAS
++	TRANSLATIONS_ALL := $(TRANSLATIONS)
++	TRANSLATIONS_WANTED = $(patsubst %,po/%.gmo,$(LINGUAS))
++	TRANSLATIONS = $(filter $(TRANSLATIONS_WANTED),$(TRANSLATIONS_ALL))
++endif
+ else
+ 	TRANSLATIONS :=
+ endif
+@@ -764,7 +769,7 @@ uninstall: uninstall-translations | show-prefix show-bindir show-sysconfdir show
+ .PHONY: uninstall
+ 
+ install-translations: $(TRANSLATIONS) | show-HAVE_GETTEXT
+-ifdef HAVE_GETTEXT
++ifeq ($(HAVE_GETTEXT), 1)
+ 	@echo "Installing translations..."
+ 	$v for i in $(TRANSLATIONS); do \
+ 		$(INSTALL) -m 755 -d $(DESTDIR)$(localedir)/`basename $$i .gmo`/LC_MESSAGES; \

diff --git a/app-shells/fish/fish-2.5.0.ebuild b/app-shells/fish/fish-2.5.0.ebuild
index 5132a555abc..6d94ff16ddf 100644
--- a/app-shells/fish/fish-2.5.0.ebuild
+++ b/app-shells/fish/fish-2.5.0.ebuild
@@ -10,7 +10,7 @@ SRC_URI="http://fishshell.com/files/${PV}/${P}.tar.gz"
 LICENSE="GPL-2"
 SLOT="0"
 KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~x86-solaris"
-IUSE=""
+IUSE="nls"
 
 RDEPEND="
 	>=dev-libs/libpcre2-10.21[pcre32]
@@ -19,9 +19,11 @@ RDEPEND="
 DEPEND="
 	${RDEPEND}
 	sys-devel/bc
-	sys-devel/gettext
+	nls? ( sys-devel/gettext )
 "
 
+PATCHES=( "${FILESDIR}/${P}-honor-linguas.patch" )
+
 src_configure() {
 	# Set things up for fish to be a default shell.
 	# It has to be in /bin in case /usr is unavailable.
@@ -29,7 +31,8 @@ src_configure() {
 	econf \
 		docdir="${EPREFIX}"/usr/share/doc/${PF} \
 		--bindir="${EPREFIX}"/bin \
-		--without-included-pcre2
+		--without-included-pcre2 \
+		$(use_with nls gettext)
 }
 
 src_test() {