/[gentoo-x86]/eclass/eutils.eclass
Gentoo

Diff of /eclass/eutils.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.241 Revision 1.242
1# Copyright 1999-2006 Gentoo Foundation 1# Copyright 1999-2006 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.241 2006/06/15 14:45:59 vapier Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.242 2006/06/24 04:36:33 vapier Exp $
4# 4#
5# This eclass is for general purpose functions that most ebuilds 5# This eclass is for general purpose functions that most ebuilds
6# have to implement themselves. 6# have to implement themselves.
7# 7#
8# NB: If you add anything, please comment it! 8# NB: If you add anything, please comment it!
1434# The -i builds a list of po files found in all the 1434# The -i builds a list of po files found in all the
1435# directories and uses the intersection of the lists. 1435# directories and uses the intersection of the lists.
1436# The -u builds a list of po files found in all the 1436# The -u builds a list of po files found in all the
1437# directories and uses the union of the lists. 1437# directories and uses the union of the lists.
1438strip-linguas() { 1438strip-linguas() {
1439 local ls newls 1439 local ls newls nols
1440 if [[ $1 == "-i" ]] || [[ $1 == "-u" ]] ; then 1440 if [[ $1 == "-i" ]] || [[ $1 == "-u" ]] ; then
1441 local op=$1; shift 1441 local op=$1; shift
1442 ls=$(find "$1" -name '*.po' -exec basename {} .po \;); shift 1442 ls=$(find "$1" -name '*.po' -exec basename {} .po \;); shift
1443 local d f 1443 local d f
1444 for d in "$@" ; do 1444 for d in "$@" ; do
1458 done 1458 done
1459 else 1459 else
1460 ls="$@" 1460 ls="$@"
1461 fi 1461 fi
1462 1462
1463 nols=""
1463 newls="" 1464 newls=""
1464 for f in ${LINGUAS} ; do 1465 for f in ${LINGUAS} ; do
1465 if hasq ${f} ${ls} ; then 1466 if hasq ${f} ${ls} ; then
1466 newls="${newls} ${f}" 1467 newls="${newls} ${f}"
1467 else 1468 else
1468 ewarn "Sorry, but ${PN} does not support the ${f} LINGUA" 1469 nols="${nols} ${f}"
1469 fi 1470 fi
1470 done 1471 done
1472 [[ -n ${newls} ]] \
1473 && ewarn "Sorry, but ${PN} does not support the LINGUAs:" ${nols}
1471 export LINGUAS=${newls:1} 1474 export LINGUAS=${newls:1}
1472} 1475}
1473 1476
1474# moved from kernel.eclass since they are generally useful outside of 1477# moved from kernel.eclass since they are generally useful outside of
1475# kernel.eclass -iggy (20041002) 1478# kernel.eclass -iggy (20041002)

Legend:
Removed from v.1.241  
changed lines
  Added in v.1.242

  ViewVC Help
Powered by ViewVC 1.1.20