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

Diff of /eclass/eutils.eclass

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

Revision 1.124 Revision 1.125
1# Copyright 1999-2004 Gentoo Foundation 1# Copyright 1999-2004 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.124 2004/11/13 11:15:33 usata Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.125 2004/12/07 01:32:01 vapier Exp $
4# 4#
5# Author: Martin Schlemmer <azarah@gentoo.org> 5# Author: Martin Schlemmer <azarah@gentoo.org>
6# 6#
7# This eclass is for general purpose functions that most ebuilds 7# This eclass is for general purpose functions that most ebuilds
8# have to implement themselves. 8# have to implement themselves.
1513 einfo 1513 einfo
1514 einfo "After doing that, you can safely remove ${LIB}" 1514 einfo "After doing that, you can safely remove ${LIB}"
1515 einfo "Note: 'emerge gentoolkit' to get revdep-rebuild" 1515 einfo "Note: 'emerge gentoolkit' to get revdep-rebuild"
1516 fi 1516 fi
1517} 1517}
1518
1519# Hack for people to figure out if a package was built with
1520# certain USE flags
1521#
1522# Usage: built_with_use <DEPEND ATOM> <List of USE flags>
1523# ex: built_with_use xchat gtk2
1524built_with_use() {
1525 local PKG=$(portageq best_version ${ROOT} $1)
1526 local USEFILE="${ROOT}/var/db/pkg/${PKG}/USE"
1527 [[ ! -e ${USEFILE} ]] && return 1
1528
1529 local USE_BUILT=$(<${USEFILE})
1530
1531 shift
1532 while [ $# -gt 0 ] ; do
1533 has $1 ${USE_BUILT} || return 1
1534 shift
1535 done
1536 return 0
1537}

Legend:
Removed from v.1.124  
changed lines
  Added in v.1.125

  ViewVC Help
Powered by ViewVC 1.1.20