From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 900CD59CA9 for ; Mon, 28 Mar 2016 22:03:55 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id CEAA6E0880; Mon, 28 Mar 2016 22:03:54 +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 5CC8421C002 for ; Mon, 28 Mar 2016 22:03:54 +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 66BDD340BCD for ; Mon, 28 Mar 2016 22:03:53 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id CB4B52C9 for ; Mon, 28 Mar 2016 22:03:51 +0000 (UTC) From: "Mike Frysinger" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Mike Frysinger" Message-ID: <1459202625.34056a95fa0636621ef6f7b85e398e21b4cdf1e9.vapier@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: app-text/dos2unix/ X-VCS-Repository: repo/gentoo X-VCS-Files: app-text/dos2unix/dos2unix-7.3.3.ebuild X-VCS-Directories: app-text/dos2unix/ X-VCS-Committer: vapier X-VCS-Committer-Name: Mike Frysinger X-VCS-Revision: 34056a95fa0636621ef6f7b85e398e21b4cdf1e9 X-VCS-Branch: master Date: Mon, 28 Mar 2016 22:03:51 +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-Archives-Salt: 6cf34719-d64a-425e-a45d-1c88f538c4f1 X-Archives-Hash: 6b1d3eaeb2ef9c710492f687c2dfe2a7 commit: 34056a95fa0636621ef6f7b85e398e21b4cdf1e9 Author: Mike Frysinger gentoo org> AuthorDate: Mon Mar 28 21:56:39 2016 +0000 Commit: Mike Frysinger gentoo org> CommitDate: Mon Mar 28 22:03:45 2016 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=34056a95 app-text/dos2unix: respect LINGUAS via l10n.eclass app-text/dos2unix/dos2unix-7.3.3.ebuild | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/app-text/dos2unix/dos2unix-7.3.3.ebuild b/app-text/dos2unix/dos2unix-7.3.3.ebuild index 97a70f0..5d49f87 100644 --- a/app-text/dos2unix/dos2unix-7.3.3.ebuild +++ b/app-text/dos2unix/dos2unix-7.3.3.ebuild @@ -4,7 +4,9 @@ EAPI=6 -inherit toolchain-funcs +PLOCALES="da de eo es fr hu ja nb nl pl pt_BR ru sr sv uk vi zh_CN zh_TW" + +inherit l10n toolchain-funcs DESCRIPTION="Convert DOS or MAC text files to UNIX format or vice versa" HOMEPAGE="http://www.xs4all.nl/~waterlan/dos2unix.html http://sourceforge.net/projects/dos2unix/" @@ -27,9 +29,28 @@ DEPEND=" test? ( virtual/perl-Test-Simple ) dev-lang/perl" +handle_locales() { + # Make sure locale list is kept up-to-date. + local detected sorted + detected=$(echo $(printf '%s\n' */*.po | sed -e 's:.*/::' -e 's:.po$::' | sort -u)) + sorted=$(echo $(printf '%s\n' ${PLOCALES} | sort -u)) + if [[ ${sorted} != "${detected}" ]] ; then + eerror "The ebuild needs to be kept in sync." + eerror "PLOCALES: ${sorted}" + eerror "po*/*.po: ${detected}" + die "sync PLOCALES" + fi + + # Deal with selective install of locales. + rm_loc() { rm po*/$1.po || die; } + l10n_for_each_disabled_locale_do rm_loc +} + src_prepare() { default + handle_locales + sed \ -e '/^LDFLAGS/s|=|+=|' \ -e '/CFLAGS_OS \+=/d' \