diff options
author | Gregory M. Tuner <gmt@be-evil.net> | 2014-05-30 18:55:49 -0700 |
---|---|---|
committer | Gregory M. Tuner <gmt@be-evil.net> | 2014-05-30 18:55:49 -0700 |
commit | 910a68af22c0152caee75e5573632539d40baa49 (patch) | |
tree | a112586a8949d37fe4ac2e16d25ba8f86c185ddb /eclass | |
parent | dev-libs/lzo: ununmask: unmasked upstream (diff) | |
download | gmt-910a68af22c0152caee75e5573632539d40baa49.tar.gz gmt-910a68af22c0152caee75e5573632539d40baa49.tar.bz2 gmt-910a68af22c0152caee75e5573632539d40baa49.zip |
eclass/*: deprecate various "best_abi" usages
Signed-off-by: Gregory M. Tuner <gmt@be-evil.net>
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/autotools-multilib.eclass | 4 | ||||
-rw-r--r-- | eclass/clutter-multilib.eclass | 4 | ||||
-rw-r--r-- | eclass/eutils-multilib.eclass | 190 | ||||
-rw-r--r-- | eclass/multilib-build.eclass | 142 | ||||
-rw-r--r-- | eclass/mysql-cmake-multilib.eclass | 8 | ||||
-rw-r--r-- | eclass/qt4-build-multilib.eclass | 3 |
6 files changed, 186 insertions, 165 deletions
diff --git a/eclass/autotools-multilib.eclass b/eclass/autotools-multilib.eclass index cc3ecb8..9531b09 100644 --- a/eclass/autotools-multilib.eclass +++ b/eclass/autotools-multilib.eclass @@ -57,7 +57,7 @@ _autotools-multilib_wrap_autotools_utils_phase_hooks() { ehook_fire autotools-multilib-per-abi-pre_${phase} local rslt=\$? if [[ \${rslt} == 0 ]] ; then - if multilib_is_best_abi ; then + if multilib_is_native_abi ; then ehook_fire autotools-multilib-best-abi-pre_${phase} rslt=\$? fi @@ -68,7 +68,7 @@ _autotools-multilib_wrap_autotools_utils_phase_hooks() { _autotools-multilib-autotools-utils-post_${phase}_wrapper() { debug-print-function \${FUNCNAME} "\$(mg-qm "\$@")" ehook_fire autotools-multilib-per-abi-post_${phase} -u - if multilib_is_best_abi ; then + if multilib_is_native_abi ; then ehook_fire autotools-multilib-best-abi-post_${phase} -u fi } diff --git a/eclass/clutter-multilib.eclass b/eclass/clutter-multilib.eclass index 50aa754..955218b 100644 --- a/eclass/clutter-multilib.eclass +++ b/eclass/clutter-multilib.eclass @@ -80,11 +80,11 @@ clutter-multilib_src_install() { #ehook_fire and emake install if ehook_fire clutter-multilib-per-abi-pre_src_install ; then - if ( ! multilib_is_best_abi ) || ehook_fire clutter-multilib-best-abi-pre_src_install ; then + if ( ! multilib_is_native_abi ) || ehook_fire clutter-multilib-best-abi-pre_src_install ; then emake "${clutter_multilib_install_args[@]}" fi fi - multilib_is_best_abi && ehook_fire clutter-multilib-best-abi-post_src_install -u + multilib_is_native_abi && ehook_fire clutter-multilib-best-abi-post_src_install -u ehook_fire clutter-multilib-per-abi-post_src_install -u # Do multilib magic only when >1 ABI is used. diff --git a/eclass/eutils-multilib.eclass b/eclass/eutils-multilib.eclass index 1e6a1e8..c08d894 100644 --- a/eclass/eutils-multilib.eclass +++ b/eclass/eutils-multilib.eclass @@ -54,199 +54,85 @@ abi_arch_usex() { # @FUNCTION: use_with_best_abi # @USAGE: <USEFLAG> [<flagname> [value]] # @DESCRIPTION: -# Like use_with, except that if (! multilib_is_best_abi), the use-flag test -# is treated as if it were negative (regardless of whether the flag -# is prefixed with an exclamation-point). +# Deprecated clone of multilib_native_use_with use_with_best_abi() { - [[ -z "$1" ]] && die "use_with_bestabi() called without a parameter." - - # ___eapi_use_enable_and_use_with_support_empty_third_argument - if [[ ! ${EAPI:-0} =~ ^(0|1|2|3)$ ]] ; then - local UW_SUFFIX=${3+=$3} - else - local UW_SUFFIX=${3:+=$3} - fi - local UWORD=${2:-$1} - - if multilib_is_best_abi && use $1 ; then - echo "--with-${UWORD}${UW_SUFFIX}" - else - echo "--without-${UWORD}" - fi - return 0 + eqawarn "QA warning: use_with_best_abi is deprecated" >&2 + eqawarn "use multilib_native_use_with instead" >&2 + + multilib_native_use_with "$@" } # @FUNCTION: use_with_non_best_abi # @USAGE: <USEFLAG> [<flagname> [value]] # @DESCRIPTION: -# Like use_with, except that if multilib_is_best_abi, the use-flag test -# is treated as if it were negative (regardless of whether the flag -# is prefixed with an exclamation-point). +# Deprecated clone of multilib_non_native_use_with use_with_non_best_abi() { - [[ -z "$1" ]] && die "use_with_bestabi() called without a parameter." - - # ___eapi_use_enable_and_use_with_support_empty_third_argument - if [[ ! ${EAPI:-0} =~ ^(0|1|2|3)$ ]] ; then - local UW_SUFFIX=${3+=$3} - else - local UW_SUFFIX=${3:+=$3} - fi - local UWORD=${2:-$1} - - if multilib_is_best_abi || ( ! use $1 ) ; then - echo "--without-${UWORD}" - else - echo "--with-${UWORD}${UW_SUFFIX}" - fi - return 0 + eqawarn "QA warning: use_with_non_best_abi is deprecated" >&2 + eqawarn "use multilib_non_native_use_with instead" >&2 + + multilib_non_native_use_with "$@" } # @FUNCTION: use_enable_best_abi # @USAGE: <USEFLAG> [<flagname> [value]] # @DESCRIPTION: -# Like use_enable, except that if (! multilib_is_best_abi), the use-flag test -# is treated as if it were negative (regardless of whether the flag -# is prefixed with an exclamation-point). +# Deprecated clone of multilib_native_use_enable use_enable_best_abi() { - [[ -z "$1" ]] && die "use_enable_bestabi() called without a parameter." - - # ___eapi_use_enable_and_use_with_support_empty_third_argument - if [[ ! ${EAPI:-0} =~ ^(0|1|2|3)$ ]] ; then - local UE_SUFFIX=${3+=$3} - else - local UE_SUFFIX=${3:+=$3} - fi - local UWORD=${2:-$1} - - if multilib_is_best_abi && use $1 ; then - echo "--enable-${UWORD}${UE_SUFFIX}" - else - echo "--disable-${UWORD}" - fi - return 0 + eqawarn "QA warning: use_enable_best_abi is deprecated" >&2 + eqawarn "use multilib_native_use_enable instead" >&2 + + multilib_native_use_enable "$@" } # @FUNCTION: use_enable_non_best_abi # @USAGE: <USEFLAG> [<flagname> [value]] # @DESCRIPTION: -# Like use_enable, except that if multilib_is_best_abi, the use-flag test -# is treated as if it were negative (regardless of whether the flag -# is prefixed with an exclamation-point). +# Deprecated clone of multilib_non_native_use_Enable use_enable_non_best_abi() { - [[ -z "$1" ]] && die "use_enable_bestabi() called without a parameter." - - # ___eapi_use_enable_and_use_with_support_empty_third_argument - if [[ ! ${EAPI:-0} =~ ^(0|1|2|3)$ ]] ; then - local UE_SUFFIX=${3+=$3} - else - local UE_SUFFIX=${3:+=$3} - fi - local UWORD=${2:-$1} - - if multilib_is_best_abi || ( ! use $1 ); then - echo "--disable-${UWORD}" - else - echo "--enable-${UWORD}${UE_SUFFIX}" - fi - return 0 + eqawarn "QA warning: use_enable_non_best_abi is deprecated" >&2 + eqawarn "use multilib_non_native_use_enable instead" >&2 + + multilib_non_native_use_enable "$@" } # @FUNCTION: best_abi_enable # @USAGE: <flagname> [<value>] # @DESCRIPTION: -# Returns (via standard output) either --enable-flagname (or --enable-flagname=value -# if a second argument is provided), if multilib_is_best_abi, or --disable-flagname, -# if (! multilib_is_best_abi). +# Deprecated clone of multilib_native_enable best_abi_enable() { - [[ -z "$1" ]] && die "best_abi_enable called without a parameter." - - # ___eapi_use_enable_and_use_with_support_empty_third_argument - if [[ ! ${EAPI:-0} =~ ^(0|1|2|3)$ ]] ; then - local BE_SUFFIX=${2+=$2} - else - local BE_SUFFIX=${2:+=$2} - fi - local BWORD=${1} - - if multilib_is_best_abi ; then - echo "--enable-${BWORD}${BE_SUFFIX}" - else - echo "--disable-${BWORD}" - fi - return 0 + eqawarn "QA warning: best_abi_enable is deprecated" >&2 + eqawarn "use multilib_native_enable instead" >&2 + + multilib_native_enable "${@}" } # @FUNCTION: best_abi_with # @USAGE: <flagname> [<value>] # @DESCRIPTION: -# Returns (via standard output) either --with-flagname (or --with-flagname=value -# if a second argument is provided), if multilib_is_best_abi, or --without-flagname, -# if (! multilib_is_best_abi). +# Deprecated clone of multilib_native_with best_abi_with() { - [[ -z "$1" ]] && die "best_abi_with called without a parameter." - - # ___eapi_use_enable_and_use_with_support_empty_third_argument - if [[ ! ${EAPI:-0} =~ ^(0|1|2|3)$ ]] ; then - local BW_SUFFIX=${2+=$2} - else - local BW_SUFFIX=${2:+=$2} - fi - local BWORD=${1} - - if multilib_is_best_abi ; then - echo "--with-${BWORD}${BW_SUFFIX}" - else - echo "--without-${BWORD}" - fi - return 0 + eqawarn "QA warning: best_abi_with is deprecated" >&2 + eqawarn "use multilib_native_with instead" >&2 + + multilib_native_with "${@}" } # @FUNCTION: non_best_abi_enable # @USAGE: <flagname> [<value>] # @DESCRIPTION: -# Returns (via standard output) either --enable-flagname (or --enable-flagname=value -# if a second argument is provided), if (! multilib_is_best_abi), or -# --disable-flagname, if multilib_is_best_abi. non_best_abi_enable() { - [[ -z "$1" ]] && die "non_best_abi_enable called without a parameter." - - # ___eapi_use_enable_and_use_with_support_empty_third_argument - if [[ ! ${EAPI:-0} =~ ^(0|1|2|3)$ ]] ; then - local BE_SUFFIX=${2+=$2} - else - local BE_SUFFIX=${2:+=$2} - fi - local BWORD=${1} - - if multilib_is_best_abi ; then - echo "--disable-${BWORD}" - else - echo "--enable-${BWORD}${BE_SUFFIX}" - fi - return 0 + eqawarn "QA warning: best_abi_enable is deprecated" >&2 + eqawarn "use multilib_native_enable instead" >&2 + + multilib_non_native_enable "${@}" } # @FUNCTION: non_best_abi_with # @USAGE: <flagname> [<value>] # @DESCRIPTION: -# Returns (via standard output) either --with-flagname (or --with-flagname=value -# if a second argument is provided), if (! multilib_is_best_abi), or -# --without-flagname, if multilib_is_best_abi. non_best_abi_with() { - [[ -z "$1" ]] && die "non_best_abi_with called without a parameter." - - # ___eapi_use_enable_and_use_with_support_empty_third_argument - if [[ ! ${EAPI:-0} =~ ^(0|1|2|3)$ ]] ; then - local BW_SUFFIX=${2+=$2} - else - local BW_SUFFIX=${2:+=$2} - fi - local BWORD=${1} - - if multilib_is_best_abi ; then - echo "--without-${BWORD}" - else - echo "--with-${BWORD}${BW_SUFFIX}" - fi - return 0 + eqawarn "QA warning: best_abi_with is deprecated" >&2 + eqawarn "use multilib_native_with instead" >&2 + + multilib_non_native_with "${@}" } diff --git a/eclass/multilib-build.eclass b/eclass/multilib-build.eclass index 290b3be..ff2d212 100644 --- a/eclass/multilib-build.eclass +++ b/eclass/multilib-build.eclass @@ -1141,13 +1141,28 @@ multilib_native_use_with() { fi } +# @FUNCTION: multilib_non_native_use_with +# @USAGE: <flag> [<opt-name> [<opt-value>]] +# @DESCRIPTION: +# Output --with configure option like use_with if USE <flag> is enabled +# and multilib_is_native_abi is false. +# Otherwise, outputs --without configure option. Arguments are the same +# as for use_with in the EAPI. +multilib_non_native_use_with() { + if multilib_is_native_abi; then + echo "--without-${2:-${1}}" + else + use_with "${@}" + fi +} + # @FUNCTION: multilib_native_use_enable # @USAGE: <flag> [<opt-name> [<opt-value>]] # @DESCRIPTION: -# Output --enable configure option alike use_with if USE <flag> -# is enabled and executables are being built (multilib_is_native_abi -# is true). Otherwise, outputs --disable configure option. Arguments are -# the same as for use_enable in the EAPI. +# Output --enable configure option like use_enable if USE <flag> +# is enabled multilib_is_native_abi is true. Otherwise, outputs +# --disable configure option. Arguments are the same as for +# use_enable in the EAPI. multilib_native_use_enable() { if multilib_is_native_abi; then use_enable "${@}" @@ -1156,6 +1171,21 @@ multilib_native_use_enable() { fi } +# @FUNCTION: multilib_non_native_use_enable +# @USAGE: <flag> [<opt-name> [<opt-value>]] +# @DESCRIPTION: +# Output --enable configure option like use_enable if USE <flag> +# is enabled and multilib_is_native_abi is false. +# Otherwise, outputs --disable configure option. Arguments are +# the same as for use_enable in the EAPI. +multilib_non_native_use_enable() { + if multilib_is_native_abi; then + echo "--disable-${2:-${1}}" + else + use_enable "${@}" + fi +} + # @FUNCTION: multilib_native_usex # @USAGE: <flag> [<true1> [<false1> [<true2> [<false2>]]]] # @DESCRIPTION: @@ -1174,6 +1204,110 @@ multilib_native_usex() { fi } +# @FUNCTION: multilib_native_enable +# @USAGE: <flagname> [<value>] +# @DESCRIPTION: +# When multilib_is_native_abi is true, returns (via standard output) "--enable-flagname" +# (or "--enable-flagname=value", when the second argument is provided); when multilib_is_native_abi +# is false, the second argument is ignored and the output is always "--disable-flagname". +# An analogue of use_enable, but lacking use_with's first argument -- instead of testing a +# provided use-flag, it instead tests multilib_is_native_abi. +multilib_native_enable() { + [[ -z "$1" ]] && die "multilib_native_enable called without a parameter." + + # ___eapi_use_enable_and_use_with_support_empty_third_argument + if [[ ! ${EAPI:-0} =~ ^(0|1|2|3)$ ]] ; then + local BW_SUFFIX=${2+=$2} + else + local BW_SUFFIX=${2:+=$2} + fi + + if multilib_is_native_abi ; then + echo "--enable-${1}${BW_SUFFIX}" + else + echo "--disable-${1}" + fi + return 0 +} + +# @FUNCTION: multilib_native_with +# @USAGE: <flagname> [<value>] +# @DESCRIPTION: +# When multilib_is_native_abi is true, returns (via standard output) "--with-flagname" +# (or "--with-flagname=value", when the second argument is provided); when multilib_is_native_abi +# is false, the second argument is ignored and the output is always "--without-flagname". +# An analogue of use_with, but lacking use_with's first argument -- instead of testing a +# provided use-flag, it instead tests multilib_is_native_abi. +multilib_native_with() { + [ -z "$1" ]] && die "best_abi_with called without a parameter." + + # ___eapi_use_enable_and_use_with_support_empty_third_argument + if [[ ! ${EAPI:-0} =~ ^(0|1|2|3)$ ]] ; then + local BW_SUFFIX=${2+=$2} + else + local BW_SUFFIX=${2:+=$2} + fi + + if multilib_is_native_abi ; then + echo "--with-${1}${BW_SUFFIX}" + else + echo "--without-${1}" + fi + return 0 +} + +# @FUNCTION: multilib_non_native_enable +# @USAGE: <flagname> [<value>] +# @DESCRIPTION: +# When multilib_is_native_abi is false, returns (via standard output) "--enable-flagname" +# (or "--enable-flagname=value", when the second argument is provided); when multilib_is_native_abi +# is true, the second argument is ignored and the output is always "--disable-flagname". +# An analogue of use_enable, but lacking use_with's first argument -- instead of testing a +# provided use-flag, it instead tests the logical negation of multilib_is_native_abi. +multilib_non_native_enable() { + [[ -z "$1" ]] && die "non_best_abi_enable called without a parameter." + + # ___eapi_use_enable_and_use_with_support_empty_third_argument + if [[ ! ${EAPI:-0} =~ ^(0|1|2|3)$ ]] ; then + local BW_SUFFIX=${2+=$2} + else + local BW_SUFFIX=${2:+=$2} + fi + + if multilib_is_native_abi ; then + echo "--disable-${1}" + else + echo "--enable-${1}${BW_SUFFIX}" + fi + return 0 +} + +# @FUNCTION: multilib_non_native_with +# @USAGE: <flagname> [<value>] +# @DESCRIPTION: +# When multilib_is_native_abi is false, returns (via standard output) "--with-flagname" +# (or "--with-flagname=value", when the second argument is provided); when multilib_is_native_abi +# is true, the second argument is ignored and the output is always "--without-flagname". +# An analogue of use_with, but lacking use_with's first argument -- instead of testing a +# provided use-flag, it instead tests the logical negation of multilib_is_native_abi. +multilib_non_native_with() { + [[ -z "$1" ]] && die "best_abi_with called without a parameter." + + # ___eapi_use_enable_and_use_with_support_empty_third_argument + if [[ ! ${EAPI:-0} =~ ^(0|1|2|3)$ ]] ; then + local BW_SUFFIX=${2+=$2} + else + local BW_SUFFIX=${2:+=$2} + fi + + if multilib_is_native_abi ; then + echo "--without-${1}" + else + echo "--with-${1}${BW_SUFFIX}" + fi + return 0 +} + # @FUNCTION: abi_arch_use # @USAGE: <[!]pseudo-flag> # @RETURN: True (zero) if the pseudo-use-flag test is positive, similar to use helper. diff --git a/eclass/mysql-cmake-multilib.eclass b/eclass/mysql-cmake-multilib.eclass index 748583d..a58d73c 100644 --- a/eclass/mysql-cmake-multilib.eclass +++ b/eclass/mysql-cmake-multilib.eclass @@ -254,7 +254,7 @@ mysql-cmake-multilib_src_configure() { mysql_cmake_abi_pre_configure() { debug-print-function ${FUNCNAME} "$@" - if multilib_is_best_abi && use '!minimal' ; then + if multilib_is_native_abi && use '!minimal' ; then configure_cmake_standard else configure_cmake_minimal @@ -343,7 +343,7 @@ _mysql-cmake-post-src_install_perabi() { debug-print-function ${FUNCTION} "$@" # Minimal builds don't have the MySQL server - if multilib_is_best_abi && use '!minimal' ; then + if multilib_is_native_abi && use '!minimal' ; then einfo "Creating initial directories" # Empty directories ... diropts "-m0750" @@ -376,8 +376,8 @@ _mysql-cmake-post-src_install_perabi() { done fi - cat <<-EOF > "${T}"/80mysql-libdir$(multilib_is_best_abi || echo "-${ABI}") + cat <<-EOF > "${T}"/80mysql-libdir$(multilib_is_native_abi || echo "-${ABI}") LDPATH="${EPREFIX}/usr/$(get_libdir)/mysql" EOF - doenvd "${T}"/80mysql-libdir$(multilib_is_best_abi || echo "-${ABI}") + doenvd "${T}"/80mysql-libdir$(multilib_is_native_abi || echo "-${ABI}") } diff --git a/eclass/qt4-build-multilib.eclass b/eclass/qt4-build-multilib.eclass index 16e7b87..e14e05f 100644 --- a/eclass/qt4-build-multilib.eclass +++ b/eclass/qt4-build-multilib.eclass @@ -57,9 +57,10 @@ qt4-build-multilib_src_unpack() { # by implementing a hook-adapter for the per-abi ehooks _qt4-build-multilib_best_abi_hook_demux() { local hookname="${1/-per-abi-/-best-abi-}" - multilib_is_best_abi && { ehook-fire "${hookname}" ; return $? ; } + multilib_is_native_abi && { ehook-fire "${hookname}" ; return $? ; } return 0 } + if [[ ${_QT4_BUILD_MULTILIB_HOOK_DEMUX_REGISTERED} ]] ; then for _qwerpoiuqwerpoiu in qt4-build-multilib-per-abi-{pre,post}_src_{prepare,configure,compile,test,install} ; do ehook ${_qwerpoiuqwerpoiu} _qt4-build-multilib_best_abi_hook_demux |