diff options
author | Mike Frysinger <vapier@gentoo.org> | 2011-10-17 19:10:58 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2011-10-17 19:10:58 +0000 |
commit | 5d18f4283de2252cf69b1f4585a9254f97cd1c6a (patch) | |
tree | fbc90307136b2b0efd6524c8703b91246b07ad5a /eclass | |
parent | Use correct python version for gnome-keyring script, reorganize for alphabeti... (diff) | |
download | gentoo-2-5d18f4283de2252cf69b1f4585a9254f97cd1c6a.tar.gz gentoo-2-5d18f4283de2252cf69b1f4585a9254f97cd1c6a.tar.bz2 gentoo-2-5d18f4283de2252cf69b1f4585a9254f97cd1c6a.zip |
add a huse() helper to avoid QA warnings when checking features that are not enabled
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/toolchain.eclass | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass index 408f63deb22c..9e039b72f64f 100644 --- a/eclass/toolchain.eclass +++ b/eclass/toolchain.eclass @@ -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/eclass/toolchain.eclass,v 1.472 2011/09/27 12:14:25 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain.eclass,v 1.473 2011/10/17 19:10:58 vapier Exp $ # # Maintainer: Toolchain Ninjas <toolchain@gentoo.org> @@ -765,9 +765,9 @@ toolchain_pkg_setup() { unset GCC_SPECS if use nocxx ; then - use go && ewarn 'Go requires a C++ compiler, disabled due to USE="nocxx"' - use objc++ && ewarn 'Obj-C++ requires a C++ compiler, disabled due to USE="nocxx"' - use gcj && ewarn 'GCJ requires a C++ compiler, disabled due to USE="nocxx"' + huse go && ewarn 'Go requires a C++ compiler, disabled due to USE="nocxx"' + huse objc++ && ewarn 'Obj-C++ requires a C++ compiler, disabled due to USE="nocxx"' + huse gcj && ewarn 'GCJ requires a C++ compiler, disabled due to USE="nocxx"' fi want_libssp && libc_has_ssp && \ @@ -2349,6 +2349,11 @@ is_multilib() { use multilib } +huse() { + has $1 ${IUSE} || return 1 + use $1 +} + is_cxx() { gcc-lang-supported 'c++' || return 1 ! use nocxx @@ -2356,7 +2361,7 @@ is_cxx() { is_d() { gcc-lang-supported d || return 1 - use d + huse d } is_f77() { @@ -2376,27 +2381,26 @@ is_fortran() { is_gcj() { gcc-lang-supported java || return 1 - ! use nocxx && use gcj + ! use nocxx && huse gcj } is_go() { gcc-lang-supported go || return 1 - ! use nocxx && use go + ! use nocxx && huse go } is_libffi() { - has libffi ${IUSE} || return 1 - use libffi + huse libffi } is_objc() { gcc-lang-supported objc || return 1 - use objc + huse objc } is_objcxx() { gcc-lang-supported 'obj-c++' || return 1 - ! use nocxx && use objc++ + ! use nocxx && huse objc++ } is_ada() { |