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

Diff of /eclass/eutils.eclass

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

Revision 1.364 Revision 1.365
1# Copyright 1999-2011 Gentoo Foundation 1# Copyright 1999-2011 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.364 2011/09/21 21:46:49 mgorny Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.365 2011/09/29 02:32:20 vapier Exp $
4 4
5# @ECLASS: eutils.eclass 5# @ECLASS: eutils.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# base-system@gentoo.org 7# base-system@gentoo.org
8# @BLURB: many extra (but common) functions that are used in ebuilds 8# @BLURB: many extra (but common) functions that are used in ebuilds
2043 local flag=${1} 2043 local flag=${1}
2044 local liuse=( ${IUSE} ) 2044 local liuse=( ${IUSE} )
2045 2045
2046 has "${flag}" "${liuse[@]#[+-]}" 2046 has "${flag}" "${liuse[@]#[+-]}"
2047} 2047}
2048
2049# @FUNCTION: usex
2050# @USAGE: <USE flag> [true output] [false output] [true suffix] [false suffix]
2051# @DESCRIPTION:
2052# If USE flag is set, echo [true output][true suffix] (defaults to "yes"),
2053# otherwise echo [false output][false suffix] (defaults to "no").
2054usex() { use "$1" && echo "${2-yes}$4" || echo "${3-no}$5" ; } #382963

Legend:
Removed from v.1.364  
changed lines
  Added in v.1.365

  ViewVC Help
Powered by ViewVC 1.1.20