commit: 5a8c47c59332c1a7d63cca6878575b61ea22773f Author: Davide Pesavento <pesa <AT> gentoo <DOT> org> AuthorDate: Sun Jun 22 18:26:46 2014 +0000 Commit: Davide Pesavento <pesa <AT> gentoo <DOT> org> CommitDate: Sun Jun 22 18:26:46 2014 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/qt.git;a=commit;h=5a8c47c5
[qt4-build-multilib] Provide qt_native_use() convenience function. --- eclass/qt4-build-multilib.eclass | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/eclass/qt4-build-multilib.eclass b/eclass/qt4-build-multilib.eclass index efa501c..c4a5562 100644 --- a/eclass/qt4-build-multilib.eclass +++ b/eclass/qt4-build-multilib.eclass @@ -470,14 +470,24 @@ qt4-build-multilib_pkg_postrm() { # @FUNCTION: qt_use # @USAGE: <flag> [feature] [enableval] # @DESCRIPTION: -# This will echo "-${enableval}-${feature}" if <flag> is enabled, or -# "-no-${feature}" if it's disabled. If [feature] is not specified, -# <flag> will be used for that. If [enableval] is not specified, the -# "-${enableval}" prefix is omitted. +# Outputs "-${enableval}-${feature}" if <flag> is enabled, "-no-${feature}" +# otherwise. If [feature] is not specified, <flag> is used in its place. +# If [enableval] is not specified, the "-${enableval}" prefix is omitted. qt_use() { use "$1" && echo "${3:+-$3}-${2:-$1}" || echo "-no-${2:-$1}" } +# @FUNCTION: qt_native_use +# @USAGE: <flag> [feature] [enableval] +# @DESCRIPTION: +# Outputs "-${enableval}-${feature}" if <flag> is enabled and we are currently +# building for the native ABI, "-no-${feature}" otherwise. If [feature] is not +# specified, <flag> is used in its place. If [enableval] is not specified, +# the "-${enableval}" prefix is omitted. +qt_native_use() { + multilib_is_native_abi && use "$1" && echo "${3:+-$3}-${2:-$1}" || echo "-no-${2:-$1}" +} + ###### Internal functions ######