From 1fffcf4be92b88a8d317285fb970c6f78b506677 Mon Sep 17 00:00:00 2001 From: Joonas Niilola Date: Sat, 7 Dec 2019 16:21:50 +0200 Subject: x11-misc/xtrace: remove inactive proxy-maintainer Signed-off-by: Joonas Niilola --- x11-misc/xtrace/metadata.xml | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/x11-misc/xtrace/metadata.xml b/x11-misc/xtrace/metadata.xml index 91b9837c7dda..867145a2f0fb 100644 --- a/x11-misc/xtrace/metadata.xml +++ b/x11-misc/xtrace/metadata.xml @@ -1,16 +1,8 @@ - - nightnord@gmail.com - Andrian Nord - - - maksbotan@gentoo.org - Maxim Koltsov - - - proxy-maint@gentoo.org - Proxy Maintainers - + + maksbotan@gentoo.org + Maxim Koltsov + -- cgit v1.2.3-65-gdbad From 0f936ec81f1dc20fa58ba40bc17989ee44810214 Mon Sep 17 00:00:00 2001 From: Michał Górny Date: Wed, 27 Nov 2019 10:25:41 +0100 Subject: skel.ebuild: Reorder S after SRC_URI MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Update the skel variable order to place S immediately after SRC_URI. This seems to be a growing trend, and is quite reasonable given that S usually matches the archive name, and e.g. if SRC_URI uses MY_P, then S usually uses it as well: SRC_URI="http://example.com/${MY_P}.tar.gz" S=${WORKDIR}/${MY_P} Signed-off-by: Michał Górny --- skel.ebuild | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/skel.ebuild b/skel.ebuild index 9c9e6b366eb9..6e855e8fa6cc 100644 --- a/skel.ebuild +++ b/skel.ebuild @@ -32,6 +32,12 @@ HOMEPAGE="https://foo.example.org/" # Portage. SRC_URI="ftp://foo.example.org/${P}.tar.gz" +# Source directory; the dir where the sources can be found (automatically +# unpacked) inside ${WORKDIR}. The default value for S is ${WORKDIR}/${P} +# If you don't need to change it, leave the S= line out of the ebuild +# to keep it tidy. +#S="${WORKDIR}/${P}" + # License of the package. This must match the name of file(s) in the # licenses/ directory. For complex license combination see the developer @@ -99,13 +105,6 @@ IUSE="gnome X" #BDEPEND="virtual/pkgconfig" -# Source directory; the dir where the sources can be found (automatically -# unpacked) inside ${WORKDIR}. The default value for S is ${WORKDIR}/${P} -# If you don't need to change it, leave the S= line out of the ebuild -# to keep it tidy. -#S="${WORKDIR}/${P}" - - # The following src_configure function is implemented as default by portage, so # you only need to call it if you need a different behaviour. #src_configure() { -- cgit v1.2.3-65-gdbad From f981af79945e28a40dab2b5196329f7835afe78b Mon Sep 17 00:00:00 2001 From: Michał Górny Date: Thu, 28 Nov 2019 14:33:36 +0100 Subject: git-r3.eclass: Explicitly disable password prompts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes: https://bugs.gentoo.org/701276 Signed-off-by: Michał Górny --- eclass/git-r3.eclass | 3 +++ 1 file changed, 3 insertions(+) diff --git a/eclass/git-r3.eclass b/eclass/git-r3.eclass index b1c7f7f43abc..e0d2bbb5edc0 100644 --- a/eclass/git-r3.eclass +++ b/eclass/git-r3.eclass @@ -556,6 +556,9 @@ _git-r3_is_local_repo() { git-r3_fetch() { debug-print-function ${FUNCNAME} "$@" + # disable password prompts, https://bugs.gentoo.org/701276 + local -x GIT_TERMINAL_PROMPT=0 + # process repos first since we create repo_name from it local repos if [[ ${1} ]]; then -- cgit v1.2.3-65-gdbad From 26467bacc4d873a6d9ad43ef61e8adc3927c6090 Mon Sep 17 00:00:00 2001 From: Michał Górny Date: Fri, 29 Nov 2019 11:20:33 +0100 Subject: python*-r1.eclass: Deprecate python_gen_usedep MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Deprecate python_gen_usedep() in favor of python_gen_cond_dep(). The latter is a newer API that generates full USE-conditional blocks rather than pure USE-dependency strings. As such, it can replace all uses of the former, and is safer to use in general. In particular: dev-python/foo[$(python_gen_usedep -2)] dev-python/bar[$(python_gen_usedep -2)] installs the dependency (with no implementation match enforced) even if there's no python2 implementation enabled, while: $(python_gen_cond_dep ' dev-python/foo[${PYTHON_USEDEP}] dev-python/bar[${PYTHON_USEDEP}] ' -2) installs it only if there's at least one implementation requiring it. Since the functions are used in global scope only, a deprecation warning is emitted only once, during the sourcing for pkg_setup phase. This avoids having it output during metadata cache regeneration. Signed-off-by: Michał Górny --- eclass/python-r1.eclass | 61 +++++++++++++++++++++++++++++++----------- eclass/python-single-r1.eclass | 61 +++++++++++++++++++++++++++++++----------- 2 files changed, 90 insertions(+), 32 deletions(-) diff --git a/eclass/python-r1.eclass b/eclass/python-r1.eclass index 335ae9fe6370..ea4d1e3d4e41 100644 --- a/eclass/python-r1.eclass +++ b/eclass/python-r1.eclass @@ -276,9 +276,47 @@ _python_validate_useflags() { die "No supported Python implementation in PYTHON_TARGETS." } +# @FUNCTION: _python_gen_usedep +# @INTERNAL +# @USAGE: [...] +# @DESCRIPTION: +# Output a USE dependency string for Python implementations which +# are both in PYTHON_COMPAT and match any of the patterns passed +# as parameters to the function. +# +# The patterns can be either fnmatch-style patterns (matched via bash +# == operator against PYTHON_COMPAT values) or '-2' / '-3' to indicate +# appropriately all enabled Python 2/3 implementations (alike +# python_is_python3). Remember to escape or quote the fnmatch patterns +# to prevent accidental shell filename expansion. +# +# This is an internal function used to implement python_gen_cond_dep +# and deprecated python_gen_usedep. +_python_gen_usedep() { + debug-print-function ${FUNCNAME} "${@}" + + local impl matches=() + + for impl in "${_PYTHON_SUPPORTED_IMPLS[@]}"; do + if _python_impl_matches "${impl}" "${@}"; then + matches+=( + "python_targets_${impl}(-)?" + "-python_single_target_${impl}(-)" + ) + fi + done + + [[ ${matches[@]} ]] || die "No supported implementations match python_gen_usedep patterns: ${@}" + + local out=${matches[@]} + echo "${out// /,}" +} + # @FUNCTION: python_gen_usedep # @USAGE: [...] # @DESCRIPTION: +# DEPRECATED. Please use python_gen_cond_dep instead. +# # Output a USE dependency string for Python implementations which # are both in PYTHON_COMPAT and match any of the patterns passed # as parameters to the function. @@ -306,21 +344,12 @@ _python_validate_useflags() { python_gen_usedep() { debug-print-function ${FUNCNAME} "${@}" - local impl matches=() - - for impl in "${_PYTHON_SUPPORTED_IMPLS[@]}"; do - if _python_impl_matches "${impl}" "${@}"; then - matches+=( - "python_targets_${impl}(-)?" - "-python_single_target_${impl}(-)" - ) - fi - done - - [[ ${matches[@]} ]] || die "No supported implementations match python_gen_usedep patterns: ${@}" - - local out=${matches[@]} - echo "${out// /,}" + # output only once, during some reasonable phase + # (avoid spamming cache regen runs) + if [[ ${EBUILD_PHASE} == setup ]]; then + eqawarn "python_gen_usedep() is deprecated. Please use python_gen_cond_dep instead." + fi + _python_gen_usedep "${@}" } # @FUNCTION: python_gen_useflags @@ -405,7 +434,7 @@ python_gen_cond_dep() { # (since python_gen_usedep() will not return ${PYTHON_USEDEP} # the code is run at most once) if [[ ${dep} == *'${PYTHON_USEDEP}'* ]]; then - local usedep=$(python_gen_usedep "${@}") + local usedep=$(_python_gen_usedep "${@}") dep=${dep//\$\{PYTHON_USEDEP\}/${usedep}} fi diff --git a/eclass/python-single-r1.eclass b/eclass/python-single-r1.eclass index 8ac17b7815e2..47176f79e6ad 100644 --- a/eclass/python-single-r1.eclass +++ b/eclass/python-single-r1.eclass @@ -265,9 +265,47 @@ unset -f _python_single_set_globals if [[ ! ${_PYTHON_SINGLE_R1} ]]; then +# @FUNCTION: _python_gen_usedep +# @INTERNAL +# @USAGE: [...] +# @DESCRIPTION: +# Output a USE dependency string for Python implementations which +# are both in PYTHON_COMPAT and match any of the patterns passed +# as parameters to the function. +# +# The patterns can be either fnmatch-style patterns (matched via bash +# == operator against PYTHON_COMPAT values) or '-2' / '-3' to indicate +# appropriately all enabled Python 2/3 implementations (alike +# python_is_python3). Remember to escape or quote the fnmatch patterns +# to prevent accidental shell filename expansion. +# +# This is an internal function used to implement python_gen_cond_dep +# and deprecated python_gen_usedep. +_python_gen_usedep() { + debug-print-function ${FUNCNAME} "${@}" + + local impl matches=() + + for impl in "${_PYTHON_SUPPORTED_IMPLS[@]}"; do + if _python_impl_matches "${impl}" "${@}"; then + matches+=( + "python_targets_${impl}(-)?" + "python_single_target_${impl}(+)?" + ) + fi + done + + [[ ${matches[@]} ]] || die "No supported implementations match python_gen_usedep patterns: ${@}" + + local out=${matches[@]} + echo "${out// /,}" +} + # @FUNCTION: python_gen_usedep # @USAGE: [...] # @DESCRIPTION: +# DEPRECATED. Please use python_gen_cond_dep instead. +# # Output a USE dependency string for Python implementations which # are both in PYTHON_COMPAT and match any of the patterns passed # as parameters to the function. @@ -295,21 +333,12 @@ if [[ ! ${_PYTHON_SINGLE_R1} ]]; then python_gen_usedep() { debug-print-function ${FUNCNAME} "${@}" - local impl matches=() - - for impl in "${_PYTHON_SUPPORTED_IMPLS[@]}"; do - if _python_impl_matches "${impl}" "${@}"; then - matches+=( - "python_targets_${impl}(-)?" - "python_single_target_${impl}(+)?" - ) - fi - done - - [[ ${matches[@]} ]] || die "No supported implementations match python_gen_usedep patterns: ${@}" - - local out=${matches[@]} - echo "${out// /,}" + # output only once, during some reasonable phase + # (avoid spamming cache regen runs) + if [[ ${EBUILD_PHASE} == setup ]]; then + eqawarn "python_gen_usedep() is deprecated. Please use python_gen_cond_dep instead." + fi + _python_gen_usedep "${@}" } # @FUNCTION: python_gen_useflags @@ -407,7 +436,7 @@ python_gen_cond_dep() { # (since python_gen_usedep() will not return ${PYTHON_USEDEP} # the code is run at most once) if [[ ${dep} == *'${PYTHON_USEDEP}'* ]]; then - local usedep=$(python_gen_usedep "${@}") + local usedep=$(_python_gen_usedep "${@}") dep=${dep//\$\{PYTHON_USEDEP\}/${usedep}} fi -- cgit v1.2.3-65-gdbad From 4da21ec689a66fe87ef67476dc6245808f6dde88 Mon Sep 17 00:00:00 2001 From: Michał Górny Date: Fri, 29 Nov 2019 16:03:53 +0100 Subject: python-single-r1.eclass: Restore PYTHON_SINGLE_TARGET for one impl MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Undo the hack that removes PYTHON_SINGLE_TARGET (in favor of plain PYTHON_TARGETS) when the package supports only one target. Instead, output both kinds of flags consistently for all packages, and use IUSE defaults to enable them when only one interpreter is supported. This should give similar end results without creating unnecessary differences between ebuilds with one and multiple implementations. It will make future API changes easier, as well as simplify tooling used to detect eclass type. Signed-off-by: Michał Górny --- eclass/python-single-r1.eclass | 143 ++++++++++++++--------------------------- 1 file changed, 49 insertions(+), 94 deletions(-) diff --git a/eclass/python-single-r1.eclass b/eclass/python-single-r1.eclass index 47176f79e6ad..7adb136101ad 100644 --- a/eclass/python-single-r1.eclass +++ b/eclass/python-single-r1.eclass @@ -179,47 +179,32 @@ EXPORT_FUNCTIONS pkg_setup _python_single_set_globals() { _python_set_impls - local i PYTHON_PKG_DEP - local flags_mt=( "${_PYTHON_SUPPORTED_IMPLS[@]/#/python_targets_}" ) local flags=( "${_PYTHON_SUPPORTED_IMPLS[@]/#/python_single_target_}" ) local unflags=( "${_PYTHON_UNSUPPORTED_IMPLS[@]/#/-python_single_target_}" ) - local optflags=${flags_mt[@]/%/(-)?},${unflags[@]/%/(-)} - - IUSE="${flags_mt[*]}" - - local deps requse usedep if [[ ${#_PYTHON_SUPPORTED_IMPLS[@]} -eq 1 ]]; then - # There is only one supported implementation; set IUSE and other - # variables without PYTHON_SINGLE_TARGET. - requse=${flags_mt[*]} - python_export "${_PYTHON_SUPPORTED_IMPLS[0]}" PYTHON_PKG_DEP - deps="${flags_mt[*]}? ( ${PYTHON_PKG_DEP} ) " - # Force on the python_single_target_* flag for this impl, so - # that any dependencies that inherit python-single-r1 and - # happen to have multiple implementations will still need - # to bound by the implementation used by this package. - optflags+=,${flags[0]/%/(+)} + # if only one implementation is supported, use IUSE defaults + # to avoid requesting the user to enable it + IUSE="+${flags_mt[0]} +${flags[0]}" else - # Multiple supported implementations; honor PYTHON_SINGLE_TARGET. - IUSE+=" ${flags[*]}" - requse="^^ ( ${flags[*]} )" - # Ensure deps honor the same python_single_target_* flag as is set - # on this package. - optflags+=,${flags[@]/%/(+)?} - - for i in "${_PYTHON_SUPPORTED_IMPLS[@]}"; do - # The chosen targets need to be in PYTHON_TARGETS as well. - # This is in order to enforce correct dependencies on packages - # supporting multiple implementations. - requse+=" python_single_target_${i}? ( python_targets_${i} )" - - python_export "${i}" PYTHON_PKG_DEP - deps+="python_single_target_${i}? ( ${PYTHON_PKG_DEP} ) " - done + IUSE="${flags_mt[*]} ${flags[*]}" fi - usedep=${optflags// /,} + + local requse="^^ ( ${flags[*]} )" + local optflags="${flags_mt[@]/%/(-)?},${unflags[@]/%/(-)},${flags[@]/%/(+)?}" + local usedep="${optflags// /,}" + + local deps= i PYTHON_PKG_DEP + for i in "${_PYTHON_SUPPORTED_IMPLS[@]}"; do + # The chosen targets need to be in PYTHON_TARGETS as well. + # This is in order to enforce correct dependencies on packages + # supporting multiple implementations. + requse+=" python_single_target_${i}? ( python_targets_${i} )" + + python_export "${i}" PYTHON_PKG_DEP + deps+="python_single_target_${i}? ( ${PYTHON_PKG_DEP} ) " + done # 1) well, python-exec would suffice as an RDEP # but no point in making this overcomplex, BDEP doesn't hurt anyone @@ -367,17 +352,11 @@ python_gen_usedep() { python_gen_useflags() { debug-print-function ${FUNCNAME} "${@}" - local flag_prefix impl matches=() - - if [[ ${#_PYTHON_SUPPORTED_IMPLS[@]} -eq 1 ]]; then - flag_prefix=python_targets - else - flag_prefix=python_single_target - fi + local impl matches=() for impl in "${_PYTHON_SUPPORTED_IMPLS[@]}"; do if _python_impl_matches "${impl}" "${@}"; then - matches+=( "${flag_prefix}_${impl}" ) + matches+=( "python_single_target_${impl}" ) fi done @@ -419,13 +398,7 @@ python_gen_useflags() { python_gen_cond_dep() { debug-print-function ${FUNCNAME} "${@}" - local flag_prefix impl matches=() - - if [[ ${#_PYTHON_SUPPORTED_IMPLS[@]} -eq 1 ]]; then - flag_prefix=python_targets - else - flag_prefix=python_single_target - fi + local impl matches=() local dep=${1} shift @@ -440,7 +413,7 @@ python_gen_cond_dep() { dep=${dep//\$\{PYTHON_USEDEP\}/${usedep}} fi - matches+=( "${flag_prefix}_${impl}? ( ${dep} )" ) + matches+=( "python_single_target_${impl}? ( ${dep} )" ) fi done @@ -484,15 +457,9 @@ python_gen_cond_dep() { python_gen_impl_dep() { debug-print-function ${FUNCNAME} "${@}" - local impl pattern + local impl local matches=() - if [[ ${#_PYTHON_SUPPORTED_IMPLS[@]} -eq 1 ]]; then - flag_prefix=python_targets - else - flag_prefix=python_single_target - fi - local PYTHON_REQ_USE=${1} shift @@ -501,7 +468,7 @@ python_gen_impl_dep() { if _python_impl_matches "${impl}" "${patterns[@]}"; then local PYTHON_PKG_DEP python_export "${impl}" PYTHON_PKG_DEP - matches+=( "${flag_prefix}_${impl}? ( ${PYTHON_PKG_DEP} )" ) + matches+=( "python_single_target_${impl}? ( ${PYTHON_PKG_DEP} )" ) fi done @@ -534,47 +501,35 @@ python_setup() { return fi - if [[ ${#_PYTHON_SUPPORTED_IMPLS[@]} -eq 1 ]]; then - if use "python_targets_${_PYTHON_SUPPORTED_IMPLS[0]}"; then - # Only one supported implementation, enable it explicitly - python_export "${_PYTHON_SUPPORTED_IMPLS[0]}" EPYTHON PYTHON + local impl + for impl in "${_PYTHON_SUPPORTED_IMPLS[@]}"; do + if use "python_single_target_${impl}"; then + if [[ ${EPYTHON} ]]; then + eerror "Your PYTHON_SINGLE_TARGET setting lists more than a single Python" + eerror "implementation. Please set it to just one value. If you need" + eerror "to override the value for a single package, please use package.env" + eerror "or an equivalent solution (man 5 portage)." + echo + die "More than one implementation in PYTHON_SINGLE_TARGET." + fi + + if ! use "python_targets_${impl}"; then + eerror "The implementation chosen as PYTHON_SINGLE_TARGET must be added" + eerror "to PYTHON_TARGETS as well. This is in order to ensure that" + eerror "dependencies are satisfied correctly. We're sorry" + eerror "for the inconvenience." + echo + die "Build target (${impl}) not in PYTHON_TARGETS." + fi + + python_export "${impl}" EPYTHON PYTHON python_wrapper_setup fi - else - local impl - for impl in "${_PYTHON_SUPPORTED_IMPLS[@]}"; do - if use "python_single_target_${impl}"; then - if [[ ${EPYTHON} ]]; then - eerror "Your PYTHON_SINGLE_TARGET setting lists more than a single Python" - eerror "implementation. Please set it to just one value. If you need" - eerror "to override the value for a single package, please use package.env" - eerror "or an equivalent solution (man 5 portage)." - echo - die "More than one implementation in PYTHON_SINGLE_TARGET." - fi - - if ! use "python_targets_${impl}"; then - eerror "The implementation chosen as PYTHON_SINGLE_TARGET must be added" - eerror "to PYTHON_TARGETS as well. This is in order to ensure that" - eerror "dependencies are satisfied correctly. We're sorry" - eerror "for the inconvenience." - echo - die "Build target (${impl}) not in PYTHON_TARGETS." - fi - - python_export "${impl}" EPYTHON PYTHON - python_wrapper_setup - fi - done - fi + done if [[ ! ${EPYTHON} ]]; then eerror "No Python implementation selected for the build. Please set" - if [[ ${#_PYTHON_SUPPORTED_IMPLS[@]} -eq 1 ]]; then - eerror "the PYTHON_TARGETS variable in your make.conf to include one" - else - eerror "the PYTHON_SINGLE_TARGET variable in your make.conf to one" - fi + eerror "the PYTHON_SINGLE_TARGET variable in your make.conf to one" eerror "of the following values:" eerror eerror "${_PYTHON_SUPPORTED_IMPLS[@]}" -- cgit v1.2.3-65-gdbad From 1d5b43ab215e7062d48a581b18f69df4eccb40ac Mon Sep 17 00:00:00 2001 From: Michał Górny Date: Sat, 30 Nov 2019 10:56:38 +0100 Subject: python*r1.eclass: Reliably allow empty s to gen funcs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reliably allow empty pattern lists (equivalent to no restrictions) in all pattern-based generator functions, notably python_gen_cond_dep. Previously, only some of the functions accepted them while others failed via _python_impl_matches function. Signed-off-by: Michał Górny --- eclass/python-r1.eclass | 13 ++++++------- eclass/python-single-r1.eclass | 9 ++++----- eclass/python-utils-r1.eclass | 6 ++++-- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/eclass/python-r1.eclass b/eclass/python-r1.eclass index ea4d1e3d4e41..479c4d08234b 100644 --- a/eclass/python-r1.eclass +++ b/eclass/python-r1.eclass @@ -278,7 +278,7 @@ _python_validate_useflags() { # @FUNCTION: _python_gen_usedep # @INTERNAL -# @USAGE: [...] +# @USAGE: [...] # @DESCRIPTION: # Output a USE dependency string for Python implementations which # are both in PYTHON_COMPAT and match any of the patterns passed @@ -353,7 +353,7 @@ python_gen_usedep() { } # @FUNCTION: python_gen_useflags -# @USAGE: [...] +# @USAGE: [...] # @DESCRIPTION: # Output a list of USE flags for Python implementations which # are both in PYTHON_COMPAT and match any of the patterns passed @@ -390,7 +390,7 @@ python_gen_useflags() { } # @FUNCTION: python_gen_cond_dep -# @USAGE: [...] +# @USAGE: [...] # @DESCRIPTION: # Output a list of -ies made conditional to USE flags # of Python implementations which are both in PYTHON_COMPAT and match @@ -486,9 +486,8 @@ python_gen_impl_dep() { local PYTHON_REQ_USE=${1} shift - local patterns=( "${@-*}" ) for impl in "${_PYTHON_SUPPORTED_IMPLS[@]}"; do - if _python_impl_matches "${impl}" "${patterns[@]}"; then + if _python_impl_matches "${impl}" "${@}"; then local PYTHON_PKG_DEP python_export "${impl}" PYTHON_PKG_DEP matches+=( "python_targets_${impl}? ( ${PYTHON_PKG_DEP} )" ) @@ -566,7 +565,7 @@ python_gen_any_dep() { local i PYTHON_PKG_DEP out= for i in "${_PYTHON_SUPPORTED_IMPLS[@]}"; do - if _python_impl_matches "${i}" "${@-*}"; then + if _python_impl_matches "${i}" "${@}"; then local PYTHON_USEDEP="python_targets_${i}(-),python_single_target_${i}(+)" python_export "${i}" PYTHON_PKG_DEP @@ -763,7 +762,7 @@ python_setup() { fi # check patterns - _python_impl_matches "${impl}" "${@-*}" || continue + _python_impl_matches "${impl}" "${@}" || continue python_export "${impl}" EPYTHON PYTHON diff --git a/eclass/python-single-r1.eclass b/eclass/python-single-r1.eclass index 7adb136101ad..5c6be1c9b11c 100644 --- a/eclass/python-single-r1.eclass +++ b/eclass/python-single-r1.eclass @@ -252,7 +252,7 @@ if [[ ! ${_PYTHON_SINGLE_R1} ]]; then # @FUNCTION: _python_gen_usedep # @INTERNAL -# @USAGE: [...] +# @USAGE: [...] # @DESCRIPTION: # Output a USE dependency string for Python implementations which # are both in PYTHON_COMPAT and match any of the patterns passed @@ -327,7 +327,7 @@ python_gen_usedep() { } # @FUNCTION: python_gen_useflags -# @USAGE: [...] +# @USAGE: [...] # @DESCRIPTION: # Output a list of USE flags for Python implementations which # are both in PYTHON_COMPAT and match any of the patterns passed @@ -364,7 +364,7 @@ python_gen_useflags() { } # @FUNCTION: python_gen_cond_dep -# @USAGE: [...] +# @USAGE: [...] # @DESCRIPTION: # Output a list of -ies made conditional to USE flags # of Python implementations which are both in PYTHON_COMPAT and match @@ -463,9 +463,8 @@ python_gen_impl_dep() { local PYTHON_REQ_USE=${1} shift - local patterns=( "${@-*}" ) for impl in "${_PYTHON_SUPPORTED_IMPLS[@]}"; do - if _python_impl_matches "${impl}" "${patterns[@]}"; then + if _python_impl_matches "${impl}" "${@}"; then local PYTHON_PKG_DEP python_export "${impl}" PYTHON_PKG_DEP matches+=( "python_single_target_${impl}? ( ${PYTHON_PKG_DEP} )" ) diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass index 4f3ac66f2150..3eadc50f93e6 100644 --- a/eclass/python-utils-r1.eclass +++ b/eclass/python-utils-r1.eclass @@ -164,11 +164,12 @@ _python_set_impls() { } # @FUNCTION: _python_impl_matches -# @USAGE: ... +# @USAGE: [...] # @INTERNAL # @DESCRIPTION: # Check whether the specified matches at least one # of the patterns following it. Return 0 if it does, 1 otherwise. +# Matches if no patterns are provided. # # can be in PYTHON_COMPAT or EPYTHON form. The patterns can be # either: @@ -176,7 +177,8 @@ _python_set_impls() { # b) '-2' to indicate all Python 2 variants (= !python_is_python3) # c) '-3' to indicate all Python 3 variants (= python_is_python3) _python_impl_matches() { - [[ ${#} -ge 2 ]] || die "${FUNCNAME}: takes at least 2 parameters" + [[ ${#} -ge 1 ]] || die "${FUNCNAME}: takes at least 1 parameter" + [[ ${#} -eq 1 ]] && return 0 local impl=${1} pattern shift -- cgit v1.2.3-65-gdbad From c6dbe442785be83968c942aa7608bb17fccba555 Mon Sep 17 00:00:00 2001 From: Michał Górny Date: Sat, 30 Nov 2019 11:42:27 +0100 Subject: python*r1.eclass: Remove python-exec:0 leftover MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Michał Górny --- eclass/python-r1.eclass | 6 +----- eclass/python-single-r1.eclass | 6 +----- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/eclass/python-r1.eclass b/eclass/python-r1.eclass index 479c4d08234b..e87b59967cde 100644 --- a/eclass/python-r1.eclass +++ b/eclass/python-r1.eclass @@ -195,11 +195,7 @@ _python_set_globals() { # but no point in making this overcomplex, BDEP doesn't hurt anyone # 2) python-exec should be built with all targets forced anyway # but if new targets were added, we may need to force a rebuild - if [[ ${_PYTHON_WANT_PYTHON_EXEC2} == 0 ]]; then - die "python-exec:0 is no longer supported, please fix your ebuild to work with python-exec:2" - else - deps+=">=dev-lang/python-exec-2:=[${usedep}]" - fi + deps+=">=dev-lang/python-exec-2:=[${usedep}]" if [[ ${PYTHON_DEPS+1} ]]; then # IUSE is magical, so we can't really check it diff --git a/eclass/python-single-r1.eclass b/eclass/python-single-r1.eclass index 5c6be1c9b11c..f42c0fb6197a 100644 --- a/eclass/python-single-r1.eclass +++ b/eclass/python-single-r1.eclass @@ -210,11 +210,7 @@ _python_single_set_globals() { # but no point in making this overcomplex, BDEP doesn't hurt anyone # 2) python-exec should be built with all targets forced anyway # but if new targets were added, we may need to force a rebuild - if [[ ${_PYTHON_WANT_PYTHON_EXEC2} == 0 ]]; then - die "python-exec:0 is no longer supported, please fix your ebuild to work with python-exec:2" - else - deps+=">=dev-lang/python-exec-2:=[${usedep}]" - fi + deps+=">=dev-lang/python-exec-2:=[${usedep}]" if [[ ${PYTHON_DEPS+1} ]]; then if [[ ${PYTHON_DEPS} != "${deps}" ]]; then -- cgit v1.2.3-65-gdbad From 4685a5f4ed0eb025a4fdb5d5b913357ef077b728 Mon Sep 17 00:00:00 2001 From: Michał Górny Date: Fri, 29 Nov 2019 13:13:25 +0100 Subject: python-single-r1.eclass: Introduce PYTHON_{SINGLE,MULTI}_USEDEP API MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Introduce a new API that replaces PYTHON_USEDEP with PYTHON_SINGLE_USEDEP variable and PYTHON_MULTI_USEDEP placeholder. The former can be used directly (or via python_gen_cond_dep) when depending on other python-single-r1 packages, the latter can be used via python_gen_cond_dep when depending on python-r1 packages. Long term, the new API will enable us to remove redundant PYTHON_TARGETS flags from python-single-r1 packages. Signed-off-by: Michał Górny --- eclass/python-single-r1.eclass | 109 +++++++++++++++++++++++++++++++++++------ 1 file changed, 93 insertions(+), 16 deletions(-) diff --git a/eclass/python-single-r1.eclass b/eclass/python-single-r1.eclass index f42c0fb6197a..ad7e39558cf1 100644 --- a/eclass/python-single-r1.eclass +++ b/eclass/python-single-r1.eclass @@ -12,12 +12,17 @@ # @DESCRIPTION: # An extension of the python-r1 eclass suite for packages which # don't support being installed for multiple Python implementations. -# This mostly includes tools embedding Python. +# This mostly includes tools embedding Python and packages using foreign +# build systems. # -# This eclass extends the IUSE and REQUIRED_USE set by python-r1 -# to request the PYTHON_SINGLE_TARGET when the inheriting ebuild -# can be supported by more than one Python implementation. It also -# replaces PYTHON_USEDEP and PYTHON_DEPS with a more suitable form. +# This eclass sets correct IUSE. It also provides PYTHON_DEPS +# and PYTHON_REQUIRED_USE that need to be added to appropriate ebuild +# metadata variables. +# +# The eclass exports PYTHON_SINGLE_USEDEP that is suitable for depending +# on other packages using the eclass. Dependencies on packages using +# python-r1 should be created via python_gen_cond_dep() function, +# using PYTHON_MULTI_USEDEP placeholder. # # Please note that packages support multiple Python implementations # (using python-r1 eclass) can not depend on packages not supporting @@ -136,6 +141,9 @@ EXPORT_FUNCTIONS pkg_setup # @ECLASS-VARIABLE: PYTHON_USEDEP # @DESCRIPTION: +# DEPRECATED. Use PYTHON_SINGLE_USEDEP or python_gen_cond_dep with +# PYTHON_MULTI_USEDEP placeholder instead. +# # This is an eclass-generated USE-dependency string which can be used to # depend on another Python package being built for the same Python # implementations. @@ -154,6 +162,43 @@ EXPORT_FUNCTIONS pkg_setup # python_targets_python2_7(-)?,python_single_target_python3_4(+)? # @CODE +# @ECLASS-VARIABLE: PYTHON_SINGLE_USEDEP +# @DESCRIPTION: +# This is an eclass-generated USE-dependency string which can be used to +# depend on another python-single-r1 package being built for the same +# Python implementations. +# +# If you need to depend on a multi-impl (python-r1) package, use +# python_gen_cond_dep with PYTHON_MULTI_USEDEP placeholder instead. +# +# Example use: +# @CODE +# RDEPEND="dev-python/foo[${PYTHON_SINGLE_USEDEP}]" +# @CODE +# +# Example value: +# @CODE +# python_single_target_python3_4(-)? +# @CODE + +# @ECLASS-VARIABLE: PYTHON_MULTI_USEDEP +# @DESCRIPTION: +# This is a placeholder variable supported by python_gen_cond_dep, +# in order to depend on python-r1 packages built for the same Python +# implementations. +# +# Example use: +# @CODE +# RDEPEND="$(python_gen_cond_dep ' +# dev-python/foo[${PYTHON_MULTI_USEDEP}] +# ')" +# @CODE +# +# Example value: +# @CODE +# python_targets_python3_4(-) +# @CODE + # @ECLASS-VARIABLE: PYTHON_REQUIRED_USE # @DESCRIPTION: # This is an eclass-generated required-use expression which ensures the following @@ -194,6 +239,8 @@ _python_single_set_globals() { local requse="^^ ( ${flags[*]} )" local optflags="${flags_mt[@]/%/(-)?},${unflags[@]/%/(-)},${flags[@]/%/(+)?}" local usedep="${optflags// /,}" + local single_flags="${flags[@]/%/(-)?}" + local single_usedep=${single_flags// /,} local deps= i PYTHON_PKG_DEP for i in "${_PYTHON_SUPPORTED_IMPLS[@]}"; do @@ -234,11 +281,20 @@ _python_single_set_globals() { eerror "Now : ${usedep}" die "PYTHON_USEDEP integrity check failed" fi + + if [[ ${PYTHON_SINGLE_USEDEP} != "${single_usedep}" ]]; then + eerror "PYTHON_SINGLE_USEDEP have changed between inherits!" + eerror "Before: ${PYTHON_SINGLE_USEDEP}" + eerror "Now : ${single_usedep}" + die "PYTHON_SINGLE_USEDEP integrity check failed" + fi else PYTHON_DEPS=${deps} PYTHON_REQUIRED_USE=${requse} PYTHON_USEDEP=${usedep} - readonly PYTHON_DEPS PYTHON_REQUIRED_USE PYTHON_USEDEP + PYTHON_SINGLE_USEDEP=${single_usedep} + readonly PYTHON_DEPS PYTHON_REQUIRED_USE PYTHON_USEDEP \ + PYTHON_SINGLE_USEDEP fi } _python_single_set_globals @@ -248,12 +304,15 @@ if [[ ! ${_PYTHON_SINGLE_R1} ]]; then # @FUNCTION: _python_gen_usedep # @INTERNAL -# @USAGE: [...] +# @USAGE: <-s|-u> [...] # @DESCRIPTION: # Output a USE dependency string for Python implementations which # are both in PYTHON_COMPAT and match any of the patterns passed # as parameters to the function. # +# The first argument specifies USE-dependency type: '-s' for new-style +# PYTHON_SINGLE_USEDEP, '-u' for backwards-compatible PYTHON_USEDEP. +# # The patterns can be either fnmatch-style patterns (matched via bash # == operator against PYTHON_COMPAT values) or '-2' / '-3' to indicate # appropriately all enabled Python 2/3 implementations (alike @@ -265,14 +324,25 @@ if [[ ! ${_PYTHON_SINGLE_R1} ]]; then _python_gen_usedep() { debug-print-function ${FUNCNAME} "${@}" + local mode=${1} + shift local impl matches=() for impl in "${_PYTHON_SUPPORTED_IMPLS[@]}"; do if _python_impl_matches "${impl}" "${@}"; then - matches+=( - "python_targets_${impl}(-)?" - "python_single_target_${impl}(+)?" - ) + case ${mode} in + -s) + matches+=( + "python_single_target_${impl}(-)?" + ) + ;; + -u) + matches+=( + "python_targets_${impl}(-)?" + "python_single_target_${impl}(+)?" + ) + ;; + esac fi done @@ -319,7 +389,7 @@ python_gen_usedep() { if [[ ${EBUILD_PHASE} == setup ]]; then eqawarn "python_gen_usedep() is deprecated. Please use python_gen_cond_dep instead." fi - _python_gen_usedep "${@}" + _python_gen_usedep -u "${@}" } # @FUNCTION: python_gen_useflags @@ -373,7 +443,8 @@ python_gen_useflags() { # to prevent accidental shell filename expansion. # # In order to enforce USE constraints on the packages, verbatim -# '${PYTHON_USEDEP}' (quoted!) may be placed in the dependency +# '${PYTHON_USEDEP}', '${PYTHON_SINGLE_USEDEP}' +# and '${PYTHON_MULTI_USEDEP}' (quoted!) may be placed in the dependency # specification. It will get expanded within the function into a proper # USE dependency string. # @@ -381,7 +452,7 @@ python_gen_useflags() { # @CODE # PYTHON_COMPAT=( python{2_7,3_{3,4}} pypy ) # RDEPEND="$(python_gen_cond_dep \ -# 'dev-python/unittest2[${PYTHON_USEDEP}]' python2_7 pypy )" +# 'dev-python/unittest2[${PYTHON_MULTI_USEDEP}]' python2_7 pypy )" # @CODE # # It will cause the variable to look like: @@ -405,11 +476,17 @@ python_gen_cond_dep() { # (since python_gen_usedep() will not return ${PYTHON_USEDEP} # the code is run at most once) if [[ ${dep} == *'${PYTHON_USEDEP}'* ]]; then - local usedep=$(_python_gen_usedep "${@}") + local usedep=$(_python_gen_usedep -u "${@}") dep=${dep//\$\{PYTHON_USEDEP\}/${usedep}} fi + if [[ ${dep} == *'${PYTHON_SINGLE_USEDEP}'* ]]; then + local usedep=$(_python_gen_usedep -s "${@}") + dep=${dep//\$\{PYTHON_SINGLE_USEDEP\}/${usedep}} + fi + local multi_usedep="python_targets_${impl}(-)" - matches+=( "python_single_target_${impl}? ( ${dep} )" ) + matches+=( "python_single_target_${impl}? ( + ${dep//\$\{PYTHON_MULTI_USEDEP\}/${multi_usedep}} )" ) fi done -- cgit v1.2.3-65-gdbad From 9c4fe911d04d36d390786f1b9cecbbf60f10532a Mon Sep 17 00:00:00 2001 From: Michał Górny Date: Sat, 30 Nov 2019 11:47:55 +0100 Subject: python-single-r1.eclass: Use new-style flags for python-exec dep MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Depend on PYTHON_TARGETS directly in dev-lang/python-exec dep, instead of relying on old-style PYTHON_USEDEP. Signed-off-by: Michał Górny --- eclass/python-single-r1.eclass | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/eclass/python-single-r1.eclass b/eclass/python-single-r1.eclass index ad7e39558cf1..f042bf4e1167 100644 --- a/eclass/python-single-r1.eclass +++ b/eclass/python-single-r1.eclass @@ -250,15 +250,16 @@ _python_single_set_globals() { requse+=" python_single_target_${i}? ( python_targets_${i} )" python_export "${i}" PYTHON_PKG_DEP - deps+="python_single_target_${i}? ( ${PYTHON_PKG_DEP} ) " + # 1) well, python-exec would suffice as an RDEP + # but no point in making this overcomplex, BDEP doesn't hurt anyone + # 2) python-exec should be built with all targets forced anyway + # but if new targets were added, we may need to force a rebuild + deps+="python_single_target_${i}? ( + ${PYTHON_PKG_DEP} + >=dev-lang/python-exec-2:=[python_targets_${i}] + ) " done - # 1) well, python-exec would suffice as an RDEP - # but no point in making this overcomplex, BDEP doesn't hurt anyone - # 2) python-exec should be built with all targets forced anyway - # but if new targets were added, we may need to force a rebuild - deps+=">=dev-lang/python-exec-2:=[${usedep}]" - if [[ ${PYTHON_DEPS+1} ]]; then if [[ ${PYTHON_DEPS} != "${deps}" ]]; then eerror "PYTHON_DEPS have changed between inherits (PYTHON_REQ_USE?)!" -- cgit v1.2.3-65-gdbad From 6bc26eb83470279b5275973beb5fe4b398fef83f Mon Sep 17 00:00:00 2001 From: Michał Górny Date: Sat, 30 Nov 2019 11:54:14 +0100 Subject: python-single-r1.eclass: Remove deprecated PYTHON_USEDEP API MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Michał Górny --- eclass/python-single-r1.eclass | 122 +++++------------------------------------ 1 file changed, 13 insertions(+), 109 deletions(-) diff --git a/eclass/python-single-r1.eclass b/eclass/python-single-r1.eclass index f042bf4e1167..438f25134c34 100644 --- a/eclass/python-single-r1.eclass +++ b/eclass/python-single-r1.eclass @@ -139,29 +139,6 @@ EXPORT_FUNCTIONS pkg_setup # python_single_target_pypy? ( virtual/pypy[gdbm] ) # @CODE -# @ECLASS-VARIABLE: PYTHON_USEDEP -# @DESCRIPTION: -# DEPRECATED. Use PYTHON_SINGLE_USEDEP or python_gen_cond_dep with -# PYTHON_MULTI_USEDEP placeholder instead. -# -# This is an eclass-generated USE-dependency string which can be used to -# depend on another Python package being built for the same Python -# implementations. -# -# The generate USE-flag list is compatible with packages using python-r1, -# python-single-r1 and python-distutils-ng eclasses. It must not be used -# on packages using python.eclass. -# -# Example use: -# @CODE -# RDEPEND="dev-python/foo[${PYTHON_USEDEP}]" -# @CODE -# -# Example value: -# @CODE -# python_targets_python2_7(-)?,python_single_target_python3_4(+)? -# @CODE - # @ECLASS-VARIABLE: PYTHON_SINGLE_USEDEP # @DESCRIPTION: # This is an eclass-generated USE-dependency string which can be used to @@ -226,7 +203,6 @@ _python_single_set_globals() { local flags_mt=( "${_PYTHON_SUPPORTED_IMPLS[@]/#/python_targets_}" ) local flags=( "${_PYTHON_SUPPORTED_IMPLS[@]/#/python_single_target_}" ) - local unflags=( "${_PYTHON_UNSUPPORTED_IMPLS[@]/#/-python_single_target_}" ) if [[ ${#_PYTHON_SUPPORTED_IMPLS[@]} -eq 1 ]]; then # if only one implementation is supported, use IUSE defaults @@ -237,8 +213,6 @@ _python_single_set_globals() { fi local requse="^^ ( ${flags[*]} )" - local optflags="${flags_mt[@]/%/(-)?},${unflags[@]/%/(-)},${flags[@]/%/(+)?}" - local usedep="${optflags// /,}" local single_flags="${flags[@]/%/(-)?}" local single_usedep=${single_flags// /,} @@ -276,13 +250,6 @@ _python_single_set_globals() { die "PYTHON_REQUIRED_USE integrity check failed" fi - if [[ ${PYTHON_USEDEP} != "${usedep}" ]]; then - eerror "PYTHON_USEDEP have changed between inherits!" - eerror "Before: ${PYTHON_USEDEP}" - eerror "Now : ${usedep}" - die "PYTHON_USEDEP integrity check failed" - fi - if [[ ${PYTHON_SINGLE_USEDEP} != "${single_usedep}" ]]; then eerror "PYTHON_SINGLE_USEDEP have changed between inherits!" eerror "Before: ${PYTHON_SINGLE_USEDEP}" @@ -292,10 +259,8 @@ _python_single_set_globals() { else PYTHON_DEPS=${deps} PYTHON_REQUIRED_USE=${requse} - PYTHON_USEDEP=${usedep} PYTHON_SINGLE_USEDEP=${single_usedep} - readonly PYTHON_DEPS PYTHON_REQUIRED_USE PYTHON_USEDEP \ - PYTHON_SINGLE_USEDEP + readonly PYTHON_DEPS PYTHON_REQUIRED_USE PYTHON_SINGLE_USEDEP fi } _python_single_set_globals @@ -305,45 +270,29 @@ if [[ ! ${_PYTHON_SINGLE_R1} ]]; then # @FUNCTION: _python_gen_usedep # @INTERNAL -# @USAGE: <-s|-u> [...] +# @USAGE: [...] # @DESCRIPTION: # Output a USE dependency string for Python implementations which # are both in PYTHON_COMPAT and match any of the patterns passed # as parameters to the function. # -# The first argument specifies USE-dependency type: '-s' for new-style -# PYTHON_SINGLE_USEDEP, '-u' for backwards-compatible PYTHON_USEDEP. -# # The patterns can be either fnmatch-style patterns (matched via bash # == operator against PYTHON_COMPAT values) or '-2' / '-3' to indicate # appropriately all enabled Python 2/3 implementations (alike # python_is_python3). Remember to escape or quote the fnmatch patterns # to prevent accidental shell filename expansion. # -# This is an internal function used to implement python_gen_cond_dep -# and deprecated python_gen_usedep. +# This is an internal function used to implement python_gen_cond_dep. _python_gen_usedep() { debug-print-function ${FUNCNAME} "${@}" - local mode=${1} - shift local impl matches=() for impl in "${_PYTHON_SUPPORTED_IMPLS[@]}"; do if _python_impl_matches "${impl}" "${@}"; then - case ${mode} in - -s) - matches+=( - "python_single_target_${impl}(-)?" - ) - ;; - -u) - matches+=( - "python_targets_${impl}(-)?" - "python_single_target_${impl}(+)?" - ) - ;; - esac + matches+=( + "python_single_target_${impl}(-)?" + ) fi done @@ -353,46 +302,6 @@ _python_gen_usedep() { echo "${out// /,}" } -# @FUNCTION: python_gen_usedep -# @USAGE: [...] -# @DESCRIPTION: -# DEPRECATED. Please use python_gen_cond_dep instead. -# -# Output a USE dependency string for Python implementations which -# are both in PYTHON_COMPAT and match any of the patterns passed -# as parameters to the function. -# -# The patterns can be either fnmatch-style patterns (matched via bash -# == operator against PYTHON_COMPAT values) or '-2' / '-3' to indicate -# appropriately all enabled Python 2/3 implementations (alike -# python_is_python3). Remember to escape or quote the fnmatch patterns -# to prevent accidental shell filename expansion. -# -# When all implementations are requested, please use ${PYTHON_USEDEP} -# instead. Please also remember to set an appropriate REQUIRED_USE -# to avoid ineffective USE flags. -# -# Example: -# @CODE -# PYTHON_COMPAT=( python{2_7,3_4} ) -# DEPEND="doc? ( dev-python/epydoc[$(python_gen_usedep 'python2*')] )" -# @CODE -# -# It will cause the dependency to look like: -# @CODE -# DEPEND="doc? ( dev-python/epydoc[python_targets_python2_7(-)?,...] )" -# @CODE -python_gen_usedep() { - debug-print-function ${FUNCNAME} "${@}" - - # output only once, during some reasonable phase - # (avoid spamming cache regen runs) - if [[ ${EBUILD_PHASE} == setup ]]; then - eqawarn "python_gen_usedep() is deprecated. Please use python_gen_cond_dep instead." - fi - _python_gen_usedep -u "${@}" -} - # @FUNCTION: python_gen_useflags # @USAGE: [...] # @DESCRIPTION: @@ -444,10 +353,9 @@ python_gen_useflags() { # to prevent accidental shell filename expansion. # # In order to enforce USE constraints on the packages, verbatim -# '${PYTHON_USEDEP}', '${PYTHON_SINGLE_USEDEP}' -# and '${PYTHON_MULTI_USEDEP}' (quoted!) may be placed in the dependency -# specification. It will get expanded within the function into a proper -# USE dependency string. +# '${PYTHON_SINGLE_USEDEP}' and '${PYTHON_MULTI_USEDEP}' (quoted!) may +# be placed in the dependency specification. It will get expanded within +# the function into a proper USE dependency string. # # Example: # @CODE @@ -473,15 +381,11 @@ python_gen_cond_dep() { for impl in "${_PYTHON_SUPPORTED_IMPLS[@]}"; do if _python_impl_matches "${impl}" "${@}"; then - # substitute ${PYTHON_USEDEP} if used - # (since python_gen_usedep() will not return ${PYTHON_USEDEP} - # the code is run at most once) - if [[ ${dep} == *'${PYTHON_USEDEP}'* ]]; then - local usedep=$(_python_gen_usedep -u "${@}") - dep=${dep//\$\{PYTHON_USEDEP\}/${usedep}} - fi + # substitute ${PYTHON_SINGLE_USEDEP} if used + # (since python_gen_usedep() will not return + # ${PYTHON_SINGLE_USEDEP}, the code is run at most once) if [[ ${dep} == *'${PYTHON_SINGLE_USEDEP}'* ]]; then - local usedep=$(_python_gen_usedep -s "${@}") + local usedep=$(_python_gen_usedep "${@}") dep=${dep//\$\{PYTHON_SINGLE_USEDEP\}/${usedep}} fi local multi_usedep="python_targets_${impl}(-)" -- cgit v1.2.3-65-gdbad From 31f43f7851c01ca85f6a8016342f91c942fdb7d5 Mon Sep 17 00:00:00 2001 From: Michał Górny Date: Sat, 30 Nov 2019 11:56:58 +0100 Subject: python-single-r1.eclass: Remove unused PYTHON_TARGETS MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Michał Górny --- eclass/python-single-r1.eclass | 35 ++++++++--------------------------- 1 file changed, 8 insertions(+), 27 deletions(-) diff --git a/eclass/python-single-r1.eclass b/eclass/python-single-r1.eclass index 438f25134c34..4184b6f132bc 100644 --- a/eclass/python-single-r1.eclass +++ b/eclass/python-single-r1.eclass @@ -89,9 +89,9 @@ EXPORT_FUNCTIONS pkg_setup # # It should be noted that in order to preserve metadata immutability, # PYTHON_COMPAT_OVERRIDE does not affect IUSE nor dependencies. -# The state of PYTHON_TARGETS and PYTHON_SINGLE_TARGET is ignored, -# and the implementation in PYTHON_COMPAT_OVERRIDE is built instead. -# Dependencies need to be satisfied manually. +# The state of PYTHON_SINGLE_TARGET is ignored, and the implementation +# in PYTHON_COMPAT_OVERRIDE is built instead. Dependencies need to be +# satisfied manually. # # Example: # @CODE @@ -178,10 +178,8 @@ EXPORT_FUNCTIONS pkg_setup # @ECLASS-VARIABLE: PYTHON_REQUIRED_USE # @DESCRIPTION: -# This is an eclass-generated required-use expression which ensures the following -# when more than one python implementation is possible: -# 1. Exactly one PYTHON_SINGLE_TARGET value has been enabled. -# 2. The selected PYTHON_SINGLE_TARGET value is enabled in PYTHON_TARGETS. +# This is an eclass-generated required-use expression which ensures +# that exactly one PYTHON_SINGLE_TARGET value has been enabled. # # This expression should be utilized in an ebuild by including it in # REQUIRED_USE, optionally behind a use flag. @@ -193,23 +191,20 @@ EXPORT_FUNCTIONS pkg_setup # # Example value: # @CODE -# python_single_target_python2_7? ( python_targets_python2_7 ) -# python_single_target_python3_3? ( python_targets_python3_3 ) # ^^ ( python_single_target_python2_7 python_single_target_python3_3 ) # @CODE _python_single_set_globals() { _python_set_impls - local flags_mt=( "${_PYTHON_SUPPORTED_IMPLS[@]/#/python_targets_}" ) local flags=( "${_PYTHON_SUPPORTED_IMPLS[@]/#/python_single_target_}" ) if [[ ${#_PYTHON_SUPPORTED_IMPLS[@]} -eq 1 ]]; then # if only one implementation is supported, use IUSE defaults # to avoid requesting the user to enable it - IUSE="+${flags_mt[0]} +${flags[0]}" + IUSE="+${flags[0]}" else - IUSE="${flags_mt[*]} ${flags[*]}" + IUSE="${flags[*]}" fi local requse="^^ ( ${flags[*]} )" @@ -218,11 +213,6 @@ _python_single_set_globals() { local deps= i PYTHON_PKG_DEP for i in "${_PYTHON_SUPPORTED_IMPLS[@]}"; do - # The chosen targets need to be in PYTHON_TARGETS as well. - # This is in order to enforce correct dependencies on packages - # supporting multiple implementations. - requse+=" python_single_target_${i}? ( python_targets_${i} )" - python_export "${i}" PYTHON_PKG_DEP # 1) well, python-exec would suffice as an RDEP # but no point in making this overcomplex, BDEP doesn't hurt anyone @@ -490,15 +480,6 @@ python_setup() { die "More than one implementation in PYTHON_SINGLE_TARGET." fi - if ! use "python_targets_${impl}"; then - eerror "The implementation chosen as PYTHON_SINGLE_TARGET must be added" - eerror "to PYTHON_TARGETS as well. This is in order to ensure that" - eerror "dependencies are satisfied correctly. We're sorry" - eerror "for the inconvenience." - echo - die "Build target (${impl}) not in PYTHON_TARGETS." - fi - python_export "${impl}" EPYTHON PYTHON python_wrapper_setup fi @@ -511,7 +492,7 @@ python_setup() { eerror eerror "${_PYTHON_SUPPORTED_IMPLS[@]}" echo - die "No supported Python implementation in PYTHON_SINGLE_TARGET/PYTHON_TARGETS." + die "No supported Python implementation in PYTHON_SINGLE_TARGET." fi } -- cgit v1.2.3-65-gdbad From b1c6961beda1e729f3c6d301d6e0cce4de0493bf Mon Sep 17 00:00:00 2001 From: Michał Górny Date: Fri, 29 Nov 2019 13:48:44 +0100 Subject: distutils-r1.eclass: Depend on setuptools by default MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add a new DISTUTILS_USE_SETUPTOOLS top variable, and make it default to BDEPEND-ing on dev-python/setuptools (which should be correct for the majority of packages). Packages that either need RDEPEND or no dependency at all can override it. Also add a check for correct value in esetup.py. This should make it easy for developers to adjust the new variable in their packages. Signed-off-by: Michał Górny --- eclass/distutils-r1.eclass | 82 ++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 76 insertions(+), 6 deletions(-) diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass index 0c5d6781f83d..fae25ea8a5ec 100644 --- a/eclass/distutils-r1.eclass +++ b/eclass/distutils-r1.eclass @@ -77,9 +77,23 @@ esac # to be exported. It must be run in order for the eclass functions # to function properly. +# @ECLASS-VARIABLE: DISTUTILS_USE_SETUPTOOLS +# @PRE_INHERIT +# @DESCRIPTION: +# Controls adding dev-python/setuptools dependency. The allowed values +# are: +# +# - no -- do not add the dependency (pure distutils package) +# - bdepend -- add it to BDEPEND (the default) +# - rdepend -- add it to BDEPEND+RDEPEND (when using entry_points) +# +# This variable is effective only if DISTUTILS_OPTIONAL is disabled. +# It needs to be set before the inherit line. +: ${DISTUTILS_USE_SETUPTOOLS:=bdepend} + if [[ ! ${_DISTUTILS_R1} ]]; then -[[ ${EAPI} == [45] ]] && inherit eutils +[[ ${EAPI} == [456] ]] && inherit eutils [[ ${EAPI} == [56] ]] && inherit xdg-utils inherit multiprocessing toolchain-funcs @@ -97,15 +111,35 @@ fi if [[ ! ${_DISTUTILS_R1} ]]; then -if [[ ! ${DISTUTILS_OPTIONAL} ]]; then - RDEPEND=${PYTHON_DEPS} +_distutils_set_globals() { + local rdep=${PYTHON_DEPS} + local bdep=${rdep} + + case ${DISTUTILS_USE_SETUPTOOLS} in + no) + ;; + bdepend) + bdep+=" dev-python/setuptools[${PYTHON_USEDEP}]" + ;; + rdepend) + bdep+=" dev-python/setuptools[${PYTHON_USEDEP}]" + rdep+=" dev-python/setuptools[${PYTHON_USEDEP}]" + ;; + *) + die "Invalid DISTUTILS_USE_SETUPTOOLS=${DISTUTILS_USE_SETUPTOOLS}" + ;; + esac + + RDEPEND=${rdep} if [[ ${EAPI} != [56] ]]; then - BDEPEND=${PYTHON_DEPS} + BDEPEND=${bdep} else - DEPEND=${PYTHON_DEPS} + DEPEND=${bdep} fi REQUIRED_USE=${PYTHON_REQUIRED_USE} -fi +} +[[ ! ${DISTUTILS_OPTIONAL} ]] && _distutils_set_globals +unset -f _distutils_set_globals # @ECLASS-VARIABLE: PATCHES # @DEFAULT_UNSET @@ -395,6 +429,41 @@ distutils_enable_tests() { return 0 } +# @FUNCTION: _distutils-r1_verify_use_setuptools +# @INTERNAL +# @DESCRIPTION: +# Check setup.py for signs that DISTUTILS_USE_SETUPTOOLS have been set +# incorrectly. +_distutils_verify_use_setuptools() { + [[ ${DISTUTILS_OPTIONAL} ]] && return + + # ok, those are cheap greps. we can try toimprove them if we hit + # false positives. + local expected=no + if [[ ${CATEGORY}/${PN} == dev-python/setuptools ]]; then + # as a special case, setuptools provides itself ;-) + : + elif grep -E -q -s '(from|import)\s+setuptools' setup.py; then + if grep -E -q -s 'entry_points\s+=' setup.py; then + expected=rdepend + else + expected=bdepend + fi + fi + + if [[ ${DISTUTILS_USE_SETUPTOOLS} != ${expected} ]]; then + if [[ ! ${_DISTUTILS_SETUPTOOLS_WARNED} ]]; then + _DISTUTILS_SETUPTOOLS_WARNED=1 + local def= + [[ ${DISTUTILS_USE_SETUPTOOLS} == bdepend ]] && def=' (default?)' + + eqawarn "DISTUTILS_USE_SETUPTOOLS value is probably incorrect" + eqawarn " value: DISTUTILS_USE_SETUPTOOLS=${DISTUTILS_USE_SETUPTOOLS}${def}" + eqawarn " expected: DISTUTILS_USE_SETUPTOOLS=${expected}" + fi + fi +} + # @FUNCTION: esetup.py # @USAGE: [...] # @DESCRIPTION: @@ -417,6 +486,7 @@ esetup.py() { [[ ${EAPI} != [45] ]] && die_args+=( -n ) [[ ${BUILD_DIR} ]] && _distutils-r1_create_setup_cfg + _distutils_verify_use_setuptools set -- "${EPYTHON:-python}" setup.py "${mydistutilsargs[@]}" "${@}" -- cgit v1.2.3-65-gdbad From 0421a583fbde0b37162cb755788d37fa1399c6b1 Mon Sep 17 00:00:00 2001 From: Michał Górny Date: Fri, 29 Nov 2019 14:10:25 +0100 Subject: dev-python/setuptools: Disable setuptools self-dependency MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Michał Górny --- dev-python/setuptools/setuptools-40.6.3.ebuild | 1 + dev-python/setuptools/setuptools-41.5.1.ebuild | 1 + dev-python/setuptools/setuptools-42.0.0.ebuild | 1 + dev-python/setuptools/setuptools-42.0.1.ebuild | 1 + dev-python/setuptools/setuptools-9999.ebuild | 1 + 5 files changed, 5 insertions(+) diff --git a/dev-python/setuptools/setuptools-40.6.3.ebuild b/dev-python/setuptools/setuptools-40.6.3.ebuild index d5d482efd58e..a21883a89f89 100644 --- a/dev-python/setuptools/setuptools-40.6.3.ebuild +++ b/dev-python/setuptools/setuptools-40.6.3.ebuild @@ -2,6 +2,7 @@ # Distributed under the terms of the GNU General Public License v2 EAPI=6 +DISTUTILS_USE_SETUPTOOLS=no PYTHON_COMPAT=( python2_7 python3_{5,6,7} pypy{,3} ) PYTHON_REQ_USE="xml(+)" diff --git a/dev-python/setuptools/setuptools-41.5.1.ebuild b/dev-python/setuptools/setuptools-41.5.1.ebuild index ff4a7aa54630..a7b9022b6a0c 100644 --- a/dev-python/setuptools/setuptools-41.5.1.ebuild +++ b/dev-python/setuptools/setuptools-41.5.1.ebuild @@ -2,6 +2,7 @@ # Distributed under the terms of the GNU General Public License v2 EAPI=7 +DISTUTILS_USE_SETUPTOOLS=no PYTHON_COMPAT=( python2_7 python3_{5,6,7,8} pypy{,3} ) PYTHON_REQ_USE="xml(+)" diff --git a/dev-python/setuptools/setuptools-42.0.0.ebuild b/dev-python/setuptools/setuptools-42.0.0.ebuild index e7aa7c945a85..8c33401e75bd 100644 --- a/dev-python/setuptools/setuptools-42.0.0.ebuild +++ b/dev-python/setuptools/setuptools-42.0.0.ebuild @@ -2,6 +2,7 @@ # Distributed under the terms of the GNU General Public License v2 EAPI=7 +DISTUTILS_USE_SETUPTOOLS=no PYTHON_COMPAT=( python2_7 python3_{5,6,7,8} pypy{,3} ) PYTHON_REQ_USE="xml(+)" diff --git a/dev-python/setuptools/setuptools-42.0.1.ebuild b/dev-python/setuptools/setuptools-42.0.1.ebuild index 0c293d1ea950..58369bab16cb 100644 --- a/dev-python/setuptools/setuptools-42.0.1.ebuild +++ b/dev-python/setuptools/setuptools-42.0.1.ebuild @@ -2,6 +2,7 @@ # Distributed under the terms of the GNU General Public License v2 EAPI=7 +DISTUTILS_USE_SETUPTOOLS=no PYTHON_COMPAT=( python2_7 python3_{5,6,7,8} pypy{,3} ) PYTHON_REQ_USE="xml(+)" diff --git a/dev-python/setuptools/setuptools-9999.ebuild b/dev-python/setuptools/setuptools-9999.ebuild index 8d522c4213f5..34b0627c0728 100644 --- a/dev-python/setuptools/setuptools-9999.ebuild +++ b/dev-python/setuptools/setuptools-9999.ebuild @@ -2,6 +2,7 @@ # Distributed under the terms of the GNU General Public License v2 EAPI=7 +DISTUTILS_USE_SETUPTOOLS=no PYTHON_COMPAT=( python2_7 python3_{5,6,7,8} pypy{,3} ) PYTHON_REQ_USE="xml(+)" -- cgit v1.2.3-65-gdbad From 224ed83bf909f0a9afd59e23cd957a6787a08c50 Mon Sep 17 00:00:00 2001 From: Michał Górny Date: Fri, 29 Nov 2019 14:31:46 +0100 Subject: sys-apps/portage: Disable setuptools dependency MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Michał Górny --- sys-apps/portage/portage-2.3.69.ebuild | 1 + sys-apps/portage/portage-2.3.76-r1.ebuild | 1 + sys-apps/portage/portage-2.3.79.ebuild | 1 + sys-apps/portage/portage-2.3.80-r1.ebuild | 1 + sys-apps/portage/portage-2.3.81.ebuild | 1 + sys-apps/portage/portage-9999.ebuild | 1 + 6 files changed, 6 insertions(+) diff --git a/sys-apps/portage/portage-2.3.69.ebuild b/sys-apps/portage/portage-2.3.69.ebuild index fbbb9c85705c..854c01cd6e53 100644 --- a/sys-apps/portage/portage-2.3.69.ebuild +++ b/sys-apps/portage/portage-2.3.69.ebuild @@ -3,6 +3,7 @@ EAPI=5 +DISTUTILS_USE_SETUPTOOLS=no PYTHON_COMPAT=( pypy python3_5 python3_6 python3_7 diff --git a/sys-apps/portage/portage-2.3.76-r1.ebuild b/sys-apps/portage/portage-2.3.76-r1.ebuild index ff8abf53e72d..28afff0ae724 100644 --- a/sys-apps/portage/portage-2.3.76-r1.ebuild +++ b/sys-apps/portage/portage-2.3.76-r1.ebuild @@ -3,6 +3,7 @@ EAPI=5 +DISTUTILS_USE_SETUPTOOLS=no PYTHON_COMPAT=( pypy python3_5 python3_6 python3_7 diff --git a/sys-apps/portage/portage-2.3.79.ebuild b/sys-apps/portage/portage-2.3.79.ebuild index d3317bec4fd7..0389ff89cfad 100644 --- a/sys-apps/portage/portage-2.3.79.ebuild +++ b/sys-apps/portage/portage-2.3.79.ebuild @@ -3,6 +3,7 @@ EAPI=5 +DISTUTILS_USE_SETUPTOOLS=no PYTHON_COMPAT=( pypy python3_5 python3_6 python3_7 python3_8 diff --git a/sys-apps/portage/portage-2.3.80-r1.ebuild b/sys-apps/portage/portage-2.3.80-r1.ebuild index 6d384ab8fdd8..494eb2b43686 100644 --- a/sys-apps/portage/portage-2.3.80-r1.ebuild +++ b/sys-apps/portage/portage-2.3.80-r1.ebuild @@ -3,6 +3,7 @@ EAPI=5 +DISTUTILS_USE_SETUPTOOLS=no PYTHON_COMPAT=( pypy python3_5 python3_6 python3_7 python3_8 diff --git a/sys-apps/portage/portage-2.3.81.ebuild b/sys-apps/portage/portage-2.3.81.ebuild index e7b9119d36b6..be56b54d2052 100644 --- a/sys-apps/portage/portage-2.3.81.ebuild +++ b/sys-apps/portage/portage-2.3.81.ebuild @@ -3,6 +3,7 @@ EAPI=5 +DISTUTILS_USE_SETUPTOOLS=no PYTHON_COMPAT=( pypy python3_5 python3_6 python3_7 python3_8 diff --git a/sys-apps/portage/portage-9999.ebuild b/sys-apps/portage/portage-9999.ebuild index 6401c40dee2a..04544afb66d4 100644 --- a/sys-apps/portage/portage-9999.ebuild +++ b/sys-apps/portage/portage-9999.ebuild @@ -3,6 +3,7 @@ EAPI=6 +DISTUTILS_USE_SETUPTOOLS=no PYTHON_COMPAT=( pypy python3_5 python3_6 python3_7 python3_8 -- cgit v1.2.3-65-gdbad From a1fed83a5230f10e7783f7ec30b5f56ff9c6e665 Mon Sep 17 00:00:00 2001 From: Michał Górny Date: Tue, 5 Nov 2019 21:54:49 +0100 Subject: dev-libs/libltdl: Drop old MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes: https://bugs.gentoo.org/697824 Closes: https://github.com/gentoo/gentoo/pull/13559 Signed-off-by: Michał Górny --- dev-libs/libltdl/Manifest | 2 -- dev-libs/libltdl/libltdl-1.3.5.ebuild | 42 ---------------------------------- dev-libs/libltdl/libltdl-1.5.26.ebuild | 38 ------------------------------ 3 files changed, 82 deletions(-) delete mode 100644 dev-libs/libltdl/libltdl-1.3.5.ebuild delete mode 100644 dev-libs/libltdl/libltdl-1.5.26.ebuild diff --git a/dev-libs/libltdl/Manifest b/dev-libs/libltdl/Manifest index 3b6a50db076e..4f2d5bac1893 100644 --- a/dev-libs/libltdl/Manifest +++ b/dev-libs/libltdl/Manifest @@ -1,3 +1 @@ -DIST libtool-1.3.5.tar.gz 538884 BLAKE2B 769c0ab679d5665bb729f97dc5c02b6e8921532788009425195c93971d8886547824e838a4dea559ccb365a86f600a250bccd8cb559e9be2158f9db3463f3ec4 SHA512 e7e693da0e87bc3b178b270c1d5b0d46116d1624f6e3657ad75bc381bcbba8949ab0913fe3985c77e9dd0ee519df7da9c5ee3b4f6030ad1d4651de2e642c4bd6 -DIST libtool-1.5.26.tar.gz 2961939 BLAKE2B c12ea59cc828ee7aa85ef445e3b0586ddfa8629824e308f46c74ac64dd8b73f0e4675d6673c09d76714c841f29b33000318eebfca3c5d28657327017e30b2372 SHA512 fcd39856c8cd457c97f176d5f6ce97fd93108808ce24315d179a7c9ca85bb90e799afaa83bc283ec627d73cfe0e0710d36a1ee8f39c9963cf2e806e64a0e0bcf DIST libtool-2.4.6.tar.xz 973080 BLAKE2B 0865af9f8701ca9dc62eec8294a088d24f4a3ff541bc76acfe7b69f70637d7e8261a17d69f7d54a4177f974c429be68467883a1560edb539061966cbf7d4a356 SHA512 a6eef35f3cbccf2c9e2667f44a476ebc80ab888725eb768e91a3a6c33b8c931afc46eb23efaee76c8696d3e4eed74ab1c71157bcb924f38ee912c8a90a6521a4 diff --git a/dev-libs/libltdl/libltdl-1.3.5.ebuild b/dev-libs/libltdl/libltdl-1.3.5.ebuild deleted file mode 100644 index 7e48b626acbd..000000000000 --- a/dev-libs/libltdl/libltdl-1.3.5.ebuild +++ /dev/null @@ -1,42 +0,0 @@ -# Copyright 1999-2014 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -# This ebuild provides libltdl.so.0. - -EAPI="4" - -inherit multilib-minimal - -MY_P="libtool-${PV}" - -DESCRIPTION="A shared library tool for developers" -HOMEPAGE="https://www.gnu.org/software/libtool/" -SRC_URI="mirror://gnu/libtool/${MY_P}.tar.gz" - -LICENSE="GPL-2" -SLOT="1.3" -KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86" -IUSE="" -# libltdl doesn't have a testsuite. -RESTRICT="test" - -RDEPEND="!sys-devel/libtool:1.3" - -S="${WORKDIR}/${MY_P}" - -multilib_src_configure() { - ECONF_SOURCE=${S} \ - econf \ - --enable-ltdl-install \ - --disable-static -} - -multilib_src_compile() { - emake -C libltdl -} - -multilib_src_install() { - emake -C libltdl DESTDIR="${D}" install-exec - # basically we just install ABI libs for old packages - rm "${ED}"/usr/$(get_libdir)/libltdl.{la,so} || die -} diff --git a/dev-libs/libltdl/libltdl-1.5.26.ebuild b/dev-libs/libltdl/libltdl-1.5.26.ebuild deleted file mode 100644 index 28eccdaf6bbf..000000000000 --- a/dev-libs/libltdl/libltdl-1.5.26.ebuild +++ /dev/null @@ -1,38 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -# This ebuild provides libltdl.so.3. - -EAPI="4" - -inherit multilib-minimal - -MY_P="libtool-${PV}" - -DESCRIPTION="A shared library tool for developers" -HOMEPAGE="https://www.gnu.org/software/libtool/" -SRC_URI="mirror://gnu/libtool/${MY_P}.tar.gz" - -LICENSE="GPL-2" -SLOT="1.5" -KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86" -IUSE="" -# libltdl doesn't have a testsuite. -RESTRICT="test" - -RDEPEND="!sys-devel/libtool:1.5" - -S="${WORKDIR}/${MY_P}/libltdl" - -multilib_src_configure() { - ECONF_SOURCE=${S} \ - econf \ - --enable-ltdl-install \ - --disable-static -} - -multilib_src_install() { - emake DESTDIR="${D}" install-exec - # basically we just install ABI libs for old packages - rm "${ED}"/usr/$(get_libdir)/libltdl.{la,so} || die -} -- cgit v1.2.3-65-gdbad From cd5bba3d05be8d48c005b28c07fbbbef8bb5dcfa Mon Sep 17 00:00:00 2001 From: Michał Górny Date: Tue, 5 Nov 2019 21:52:44 +0100 Subject: net-dns/libidn: Drop old MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes: https://bugs.gentoo.org/697818 Closes: https://github.com/gentoo/gentoo/pull/13560 Signed-off-by: Michał Górny --- net-dns/libidn/Manifest | 2 - .../libidn/files/libidn-1.33-CVE-2017-14062.patch | 77 ------------- .../libidn/files/libidn-1.33-parallel-make.patch | 115 ------------------- net-dns/libidn/libidn-1.33-r2.ebuild | 122 --------------------- net-dns/libidn/libidn-1.33-r99.ebuild | 59 ---------- 5 files changed, 375 deletions(-) delete mode 100644 net-dns/libidn/files/libidn-1.33-CVE-2017-14062.patch delete mode 100644 net-dns/libidn/files/libidn-1.33-parallel-make.patch delete mode 100644 net-dns/libidn/libidn-1.33-r2.ebuild delete mode 100644 net-dns/libidn/libidn-1.33-r99.ebuild diff --git a/net-dns/libidn/Manifest b/net-dns/libidn/Manifest index 4f4d621296f4..fed1d9a4995c 100644 --- a/net-dns/libidn/Manifest +++ b/net-dns/libidn/Manifest @@ -1,3 +1 @@ -DIST libidn-1.33-security_backports-01.tar.xz 3420 BLAKE2B c0311d83dee53b83bceab7777e9508ffdc2737e31eec71dc7e67b29ee75cdcef8558db0e89d857ed8c402980fdd7c3419fbb123eba91dddc2358a06684114811 SHA512 e925d20c9258b47821d444c563c75f09f003d1c6b367c934a808242ce4c259ff83e9d67e886cb3e832117df1cd9cae4b18417c48fbf9c77266ab379d3afcd4f4 -DIST libidn-1.33.tar.gz 3501056 BLAKE2B ce6319dc61dd825cf7ddb33f4279c178709e16ce2815c3d1a464bba6b5c6cc493107a10a686f349247a0d6023b1b834a650046e68da9f2f559870dba13a59384 SHA512 38dd459eaeda0c9e3cc2d24d967113515a499747550a2a9157f32357def90d71a3a3b52398e96a44a28cd5948dc353b0473c4ff0453a69720191c4cb49cac2c6 DIST libidn-1.35.tar.gz 4169217 BLAKE2B 809f9e854a4f2fcd3b2d5f7cdb34e2c68a0f00f5fcffc9002ead2d2d3dcee38022b3288f29716437f65f09e259e35cc98679d9c9d943423190cebb76fcbc94fa SHA512 782260f73b1fd8ebea8a40e2b3a6866c4f67494b2b3df03748daa9c0f842a9578932e746eb4bbf2547fccb1d65d7fc99a7977759dbe58f87f2fdd26d0fe45a09 diff --git a/net-dns/libidn/files/libidn-1.33-CVE-2017-14062.patch b/net-dns/libidn/files/libidn-1.33-CVE-2017-14062.patch deleted file mode 100644 index 5c2e0a91b2e3..000000000000 --- a/net-dns/libidn/files/libidn-1.33-CVE-2017-14062.patch +++ /dev/null @@ -1,77 +0,0 @@ -From e9e81b8063b095b02cf104bb992fa9bf9515b9d8 Mon Sep 17 00:00:00 2001 -From: =?utf8?q?Tim=20R=C3=BChsen?= -Date: Fri, 1 Sep 2017 10:04:48 +0200 -Subject: [PATCH] lib/punycode.c (decode_digit): Fix integer overflow - -This fix is a backport from libidn2 and addresses -CVE-2017-14062. ---- - lib/punycode.c | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/lib/punycode.c b/lib/punycode.c -index 86819a7..49250a1 100644 ---- a/lib/punycode.c -+++ b/lib/punycode.c -@@ -88,10 +88,10 @@ enum - /* point (for use in representing integers) in the range 0 to */ - /* base-1, or base if cp does not represent a value. */ - --static punycode_uint --decode_digit (punycode_uint cp) -+static unsigned -+decode_digit (int cp) - { -- return cp - 48 < 10 ? cp - 22 : cp - 65 < 26 ? cp - 65 : -+ return (unsigned) cp - 48 < 10 ? cp - 22 : cp - 65 < 26 ? cp - 65 : - cp - 97 < 26 ? cp - 97 : base; - } - --- -1.9.1 - -From 6c8a9375641ca283b50f9680c90dcd57f9c44798 Mon Sep 17 00:00:00 2001 -From: =?utf8?q?Tim=20R=C3=BChsen?= -Date: Wed, 4 Oct 2017 15:22:43 +0200 -Subject: [PATCH] lib/punycode.c (decode_digit): Really fix integer overflow - -The fix in commit e9e81b8063b095b02cf104bb992fa9bf9515b9d8 -was incomplete. - -Reported-by: Christian Weisgerber ---- - lib/punycode.c | 4 ++-- - tests/tst_idna.c | 2 +- - 2 files changed, 3 insertions(+), 3 deletions(-) - -diff --git a/lib/punycode.c b/lib/punycode.c -index 49250a1..d475b6d 100644 ---- a/lib/punycode.c -+++ b/lib/punycode.c -@@ -91,8 +91,8 @@ enum - static unsigned - decode_digit (int cp) - { -- return (unsigned) cp - 48 < 10 ? cp - 22 : cp - 65 < 26 ? cp - 65 : -- cp - 97 < 26 ? cp - 97 : base; -+ return (unsigned) (cp - 48 < 10 ? cp - 22 : cp - 65 < 26 ? cp - 65 : -+ cp - 97 < 26 ? cp - 97 : base); - } - - /* encode_digit(d,flag) returns the basic code point whose value */ -diff --git a/tests/tst_idna.c b/tests/tst_idna.c -index 4ac046f..7fb58b9 100644 ---- a/tests/tst_idna.c -+++ b/tests/tst_idna.c -@@ -211,7 +211,7 @@ static const struct idna idna[] = { - 'x', 'n', '-', '-', 'f', 'o', 0x3067}, - IDNA_ACE_PREFIX "too long too long too long too long too long too " - "long too long too long too long too long ", 0, -- IDNA_CONTAINS_ACE_PREFIX, IDNA_PUNYCODE_ERROR} -+ IDNA_CONTAINS_ACE_PREFIX, IDNA_INVALID_LENGTH} - }; - - void --- -1.9.1 - diff --git a/net-dns/libidn/files/libidn-1.33-parallel-make.patch b/net-dns/libidn/files/libidn-1.33-parallel-make.patch deleted file mode 100644 index 2d237f3e27b1..000000000000 --- a/net-dns/libidn/files/libidn-1.33-parallel-make.patch +++ /dev/null @@ -1,115 +0,0 @@ -From 4709e64fef29ca8ddd5b0878e3126640bd1480c2 Mon Sep 17 00:00:00 2001 -From: =?utf8?q?Tim=20R=C3=BChsen?= -Date: Wed, 4 Oct 2017 15:02:49 +0200 -Subject: [PATCH] * src/Makefile.am: Fix rule for parallel builds - ---- - src/Makefile.am | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/src/Makefile.am b/src/Makefile.am -index 6832c20..218d52e 100644 ---- a/src/Makefile.am -+++ b/src/Makefile.am -@@ -35,7 +35,8 @@ libidn_cmd_la_SOURCES = idn.ggo idn_cmd.c idn_cmd.h - libidn_cmd_la_LIBADD = ../gl/libgnu.la - libidn_cmd_la_CFLAGS = - --idn_cmd.c idn_cmd.h: idn.ggo Makefile.am -+# pattern rule (%) needed for parallel make (-j) -+idn_cmd%c idn_cmd%h: idn.ggo - gengetopt --unamed-opts --no-handle-version --no-handle-help \ - --set-package="idn" \ - --input $^ --file-name idn_cmd --- -1.9.1 - ---- a/src/Makefile.in -+++ b/src/Makefile.in -@@ -1,7 +1,7 @@ --# Makefile.in generated by automake 1.14.1 from Makefile.am. -+# Makefile.in generated by automake 1.15.1 from Makefile.am. - # @configure_input@ - --# Copyright (C) 1994-2013 Free Software Foundation, Inc. -+# Copyright (C) 1994-2017 Free Software Foundation, Inc. - - # This Makefile.in is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, -@@ -34,7 +34,17 @@ - - - VPATH = @srcdir@ --am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' -+am__is_gnu_make = { \ -+ if test -z '$(MAKELEVEL)'; then \ -+ false; \ -+ elif test -n '$(MAKE_HOST)'; then \ -+ true; \ -+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ -+ true; \ -+ else \ -+ false; \ -+ fi; \ -+} - am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ -@@ -99,8 +109,6 @@ - host_triplet = @host@ - bin_PROGRAMS = idn$(EXEEXT) - subdir = src --DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ -- $(top_srcdir)/build-aux/depcomp $(dist_lisp_DATA) - ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 - am__aclocal_m4_deps = $(top_srcdir)/lib/gl/m4/ctype.m4 \ - $(top_srcdir)/lib/gl/m4/gnulib-comp.m4 \ -@@ -184,6 +192,8 @@ - $(top_srcdir)/m4/wint_t.m4 $(top_srcdir)/configure.ac - am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -+DIST_COMMON = $(srcdir)/Makefile.am $(dist_lisp_DATA) \ -+ $(am__DIST_COMMON) - mkinstalldirs = $(install_sh) -d - CONFIG_HEADER = $(top_builddir)/config.h - CONFIG_CLEAN_FILES = -@@ -294,6 +304,8 @@ - done | $(am__uniquify_input)` - ETAGS = etags - CTAGS = ctags -+am__DIST_COMMON = $(srcdir)/Makefile.in \ -+ $(top_srcdir)/build-aux/depcomp - DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) - ACLOCAL = @ACLOCAL@ - ALLOCA = @ALLOCA@ -@@ -863,6 +875,7 @@ - LT_AGE = @LT_AGE@ - LT_CURRENT = @LT_CURRENT@ - LT_REVISION = @LT_REVISION@ -+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ - MAKEINFO = @MAKEINFO@ - MANIFEST_TOOL = @MANIFEST_TOOL@ - MKDIR_P = @MKDIR_P@ -@@ -1200,7 +1213,6 @@ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu src/Makefile --.PRECIOUS: Makefile - Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ -@@ -1562,10 +1574,13 @@ - pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ - uninstall-binPROGRAMS uninstall-dist_lispDATA - -+.PRECIOUS: Makefile -+ - - idn.c: $(BUILT_SOURCES) - --idn_cmd.c idn_cmd.h: idn.ggo Makefile.am -+# pattern rule (%) needed for parallel make (-j) -+idn_cmd%c idn_cmd%h: idn.ggo - gengetopt --unamed-opts --no-handle-version --no-handle-help \ - --set-package="idn" \ - --input $^ --file-name idn_cmd diff --git a/net-dns/libidn/libidn-1.33-r2.ebuild b/net-dns/libidn/libidn-1.33-r2.ebuild deleted file mode 100644 index 3d0c3be3b448..000000000000 --- a/net-dns/libidn/libidn-1.33-r2.ebuild +++ /dev/null @@ -1,122 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 -inherit elisp-common java-pkg-opt-2 mono-env multilib-minimal libtool - -DESCRIPTION="Internationalized Domain Names (IDN) implementation" -HOMEPAGE="https://www.gnu.org/software/libidn/" -SRC_URI="mirror://gnu/libidn/${P}.tar.gz" - -LICENSE="GPL-2 GPL-3 LGPL-3 java? ( Apache-2.0 )" -SLOT="0" -KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh ~sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" -IUSE="doc emacs java mono nls static-libs" - -DOCS=( AUTHORS ChangeLog FAQ NEWS README THANKS TODO ) -COMMON_DEPEND=" - emacs? ( virtual/emacs ) - mono? ( >=dev-lang/mono-0.95 ) -" -DEPEND="${COMMON_DEPEND} - nls? ( - >=sys-devel/gettext-0.17 - ) - java? ( - >=virtual/jdk-1.5 - ) -" -RDEPEND="${COMMON_DEPEND} - nls? ( - >=virtual/libintl-0-r1[${MULTILIB_USEDEP}] - ) - java? ( - >=virtual/jre-1.5 - ) -" -PATCHES=( - "${FILESDIR}"/${PN}-1.33-CVE-2017-14062.patch - "${FILESDIR}"/${PN}-1.33-parallel-make.patch -) - -pkg_setup() { - mono-env_pkg_setup - java-pkg-opt-2_pkg_setup -} - -src_prepare() { - default - - # bundled, with wrong bytecode - rm "${S}/java/${P}.jar" || die - - # prevent triggering doc updates after punycode.c patch - touch doc/texi/punycode* doc/man/punycode* doc/libidn.info || die - - elibtoolize # for Solaris shared objects -} - -multilib_src_configure() { - ECONF_SOURCE=${S} GJDOC=javadoc \ - econf \ - $(multilib_native_use_enable java) \ - $(multilib_native_use_enable mono csharp mono) \ - $(use_enable nls) \ - $(use_enable static-libs static) \ - --disable-silent-rules \ - --disable-valgrind-tests \ - --with-lispdir="${EPREFIX}${SITELISP}/${PN}" \ - --with-packager-bug-reports="https://bugs.gentoo.org" \ - --with-packager-version="r${PR}" \ - --with-packager="Gentoo" -} - -multilib_src_compile() { - default - - if multilib_is_native_abi; then - use emacs && elisp-compile "${S}"/src/*.el - use java && use doc && emake -C java/src/main/java javadoc - fi -} - -multilib_src_test() { - # only run libidn specific tests and not gnulib tests (bug #539356) - emake -C tests check -} - -multilib_src_install() { - emake DESTDIR="${D}" install - - if multilib_is_native_abi && use java; then - java-pkg_newjar java/${P}.jar ${PN}.jar - rm -r "${ED}"/usr/share/java || die - use doc && java-pkg_dojavadoc "${S}"/doc/java - fi -} - -multilib_src_install_all() { - if use emacs; then - # *.el are installed by the build system - elisp-install ${PN} "${S}"/src/*.elc - elisp-site-file-install "${FILESDIR}/50${PN}-gentoo.el" - else - rm -r "${ED}/usr/share/emacs" || die - fi - - einstalldocs - - if use doc ; then - dodoc -r doc/reference/html/ - fi - - prune_libtool_files -} - -pkg_postinst() { - use emacs && elisp-site-regen -} - -pkg_postrm() { - use emacs && elisp-site-regen -} diff --git a/net-dns/libidn/libidn-1.33-r99.ebuild b/net-dns/libidn/libidn-1.33-r99.ebuild deleted file mode 100644 index d80feb1ef34b..000000000000 --- a/net-dns/libidn/libidn-1.33-r99.ebuild +++ /dev/null @@ -1,59 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 -inherit autotools multilib-minimal libtool - -DESCRIPTION="Internationalized Domain Names (IDN) implementation" -HOMEPAGE="https://www.gnu.org/software/libidn/" -SRC_URI=" - mirror://gnu/libidn/${P}.tar.gz - https://dev.gentoo.org/~polynomial-c/${P}-security_backports-01.tar.xz -" - -LICENSE="GPL-2 GPL-3 LGPL-3" -SLOT="1.33" -KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh ~sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" - -RDEPEND="!<${CATEGORY}/${PN}-1.35:0" - -PATCHES=( - "${FILESDIR}"/${PN}-1.33-parallel-make.patch -) - -src_prepare() { - default - - eapply "${WORKDIR}"/patches - - # breaks eautoreconf - sed '/AM_INIT_AUTOMAKE/s@ -Werror@@' -i configure.ac || die - # Breaks build because --disable-gtk-doc* gets ignored - sed '/^SUBDIRS/s@ doc@@' -i Makefile.am || die - eautoreconf - elibtoolize # for Solaris shared objects -} - -multilib_src_configure() { - local myeconfargs=( - --disable-java - --disable-csharp - --disable-nls - --disable-static - --disable-silent-rules - --disable-valgrind-tests - --with-packager-bug-reports="https://bugs.gentoo.org" - --with-packager-version="r${PR}" - --with-packager="Gentoo" - ) - ECONF_SOURCE="${S}" econf "${myeconfargs[@]}" -} - -multilib_src_test() { - # only run libidn specific tests and not gnulib tests (bug #539356) - emake -C tests check -} - -multilib_src_install() { - dolib.so lib/.libs/libidn.so.11* -} -- cgit v1.2.3-65-gdbad From 430e6c36df5ca66146be52035414dfdad90c625b Mon Sep 17 00:00:00 2001 From: Andreas Sturmlechner Date: Sat, 7 Dec 2019 15:34:35 +0100 Subject: dev-python/pycairo: Fix the fix Closes: https://bugs.gentoo.org/702210 Package-Manager: Portage-2.3.81, Repoman-2.3.19 Signed-off-by: Andreas Sturmlechner --- dev-python/pycairo/pycairo-1.18.2.ebuild | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dev-python/pycairo/pycairo-1.18.2.ebuild b/dev-python/pycairo/pycairo-1.18.2.ebuild index d1e334554fd1..9f1cd5f0198d 100644 --- a/dev-python/pycairo/pycairo-1.18.2.ebuild +++ b/dev-python/pycairo/pycairo-1.18.2.ebuild @@ -32,7 +32,8 @@ DEPEND="${RDEPEND}" RESTRICT="!test? ( test )" python_check_deps() { - use doc && has_version "dev-python/sphinx[${PYTHON_USEDEP}]" + use doc || return 0 + has_version "dev-python/sphinx[${PYTHON_USEDEP}]" } python_compile_all() { -- cgit v1.2.3-65-gdbad From d51fec51c03a67074cf521d274e47ebcf1e1c412 Mon Sep 17 00:00:00 2001 From: Andreas Sturmlechner Date: Sat, 7 Dec 2019 15:35:40 +0100 Subject: dev-python/pyproj: Fix the fix Closes: https://bugs.gentoo.org/702218 Package-Manager: Portage-2.3.81, Repoman-2.3.19 Signed-off-by: Andreas Sturmlechner --- dev-python/pyproj/pyproj-2.4.1.ebuild | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dev-python/pyproj/pyproj-2.4.1.ebuild b/dev-python/pyproj/pyproj-2.4.1.ebuild index 4caf7eaf1353..52b61f2b5316 100644 --- a/dev-python/pyproj/pyproj-2.4.1.ebuild +++ b/dev-python/pyproj/pyproj-2.4.1.ebuild @@ -31,7 +31,8 @@ BDEPEND="dev-python/setuptools[${PYTHON_USEDEP}] distutils_enable_tests pytest python_check_deps() { - use doc && has_version "dev-python/sphinx[${PYTHON_USEDEP}]" + use doc || return 0 + has_version "dev-python/sphinx[${PYTHON_USEDEP}]" } python_prepare_all() { -- cgit v1.2.3-65-gdbad From 6b7cf0af64a5bdcd3e98b0e89e4202cd3f35ebdf Mon Sep 17 00:00:00 2001 From: Fabian Groffen Date: Sat, 7 Dec 2019 15:36:57 +0100 Subject: app-admin/diamond-4.0.515.20180315: bump for py3 support Package-Manager: Portage-2.3.76, Repoman-2.3.16 Signed-off-by: Fabian Groffen --- app-admin/diamond/Manifest | 1 + app-admin/diamond/diamond-4.0.515.20180315.ebuild | 86 +++++++++++++++++++++++ app-admin/diamond/diamond-9999.ebuild | 7 +- 3 files changed, 91 insertions(+), 3 deletions(-) create mode 100644 app-admin/diamond/diamond-4.0.515.20180315.ebuild diff --git a/app-admin/diamond/Manifest b/app-admin/diamond/Manifest index 3cfe85f452f6..d73e7280e28d 100644 --- a/app-admin/diamond/Manifest +++ b/app-admin/diamond/Manifest @@ -1,2 +1,3 @@ +DIST python-diamond-4.0.515.20180315.tar.gz 673084 BLAKE2B a1903368fc1b540028038a401cf68c772fd04d5d19dc7e3773c9909c1b4ccb5eeba6e184fd46da83e9c0234675e51331a4097a810191ac1a18242cbf96b0456c SHA512 8497362659fa43e4c72bd28d03ff9d8b3ccaab3901cb5e0e1e252340b70a6ab0972db37863daad0d7dd8e92c83a82f9ec151af07ca5fdafee0d214a7061b5f9f DIST python-diamond-4.0.515.tar.gz 620337 BLAKE2B 8df675f7e91086dc6e98166c3f6c25c7837bd53f720cd0dfdf05a1dd2954aaa190bfe8844d01acfcdf46d5be917c29c0e231f2b433a648d6dcc1f34e2c617d91 SHA512 8516e46f4f75400a55ca0127789344a897fc7cd6c10f0f8379d30db58de5a09ae676e340371cdf1a0c9ca894fd355699a1a0f430bfad148e32157d5eb97aaef5 DIST python-diamond-4.0.tar.gz 491433 BLAKE2B ddf678b758b046b80fe347c2cd8ce2fec46f03e65415735d88969d66dc05466730e52df9e8efc27e3a3bff13862c4efcc393de6d05ec6d350e3912a706d298cb SHA512 c4a6e63bdc55f9e0ac2fbf3b644be91662635c08ecc864dfaaebf2fe62fb45609c099da63efd93ed498d2dc9e95bbcb64be09f715e21d59b30bce958a96dc56b diff --git a/app-admin/diamond/diamond-4.0.515.20180315.ebuild b/app-admin/diamond/diamond-4.0.515.20180315.ebuild new file mode 100644 index 000000000000..8882dd7f46ca --- /dev/null +++ b/app-admin/diamond/diamond-4.0.515.20180315.ebuild @@ -0,0 +1,86 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +if [[ ${PV} = 9999* ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/python-diamond/Diamond.git" + S=${WORKDIR}/diamond-${PV} +else + GHASH=0f3eb04327d6d3ed5e53a9967d6c9d2c09714a47 + SRC_URI="https://github.com/python-diamond/Diamond/archive/${GHASH}.tar.gz -> python-diamond-${PV}.tar.gz" + KEYWORDS="~amd64 ~arm ~x86 ~amd64-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" + S=${WORKDIR}/Diamond-${GHASH} +fi + +PYTHON_COMPAT=( python3_6 ) + +inherit distutils-r1 prefix + +DESCRIPTION="Python daemon that collects and publishes system metrics" +HOMEPAGE="https://github.com/python-diamond/Diamond" + +LICENSE="MIT" +SLOT="0" +IUSE="test mongo mysql snmp redis" + +RDEPEND="dev-python/configobj + dev-python/setproctitle + mongo? ( dev-python/pymongo ) + mysql? ( dev-python/mysql-python ) + snmp? ( dev-python/pysnmp ) + redis? ( dev-python/redis-py ) + !kernel_linux? ( >=dev-python/psutil-3 )" +DEPEND="${RDEPEND} + test? ( + dev-python/mock + dev-python/pysnmp + )" + +src_prepare() { + # adjust for Prefix + hprefixify bin/diamond* + + # fix the version (not set in GitHub archive) + sed -i -e "s/__VERSIONTOKENHERE__/${PV}/" src/diamond/version.py.tmpl || die + # fix psutil usage + sed -i -e 's/psutil\.network_io_counters/psutil.net_io_counters/' \ + src/collectors/network/network.py || die + # fix symlink out of place + rm README.md || die + cp docs/index.md README.md || die + + # this module isn't Python3 yet (lambda), if you use this and have a + # fix, let me know + rm src/diamond/handler/rrdtool.py || die + + distutils-r1_src_prepare +} + +python_test() { + # don't want to depend on docker for just this + mv src/collectors/docker_collector/test/{test,no}docker_collector.py || die + # fails on binding ports + mv src/collectors/portstat/tests/{test,no}_portstat.py || die + "${PYTHON}" ./test.py || die "Tests fail with ${PYTHON}" +} + +python_install() { + export VIRTUAL_ENV=1 + distutils-r1_python_install + python_optimize + mv "${ED}"/usr/etc "${ED}"/ || die + rm "${ED}"/etc/diamond/*.windows # won't need these + sed -i \ + -e '/pid_file =/s:/var/run:/run:' \ + "${ED}"/etc/diamond/diamond.conf.example || die + hprefixify "${ED}"/etc/diamond/diamond.conf.example +} + +src_install() { + distutils-r1_src_install + newinitd "${FILESDIR}"/${PN}.initd ${PN} + newconfd "${FILESDIR}"/${PN}.confd ${PN} + keepdir /var/log/diamond +} diff --git a/app-admin/diamond/diamond-9999.ebuild b/app-admin/diamond/diamond-9999.ebuild index 57df76bc0741..73f30e45464a 100644 --- a/app-admin/diamond/diamond-9999.ebuild +++ b/app-admin/diamond/diamond-9999.ebuild @@ -1,7 +1,7 @@ -# Copyright 1999-2017 Gentoo Foundation +# Copyright 1999-2019 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=5 +EAPI=6 if [[ ${PV} = 9999* ]]; then inherit git-r3 @@ -13,7 +13,7 @@ else S=${WORKDIR}/Diamond-${PV} fi -PYTHON_COMPAT=( python2_7 ) +PYTHON_COMPAT=( python3_6 ) inherit distutils-r1 prefix @@ -55,6 +55,7 @@ python_test() { python_install() { export VIRTUAL_ENV=1 distutils-r1_python_install + python_optimize mv "${ED}"/usr/etc "${ED}"/ || die rm "${ED}"/etc/diamond/*.windows # won't need these sed -i \ -- cgit v1.2.3-65-gdbad