From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 DD106158092 for ; Sun, 12 Sep 2021 02:27:26 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 6B5C8E07EE; Sun, 12 Sep 2021 02:27:25 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 2572EE07EE for ; Sun, 12 Sep 2021 02:27:25 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id EABA0342D23 for ; Sun, 12 Sep 2021 02:27:23 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 529D856 for ; Sun, 12 Sep 2021 02:27:22 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1631413634.167c4a85d88f963199194ef37bff012f47c963f2.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sys-apps/fakeroot/ X-VCS-Repository: repo/gentoo X-VCS-Files: sys-apps/fakeroot/fakeroot-1.26-r1.ebuild sys-apps/fakeroot/fakeroot-1.26.ebuild X-VCS-Directories: sys-apps/fakeroot/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 167c4a85d88f963199194ef37bff012f47c963f2 X-VCS-Branch: master Date: Sun, 12 Sep 2021 02:27:22 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 0d871f54-c70b-412f-a2c2-bfa8eb52ffef X-Archives-Hash: 6046f3aa31703fe36c996fa247b8ab0e commit: 167c4a85d88f963199194ef37bff012f47c963f2 Author: Sam James gentoo org> AuthorDate: Sun Sep 12 02:21:39 2021 +0000 Commit: Sam James gentoo org> CommitDate: Sun Sep 12 02:27:14 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=167c4a85 sys-apps/fakeroot: conditionally gen+install translated man pages Closes: https://bugs.gentoo.org/469428 Signed-off-by: Sam James gentoo.org> ...akeroot-1.26.ebuild => fakeroot-1.26-r1.ebuild} | 41 +++++++++++++++++----- 1 file changed, 32 insertions(+), 9 deletions(-) diff --git a/sys-apps/fakeroot/fakeroot-1.26.ebuild b/sys-apps/fakeroot/fakeroot-1.26-r1.ebuild similarity index 53% rename from sys-apps/fakeroot/fakeroot-1.26.ebuild rename to sys-apps/fakeroot/fakeroot-1.26-r1.ebuild index 823e5a4ddf2..eaea8a55af7 100644 --- a/sys-apps/fakeroot/fakeroot-1.26.ebuild +++ b/sys-apps/fakeroot/fakeroot-1.26-r1.ebuild @@ -3,7 +3,7 @@ EAPI=7 -inherit flag-o-matic +inherit autotools flag-o-matic plocale DESCRIPTION="A fake root environment by means of LD_PRELOAD and SysV IPC (or TCP) trickery" HOMEPAGE="https://packages.qa.debian.org/f/fakeroot.html" @@ -12,17 +12,36 @@ SRC_URI="mirror://debian/pool/main/${PN:0:1}/${PN}/${P/-/_}.orig.tar.gz" LICENSE="GPL-3" SLOT="0" KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux" -IUSE="acl debug test" +IUSE="acl debug nls test" RESTRICT="!test? ( test )" -DEPEND=" - sys-libs/libcap +DEPEND="sys-libs/libcap acl? ( sys-apps/acl ) test? ( app-arch/sharutils )" -BDEPEND="app-text/po4a" +BDEPEND="nls? ( app-text/po4a )" DOCS=( AUTHORS BUGS DEBUG README doc/README.saving ) +PLOCALES="de es fr nl pt sv" + +src_prepare() { + default + + disable_locale() { + local locale=${1} + + sed -i -e "s: ${locale}::" doc/po4a/po4a.cfg doc/Makefile.am || die + } + + plocale_find_changes doc/po4a/po '' '.po' + plocale_for_each_disabled_locale disable_locale + + # We could make this conditional and disable the autodependency in + # autotools.eclass but it'd make it too easy for NLS builds to be broken + # and us not realise. + eautoreconf +} + src_configure() { export ac_cv_header_sys_acl_h=$(usex acl) use acl || export ac_cv_search_acl_get_fd=no # bug 759568 @@ -32,10 +51,14 @@ src_configure() { } src_compile() { - # Create translated man pages - pushd doc >/dev/null || die - po4a -v -k 0 --variable "srcdir=${S}/doc/" po4a/po4a.cfg || die - popd >/dev/null || die + local enabled_locales=$(plocale_get_locales) + + if use nls && [[ -n ${enabled_locales} ]] ; then + # Create translated man pages + pushd doc >/dev/null || die + po4a -v -k 0 --variable "srcdir=${S}/doc/" po4a/po4a.cfg || die + popd >/dev/null || die + fi default }