summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
Diffstat (limited to 'eclass')
-rw-r--r--eclass/Manifest.gzbin35988 -> 35831 bytes
-rw-r--r--eclass/l10n.eclass148
-rw-r--r--eclass/python-utils-r1.eclass7
-rw-r--r--eclass/ruby-single.eclass8
-rw-r--r--eclass/udev.eclass2
-rw-r--r--eclass/virtualx.eclass33
6 files changed, 27 insertions, 171 deletions
diff --git a/eclass/Manifest.gz b/eclass/Manifest.gz
index 7abd1623848d..1096a671790a 100644
--- a/eclass/Manifest.gz
+++ b/eclass/Manifest.gz
Binary files differ
diff --git a/eclass/l10n.eclass b/eclass/l10n.eclass
deleted file mode 100644
index 487c7a30a055..000000000000
--- a/eclass/l10n.eclass
+++ /dev/null
@@ -1,148 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-# @DEAD
-# Use plocale.eclass as drop-in replacement.
-# Functions should be replaced as follows:
-# l10n_for_each_locale_do → plocale_for_each_locale
-# plocale_for_each_disabled_locale → l10n_for_each_disabled_locale_do
-# plocale_find_changes → l10n_find_plocales_changes
-# plocale_get_locales → l10n_get_locales
-#
-# Rationale: Ever since the L10N USE_EXPAND variable was introduced,
-# the name of this eclass has caused some confusion, because it operates
-# on LINGUAS and is unrelated to L10N.
-#
-# @ECLASS: l10n.eclass
-# @MAINTAINER:
-# Ulrich Müller <ulm@gentoo.org>
-# @AUTHOR:
-# Ben de Groot <yngwin@gentoo.org>
-# @SUPPORTED_EAPIS: 5 6 7
-# @BLURB: convenience functions to handle localizations
-# @DEPRECATED: plocale.eclass
-# @DESCRIPTION:
-# The l10n (localization) eclass offers a number of functions to more
-# conveniently handle localizations (translations) offered by packages.
-# These are meant to prevent code duplication for such boring tasks as
-# determining the cross-section between the user's set LINGUAS and what
-# is offered by the package.
-
-case ${EAPI} in
- 5|6|7) ;;
- *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
-esac
-
-inherit strip-linguas
-
-if [[ -z ${_L10N_ECLASS} ]]; then
-_L10N_ECLASS=1
-
-# @ECLASS-VARIABLE: PLOCALES
-# @DEFAULT_UNSET
-# @DESCRIPTION:
-# Variable listing the locales for which localizations are offered by
-# the package.
-#
-# Example: PLOCALES="cy de el_GR en_US pt_BR vi zh_CN"
-
-# @ECLASS-VARIABLE: PLOCALE_BACKUP
-# @DEFAULT_UNSET
-# @DESCRIPTION:
-# In some cases the package fails when none of the offered PLOCALES are
-# selected by the user. In that case this variable should be set to a
-# default locale (usually 'en' or 'en_US') as backup.
-#
-# Example: PLOCALE_BACKUP="en_US"
-
-# @FUNCTION: l10n_for_each_locale_do
-# @USAGE: <function>
-# @DESCRIPTION:
-# Convenience function for processing localizations. The parameter should
-# be a function (defined in the consuming eclass or ebuild) which takes
-# an individual localization as (last) parameter.
-#
-# Example: l10n_for_each_locale_do install_locale
-l10n_for_each_locale_do() {
- local locs x
- locs=$(l10n_get_locales)
- for x in ${locs}; do
- "${@}" ${x} || die "failed to process enabled ${x} locale"
- done
-}
-
-# @FUNCTION: l10n_for_each_disabled_locale_do
-# @USAGE: <function>
-# @DESCRIPTION:
-# Complementary to l10n_for_each_locale_do, this function will process
-# locales that are disabled. This could be used for example to remove
-# locales from a Makefile, to prevent them from being built needlessly.
-l10n_for_each_disabled_locale_do() {
- local locs x
- locs=$(l10n_get_locales disabled)
- for x in ${locs}; do
- "${@}" ${x} || die "failed to process disabled ${x} locale"
- done
-}
-
-# @FUNCTION: l10n_find_plocales_changes
-# @USAGE: <translations dir> <filename pre pattern> <filename post pattern>
-# @DESCRIPTION:
-# Ebuild maintenance helper function to find changes in package offered
-# locales when doing a version bump. This could be added for example to
-# src_prepare
-#
-# Example: l10n_find_plocales_changes "${S}/src/translations" "${PN}_" '.ts'
-l10n_find_plocales_changes() {
- [[ $# -ne 3 ]] && die "Exactly 3 arguments are needed!"
- ebegin "Looking in ${1} for new locales"
- pushd "${1}" >/dev/null || die "Cannot access ${1}"
- local current= x=
- for x in ${2}*${3} ; do
- x=${x#"${2}"}
- x=${x%"${3}"}
- current+="${x} "
- done
- popd >/dev/null
- # RHS will be sorted with single spaces so ensure the LHS is too
- # before attempting to compare them for equality. See bug #513242.
- # Run them both through the same sorting algorithm so we don't have
- # to worry about them being the same.
- if [[ "$(printf '%s\n' ${PLOCALES} | LC_ALL=C sort)" != "$(printf '%s\n' ${current} | LC_ALL=C sort)" ]] ; then
- eend 1 "There are changes in locales! This ebuild should be updated to:"
- eerror "PLOCALES=\"${current%[[:space:]]}\""
- return 1
- else
- eend 0
- fi
-}
-
-# @FUNCTION: l10n_get_locales
-# @USAGE: [disabled]
-# @DESCRIPTION:
-# Determine which LINGUAS the user has enabled that are offered by the
-# package, as listed in PLOCALES, and return them. In case no locales
-# are selected, fall back on PLOCALE_BACKUP. When the disabled argument
-# is given, return the disabled locales instead of the enabled ones.
-l10n_get_locales() {
- local loc locs
- if [[ -z ${LINGUAS+set} ]]; then
- # enable all if unset
- locs=${PLOCALES}
- else
- for loc in ${LINGUAS}; do
- has ${loc} ${PLOCALES} && locs+="${loc} "
- done
- fi
- [[ -z ${locs} ]] && locs=${PLOCALE_BACKUP}
- if [[ ${1} == disabled ]]; then
- local disabled_locs
- for loc in ${PLOCALES}; do
- has ${loc} ${locs} || disabled_locs+="${loc} "
- done
- locs=${disabled_locs}
- fi
- printf "%s" "${locs}"
-}
-
-fi
diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass
index 168c767a2eea..b104b6694ac3 100644
--- a/eclass/python-utils-r1.eclass
+++ b/eclass/python-utils-r1.eclass
@@ -1272,7 +1272,12 @@ epytest() {
echo "${@}" >&2
"${@}" || die -n "pytest failed with ${EPYTHON}"
- return ${?}
+ local ret=${?}
+
+ # remove common temporary directories left over by pytest plugins
+ rm -rf .hypothesis .pytest_cache || die
+
+ return ${ret}
}
# @FUNCTION: eunittest
diff --git a/eclass/ruby-single.eclass b/eclass/ruby-single.eclass
index bf339bc9b601..e19597b99a01 100644
--- a/eclass/ruby-single.eclass
+++ b/eclass/ruby-single.eclass
@@ -7,7 +7,7 @@
# @AUTHOR:
# Author: Hans de Graaff <graaff@gentoo.org>
# Based on python-single-r1 by: Michał Górny <mgorny@gentoo.org>
-# @SUPPORTED_EAPIS: 4 5 6 7
+# @SUPPORTED_EAPIS: 4 5 6 7 8
# @BLURB: An eclass for Ruby packages not installed for multiple implementations.
# @DESCRIPTION:
# An eclass for packages which don't support being installed for
@@ -17,7 +17,7 @@
# pull in the dependency on the requested ruby targets.
#
# @CODE
-# USE_RUBY="ruby20 ruby21"
+# USE_RUBY="ruby26 ruby27"
# inherit ruby-single
# RDEPEND="${RUBY_DEPS}"
# @CODE
@@ -26,7 +26,7 @@ case "${EAPI:-0}" in
0|1|2|3)
die "Unsupported EAPI=${EAPI:-0} (too old) for ${ECLASS}"
;;
- 4|5|6|7)
+ 4|5|6|7|8)
;;
*)
die "Unsupported EAPI=${EAPI} (unknown) for ${ECLASS}"
@@ -66,7 +66,7 @@ inherit ruby-utils
#
# Example value:
# @CODE
-# || ( dev-lang/ruby:2.0 dev-lang/ruby:1.9 ) virtual/rubygems
+# || ( dev-lang/ruby:2.7 dev-lang/ruby:2.6 ) virtual/rubygems
# @CODE
#
# The order of dependencies will change over time to best match the
diff --git a/eclass/udev.eclass b/eclass/udev.eclass
index 7d5f59ab8d96..7f9415914cd2 100644
--- a/eclass/udev.eclass
+++ b/eclass/udev.eclass
@@ -3,7 +3,7 @@
# @ECLASS: udev.eclass
# @MAINTAINER:
-# udev-bugs@gentoo.org
+# systemd@gentoo.org
# @SUPPORTED_EAPIS: 5 6 7 8
# @BLURB: Default eclass for determining udev directories.
# @DESCRIPTION:
diff --git a/eclass/virtualx.eclass b/eclass/virtualx.eclass
index ca52e8d2815c..9d446cfdd36a 100644
--- a/eclass/virtualx.eclass
+++ b/eclass/virtualx.eclass
@@ -6,17 +6,16 @@
# x11@gentoo.org
# @AUTHOR:
# Original author: Martin Schlemmer <azarah@gentoo.org>
-# @SUPPORTED_EAPIS: 6 7
-# @BLURB: This eclass can be used for packages that needs a working X environment to build.
+# @SUPPORTED_EAPIS: 6 7 8
+# @BLURB: This eclass can be used for packages that need a working X environment to build.
-case ${EAPI:-0} in
- [0-5]) die "virtualx.eclass: EAPI ${EAPI} is too old." ;;
- 6|7) ;;
- *) die "virtualx.eclass: EAPI ${EAPI} is not supported yet." ;;
+case ${EAPI} in
+ 6|7|8) ;;
+ *) die "${ECLASS}: EAPI ${EAPI:-0} is not supported." ;;
esac
-if [[ ! ${_VIRTUAL_X} ]]; then
-_VIRTUAL_X=1
+if [[ ! ${_VIRTUALX_ECLASS} ]]; then
+_VIRTUALX_ECLASS=1
# @ECLASS-VARIABLE: VIRTUALX_REQUIRED
# @PRE_INHERIT
@@ -30,20 +29,20 @@ _VIRTUAL_X=1
: ${VIRTUALX_REQUIRED:=test}
# @ECLASS-VARIABLE: VIRTUALX_DEPEND
+# @OUTPUT_VARIABLE
# @DESCRIPTION:
-# Dep string available for use outside of eclass, in case a more
-# complicated dep is needed.
-# You can specify the variable BEFORE inherit to add more dependencies.
-VIRTUALX_DEPEND="${VIRTUALX_DEPEND}
+# Standard dependencies string that is automatically added to BDEPEND
+# (in EAPI-6: DEPEND) unless VIRTUALX_REQUIRED is set to "manual".
+# DEPRECATED: Pre-EAPI-8 you can specify the variable BEFORE inherit
+# to add more dependencies.
+[[ ${EAPI} != [67] ]] && VIRTUALX_DEPEND=""
+VIRTUALX_DEPEND+="
x11-base/xorg-server[xvfb]
x11-apps/xhost
"
+[[ ${EAPI} != [67] ]] && readonly VIRTUALX_DEPEND
-# @ECLASS-VARIABLE: VIRTUALX_COMMAND
-# @DESCRIPTION:
-# Command (or eclass function call) to be run in the X11 environment
-# (within virtualmake function).
-: ${VIRTUALX_COMMAND:="emake"}
+[[ ${VIRTUALX_COMMAND} ]] && die "VIRTUALX_COMMAND has been removed and is a no-op"
case ${VIRTUALX_REQUIRED} in
manual)