summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeroen Roovers <jer@gentoo.org>2011-06-04 17:51:13 +0000
committerJeroen Roovers <jer@gentoo.org>2011-06-04 17:51:13 +0000
commit01108180a3ed7afb6f226064957e83b380842beb (patch)
tree951c389813550c3d5256e97ac3c7e9cf90a8ab9e /www-client/opera
parentRemoved deprecated policies (diff)
downloadgentoo-2-01108180a3ed7afb6f226064957e83b380842beb.tar.gz
gentoo-2-01108180a3ed7afb6f226064957e83b380842beb.tar.bz2
gentoo-2-01108180a3ed7afb6f226064957e83b380842beb.zip
Add a simple linguas counter.
(Portage version: 2.2.0_alpha37/cvs/Linux x86_64)
Diffstat (limited to 'www-client/opera')
-rw-r--r--www-client/opera/ChangeLog5
-rw-r--r--www-client/opera/opera-11.50.1027.ebuild14
2 files changed, 16 insertions, 3 deletions
diff --git a/www-client/opera/ChangeLog b/www-client/opera/ChangeLog
index 1c3123fbe608..a77dce7926df 100644
--- a/www-client/opera/ChangeLog
+++ b/www-client/opera/ChangeLog
@@ -1,6 +1,9 @@
# ChangeLog for www-client/opera
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/www-client/opera/ChangeLog,v 1.633 2011/05/31 07:16:06 jer Exp $
+# $Header: /var/cvsroot/gentoo-x86/www-client/opera/ChangeLog,v 1.634 2011/06/04 17:51:13 jer Exp $
+
+ 04 Jun 2011; Jeroen Roovers <jer@gentoo.org> opera-11.50.1027.ebuild:
+ Add a simple linguas counter.
*opera-11.50.1027 (31 May 2011)
diff --git a/www-client/opera/opera-11.50.1027.ebuild b/www-client/opera/opera-11.50.1027.ebuild
index 9fbf24a2cdf7..4caeb3badafa 100644
--- a/www-client/opera/opera-11.50.1027.ebuild
+++ b/www-client/opera/opera-11.50.1027.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/www-client/opera/opera-11.50.1027.ebuild,v 1.1 2011/05/31 07:16:06 jer Exp $
+# $Header: /var/cvsroot/gentoo-x86/www-client/opera/opera-11.50.1027.ebuild,v 1.2 2011/06/04 17:51:13 jer Exp $
EAPI="3"
@@ -99,9 +99,19 @@ src_unpack() {
}
src_prepare() {
+ local LNGDIR="share/${PN}/locale"
+
+ # Count linguas
+ count() { echo ${#}; }
+ local lingua_count=$(count ${O_LINGUAS} en)
+ local locale_count=$(count ${LNGDIR}/*)
+ [[ ${lingua_count} = ${locale_count} ]] \
+ || die "Number of LINGUAS does not match number of locales"
+ unset count
+
# Remove unwanted linguas
- LNGDIR="share/${PN}/locale"
einfo "Keeping these locales (linguas): ${LINGUAS}."
+
for LINGUA in ${O_LINGUAS}; do
if ! use linguas_${LINGUA/-/_}; then
LINGUA=$(find "${LNGDIR}" -maxdepth 1 -type d -iname ${LINGUA/_/-})