Gentoo Archives: gentoo-commits

From: Lars Wendler <polynomial-c@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-shells/fish/, app-shells/fish/files/
Date: Fri, 03 Mar 2017 13:12:35
Message-Id: 1488546742.0ab0eccf1cba817194be494894987b02337eef3f.polynomial-c@gentoo
1 commit: 0ab0eccf1cba817194be494894987b02337eef3f
2 Author: Georgy Yakovlev <ya <AT> sysdump <DOT> net>
3 AuthorDate: Fri Feb 24 06:34:59 2017 +0000
4 Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
5 CommitDate: Fri Mar 3 13:12:22 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0ab0eccf
7
8 app-shells/fish: add nls support
9
10 This adds nls useflag and includes
11 backported upstream patch to honor LINGUAS.
12 Fixes bug 409969.
13 Closes: https://github.com/gentoo/gentoo/pull/4072
14
15 .../fish/files/fish-2.5.0-honor-linguas.patch | 32 ++++++++++++++++++++++
16 app-shells/fish/fish-2.5.0.ebuild | 9 ++++--
17 2 files changed, 38 insertions(+), 3 deletions(-)
18
19 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
20 new file mode 100644
21 index 00000000000..843036d6e5d
22 --- /dev/null
23 +++ b/app-shells/fish/files/fish-2.5.0-honor-linguas.patch
24 @@ -0,0 +1,32 @@
25 +diff --git a/Makefile.in b/Makefile.in
26 +index 35e63ae..b73c612 100644
27 +--- a/Makefile.in
28 ++++ b/Makefile.in
29 +@@ -195,11 +195,16 @@ ifeq ($(shell uname), Darwin)
30 + endif
31 +
32 + #
33 +-# All translation message catalogs
34 ++# All translation message catalogs, filter files based on LINGUAS.
35 + #
36 + TRANSLATIONS_SRC := $(wildcard po/*.po)
37 +-ifdef HAVE_GETTEXT
38 ++ifeq ($(HAVE_GETTEXT), 1)
39 + TRANSLATIONS := $(TRANSLATIONS_SRC:.po=.gmo)
40 ++ifdef LINGUAS
41 ++ TRANSLATIONS_ALL := $(TRANSLATIONS)
42 ++ TRANSLATIONS_WANTED = $(patsubst %,po/%.gmo,$(LINGUAS))
43 ++ TRANSLATIONS = $(filter $(TRANSLATIONS_WANTED),$(TRANSLATIONS_ALL))
44 ++endif
45 + else
46 + TRANSLATIONS :=
47 + endif
48 +@@ -764,7 +769,7 @@ uninstall: uninstall-translations | show-prefix show-bindir show-sysconfdir show
49 + .PHONY: uninstall
50 +
51 + install-translations: $(TRANSLATIONS) | show-HAVE_GETTEXT
52 +-ifdef HAVE_GETTEXT
53 ++ifeq ($(HAVE_GETTEXT), 1)
54 + @echo "Installing translations..."
55 + $v for i in $(TRANSLATIONS); do \
56 + $(INSTALL) -m 755 -d $(DESTDIR)$(localedir)/`basename $$i .gmo`/LC_MESSAGES; \
57
58 diff --git a/app-shells/fish/fish-2.5.0.ebuild b/app-shells/fish/fish-2.5.0.ebuild
59 index 5132a555abc..6d94ff16ddf 100644
60 --- a/app-shells/fish/fish-2.5.0.ebuild
61 +++ b/app-shells/fish/fish-2.5.0.ebuild
62 @@ -10,7 +10,7 @@ SRC_URI="http://fishshell.com/files/${PV}/${P}.tar.gz"
63 LICENSE="GPL-2"
64 SLOT="0"
65 KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~x86-solaris"
66 -IUSE=""
67 +IUSE="nls"
68
69 RDEPEND="
70 >=dev-libs/libpcre2-10.21[pcre32]
71 @@ -19,9 +19,11 @@ RDEPEND="
72 DEPEND="
73 ${RDEPEND}
74 sys-devel/bc
75 - sys-devel/gettext
76 + nls? ( sys-devel/gettext )
77 "
78
79 +PATCHES=( "${FILESDIR}/${P}-honor-linguas.patch" )
80 +
81 src_configure() {
82 # Set things up for fish to be a default shell.
83 # It has to be in /bin in case /usr is unavailable.
84 @@ -29,7 +31,8 @@ src_configure() {
85 econf \
86 docdir="${EPREFIX}"/usr/share/doc/${PF} \
87 --bindir="${EPREFIX}"/bin \
88 - --without-included-pcre2
89 + --without-included-pcre2 \
90 + $(use_with nls gettext)
91 }
92
93 src_test() {