summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2021-03-12 21:55:15 +0000
committerV3n3RiX <venerix@redcorelinux.org>2021-03-12 21:55:15 +0000
commit7218e1b46bceac05841e90472501742d905fb3fc (patch)
tree56fae051db521b8fce8014cbc8b11484885b14b3 /eclass
parent6d691ad5b6239929063441bbd14c489e92e7396e (diff)
gentoo resync : 12.03.2021
Diffstat (limited to 'eclass')
-rw-r--r--eclass/Manifest.gzbin37087 -> 37101 bytes
-rw-r--r--eclass/aspell-dict-r1.eclass14
-rw-r--r--eclass/autotools-multilib.eclass1
-rw-r--r--eclass/cmake-multilib.eclass51
-rw-r--r--eclass/distutils-r1.eclass139
-rw-r--r--eclass/docs.eclass2
-rw-r--r--eclass/emboss-r2.eclass10
-rw-r--r--eclass/freedict.eclass33
-rw-r--r--eclass/kernel-install.eclass87
-rw-r--r--eclass/mozcoreconf-v6.eclass23
-rw-r--r--eclass/mozlinguas-v2.eclass18
-rw-r--r--eclass/python-r1.eclass13
-rw-r--r--eclass/python-utils-r1.eclass181
-rw-r--r--eclass/tmpfiles.eclass10
14 files changed, 227 insertions, 355 deletions
diff --git a/eclass/Manifest.gz b/eclass/Manifest.gz
index e08429eadcb2..a6e1a64e3a41 100644
--- a/eclass/Manifest.gz
+++ b/eclass/Manifest.gz
Binary files differ
diff --git a/eclass/aspell-dict-r1.eclass b/eclass/aspell-dict-r1.eclass
index b07af61fdf1e..89f7b954dd68 100644
--- a/eclass/aspell-dict-r1.eclass
+++ b/eclass/aspell-dict-r1.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: aspell-dict-r1.eclass
@@ -7,7 +7,7 @@
# @AUTHOR:
# Original author: Seemant Kulleen
# -r1 author: David Seifert
-# @SUPPORTED_EAPIS: 6
+# @SUPPORTED_EAPIS: 7
# @BLURB: An eclass to streamline the construction of ebuilds for new aspell dicts
# @DESCRIPTION:
# The aspell-dict-r1 eclass is designed to streamline the construction of
@@ -22,6 +22,7 @@
# inheriting the eclass.
# @ECLASS-VARIABLE: ASPELL_VERSION
+# @DEFAULT_UNSET
# @DESCRIPTION:
# What major version of aspell is this dictionary for? Valid values are 5, 6 or undefined.
# This value is used to construct SRC_URI and *DEPEND strings. If defined to 6,
@@ -30,10 +31,10 @@
# it needs to be overridden before inheriting the eclass.
case ${EAPI:-0} in
- [0-5])
+ [0-6])
die "aspell-dict-r1.eclass is banned in EAPI ${EAPI:-0}"
;;
- 6)
+ 7)
;;
*)
die "Unknown EAPI ${EAPI:-0}"
@@ -43,24 +44,24 @@ esac
EXPORT_FUNCTIONS src_configure src_install
if [[ ! ${_ASPELL_DICT_R1} ]]; then
+_ASPELL_DICT_R1=1
# aspell packages have an idiosyncratic versioning scheme, that is
# the last separating version separator is replaced by a '-'.
_ASPELL_P=aspell${ASPELL_VERSION}-${PN/aspell-/}-${PV%.*}-${PV##*.}
+S="${WORKDIR}/${_ASPELL_P}"
# @ECLASS-VARIABLE: ASPELL_SPELLANG
# @DESCRIPTION:
# Short (readonly) form of the language code, generated from ${PN}
# For instance, 'aspell-hu' yields the value 'hu'.
readonly ASPELL_SPELLANG=${PN/aspell-/}
-S="${WORKDIR}/${_ASPELL_P}"
DESCRIPTION="${ASPELL_LANG} language dictionary for aspell"
HOMEPAGE="http://aspell.net"
SRC_URI="mirror://gnu/aspell/dict/${ASPELL_SPELLANG}/${_ASPELL_P}.tar.bz2"
unset _ASPELL_P
-IUSE=""
SLOT="0"
_ASPELL_MAJOR_VERSION=${ASPELL_VERSION:-5}
@@ -86,5 +87,4 @@ aspell-dict-r1_src_install() {
[[ -s info ]] && dodoc info
}
-_ASPELL_DICT_R1=1
fi
diff --git a/eclass/autotools-multilib.eclass b/eclass/autotools-multilib.eclass
index 58bf285e0e91..ae400b885a7c 100644
--- a/eclass/autotools-multilib.eclass
+++ b/eclass/autotools-multilib.eclass
@@ -1,6 +1,7 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
+# @DEAD
# @ECLASS: autotools-multilib.eclass
# @MAINTAINER:
# gx86-multilib team <multilib@gentoo.org>
diff --git a/eclass/cmake-multilib.eclass b/eclass/cmake-multilib.eclass
index 2693d9c72e2b..e6d8fe64a02f 100644
--- a/eclass/cmake-multilib.eclass
+++ b/eclass/cmake-multilib.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: cmake-multilib.eclass
@@ -6,27 +6,42 @@
# gx86-multilib team <multilib@gentoo.org>
# @AUTHOR:
# Author: Michał Górny <mgorny@gentoo.org>
-# @SUPPORTED_EAPIS: 6 7
-# @BLURB: cmake-utils wrapper for multilib builds
+# @SUPPORTED_EAPIS: 7
+# @BLURB: cmake wrapper for multilib builds
# @DESCRIPTION:
-# The cmake-multilib.eclass provides a glue between cmake-utils.eclass(5)
+# The cmake-multilib.eclass provides a glue between cmake.eclass(5)
# and multilib-minimal.eclass(5), aiming to provide a convenient way
# to build packages using cmake for multiple ABIs.
#
# Inheriting this eclass sets IUSE and exports default multilib_src_*()
-# sub-phases that call cmake-utils phase functions for each ABI enabled.
+# sub-phases that call cmake phase functions for each ABI enabled.
# The multilib_src_*() functions can be defined in ebuild just like
-# in multilib-minimal, yet they ought to call appropriate cmake-utils
+# in multilib-minimal, yet they ought to call appropriate cmake
# phase rather than 'default'.
# @ECLASS-VARIABLE: CMAKE_ECLASS
# @DESCRIPTION:
-# Default is "cmake-utils" for compatibility. Specify "cmake" for ebuilds
-# that ported from cmake-utils.eclass to cmake.eclass already.
+# Default is "cmake-utils" for compatibility in EAPI-7. Specify "cmake" for
+# ebuilds that ported to cmake.eclass already. Future EAPI is "cmake" only.
: ${CMAKE_ECLASS:=cmake-utils}
+# @ECLASS-VARIABLE: _CMAKE_ECLASS_IMPL
+# @INTERNAL
+# @DESCRIPTION:
+# Default is "cmake" for future EAPI. Cleanup once EAPI-7 support is gone.
+_CMAKE_ECLASS_IMPL=cmake
+
case ${EAPI:-0} in
- [67]) ;;
+ 7)
+ case ${CMAKE_ECLASS} in
+ cmake-utils|cmake) ;;
+ *)
+ eerror "Unknown value for \${CMAKE_ECLASS}"
+ die "Value ${CMAKE_ECLASS} is not supported"
+ ;;
+ esac
+ _CMAKE_ECLASS_IMPL=${CMAKE_ECLASS}
+ ;;
*) die "EAPI=${EAPI} is not supported" ;;
esac
@@ -34,15 +49,7 @@ if [[ ${CMAKE_IN_SOURCE_BUILD} ]]; then
die "${ECLASS}: multilib support requires out-of-source builds."
fi
-case ${CMAKE_ECLASS} in
- cmake-utils|cmake) ;;
- *)
- eerror "Unknown value for \${CMAKE_ECLASS}"
- die "Value ${CMAKE_ECLASS} is not supported"
- ;;
-esac
-
-inherit ${CMAKE_ECLASS} multilib-minimal
+inherit ${_CMAKE_ECLASS_IMPL} multilib-minimal
EXPORT_FUNCTIONS src_configure src_compile src_test src_install
@@ -53,7 +60,7 @@ cmake-multilib_src_configure() {
}
multilib_src_configure() {
- ${CMAKE_ECLASS}_src_configure "${_cmake_args[@]}"
+ ${_CMAKE_ECLASS_IMPL}_src_configure "${_cmake_args[@]}"
}
cmake-multilib_src_compile() {
@@ -63,7 +70,7 @@ cmake-multilib_src_compile() {
}
multilib_src_compile() {
- ${CMAKE_ECLASS}_src_compile "${_cmake_args[@]}"
+ ${_CMAKE_ECLASS_IMPL}_src_compile "${_cmake_args[@]}"
}
cmake-multilib_src_test() {
@@ -73,7 +80,7 @@ cmake-multilib_src_test() {
}
multilib_src_test() {
- ${CMAKE_ECLASS}_src_test "${_cmake_args[@]}"
+ ${_CMAKE_ECLASS_IMPL}_src_test "${_cmake_args[@]}"
}
cmake-multilib_src_install() {
@@ -83,5 +90,5 @@ cmake-multilib_src_install() {
}
multilib_src_install() {
- ${CMAKE_ECLASS}_src_install "${_cmake_args[@]}"
+ ${_CMAKE_ECLASS_IMPL}_src_install "${_cmake_args[@]}"
}
diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
index ca2ed98c8e8c..655a33e0d208 100644
--- a/eclass/distutils-r1.eclass
+++ b/eclass/distutils-r1.eclass
@@ -406,10 +406,10 @@ distutils_enable_sphinx() {
distutils_enable_tests() {
debug-print-function ${FUNCNAME} "${@}"
- local do_install=
+ _DISTUTILS_TEST_INSTALL=
case ${1} in
--install)
- do_install=1
+ _DISTUTILS_TEST_INSTALL=1
shift
;;
esac
@@ -419,62 +419,21 @@ distutils_enable_tests() {
case ${1} in
nose)
test_pkg=">=dev-python/nose-1.3.7-r4"
- if [[ ${do_install} ]]; then
- python_test() {
- distutils_install_for_testing --via-root
- nosetests -v || die "Tests fail with ${EPYTHON}"
- }
- else
- python_test() {
- nosetests -v || die "Tests fail with ${EPYTHON}"
- }
- fi
;;
pytest)
test_pkg=">=dev-python/pytest-4.5.0"
- if [[ ${do_install} ]]; then
- python_test() {
- distutils_install_for_testing --via-root
- pytest -vv || die "Tests fail with ${EPYTHON}"
- }
- else
- python_test() {
- pytest -vv || die "Tests fail with ${EPYTHON}"
- }
- fi
;;
setup.py)
- if [[ ${do_install} ]]; then
- python_test() {
- distutils_install_for_testing --via-root
- nonfatal esetup.py test --verbose ||
- die "Tests fail with ${EPYTHON}"
- }
- else
- python_test() {
- nonfatal esetup.py test --verbose ||
- die "Tests fail with ${EPYTHON}"
- }
- fi
;;
unittest)
- if [[ ${do_install} ]]; then
- python_test() {
- distutils_install_for_testing --via-root
- "${EPYTHON}" -m unittest discover -v ||
- die "Tests fail with ${EPYTHON}"
- }
- else
- python_test() {
- "${EPYTHON}" -m unittest discover -v ||
- die "Tests fail with ${EPYTHON}"
- }
- fi
;;
*)
die "${FUNCNAME}: unsupported argument: ${1}"
esac
+ _DISTUTILS_TEST_RUNNER=${1}
+ python_test() { distutils-r1_python_test; }
+
local test_deps=${RDEPEND}
if [[ -n ${test_pkg} ]]; then
if [[ ! ${DISTUTILS_SINGLE_IMPL} ]]; then
@@ -714,7 +673,7 @@ distutils-r1_python_configure() {
_distutils-r1_create_setup_cfg() {
cat > "${HOME}"/.pydistutils.cfg <<-_EOF_ || die
[build]
- build-base = ${BUILD_DIR}
+ build_base = ${BUILD_DIR}
# using a single directory for them helps us export
# ${PYTHONPATH} and ebuilds find the sources independently
@@ -723,16 +682,16 @@ _distutils-r1_create_setup_cfg() {
# note: due to some packages (wxpython) relying on separate
# platlib & purelib dirs, we do not set --build-lib (which
# can not be overridden with --build-*lib)
- build-platlib = %(build-base)s/lib
- build-purelib = %(build-base)s/lib
+ build_platlib = %(build_base)s/lib
+ build_purelib = %(build_base)s/lib
# make the ebuild writer lives easier
- build-scripts = %(build-base)s/scripts
+ build_scripts = %(build_base)s/scripts
# this is needed by distutils_install_for_testing since
# setuptools like to create .egg files for install --home.
[bdist_egg]
- dist-dir = ${BUILD_DIR}/dist
+ dist_dir = ${BUILD_DIR}/dist
_EOF_
# we can't refer to ${D} before src_install()
@@ -749,7 +708,7 @@ _distutils-r1_create_setup_cfg() {
if [[ ! ${DISTUTILS_SINGLE_IMPL} ]]; then
cat >> "${HOME}"/.pydistutils.cfg <<-_EOF_ || die
- install-scripts = $(python_get_scriptdir)
+ install_scripts = $(python_get_scriptdir)
_EOF_
fi
fi
@@ -841,6 +800,48 @@ _distutils-r1_wrap_scripts() {
fi
}
+# @FUNCTION: distutils-r1_python_test
+# @USAGE: [additional-args...]
+# @DESCRIPTION:
+# The python_test() implementation used by distutils_enable_tests.
+# Runs tests using the specified test runner, possibly installing them
+# first.
+#
+# This function is used only if distutils_enable_tests is called.
+distutils-r1_python_test() {
+ debug-print-function ${FUNCNAME} "${@}"
+
+ if [[ -z ${_DISTUTILS_TEST_RUNNER} ]]; then
+ die "${FUNCNAME} can be only used after calling distutils_enable_tests"
+ fi
+
+ if [[ ${_DISTUTILS_TEST_INSTALL} ]]; then
+ distutils_install_for_testing
+ fi
+
+ case ${_DISTUTILS_TEST_RUNNER} in
+ nose)
+ nosetests -v "${@}"
+ ;;
+ pytest)
+ epytest
+ ;;
+ setup.py)
+ nonfatal esetup.py test --verbose
+ ;;
+ unittest)
+ "${EPYTHON}" -m unittest discover -v
+ ;;
+ *)
+ die "Mis-synced test runner between ${FUNCNAME} and distutils_enable_testing"
+ ;;
+ esac
+
+ if [[ ${?} -ne 0 ]]; then
+ die "Tests failed with ${EPYTHON}"
+ fi
+}
+
# @FUNCTION: distutils-r1_python_install
# @USAGE: [additional-args...]
# @DESCRIPTION:
@@ -1185,39 +1186,5 @@ distutils-r1_src_install() {
_distutils-r1_check_namespace_pth
}
-# -- distutils.eclass functions --
-
-distutils_get_intermediate_installation_image() {
- die "${FUNCNAME}() is invalid for distutils-r1"
-}
-
-distutils_src_unpack() {
- die "${FUNCNAME}() is invalid for distutils-r1, and you don't want it in EAPI ${EAPI} anyway"
-}
-
-distutils_src_prepare() {
- die "${FUNCNAME}() is invalid for distutils-r1, you probably want: ${FUNCNAME/_/-r1_}"
-}
-
-distutils_src_compile() {
- die "${FUNCNAME}() is invalid for distutils-r1, you probably want: ${FUNCNAME/_/-r1_}"
-}
-
-distutils_src_test() {
- die "${FUNCNAME}() is invalid for distutils-r1, you probably want: ${FUNCNAME/_/-r1_}"
-}
-
-distutils_src_install() {
- die "${FUNCNAME}() is invalid for distutils-r1, you probably want: ${FUNCNAME/_/-r1_}"
-}
-
-distutils_pkg_postinst() {
- die "${FUNCNAME}() is invalid for distutils-r1, and pkg_postinst is unnecessary"
-}
-
-distutils_pkg_postrm() {
- die "${FUNCNAME}() is invalid for distutils-r1, and pkg_postrm is unnecessary"
-}
-
_DISTUTILS_R1=1
fi
diff --git a/eclass/docs.eclass b/eclass/docs.eclass
index b67b268b7508..cc3b5b0a1ac4 100644
--- a/eclass/docs.eclass
+++ b/eclass/docs.eclass
@@ -164,7 +164,7 @@ case ${DOCS_BUILDER} in
;;
esac
-# @FUNCTION: python_append_dep
+# @FUNCTION: python_append_deps
# @INTERNAL
# @DESCRIPTION:
# Appends [\${PYTHON_USEDEP}] to all dependencies
diff --git a/eclass/emboss-r2.eclass b/eclass/emboss-r2.eclass
index 7d13f194eb7a..ef240889c04a 100644
--- a/eclass/emboss-r2.eclass
+++ b/eclass/emboss-r2.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: emboss-r2.eclass
@@ -9,7 +9,7 @@
# Original author: Author Olivier Fisette <ofisette@gmail.com>
# Next gen author: Justin Lecher <jlec@gentoo.org>
# Next gen author: Ted Tanberry <ted.tanberry@gmail.com>
-# @SUPPORTED_EAPIS: 6
+# @SUPPORTED_EAPIS: 6 7
# @BLURB: Use this to easy install EMBOSS and EMBASSY programs (EMBOSS add-ons).
# @DESCRIPTION:
# The inheriting ebuild must set at least EAPI=6 and provide EBO_DESCRIPTION before the inherit line.
@@ -18,7 +18,7 @@
#
# Example:
#
-# EAPI=6
+# EAPI=7
#
# EBO_DESCRIPTION="applications from the CBS group"
#
@@ -38,7 +38,7 @@
if [[ ! ${_EMBOSS_R2} ]]; then
case ${EAPI:-0} in
- 6) ;;
+ [67]) ;;
*) die "EAPI=${EAPI} is not supported" ;;
esac
@@ -47,8 +47,8 @@ inherit autotools flag-o-matic
EXPORT_FUNCTIONS src_prepare src_configure src_install
HOMEPAGE="http://emboss.sourceforge.net/"
-LICENSE="LGPL-2 GPL-2"
+LICENSE="LGPL-2 GPL-2"
SLOT="0"
IUSE="mysql pdf png postgres static-libs X"
diff --git a/eclass/freedict.eclass b/eclass/freedict.eclass
index c1b32d1b6bfb..2af79666aa20 100644
--- a/eclass/freedict.eclass
+++ b/eclass/freedict.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: freedict.eclass
@@ -6,32 +6,27 @@
# maintainer-needed@gentoo.org
# @AUTHOR:
# Original author: Seemant Kulleen
-# @SUPPORTED_EAPIS: 6
+# @SUPPORTED_EAPIS: 7
# @BLURB: Ease the installation of freedict translation dictionaries
# @DESCRIPTION:
# This eclass exists to ease the installation of freedict translation
-# dictionaries. The only variables which need to be defined in the actual
-# ebuilds are FORLANG and TOLANG for the source and target languages,
-# respectively.
+# dictionaries.
-# @ECLASS-VARIABLE: FORLANG
+# @ECLASS-VARIABLE: FREEDICT_P
# @DESCRIPTION:
-# Please see above for a description.
-
-# @ECLASS-VARIABLE: TOLANG
-# @DESCRIPTION:
-# Please see above for a description.
+# Strips PN of 'freedict' prefix, to be used in SRC_URI and doins
+FREEDICT_P=${PN/freedict-/}
case ${EAPI:-0} in
- 6) ;;
+ 7) ;;
*) die "${ECLASS}.eclass is banned in EAPI=${EAPI}" ;;
esac
-MY_P=${PN/freedict-/}
+[[ ${FORLANG} ]] && die "FORLANG is banned, set DESCRIPTION instead"
+[[ ${TOLANG} ]] && die "TOLANG is banned, set DESCRIPTION instead"
-DESCRIPTION="Freedict for language translation from ${FORLANG} to ${TOLANG}"
-HOMEPAGE="http://freedict.sourceforge.net/"
-SRC_URI="http://freedict.sourceforge.net/download/linux/${MY_P}.tar.gz"
+HOMEPAGE="http://freedict.sourceforge.net/en/"
+SRC_URI="http://freedict.sourceforge.net/download/linux/${FREEDICT_P}.tar.gz"
LICENSE="GPL-2+"
SLOT="0"
@@ -42,11 +37,11 @@ S="${WORKDIR}"
# @FUNCTION: freedict_src_install
# @DESCRIPTION:
-# The freedict src_install function, which is exported
+# Installs translation specific dict.dz and index files.
freedict_src_install() {
insinto /usr/$(get_libdir)/dict
- doins ${MY_P}.dict.dz
- doins ${MY_P}.index
+ doins ${FREEDICT_P}.dict.dz
+ doins ${FREEDICT_P}.index
}
EXPORT_FUNCTIONS src_install
diff --git a/eclass/kernel-install.eclass b/eclass/kernel-install.eclass
index 231dce2de6a4..860105feb8b8 100644
--- a/eclass/kernel-install.eclass
+++ b/eclass/kernel-install.eclass
@@ -76,6 +76,48 @@ BDEPEND="
x86? ( app-emulation/qemu[qemu_softmmu_targets_i386] )
)"
+# @FUNCTION: kernel-install_can_update_symlink
+# @USAGE:
+# @DESCRIPTION:
+# Determine whether the symlink at <target> (full path) should be
+# updated. Returns 0 if it should, 1 to leave as-is.
+kernel-install_can_update_symlink() {
+ debug-print-function ${FUNCNAME} "${@}"
+
+ [[ ${#} -eq 1 ]] || die "${FUNCNAME}: invalid arguments"
+ local target=${1}
+
+ # if the symlink does not exist or is broken, update
+ [[ ! -e ${target} ]] && return 0
+ # if the target does not seem to contain kernel sources
+ # (i.e. is probably a leftover directory), update
+ [[ ! -e ${target}/Makefile ]] && return 0
+
+ local symlink_target=$(readlink "${target}")
+ # the symlink target should start with the same basename as target
+ # (e.g. "linux-*")
+ [[ ${symlink_target} != ${target##*/}-* ]] && return 1
+
+ # try to establish the kernel version from symlink target
+ local symlink_ver=${symlink_target#${target##*/}-}
+ # strip KV_LOCALVERSION, we want to update the old kernels not using
+ # KV_LOCALVERSION suffix and the new kernels using it
+ symlink_ver=${symlink_ver%${KV_LOCALVERSION}}
+
+ # if ${symlink_ver} contains anything but numbers (e.g. an extra
+ # suffix), it's not our kernel, so leave it alone
+ [[ -n ${symlink_ver//[0-9.]/} ]] && return 1
+
+ local symlink_pkg=${CATEGORY}/${PN}-${symlink_ver}
+ # if the current target is either being replaced, or still
+ # installed (probably depclean candidate), update the symlink
+ has "${symlink_ver}" ${REPLACING_VERSIONS} && return 0
+ has_version -r "~${symlink_pkg}" && return 0
+
+ # otherwise it could be another kernel package, so leave it alone
+ return 1
+}
+
# @FUNCTION: kernel-install_update_symlink
# @USAGE: <target> <version>
# @DESCRIPTION:
@@ -89,34 +131,13 @@ kernel-install_update_symlink() {
local target=${1}
local version=${2}
- if [[ ! -e ${target} ]]; then
- ebegin "Creating ${target} symlink"
+ if kernel-install_can_update_symlink "${target}"; then
+ ebegin "Updating ${target} symlink"
ln -f -n -s "${target##*/}-${version}" "${target}"
eend ${?}
else
- local symlink_target=$(readlink "${target}")
- local symlink_ver=${symlink_target#${target##*/}-}
- local updated=
- if [[ ${symlink_target} == ${target##*/}-* && \
- -z ${symlink_ver//[0-9.]/} ]]
- then
- local symlink_pkg=${CATEGORY}/${PN}-${symlink_ver}
- # if the current target is either being replaced, or still
- # installed (probably depclean candidate), update the symlink
- if has "${symlink_ver}" ${REPLACING_VERSIONS} ||
- has_version -r "~${symlink_pkg}"
- then
- ebegin "Updating ${target} symlink"
- ln -f -n -s "${target##*/}-${version}" "${target}"
- eend ${?}
- updated=1
- fi
- fi
-
- if [[ ! ${updated} ]]; then
- elog "${target} points at another kernel, leaving it as-is."
- elog "Please use 'eselect kernel' to update it when desired."
- fi
+ elog "${target} points at another kernel, leaving it as-is."
+ elog "Please use 'eselect kernel' to update it when desired."
fi
}
@@ -275,27 +296,31 @@ kernel-install_test() {
spawn ./run.sh
expect {
"terminating on signal" {
- send_error "\n* Qemu killed"
+ send_error "\n* Qemu killed\n"
exit 1
}
"OS terminated" {
- send_error "\n* Qemu terminated OS"
+ send_error "\n* Qemu terminated OS\n"
exit 1
}
"Kernel panic" {
- send_error "\n* Kernel panic"
+ send_error "\n* Kernel panic\n"
exit 1
}
"Entering emergency mode" {
- send_error "\n* Initramfs failed to start the system"
+ send_error "\n* Initramfs failed to start the system\n"
exit 1
}
"Hello, World!" {
- send_error "\n* Booted successfully"
+ send_error "\n* Booted successfully\n"
exit 0
}
timeout {
- send_error "\n* Kernel boot timed out"
+ send_error "\n* Kernel boot timed out\n"
+ exit 2
+ }
+ eof {
+ send_error "\n* qemu terminated before booting the kernel\n"
exit 2
}
}
diff --git a/eclass/mozcoreconf-v6.eclass b/eclass/mozcoreconf-v6.eclass
index 0dd165db08e3..95fce0f0258d 100644
--- a/eclass/mozcoreconf-v6.eclass
+++ b/eclass/mozcoreconf-v6.eclass
@@ -1,9 +1,10 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
#
# @ECLASS: mozcoreconf-v6.eclass
# @MAINTAINER:
# Mozilla team <mozilla@gentoo.org>
+# @SUPPORTED_EAPIS: 6 7
# @BLURB: core options and configuration functions for mozilla
# @DESCRIPTION:
#
@@ -16,14 +17,26 @@
if [[ ! ${_MOZCORECONF} ]]; then
-inherit multilib toolchain-funcs flag-o-matic python-any-r1 versionator
+inherit toolchain-funcs flag-o-matic python-any-r1
-IUSE="${IUSE} custom-cflags custom-optimization"
-
-DEPEND="virtual/pkgconfig
+BDEPEND="virtual/pkgconfig
dev-lang/python:2.7[ncurses,sqlite,ssl,threads(+)]
${PYTHON_DEPS}"
+case "${EAPI:-0}" in
+ 6)
+ inherit multilib versionator
+ DEPEND+=" ${BDEPEND}"
+ ;;
+ 7)
+ ;;
+ *)
+ die "EAPI ${EAPI} is not supported, contact eclass maintainers"
+ ;;
+esac
+
+IUSE="${IUSE} custom-cflags custom-optimization"
+
# @FUNCTION: mozconfig_annotate
# @DESCRIPTION:
# add an annotated line to .mozconfig
diff --git a/eclass/mozlinguas-v2.eclass b/eclass/mozlinguas-v2.eclass
index 7795a856728b..be01ef6aca50 100644
--- a/eclass/mozlinguas-v2.eclass
+++ b/eclass/mozlinguas-v2.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: mozlinguas-v2.eclass
@@ -7,7 +7,7 @@
# @AUTHOR:
# Nirbheek Chauhan <nirbheek@gentoo.org>
# Ian Stakenvicius <axs@gentoo.org>
-# @SUPPORTED_EAPIS: 2 3 4 5 6
+# @SUPPORTED_EAPIS: 6 7
# @BLURB: Handle language packs for mozilla products
# @DESCRIPTION:
# Sets IUSE according to MOZ_LANGS (language packs available). Also exports
@@ -17,16 +17,16 @@
inherit mozextension
case "${EAPI:-0}" in
- 0|1)
- die "EAPI ${EAPI:-0} does not support the '->' SRC_URI operator";;
- 2|3|4|5|6)
- inherit eapi7-ver
- EXPORT_FUNCTIONS src_unpack src_compile src_install;;
-
+ 6)
+ inherit eapi7-ver ;;
+ 7)
+ ;;
*)
- die "EAPI ${EAPI} is not supported, contact eclass maintainers";;
+ die "EAPI ${EAPI} is not supported, contact eclass maintainers" ;;
esac
+EXPORT_FUNCTIONS src_unpack src_compile src_install
+
# @ECLASS-VARIABLE: MOZ_LANGS
# @DESCRIPTION:
# Array containing the list of language pack xpis available for
diff --git a/eclass/python-r1.eclass b/eclass/python-r1.eclass
index 74e3fb38a1cc..5e9dafe63d85 100644
--- a/eclass/python-r1.eclass
+++ b/eclass/python-r1.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: python-r1.eclass
@@ -771,15 +771,18 @@ python_foreach_impl() {
python_setup() {
debug-print-function ${FUNCNAME} "${@}"
- _python_validate_useflags
+ local has_check_deps
+ declare -f python_check_deps >/dev/null && has_check_deps=1
+
+ if [[ ! ${has_check_deps} ]]; then
+ _python_validate_useflags
+ fi
+
local pycompat=( "${PYTHON_COMPAT[@]}" )
if [[ ${PYTHON_COMPAT_OVERRIDE} ]]; then
pycompat=( ${PYTHON_COMPAT_OVERRIDE} )
fi
- local has_check_deps
- declare -f python_check_deps >/dev/null && has_check_deps=1
-
# (reverse iteration -- newest impl first)
local found
_python_verify_patterns "${@}"
diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass
index dcc441b82098..3036148b8383 100644
--- a/eclass/python-utils-r1.eclass
+++ b/eclass/python-utils-r1.eclass
@@ -907,8 +907,6 @@ _python_wrapper_setup() {
[[ ${impl} ]] || die "${FUNCNAME}: no impl nor EPYTHON specified."
if [[ ! -x ${workdir}/bin/python ]]; then
- _python_check_dead_variables
-
mkdir -p "${workdir}"/{bin,pkgconfig} || die
# Clean up, in case we were supposed to do a cheap update.
@@ -1278,172 +1276,27 @@ build_sphinx() {
HTML_DOCS+=( "${dir}/_build/html/." )
}
-# -- python.eclass functions --
-
-_python_check_dead_variables() {
- local v
-
- for v in PYTHON_DEPEND PYTHON_USE_WITH{,_OR,_OPT} {RESTRICT,SUPPORT}_PYTHON_ABIS
- do
- if [[ ${!v} ]]; then
- die "${v} is invalid for python-r1 suite, please take a look @ https://wiki.gentoo.org/wiki/Project:Python/Python.eclass_conversion#Ebuild_head"
- fi
- done
-
- for v in PYTHON_{CPPFLAGS,CFLAGS,CXXFLAGS,LDFLAGS}
- do
- if [[ ${!v} ]]; then
- die "${v} is invalid for python-r1 suite, please take a look @ https://wiki.gentoo.org/wiki/Project:Python/Python.eclass_conversion#PYTHON_CFLAGS"
- fi
- done
-
- for v in PYTHON_TESTS_RESTRICTED_ABIS PYTHON_EXPORT_PHASE_FUNCTIONS \
- PYTHON_VERSIONED_{SCRIPTS,EXECUTABLES} PYTHON_NONVERSIONED_EXECUTABLES
- do
- if [[ ${!v} ]]; then
- die "${v} is invalid for python-r1 suite"
- fi
- done
-
- for v in DISTUTILS_USE_SEPARATE_SOURCE_DIRECTORIES DISTUTILS_SETUP_FILES \
- DISTUTILS_GLOBAL_OPTIONS DISTUTILS_SRC_TEST PYTHON_MODNAME
- do
- if [[ ${!v} ]]; then
- die "${v} is invalid for distutils-r1, please take a look @ https://wiki.gentoo.org/wiki/Project:Python/Python.eclass_conversion#${v}"
- fi
- done
-
- if [[ ${DISTUTILS_DISABLE_TEST_DEPENDENCY} ]]; then
- die "${v} is invalid for distutils-r1, please take a look @ https://wiki.gentoo.org/wiki/Project:Python/Python.eclass_conversion#DISTUTILS_SRC_TEST"
- fi
-
- # python.eclass::progress
- for v in PYTHON_BDEPEND PYTHON_MULTIPLE_ABIS PYTHON_ABI_TYPE \
- PYTHON_RESTRICTED_ABIS PYTHON_TESTS_FAILURES_TOLERANT_ABIS \
- PYTHON_CFFI_MODULES_GENERATION_COMMANDS
- do
- if [[ ${!v} ]]; then
- die "${v} is invalid for python-r1 suite"
- fi
- done
-}
-
-python_pkg_setup() {
- die "${FUNCNAME}() is invalid for python-r1 suite, please take a look @ https://wiki.gentoo.org/wiki/Project:Python/Python.eclass_conversion#pkg_setup"
-}
-
-python_convert_shebangs() {
- die "${FUNCNAME}() is invalid for python-r1 suite, please take a look @ https://wiki.gentoo.org/wiki/Project:Python/Python.eclass_conversion#python_convert_shebangs"
-}
-
-python_clean_py-compile_files() {
- die "${FUNCNAME}() is invalid for python-r1 suite"
-}
-
-python_clean_installation_image() {
- die "${FUNCNAME}() is invalid for python-r1 suite"
-}
-
-python_execute_function() {
- die "${FUNCNAME}() is invalid for python-r1 suite, please take a look @ https://wiki.gentoo.org/wiki/Project:Python/Python.eclass_conversion#python_execute_function"
-}
-
-python_generate_wrapper_scripts() {
- die "${FUNCNAME}() is invalid for python-r1 suite"
-}
-
-python_merge_intermediate_installation_images() {
- die "${FUNCNAME}() is invalid for python-r1 suite"
-}
-
-python_set_active_version() {
- die "${FUNCNAME}() is invalid for python-r1 suite, please take a look @ https://wiki.gentoo.org/wiki/Project:Python/Python.eclass_conversion#pkg_setup"
-}
-
-python_need_rebuild() {
- die "${FUNCNAME}() is invalid for python-r1 suite"
-}
-
-PYTHON() {
- die "${FUNCNAME}() is invalid for python-r1 suite, please take a look @ https://wiki.gentoo.org/wiki/Project:Python/Python.eclass_conversion#.24.28PYTHON.29.2C_.24.7BEPYTHON.7D"
-}
-
-python_get_implementation() {
- die "${FUNCNAME}() is invalid for python-r1 suite"
-}
-
-python_get_implementational_package() {
- die "${FUNCNAME}() is invalid for python-r1 suite"
-}
-
-python_get_libdir() {
- die "${FUNCNAME}() is invalid for python-r1 suite"
-}
-
-python_get_library() {
- die "${FUNCNAME}() is invalid for python-r1 suite"
-}
-
-python_get_version() {
- die "${FUNCNAME}() is invalid for python-r1 suite"
-}
-
-python_get_implementation_and_version() {
- die "${FUNCNAME}() is invalid for python-r1 suite"
-}
-
-python_execute_nosetests() {
- die "${FUNCNAME}() is invalid for python-r1 suite"
-}
-
-python_execute_py.test() {
- die "${FUNCNAME}() is invalid for python-r1 suite"
-}
-
-python_execute_trial() {
- die "${FUNCNAME}() is invalid for python-r1 suite"
-}
-
-python_enable_pyc() {
- die "${FUNCNAME}() is invalid for python-r1 suite"
-}
-
-python_disable_pyc() {
- die "${FUNCNAME}() is invalid for python-r1 suite"
-}
-
-python_mod_optimize() {
- die "${FUNCNAME}() is invalid for python-r1 suite, please take a look @ https://wiki.gentoo.org/wiki/Project:Python/Python.eclass_conversion#Python_byte-code_compilation"
-}
-
-python_mod_cleanup() {
- die "${FUNCNAME}() is invalid for python-r1 suite, please take a look @ https://wiki.gentoo.org/wiki/Project:Python/Python.eclass_conversion#Python_byte-code_compilation"
-}
-
-# python.eclass::progress
-
-python_abi_depend() {
- die "${FUNCNAME}() is invalid for python-r1 suite"
-}
-
-python_install_executables() {
- die "${FUNCNAME}() is invalid for python-r1 suite"
-}
+# @FUNCTION: epytest
+# @USAGE: [<args>...]
+# @DESCRIPTION:
+# Run pytest, passing the standard set of pytest options, followed
+# by user-specified options.
+#
+# This command dies on failure and respects nonfatal in EAPIs supporting
+# nonfatal die.
+epytest() {
+ debug-print-function ${FUNCNAME} "${@}"
-python_get_extension_module_suffix() {
- die "${FUNCNAME}() is invalid for python-r1 suite"
-}
+ [[ -n ${EPYTHON} ]] || die "EPYTHON unset, invalid call context"
-python_byte-compile_modules() {
- die "${FUNCNAME}() is invalid for python-r1 suite"
-}
+ local die_args=()
+ [[ ${EAPI} != [45] ]] && die_args+=( -n )
-python_clean_byte-compiled_modules() {
- die "${FUNCNAME}() is invalid for python-r1 suite"
-}
+ set -- "${EPYTHON}" -m pytest -vv -ra "${@}"
-python_generate_cffi_modules() {
- die "${FUNCNAME}() is invalid for python-r1 suite"
+ echo "${@}" >&2
+ "${@}" || die "${die_args[@]}" "pytest failed with ${EPYTHON}"
+ return ${?}
}
_PYTHON_UTILS_R1=1
diff --git a/eclass/tmpfiles.eclass b/eclass/tmpfiles.eclass
index 360c5e3b816f..632343821648 100644
--- a/eclass/tmpfiles.eclass
+++ b/eclass/tmpfiles.eclass
@@ -60,7 +60,15 @@ case "${EAPI}" in
*) die "API is undefined for EAPI ${EAPI}" ;;
esac
-RDEPEND="virtual/tmpfiles"
+# @ECLASS-VARIABLE: TMPFILES_OPTIONAL
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# When not empty, disables the dependency on virtual/tmpfiles.
+# Ebuilds that call tmpfiles_process conditionally should declare a
+# conditional dependency themselves.
+if [[ -z ${TMPFILES_OPTIONAL} ]]; then
+ RDEPEND="virtual/tmpfiles"
+fi
# @FUNCTION: dotmpfiles
# @USAGE: <tmpfiles.d_file> ...