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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 3D57815808B for ; Tue, 29 Mar 2022 11:49:44 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 47DF4E07A5; Tue, 29 Mar 2022 11:49:43 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 8F990E07A5 for ; Tue, 29 Mar 2022 11:49:42 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 2C0A63410F3 for ; Tue, 29 Mar 2022 11:49:41 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 7DA91AF for ; Tue, 29 Mar 2022 11:49:39 +0000 (UTC) From: "Ulrich Müller" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Ulrich Müller" Message-ID: <1648554565.cccaac2fdf7f1256c6cf5273fac824d24fdde777.ulm@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sys-apps/sysvinit/ X-VCS-Repository: repo/gentoo X-VCS-Files: sys-apps/sysvinit/sysvinit-3.02-r2.ebuild sys-apps/sysvinit/sysvinit-3.02-r3.ebuild X-VCS-Directories: sys-apps/sysvinit/ X-VCS-Committer: ulm X-VCS-Committer-Name: Ulrich Müller X-VCS-Revision: cccaac2fdf7f1256c6cf5273fac824d24fdde777 X-VCS-Branch: master Date: Tue, 29 Mar 2022 11:49:39 +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: c0fb89f3-a6d7-448e-ab6e-d0c199059e2f X-Archives-Hash: 92908826811d66324d2e3a92e2e9669a commit: cccaac2fdf7f1256c6cf5273fac824d24fdde777 Author: Ulrich Müller gentoo org> AuthorDate: Tue Mar 29 11:46:53 2022 +0000 Commit: Ulrich Müller gentoo org> CommitDate: Tue Mar 29 11:49:25 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cccaac2f Revert "sys-apps/sysvinit: drop translations again" And revision bump to -r3. This reverts commit e18dcba3744bdbd1ef1700183c71a6a6703fed40. Bug: https://bugs.gentoo.org/836362#c4 Signed-off-by: Ulrich Müller gentoo.org> ...init-3.02-r2.ebuild => sysvinit-3.02-r3.ebuild} | 37 +++++++++++++++++++--- 1 file changed, 32 insertions(+), 5 deletions(-) diff --git a/sys-apps/sysvinit/sysvinit-3.02-r2.ebuild b/sys-apps/sysvinit/sysvinit-3.02-r3.ebuild similarity index 82% rename from sys-apps/sysvinit/sysvinit-3.02-r2.ebuild rename to sys-apps/sysvinit/sysvinit-3.02-r3.ebuild index c05001372e26..689e5a124a48 100644 --- a/sys-apps/sysvinit/sysvinit-3.02-r2.ebuild +++ b/sys-apps/sysvinit/sysvinit-3.02-r3.ebuild @@ -3,8 +3,9 @@ EAPI=7 +PLOCALES="de es fi fr hu id pl" VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/sysvinit.asc -inherit toolchain-funcs flag-o-matic verify-sig +inherit toolchain-funcs flag-o-matic plocale verify-sig DESCRIPTION="/sbin/init - parent of all processes" HOMEPAGE="https://savannah.nongnu.org/projects/sysvinit" @@ -17,7 +18,7 @@ SLOT="0" if [[ ${PV} != *beta* ]] ; then KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" fi -IUSE="selinux ibm static" +IUSE="selinux ibm nls static" COMMON_DEPEND=" selinux? ( @@ -30,9 +31,9 @@ DEPEND="${COMMON_DEPEND} RDEPEND="${COMMON_DEPEND} !> inittab fi + + delete_unused_locale() { + local locale=${1} + + einfo "Deleting non-requested man page translations for locale=${locale}" + rm "${S}"/man/po/${locale}.po || die + + sed -i -e "/^\[po4a_langs\]/ s:${locale}::" "${S}"/man/po/po4a.cfg || die + } + + plocale_for_each_disabled_locale delete_unused_locale } src_compile() { @@ -105,6 +117,11 @@ src_compile() { use static && append-ldflags -static emake -C src $(usex selinux 'WITH_SELINUX=yes' '') + + if use nls && [[ -n "$(plocale_get_locales)" ]] ; then + cd man/po || die + po4a po4a.cfg || die + fi } src_install() { @@ -122,6 +139,16 @@ src_install() { keepdir /etc/inittab.d + if use nls && [[ -n "$(plocale_get_locales)" ]] ; then + install_locale_man_pages() { + local locale=${1} + + doman -i18n=${locale} man/po/${locale}/* + } + + plocale_for_each_locale install_locale_man_pages + fi + # Dead symlink find "${ED}" -xtype l -delete || die