Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-apps/fakeroot/
Date: Sun, 12 Sep 2021 02:27:26
Message-Id: 1631413634.167c4a85d88f963199194ef37bff012f47c963f2.sam@gentoo
1 commit: 167c4a85d88f963199194ef37bff012f47c963f2
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Sun Sep 12 02:21:39 2021 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Sun Sep 12 02:27:14 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=167c4a85
7
8 sys-apps/fakeroot: conditionally gen+install translated man pages
9
10 Closes: https://bugs.gentoo.org/469428
11 Signed-off-by: Sam James <sam <AT> gentoo.org>
12
13 ...akeroot-1.26.ebuild => fakeroot-1.26-r1.ebuild} | 41 +++++++++++++++++-----
14 1 file changed, 32 insertions(+), 9 deletions(-)
15
16 diff --git a/sys-apps/fakeroot/fakeroot-1.26.ebuild b/sys-apps/fakeroot/fakeroot-1.26-r1.ebuild
17 similarity index 53%
18 rename from sys-apps/fakeroot/fakeroot-1.26.ebuild
19 rename to sys-apps/fakeroot/fakeroot-1.26-r1.ebuild
20 index 823e5a4ddf2..eaea8a55af7 100644
21 --- a/sys-apps/fakeroot/fakeroot-1.26.ebuild
22 +++ b/sys-apps/fakeroot/fakeroot-1.26-r1.ebuild
23 @@ -3,7 +3,7 @@
24
25 EAPI=7
26
27 -inherit flag-o-matic
28 +inherit autotools flag-o-matic plocale
29
30 DESCRIPTION="A fake root environment by means of LD_PRELOAD and SysV IPC (or TCP) trickery"
31 HOMEPAGE="https://packages.qa.debian.org/f/fakeroot.html"
32 @@ -12,17 +12,36 @@ SRC_URI="mirror://debian/pool/main/${PN:0:1}/${PN}/${P/-/_}.orig.tar.gz"
33 LICENSE="GPL-3"
34 SLOT="0"
35 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
36 -IUSE="acl debug test"
37 +IUSE="acl debug nls test"
38 RESTRICT="!test? ( test )"
39
40 -DEPEND="
41 - sys-libs/libcap
42 +DEPEND="sys-libs/libcap
43 acl? ( sys-apps/acl )
44 test? ( app-arch/sharutils )"
45 -BDEPEND="app-text/po4a"
46 +BDEPEND="nls? ( app-text/po4a )"
47
48 DOCS=( AUTHORS BUGS DEBUG README doc/README.saving )
49
50 +PLOCALES="de es fr nl pt sv"
51 +
52 +src_prepare() {
53 + default
54 +
55 + disable_locale() {
56 + local locale=${1}
57 +
58 + sed -i -e "s: ${locale}::" doc/po4a/po4a.cfg doc/Makefile.am || die
59 + }
60 +
61 + plocale_find_changes doc/po4a/po '' '.po'
62 + plocale_for_each_disabled_locale disable_locale
63 +
64 + # We could make this conditional and disable the autodependency in
65 + # autotools.eclass but it'd make it too easy for NLS builds to be broken
66 + # and us not realise.
67 + eautoreconf
68 +}
69 +
70 src_configure() {
71 export ac_cv_header_sys_acl_h=$(usex acl)
72 use acl || export ac_cv_search_acl_get_fd=no # bug 759568
73 @@ -32,10 +51,14 @@ src_configure() {
74 }
75
76 src_compile() {
77 - # Create translated man pages
78 - pushd doc >/dev/null || die
79 - po4a -v -k 0 --variable "srcdir=${S}/doc/" po4a/po4a.cfg || die
80 - popd >/dev/null || die
81 + local enabled_locales=$(plocale_get_locales)
82 +
83 + if use nls && [[ -n ${enabled_locales} ]] ; then
84 + # Create translated man pages
85 + pushd doc >/dev/null || die
86 + po4a -v -k 0 --variable "srcdir=${S}/doc/" po4a/po4a.cfg || die
87 + popd >/dev/null || die
88 + fi
89
90 default
91 }