diff options
-rw-r--r-- | dev-php/xdebug/metadata.xml | 3 | ||||
-rw-r--r-- | eclass/distutils-r1.eclass | 12 | ||||
-rw-r--r-- | eclass/python-utils-r1.eclass | 42 |
3 files changed, 50 insertions, 7 deletions
diff --git a/dev-php/xdebug/metadata.xml b/dev-php/xdebug/metadata.xml index 222c77f3742a..8bdfa70e6be3 100644 --- a/dev-php/xdebug/metadata.xml +++ b/dev-php/xdebug/metadata.xml @@ -5,4 +5,7 @@ <email>php-bugs@gentoo.org</email> <name>PHP</name> </maintainer> + <upstream> + <remote-id type="github">xdebug/xdebug</remote-id> + </upstream> </pkgmetadata> diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass index cdd57149720d..f0059d2756bf 100644 --- a/eclass/distutils-r1.eclass +++ b/eclass/distutils-r1.eclass @@ -424,11 +424,9 @@ distutils_enable_sphinx() { python_check_deps() { use doc || return 0 - local hasv_args=( -b ) - [[ ${EAPI} == 6 ]] && hasv_args=( --host-root ) local p for p in dev-python/sphinx "${_DISTUTILS_SPHINX_PLUGINS[@]}"; do - has_version "${hasv_args[@]}" "${p}[${PYTHON_USEDEP}]" || + python_has_version "${p}[${PYTHON_USEDEP}]" || return 1 done } @@ -990,18 +988,18 @@ _distutils-r1_get_backend() { } # @FUNCTION: distutils_pep517_install -# @USAGE: [<root>] +# @USAGE: <root> # @DESCRIPTION: # Build the wheel for the package in the current directory using PEP 517 -# backend and install it into <root>. If <root> is not specified, -# ${BUILD_DIR}/install is used. +# backend and install it into <root>. # # This function is intended for expert use only. It does not handle # wrapping executables. distutils_pep517_install() { debug-print-function ${FUNCNAME} "${@}" + [[ ${#} -eq 1 ]] || die "${FUNCNAME} takes exactly one argument: root" - local root=${1:-${BUILD_DIR}/install} + local root=${1} local -x WHEEL_BUILD_DIR=${BUILD_DIR}/wheel mkdir -p "${WHEEL_BUILD_DIR}" || die diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass index 204392e08da4..5f8c49298090 100644 --- a/eclass/python-utils-r1.eclass +++ b/eclass/python-utils-r1.eclass @@ -1397,5 +1397,47 @@ _python_run_check_deps() { eend ${?} } +# @FUNCTION: python_has_version +# @USAGE: [-b|-d|-r] <atom>... +# @DESCRIPTION: +# A convenience wrapper for has_version() with verbose output and better +# defaults for use in python_check_deps(). +# +# The wrapper accepts EAPI 7+-style -b/-d/-r options to indicate +# the root to perform the lookup on. Unlike has_version, the default +# is -b. In EAPI 6, -b and -d are translated to --host-root +# for compatibility. +# +# The wrapper accepts multiple package specifications. For the check +# to succeed, *all* specified atoms must match. +python_has_version() { + debug-print-function ${FUNCNAME} "${@}" + + local root_arg=( -b ) + case ${1} in + -b|-d|-r) + root_arg=( "${1}" ) + shift + ;; + esac + + if [[ ${EAPI} == 6 ]]; then + if [[ ${root_arg} == -r ]]; then + root_arg=() + else + root_arg=( --host-root ) + fi + fi + + local pkg + for pkg; do + ebegin " ${pkg}" + has_version "${root_arg[@]}" "${pkg}" + eend ${?} || return + done + + return 0 +} + _PYTHON_UTILS_R1=1 fi |