summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-10-09 04:26:33 +0100
committerV3n3RiX <venerix@koprulu.sector>2024-10-09 04:26:33 +0100
commit6ee17dd82a3bcd0e90af4ebfbb3e411d342761be (patch)
tree5ade54018efa76614b79d832bbe15a22021b6d8c /eclass
parent325837835fc86686829aaa6acace3d3c06c74cea (diff)
gentoo auto-resync : 09:10:2024 - 04:26:32
Diffstat (limited to 'eclass')
-rw-r--r--eclass/Manifest.gzbin39742 -> 39051 bytes
-rw-r--r--eclass/acct-group.eclass6
-rw-r--r--eclass/acct-user.eclass12
-rw-r--r--eclass/ada.eclass10
-rw-r--r--eclass/apache-module.eclass19
-rw-r--r--eclass/app-alternatives.eclass8
-rw-r--r--eclass/aspell-dict-r1.eclass4
-rw-r--r--eclass/autotools.eclass71
-rw-r--r--eclass/bash-completion-r1.eclass24
-rw-r--r--eclass/cdrom.eclass6
-rw-r--r--eclass/check-reqs.eclass30
-rw-r--r--eclass/depend.apache.eclass47
-rw-r--r--eclass/desktop.eclass16
-rw-r--r--eclass/dist-kernel-utils.eclass10
-rw-r--r--eclass/distutils-r1.eclass88
-rw-r--r--eclass/dotnet-pkg-base.eclass30
-rw-r--r--eclass/dotnet-pkg.eclass4
-rw-r--r--eclass/dotnet.eclass4
-rw-r--r--eclass/dune.eclass12
-rw-r--r--eclass/eapi7-ver.eclass309
-rw-r--r--eclass/emboss-r3.eclass4
-rw-r--r--eclass/eqawarn.eclass27
-rw-r--r--eclass/flag-o-matic.eclass14
-rw-r--r--eclass/fortran-2.eclass34
-rw-r--r--eclass/gap-pkg.eclass7
-rw-r--r--eclass/gkrellm-plugin.eclass4
-rw-r--r--eclass/gnuconfig.eclass35
-rw-r--r--eclass/go-module.eclass8
-rw-r--r--eclass/greadme.eclass10
-rw-r--r--eclass/guile-single.eclass10
-rw-r--r--eclass/guile-utils.eclass16
-rw-r--r--eclass/guile.eclass28
-rw-r--r--eclass/java-ant-2.eclass1
-rw-r--r--eclass/java-pkg-2.eclass6
-rw-r--r--eclass/java-utils-2.eclass25
-rw-r--r--eclass/kernel-build.eclass12
-rw-r--r--eclass/kernel-install.eclass28
-rw-r--r--eclass/latex-package.eclass14
-rw-r--r--eclass/libtool.eclass12
-rw-r--r--eclass/linux-mod-r1.eclass16
-rw-r--r--eclass/llvm-r1.eclass10
-rw-r--r--eclass/llvm-utils.eclass10
-rw-r--r--eclass/llvm.eclass8
-rw-r--r--eclass/lua-single.eclass12
-rw-r--r--eclass/lua-utils.eclass20
-rw-r--r--eclass/lua.eclass8
-rw-r--r--eclass/mercurial.eclass4
-rw-r--r--eclass/mono-env.eclass6
-rw-r--r--eclass/mozcoreconf-v6.eclass2
-rw-r--r--eclass/mozextension.eclass4
-rw-r--r--eclass/mozlinguas-v2.eclass4
-rw-r--r--eclass/multibuild.eclass16
-rw-r--r--eclass/multilib-build.eclass24
-rw-r--r--eclass/multilib-minimal.eclass8
-rw-r--r--eclass/multilib.eclass6
-rw-r--r--eclass/multiprocessing.eclass6
-rw-r--r--eclass/nuget.eclass2
-rw-r--r--eclass/out-of-source-utils.eclass10
-rw-r--r--eclass/pax-utils.eclass6
-rw-r--r--eclass/perl-functions.eclass19
-rw-r--r--eclass/php-pear-r2.eclass24
-rw-r--r--eclass/portability.eclass6
-rw-r--r--eclass/postgres-multi.eclass4
-rw-r--r--eclass/postgres.eclass4
-rw-r--r--eclass/prefix.eclass6
-rw-r--r--eclass/preserve-libs.eclass6
-rw-r--r--eclass/pypi.eclass4
-rw-r--r--eclass/python-any-r1.eclass8
-rw-r--r--eclass/python-r1.eclass30
-rw-r--r--eclass/python-single-r1.eclass12
-rw-r--r--eclass/python-utils-r1.eclass88
-rw-r--r--eclass/readme.gentoo-r1.eclass12
-rw-r--r--eclass/rebar-utils.eclass8
-rw-r--r--eclass/rebar.eclass12
-rw-r--r--eclass/rebar3.eclass14
-rw-r--r--eclass/rocm.eclass2
-rw-r--r--eclass/ruby-fakegem.eclass103
-rw-r--r--eclass/ruby-ng-gnome2.eclass12
-rw-r--r--eclass/ruby-ng.eclass135
-rw-r--r--eclass/ruby-single.eclass4
-rw-r--r--eclass/ruby-utils.eclass10
-rw-r--r--eclass/scons-utils.eclass2
-rw-r--r--eclass/secureboot.eclass8
-rw-r--r--eclass/selinux-policy-2.eclass2
-rw-r--r--eclass/shell-completion.eclass16
-rw-r--r--eclass/strip-linguas.eclass6
-rw-r--r--eclass/systemd.eclass98
-rwxr-xr-xeclass/tests/versionator_version_compare.sh199
-rw-r--r--eclass/tmpfiles.eclass14
-rw-r--r--eclass/toolchain-funcs.eclass7
-rw-r--r--eclass/toolchain.eclass8
-rw-r--r--eclass/tree-sitter-grammar.eclass10
-rw-r--r--eclass/udev.eclass22
-rw-r--r--eclass/vcs-clean.eclass12
-rw-r--r--eclass/vcs-snapshot.eclass4
-rw-r--r--eclass/vdr-plugin-2.eclass22
-rw-r--r--eclass/versionator.eclass519
-rw-r--r--eclass/vim-doc.eclass14
-rw-r--r--eclass/vim-plugin.eclass24
-rw-r--r--eclass/vim-spell.eclass6
-rw-r--r--eclass/virtualx.eclass14
-rw-r--r--eclass/waf-utils.eclass4
-rw-r--r--eclass/webapp.eclass54
-rw-r--r--eclass/wrapper.eclass8
-rw-r--r--eclass/xdg-utils.eclass12
-rw-r--r--eclass/xdg.eclass8
106 files changed, 701 insertions, 2102 deletions
diff --git a/eclass/Manifest.gz b/eclass/Manifest.gz
index fee552855a8f..b72a2a21e41a 100644
--- a/eclass/Manifest.gz
+++ b/eclass/Manifest.gz
Binary files differ
diff --git a/eclass/acct-group.eclass b/eclass/acct-group.eclass
index 00908dbd8982..ac6dc960ca24 100644
--- a/eclass/acct-group.eclass
+++ b/eclass/acct-group.eclass
@@ -89,7 +89,7 @@ S=${WORKDIR}
# Performs sanity checks for correct eclass usage, and early-checks
# whether requested GID can be enforced.
acct-group_pkg_pretend() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
# verify ACCT_GROUP_ID
[[ -n ${ACCT_GROUP_ID} ]] || die "Ebuild error: ACCT_GROUP_ID must be set!"
@@ -131,7 +131,7 @@ acct-group_pkg_pretend() {
# @DESCRIPTION:
# Installs sysusers.d file for the group.
acct-group_src_install() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
# check for the override, use PN in case this is an overlay and
# ACCT_GROUP_NAME is not PN and not valid in a bash variable name
@@ -156,7 +156,7 @@ acct-group_src_install() {
# @DESCRIPTION:
# Creates the group if it does not exist yet.
acct-group_pkg_preinst() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
if [[ ${EUID} -ne 0 || -n ${EPREFIX} ]]; then
einfo "Insufficient privileges to execute ${FUNCNAME[0]}"
diff --git a/eclass/acct-user.eclass b/eclass/acct-user.eclass
index 19c5239eaede..b3bcff7e550c 100644
--- a/eclass/acct-user.eclass
+++ b/eclass/acct-user.eclass
@@ -155,7 +155,7 @@ S=${WORKDIR}
# Generate appropriate RDEPEND from ACCT_USER_GROUPS. This must be
# called if ACCT_USER_GROUPS are set.
acct-user_add_deps() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
# ACCT_USER_GROUPS sanity check
if [[ $(declare -p ACCT_USER_GROUPS) != "declare -a"* ]]; then
@@ -218,7 +218,7 @@ eislocked() {
# Performs sanity checks for correct eclass usage, and early-checks
# whether requested UID can be enforced.
acct-user_pkg_pretend() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
# verify that acct-user_add_deps() has been called
# (it verifies ACCT_USER_GROUPS itself)
@@ -267,7 +267,7 @@ acct-user_pkg_pretend() {
# Installs a keep-file into the user's home directory to ensure it is
# owned by the package, and sysusers.d file.
acct-user_src_install() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
# Replace reserved characters in comment
: "${ACCT_USER_COMMENT:=${DESCRIPTION//[:,=]/;}}"
@@ -328,7 +328,7 @@ acct-user_src_install() {
# Creates the user if it does not exist yet. Sets permissions
# of the home directory in install image.
acct-user_pkg_preinst() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
unset _ACCT_USER_ADDED
@@ -397,7 +397,7 @@ acct-user_pkg_preinst() {
# Updates user properties if necessary. This needs to be done after
# new home directory is installed.
acct-user_pkg_postinst() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
if [[ -n ${_ACCT_USER_ADDED} ]]; then
# We just added the user; no need to update it
@@ -481,7 +481,7 @@ acct-user_pkg_postinst() {
# @DESCRIPTION:
# Ensures that the user account is locked out when it is removed.
acct-user_pkg_prerm() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
if [[ -n ${REPLACED_BY_VERSION} ]]; then
return
diff --git a/eclass/ada.eclass b/eclass/ada.eclass
index faff19a6ac85..9206bfcc42ca 100644
--- a/eclass/ada.eclass
+++ b/eclass/ada.eclass
@@ -110,7 +110,7 @@ readonly _ADA_ALL_IMPLS
# unsupported, returns 1 -- and the caller should ignore the entry.
# If it is invalid, dies with an appropriate error message.
_ada_impl_supported() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
[[ ${#} -eq 1 ]] || die "${FUNCNAME}: takes exactly 1 argument (impl)."
@@ -208,7 +208,7 @@ _ada_set_impls() {
# They are described more completely in the eclass
# variable documentation.
ada_export() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
local impl var
@@ -404,7 +404,7 @@ unset -f _ada_single_set_globals
# setup will be done. If wrapper update is requested, the directory
# shall be removed first.
ada_wrapper_setup() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
local workdir=${1:-${T}/${EADA}}
local impl=${2:-${EADA}}
@@ -470,7 +470,7 @@ ada_wrapper_setup() {
# Determine what the selected Ada implementation is and set
# the Ada build environment up for it.
ada_setup() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
unset EADA
@@ -518,7 +518,7 @@ ada_setup() {
# @DESCRIPTION:
# Runs ada_setup.
ada_pkg_setup() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
[[ ${MERGE_TYPE} != binary ]] && ada_setup
}
diff --git a/eclass/apache-module.eclass b/eclass/apache-module.eclass
index 07bdb79e08a2..880205a30539 100644
--- a/eclass/apache-module.eclass
+++ b/eclass/apache-module.eclass
@@ -4,7 +4,7 @@
# @ECLASS: apache-module.eclass
# @MAINTAINER:
# apache-bugs@gentoo.org
-# @SUPPORTED_EAPIS: 6 7 8
+# @SUPPORTED_EAPIS: 7 8
# @BLURB: Provides a common set of functions for apache modules
# @DESCRIPTION:
# This eclass handles apache modules in a sane way.
@@ -44,15 +44,10 @@
# </IfDefine>
# @CODE
-
if [[ -z ${_APACHE_MODULE_ECLASS} ]]; then
_APACHE_MODULE_ECLASS=1
case ${EAPI} in
- 6)
- ewarn "${CATEGORY}/${PF}: ebuild uses ${ECLASS} with deprecated EAPI ${EAPI}!"
- ewarn "${CATEGORY}/${PF}: Support will be removed on 2024-10-08. Please port to newer EAPI."
- ;;
7|8) ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
@@ -110,7 +105,7 @@ inherit depend.apache
# Internal function to construct the default ${APXS2_S} path if required.
apache_cd_dir() {
- debug-print-function $FUNCNAME $*
+ debug-print-function ${FUNCNAME} "$@"
local CD_DIR="${APXS2_S}"
@@ -128,7 +123,7 @@ apache_cd_dir() {
# Internal function to construct the default ${APACHE2_MOD_FILE} if required.
apache_mod_file() {
- debug-print-function $FUNCNAME $*
+ debug-print-function ${FUNCNAME} "$@"
local MOD_FILE="${APACHE2_MOD_FILE:-$(apache_cd_dir)/.libs/${PN}.so}"
@@ -140,7 +135,7 @@ apache_mod_file() {
# optional first argument `html'; if the first argument is equals `html', only
# html files are returned, otherwise normal (non-html) docs are returned.
apache_doc_magic() {
- debug-print-function $FUNCNAME $*
+ debug-print-function ${FUNCNAME} "$@"
local DOCS=
@@ -166,7 +161,7 @@ apache_doc_magic() {
# module requires a different build setup than this, use ${APXS} in your own
# src_compile routine.
apache-module_src_compile() {
- debug-print-function $FUNCNAME $*
+ debug-print-function ${FUNCNAME} "$@"
local CD_DIR=$(apache_cd_dir)
cd "${CD_DIR}" || die "cd ${CD_DIR} failed"
@@ -185,7 +180,7 @@ apache-module_src_compile() {
# 55_mod_foo.conf, APACHE2_MOD_CONF would be 55_mod_foo. ${DOCFILES} contains
# the list of files you want filed as documentation.
apache-module_src_install() {
- debug-print-function $FUNCNAME $*
+ debug-print-function ${FUNCNAME} "$@"
local CD_DIR=$(apache_cd_dir)
pushd "${CD_DIR}" >/dev/null || die "cd ${CD_DIR} failed"
@@ -227,7 +222,7 @@ apache-module_src_install() {
# @DESCRIPTION:
# This prints out information about the installed module and how to enable it.
apache-module_pkg_postinst() {
- debug-print-function $FUNCNAME $*
+ debug-print-function ${FUNCNAME} "$@"
if [[ -n "${APACHE2_MOD_DEFINE}" ]] ; then
local my_opts="-D ${APACHE2_MOD_DEFINE// / -D }"
diff --git a/eclass/app-alternatives.eclass b/eclass/app-alternatives.eclass
index c6924bfc6d2a..32afedba1e68 100644
--- a/eclass/app-alternatives.eclass
+++ b/eclass/app-alternatives.eclass
@@ -1,4 +1,4 @@
-# Copyright 2022 Gentoo Authors
+# Copyright 2022-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: app-alternatives.eclass
@@ -21,7 +21,7 @@ case ${EAPI} in
*) die "${ECLASS}: EAPI ${EAPI:-0} unsupported."
esac
-if [[ ! ${_APP_ALTERNATIVES_ECLASS} ]]; then
+if [[ -z ${_APP_ALTERNATIVES_ECLASS} ]]; then
_APP_ALTERNATIVES_ECLASS=1
# @ECLASS_VARIABLE: ALTERNATIVES
@@ -36,7 +36,7 @@ _APP_ALTERNATIVES_ECLASS=1
# @DESCRIPTION:
# Set ebuild metadata variables.
_app-alternatives_set_globals() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
if [[ ${ALTERNATIVES@a} != *a* ]]; then
die 'ALTERNATIVES must be an array.'
@@ -71,7 +71,7 @@ _app-alternatives_set_globals
# @DESCRIPTION:
# Get the flag name for the selected alternative (i.e. the USE flag set).
get_alternative() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
local flag
for flag in "${ALTERNATIVES[@]%%:*}"; do
diff --git a/eclass/aspell-dict-r1.eclass b/eclass/aspell-dict-r1.eclass
index 1a3bd0b21b24..6d10c9fb302e 100644
--- a/eclass/aspell-dict-r1.eclass
+++ b/eclass/aspell-dict-r1.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: aspell-dict-r1.eclass
@@ -41,7 +41,7 @@ case ${EAPI} in
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
-if [[ ! ${_ASPELL_DICT_R1_ECLASS} ]]; then
+if [[ -z ${_ASPELL_DICT_R1_ECLASS} ]]; then
_ASPELL_DICT_R1_ECLASS=1
# Most of those aspell packages have an idiosyncratic versioning scheme,
diff --git a/eclass/autotools.eclass b/eclass/autotools.eclass
index 641612f37193..518f6addcc50 100644
--- a/eclass/autotools.eclass
+++ b/eclass/autotools.eclass
@@ -4,7 +4,7 @@
# @ECLASS: autotools.eclass
# @MAINTAINER:
# base-system@gentoo.org
-# @SUPPORTED_EAPIS: 6 7 8
+# @SUPPORTED_EAPIS: 7 8
# @BLURB: Regenerates auto* build scripts
# @DESCRIPTION:
# This eclass is for safely handling autotooled software packages that need to
@@ -27,16 +27,10 @@ if [[ -z ${_AUTOTOOLS_ECLASS} ]] ; then
_AUTOTOOLS_ECLASS=1
case ${EAPI} in
- 6)
- ewarn "${CATEGORY}/${PF}: ebuild uses ${ECLASS} with deprecated EAPI ${EAPI}!"
- ewarn "${CATEGORY}/${PF}: Support will be removed on 2024-10-08. Please port to newer EAPI."
- ;;
7|8) ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
-[[ ${EAPI} == 6 ]] && inherit eqawarn
-
GNUCONFIG_AUTO_DEPEND=no
inherit gnuconfig libtool
@@ -184,12 +178,7 @@ RDEPEND=""
# ebuilds form conditional depends by using ${AUTOTOOLS_DEPEND} in
# their own DEPEND string.
: "${AUTOTOOLS_AUTO_DEPEND:=yes}"
-if [[ ${AUTOTOOLS_AUTO_DEPEND} != "no" ]] ; then
- case ${EAPI} in
- 6) DEPEND=${AUTOTOOLS_DEPEND} ;;
- *) BDEPEND=${AUTOTOOLS_DEPEND} ;;
- esac
-fi
+[[ ${AUTOTOOLS_AUTO_DEPEND} != "no" ]] && BDEPEND=${AUTOTOOLS_DEPEND}
_AUTOTOOLS_AUTO_DEPEND=${AUTOTOOLS_AUTO_DEPEND} # See top of eclass
unset _automake_atom _autoconf_atom
@@ -398,22 +387,16 @@ eaclocal() {
# - ${BROOT}/usr/share/aclocal
# - ${ESYSROOT}/usr/share/aclocal
# See bug #677002
- if [[ ${EAPI} != 6 ]] ; then
- if [[ ! -f "${T}"/aclocal/dirlist ]] ; then
- mkdir "${T}"/aclocal || die
- cat <<- EOF > "${T}"/aclocal/dirlist || die
- ${BROOT}/usr/share/aclocal
- ${ESYSROOT}/usr/share/aclocal
- EOF
- fi
-
- local system_acdir=" --system-acdir=${T}/aclocal"
- else
- local system_acdir=""
+ if [[ ! -f "${T}"/aclocal/dirlist ]] ; then
+ mkdir "${T}"/aclocal || die
+ cat <<- EOF > "${T}"/aclocal/dirlist || die
+ ${BROOT}/usr/share/aclocal
+ ${ESYSROOT}/usr/share/aclocal
+ EOF
fi
[[ ! -f aclocal.m4 || -n $(grep -e 'generated.*by aclocal' aclocal.m4) ]] && \
- autotools_run_tool --at-m4flags aclocal "$@" $(eaclocal_amflags) ${system_acdir}
+ autotools_run_tool --at-m4flags aclocal "$@" $(eaclocal_amflags) --system-acdir="${T}"/aclocal
}
# @FUNCTION: _elibtoolize
@@ -455,7 +438,7 @@ eautoconf() {
if [[ ${WANT_AUTOCONF} != "2.1" && -e configure.in ]] ; then
case ${EAPI} in
- 6|7)
+ 7)
eqawarn "This package has a configure.in file which has long been deprecated. Please"
eqawarn "update it to use configure.ac instead as newer versions of autotools will die"
eqawarn "when it finds this file. See https://bugs.gentoo.org/426262 for details."
@@ -543,21 +526,13 @@ eautopoint() {
# use gettext directly. So we have to copy it in manually since
# we can't let `autopoint` do it for us.
config_rpath_update() {
- local dst src
-
- case ${EAPI} in
- 6)
- src="${EPREFIX}/usr/share/gettext/config.rpath"
- ;;
- *)
- src="${BROOT}/usr/share/gettext/config.rpath"
- ;;
- esac
+ local src="${BROOT}/usr/share/gettext/config.rpath"
[[ $# -eq 0 ]] && set -- $(find -name config.rpath)
[[ $# -eq 0 ]] && return 0
einfo "Updating all config.rpath files"
+ local dst
for dst in "$@" ; do
einfo " ${dst}"
cp "${src}" "${dst}" || die
@@ -575,16 +550,7 @@ autotools_env_setup() {
local pv
for pv in ${_LATEST_AUTOMAKE[@]/#*:} ; do
# Break on first hit to respect _LATEST_AUTOMAKE order.
- local hv_args=""
- case ${EAPI} in
- 6)
- hv_args="--host-root"
- ;;
- *)
- hv_args="-b"
- ;;
- esac
- has_version ${hv_args} "=dev-build/automake-${pv}*" && export WANT_AUTOMAKE="${pv}" && break
+ has_version -b "=dev-build/automake-${pv}*" && export WANT_AUTOMAKE="${pv}" && break
done
# During bootstrap in prefix there might be no automake merged yet
@@ -604,16 +570,7 @@ autotools_env_setup() {
local pv
for pv in ${_LATEST_AUTOCONF[@]/#*:} ; do
# Break on first hit to respect _LATEST_AUTOCONF order.
- local hv_args=""
- case ${EAPI} in
- 6)
- hv_args="--host-root"
- ;;
- *)
- hv_args="-b"
- ;;
- esac
- has_version ${hv_args} "=dev-build/autoconf-${pv}*" && export WANT_AUTOCONF="${pv}" && break
+ has_version -b "=dev-build/autoconf-${pv}*" && export WANT_AUTOCONF="${pv}" && break
done
# During bootstrap in prefix there might be no autoconf merged yet
diff --git a/eclass/bash-completion-r1.eclass b/eclass/bash-completion-r1.eclass
index be506793ae94..2220cb2be508 100644
--- a/eclass/bash-completion-r1.eclass
+++ b/eclass/bash-completion-r1.eclass
@@ -4,7 +4,7 @@
# @ECLASS: bash-completion-r1.eclass
# @MAINTAINER:
# mgorny@gentoo.org
-# @SUPPORTED_EAPIS: 5 6 7 8
+# @SUPPORTED_EAPIS: 7 8
# @BLURB: A few quick functions to install bash-completion files
# @EXAMPLE:
#
@@ -23,16 +23,12 @@
# }
# @CODE
-if [[ ! ${_BASH_COMPLETION_R1_ECLASS} ]]; then
+if [[ -z ${_BASH_COMPLETION_R1_ECLASS} ]]; then
_BASH_COMPLETION_R1_ECLASS=1
inherit toolchain-funcs
case ${EAPI} in
- 6)
- ewarn "${CATEGORY}/${PF}: ebuild uses ${ECLASS} with deprecated EAPI ${EAPI}!"
- ewarn "${CATEGORY}/${PF}: Support will be removed on 2024-10-08. Please port to newer EAPI."
- ;;
7|8) ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
@@ -45,7 +41,7 @@ esac
# @EXAMPLE:
# _bash-completion-r1_get_bashdir completionsdir /usr/share/bash-completion
_bash-completion-r1_get_bashdir() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
if $(tc-getPKG_CONFIG) --exists bash-completion &>/dev/null; then
local path
@@ -63,7 +59,7 @@ _bash-completion-r1_get_bashdir() {
# @DESCRIPTION:
# Get unprefixed bash-completion completions directory.
_bash-completion-r1_get_bashcompdir() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
_bash-completion-r1_get_bashdir completionsdir /usr/share/bash-completion/completions
}
@@ -73,7 +69,7 @@ _bash-completion-r1_get_bashcompdir() {
# @DESCRIPTION:
# Get unprefixed bash-completion helpers directory.
_bash-completion-r1_get_bashhelpersdir() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
_bash-completion-r1_get_bashdir helpersdir /usr/share/bash-completion/helpers
}
@@ -82,7 +78,7 @@ _bash-completion-r1_get_bashhelpersdir() {
# @DESCRIPTION:
# Get the bash-completion completions directory.
get_bashcompdir() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
echo "${EPREFIX}$(_bash-completion-r1_get_bashcompdir)"
}
@@ -92,7 +88,7 @@ get_bashcompdir() {
# @DESCRIPTION:
# Get the bash-completion helpers directory.
get_bashhelpersdir() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
echo "${EPREFIX}$(_bash-completion-r1_get_bashhelpersdir)"
}
@@ -103,7 +99,7 @@ get_bashhelpersdir() {
# Install bash-completion files passed as args. Has EAPI-dependent failure
# behavior (like doins).
dobashcomp() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
(
insopts -m 0644
@@ -118,7 +114,7 @@ dobashcomp() {
# Install bash-completion file under a new name. Has EAPI-dependent failure
# behavior (like newins).
newbashcomp() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
(
insopts -m 0644
@@ -132,7 +128,7 @@ newbashcomp() {
# @DESCRIPTION:
# Alias <basename> completion to one or more commands (<alias>es).
bashcomp_alias() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
[[ ${#} -lt 2 ]] && die "Usage: ${FUNCNAME} <basename> <alias>..."
local base=${1} f
diff --git a/eclass/cdrom.eclass b/eclass/cdrom.eclass
index 4f7ba663beba..c4d7d59beadb 100644
--- a/eclass/cdrom.eclass
+++ b/eclass/cdrom.eclass
@@ -4,7 +4,7 @@
# @ECLASS: cdrom.eclass
# @MAINTAINER:
# games@gentoo.org
-# @SUPPORTED_EAPIS: 6 7 8
+# @SUPPORTED_EAPIS: 7 8
# @BLURB: Functions for CD-ROM handling
# @DESCRIPTION:
# Acquire CD(s) for those lovely CD-based emerges. Yes, this violates
@@ -19,10 +19,6 @@ if [[ -z ${_CDROM_ECLASS} ]]; then
_CDROM_ECLASS=1
case ${EAPI} in
- 6)
- ewarn "${CATEGORY}/${PF}: ebuild uses ${ECLASS} with deprecated EAPI ${EAPI}!"
- ewarn "${CATEGORY}/${PF}: Support will be removed on 2024-10-08. Please port to newer EAPI."
- ;;
7|8) ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
diff --git a/eclass/check-reqs.eclass b/eclass/check-reqs.eclass
index 02ff61187c45..11eec694ef04 100644
--- a/eclass/check-reqs.eclass
+++ b/eclass/check-reqs.eclass
@@ -7,7 +7,7 @@
# @AUTHOR:
# Bo Ørsted Andresen <zlin@gentoo.org>
# Original Author: Ciaran McCreesh <ciaranm@gentoo.org>
-# @SUPPORTED_EAPIS: 6 7 8
+# @SUPPORTED_EAPIS: 7 8
# @BLURB: Provides a uniform way of handling ebuilds with very high build requirements
# @DESCRIPTION:
# This eclass provides a uniform way of handling ebuilds which have very high
@@ -42,10 +42,6 @@ if [[ -z ${_CHECK_REQS_ECLASS} ]]; then
_CHECK_REQS_ECLASS=1
case ${EAPI} in
- 6)
- ewarn "${CATEGORY}/${PF}: ebuild uses ${ECLASS} with deprecated EAPI ${EAPI}!"
- ewarn "${CATEGORY}/${PF}: Support will be removed on 2024-10-08. Please port to newer EAPI."
- ;;
7|8) ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
@@ -111,7 +107,7 @@ check-reqs_pkg_pretend() {
# @DESCRIPTION:
# Internal function that checks the variables that should be defined.
check-reqs_prepare() {
- [[ ${EAPI} == [67] ]] ||
+ [[ ${EAPI} == 7 ]] ||
die "Internal function ${FUNCNAME} is not available in EAPI ${EAPI}."
_check-reqs_prepare "$@"
}
@@ -138,7 +134,7 @@ _check-reqs_prepare() {
# @DESCRIPTION:
# Internal function that runs the check based on variable settings.
check-reqs_run() {
- [[ ${EAPI} == [67] ]] ||
+ [[ ${EAPI} == 7 ]] ||
die "Internal function ${FUNCNAME} is not available in EAPI ${EAPI}."
_check-reqs_run "$@"
}
@@ -167,12 +163,12 @@ _check-reqs_run() {
if [[ ${MERGE_TYPE} != buildonly ]]; then
[[ -n ${CHECKREQS_DISK_USR} ]] && \
_check-reqs_disk \
- "${EROOT%/}/usr" \
+ "${EROOT}/usr" \
"${CHECKREQS_DISK_USR}"
[[ -n ${CHECKREQS_DISK_VAR} ]] && \
_check-reqs_disk \
- "${EROOT%/}/var" \
+ "${EROOT}/var" \
"${CHECKREQS_DISK_VAR}"
fi
}
@@ -183,7 +179,7 @@ _check-reqs_run() {
# Internal function that returns number in KiB.
# Returns 1024**2 for 1G or 1024**3 for 1T.
check-reqs_get_kibibytes() {
- [[ ${EAPI} == [67] ]] ||
+ [[ ${EAPI} == 7 ]] ||
die "Internal function ${FUNCNAME} is not available in EAPI ${EAPI}."
_check-reqs_get_kibibytes "$@"
}
@@ -217,7 +213,7 @@ _check-reqs_get_kibibytes() {
# Internal function that returns the numerical value without the unit.
# Returns "1" for "1G" or "150" for "150T".
check-reqs_get_number() {
- [[ ${EAPI} == [67] ]] ||
+ [[ ${EAPI} == 7 ]] ||
die "Internal function ${FUNCNAME} is not available in EAPI ${EAPI}."
_check-reqs_get_number "$@"
}
@@ -244,7 +240,7 @@ _check-reqs_get_number() {
# Internal function that returns the unit without the numerical value.
# Returns "GiB" for "1G" or "TiB" for "150T".
check-reqs_get_unit() {
- [[ ${EAPI} == [67] ]] ||
+ [[ ${EAPI} == 7 ]] ||
die "Internal function ${FUNCNAME} is not available in EAPI ${EAPI}."
_check-reqs_get_unit "$@"
}
@@ -277,7 +273,7 @@ _check-reqs_get_unit() {
# Internal function that prints the warning and dies if required based on
# the test results.
check-reqs_output() {
- [[ ${EAPI} == [67] ]] ||
+ [[ ${EAPI} == 7 ]] ||
die "Internal function ${FUNCNAME} is not available in EAPI ${EAPI}."
_check-reqs_get_unit "$@"
}
@@ -312,7 +308,7 @@ _check-reqs_output() {
# @DESCRIPTION:
# Internal function that checks size of RAM.
check-reqs_memory() {
- [[ ${EAPI} == [67] ]] ||
+ [[ ${EAPI} == 7 ]] ||
die "Internal function ${FUNCNAME} is not available in EAPI ${EAPI}."
_check-reqs_memory "$@"
}
@@ -371,7 +367,7 @@ _check-reqs_memory() {
# @DESCRIPTION:
# Internal function that checks space on the harddrive.
check-reqs_disk() {
- [[ ${EAPI} == [67] ]] ||
+ [[ ${EAPI} == 7 ]] ||
die "Internal function ${FUNCNAME} is not available in EAPI ${EAPI}."
_check-reqs_disk "$@"
}
@@ -415,7 +411,7 @@ _check-reqs_disk() {
# @DESCRIPTION:
# Internal function that inform about started check
check-reqs_start_phase() {
- [[ ${EAPI} == [67] ]] ||
+ [[ ${EAPI} == 7 ]] ||
die "Internal function ${FUNCNAME} is not available in EAPI ${EAPI}."
_check-reqs_start_phase "$@"
}
@@ -443,7 +439,7 @@ _check-reqs_start_phase() {
# It has different output between pretend and setup phase,
# where in pretend phase it is fatal.
check-reqs_unsatisfied() {
- [[ ${EAPI} == [67] ]] ||
+ [[ ${EAPI} == 7 ]] ||
die "Internal function ${FUNCNAME} is not available in EAPI ${EAPI}."
_check-reqs_unsatisfied "$@"
}
diff --git a/eclass/depend.apache.eclass b/eclass/depend.apache.eclass
index 60926c298f04..e1818be28af3 100644
--- a/eclass/depend.apache.eclass
+++ b/eclass/depend.apache.eclass
@@ -4,7 +4,7 @@
# @ECLASS: depend.apache.eclass
# @MAINTAINER:
# apache-bugs@gentoo.org
-# @SUPPORTED_EAPIS: 6 7 8
+# @SUPPORTED_EAPIS: 7 8
# @BLURB: Functions to allow ebuilds to depend on apache
# @DESCRIPTION:
# This eclass handles depending on apache in a sane way and provides information
@@ -40,11 +40,10 @@
# }
# @CODE
+if [[ -z ${_DEPEND_APACHE_ECLASS} ]]; then
+_DEPEND_APACHE_ECLASS=1
+
case ${EAPI} in
- 6)
- ewarn "${CATEGORY}/${PF}: ebuild uses ${ECLASS} with deprecated EAPI ${EAPI}!"
- ewarn "${CATEGORY}/${PF}: Support will be removed on 2024-10-08. Please port to newer EAPI."
- ;;
7|8) ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
@@ -124,7 +123,7 @@ APACHE2_4_DEPEND="=www-servers/apache-2.4*"
# ==============================================================================
_init_apache2() {
- debug-print-function $FUNCNAME $*
+ debug-print-function ${FUNCNAME} "$@"
# WARNING: Do not use these variables with anything that is put
# into the dependency cache (DEPEND/RDEPEND/etc)
@@ -144,7 +143,7 @@ _init_apache2_late() {
}
_init_no_apache() {
- debug-print-function $FUNCNAME $*
+ debug-print-function ${FUNCNAME} "$@"
APACHE_VERSION="0"
}
@@ -159,7 +158,7 @@ _init_no_apache() {
# apache-2.x support. If the myiuse parameter is not given it defaults to
# apache2.
depend.apache_pkg_setup() {
- debug-print-function $FUNCNAME $*
+ debug-print-function ${FUNCNAME} "$@"
if [[ "${EBUILD_PHASE}" != "setup" ]]; then
die "$FUNCNAME() should be called in pkg_setup()"
@@ -185,7 +184,7 @@ depend.apache_pkg_setup() {
# An ebuild should additionally call depend.apache_pkg_setup() in pkg_setup()
# with the same myiuse parameter.
want_apache() {
- debug-print-function $FUNCNAME $*
+ debug-print-function ${FUNCNAME} "$@"
want_apache2 "$@"
}
@@ -197,7 +196,7 @@ want_apache() {
# An ebuild should additionally call depend.apache_pkg_setup() in pkg_setup()
# with the same myiuse parameter.
want_apache2() {
- debug-print-function $FUNCNAME $*
+ debug-print-function ${FUNCNAME} "$@"
local myiuse=${1:-apache2}
IUSE="${IUSE} ${myiuse}"
@@ -214,10 +213,10 @@ want_apache2() {
# An ebuild should additionally call depend.apache_pkg_setup() in pkg_setup()
# with the same myiuse parameter.
want_apache2_2() {
- debug-print-function $FUNCNAME $*
+ debug-print-function ${FUNCNAME} "$@"
- case ${EAPI:-0} in
- 6|7)
+ case ${EAPI} in
+ 7)
local myiuse=${1:-apache2}
IUSE="${IUSE} ${myiuse}"
DEPEND="${DEPEND} ${myiuse}? ( ${APACHE2_2_DEPEND} )"
@@ -238,7 +237,7 @@ want_apache2_2() {
# An ebuild should additionally call depend.apache_pkg_setup() in pkg_setup()
# with the same myiuse parameter.
want_apache2_4() {
- debug-print-function $FUNCNAME $*
+ debug-print-function ${FUNCNAME} "$@"
local myiuse=${1:-apache2}
IUSE="${IUSE} ${myiuse}"
@@ -250,7 +249,7 @@ want_apache2_4() {
# @DESCRIPTION:
# An ebuild calls this to get the dependency information for apache.
need_apache() {
- debug-print-function $FUNCNAME $*
+ debug-print-function ${FUNCNAME} "$@"
need_apache2
}
@@ -258,7 +257,7 @@ need_apache() {
# @DESCRIPTION:
# An ebuild calls this to get the dependency information for apache-2.x.
need_apache2() {
- debug-print-function $FUNCNAME $*
+ debug-print-function ${FUNCNAME} "$@"
DEPEND="${DEPEND} ${APACHE2_DEPEND}"
RDEPEND="${RDEPEND} ${APACHE2_DEPEND}"
@@ -269,10 +268,10 @@ need_apache2() {
# @DESCRIPTION:
# An ebuild calls this to get the dependency information for apache-2.2.x.
need_apache2_2() {
- debug-print-function $FUNCNAME $*
+ debug-print-function ${FUNCNAME} "$@"
- case ${EAPI:-0} in
- 6|7)
+ case ${EAPI} in
+ 7)
DEPEND="${DEPEND} ${APACHE2_2_DEPEND}"
RDEPEND="${RDEPEND} ${APACHE2_2_DEPEND}"
_init_apache2
@@ -287,7 +286,7 @@ need_apache2_2() {
# @DESCRIPTION:
# An ebuild calls this to get the dependency information for apache-2.4.x.
need_apache2_4() {
- debug-print-function $FUNCNAME $*
+ debug-print-function ${FUNCNAME} "$@"
DEPEND="${DEPEND} ${APACHE2_4_DEPEND}"
RDEPEND="${RDEPEND} ${APACHE2_4_DEPEND}"
@@ -300,7 +299,7 @@ need_apache2_4() {
# dependency without USE-flag, in which case want_apache does not work.
# DO NOT call this function in global scope.
has_apache() {
- debug-print-function $FUNCNAME $*
+ debug-print-function ${FUNCNAME} "$@"
if has_version '>=www-servers/apache-2'; then
_init_apache2
@@ -316,7 +315,7 @@ has_apache() {
# built with a threaded MPM. If the myflag parameter is not given it defaults to
# threads.
has_apache_threads() {
- debug-print-function $FUNCNAME $*
+ debug-print-function ${FUNCNAME} "$@"
if ! has_version 'www-servers/apache[threads]'; then
return
@@ -339,7 +338,7 @@ has_apache_threads() {
# package if apache has been built with a threaded MPM. If the myflag parameter
# is not given it defaults to threads.
has_apache_threads_in() {
- debug-print-function $FUNCNAME $*
+ debug-print-function ${FUNCNAME} "$@"
if ! has_version 'www-servers/apache[threads]'; then
return
@@ -357,4 +356,6 @@ has_apache_threads_in() {
fi
}
+fi
+
EXPORT_FUNCTIONS pkg_setup
diff --git a/eclass/desktop.eclass b/eclass/desktop.eclass
index 144514c8f7c2..2ab96ba6b770 100644
--- a/eclass/desktop.eclass
+++ b/eclass/desktop.eclass
@@ -4,21 +4,17 @@
# @ECLASS: desktop.eclass
# @MAINTAINER:
# base-system@gentoo.org
-# @SUPPORTED_EAPIS: 6 7 8
+# @SUPPORTED_EAPIS: 7 8
# @BLURB: support for desktop files, menus, and icons
+if [[ -z ${_DESKTOP_ECLASS} ]]; then
+_DESKTOP_ECLASS=1
+
case ${EAPI} in
- 6)
- ewarn "${CATEGORY}/${PF}: ebuild uses ${ECLASS} with deprecated EAPI ${EAPI}!"
- ewarn "${CATEGORY}/${PF}: Support will be removed on 2024-10-08. Please port to newer EAPI."
- ;;
7|8) ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
-if [[ -z ${_DESKTOP_ECLASS} ]]; then
-_DESKTOP_ECLASS=1
-
# @FUNCTION: make_desktop_entry
# @USAGE: <command> [name] [icon] [type] [fields]
# @DESCRIPTION:
@@ -216,7 +212,7 @@ make_desktop_entry() {
insopts -m 0644
insinto /usr/share/applications
doins "${desktop}"
- ) || die "installing desktop file failed"
+ )
}
# @FUNCTION: make_session_desktop
@@ -357,7 +353,7 @@ _iconins() {
if [[ ${funcname} == newicon ]] ; then
newins "$@"
fi
- ) || die
+ )
}
# @FUNCTION: doicon
diff --git a/eclass/dist-kernel-utils.eclass b/eclass/dist-kernel-utils.eclass
index bb058d488a13..67ba459f0ebe 100644
--- a/eclass/dist-kernel-utils.eclass
+++ b/eclass/dist-kernel-utils.eclass
@@ -72,7 +72,7 @@ dist-kernel_get_image_path() {
# the kernel version, <image> full path to the image, <system.map>
# full path to System.map.
dist-kernel_install_kernel() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
[[ ${#} -eq 3 ]] || die "${FUNCNAME}: invalid arguments"
local version=${1}
@@ -125,7 +125,7 @@ dist-kernel_install_kernel() {
# This function is to be used in pkg_postinst() of ebuilds installing
# kernel modules that are included in the initramfs.
dist-kernel_reinstall_initramfs() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
[[ ${#} -eq 2 ]] || die "${FUNCNAME}: invalid arguments"
local kernel_dir=${1}
@@ -148,7 +148,7 @@ dist-kernel_reinstall_initramfs() {
# @DESCRIPTION:
# Convert a Gentoo-style ebuild version to kernel "x.y.z[-rcN]" version.
dist-kernel_PV_to_KV() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
[[ ${#} -ne 1 ]] && die "${FUNCNAME}: invalid arguments"
local pv=${1}
@@ -165,7 +165,7 @@ dist-kernel_PV_to_KV() {
# Returns the suffix for kernel modules based on the CONFIG_MODULES_COMPESS_*
# setting in the kernel config and USE=modules-compress.
dist-kernel_get_module_suffix() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
[[ ${#} -eq 1 ]] || die "${FUNCNAME}: invalid arguments"
@@ -194,7 +194,7 @@ dist-kernel_get_module_suffix() {
# Traverse path for duplicate (un)compressed modules and remove all
# but the newest variant.
dist-kernel_compressed_module_cleanup() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
[[ ${#} -ne 1 ]] && die "${FUNCNAME}: invalid arguments"
local path=${1}
diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
index 5a6ebdcede8a..c3a7d112b03f 100644
--- a/eclass/distutils-r1.eclass
+++ b/eclass/distutils-r1.eclass
@@ -44,11 +44,6 @@
# For more information, please see the Python Guide:
# https://projects.gentoo.org/python/guide/
-case ${EAPI} in
- 7|8) ;;
- *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
-esac
-
# @ECLASS_VARIABLE: DISTUTILS_EXT
# @PRE_INHERIT
# @DEFAULT_UNSET
@@ -225,6 +220,11 @@ esac
if [[ -z ${_DISTUTILS_R1_ECLASS} ]]; then
_DISTUTILS_R1_ECLASS=1
+case ${EAPI} in
+ 7|8) ;;
+ *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
+esac
+
inherit flag-o-matic
inherit multibuild multilib multiprocessing ninja-utils toolchain-funcs
@@ -493,7 +493,7 @@ unset -f _distutils_set_globals
# python_compile_all(), you can call the original implementation
# as sphinx_compile_all.
distutils_enable_sphinx() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
[[ ${#} -ge 1 ]] || die "${FUNCNAME} takes at least one arg: <subdir>"
_DISTUTILS_SPHINX_SUBDIR=${1}
@@ -589,7 +589,7 @@ distutils_enable_sphinx() {
# This function must be called in global scope, after RDEPEND has been
# declared. Take care not to overwrite the variables set by it.
distutils_enable_tests() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
case ${1} in
--install)
@@ -670,7 +670,7 @@ distutils_enable_tests() {
#
# This command dies on failure.
esetup.py() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
_python_check_EPYTHON
@@ -729,7 +729,7 @@ distutils_install_for_testing() {
# This function must only be used in python_test(). The created file
# will automatically be removed upon leaving the test phase.
distutils_write_namespace() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
if [[ ! ${DISTUTILS_USE_PEP517:-no} != no ]]; then
die "${FUNCNAME} is available only in PEP517 mode"
@@ -935,7 +935,7 @@ _distutils-r1_print_package_versions() {
# At some point in the future, it may also apply eclass-specific
# distutils patches and/or quirks.
distutils-r1_python_prepare_all() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
_python_sanity_checks
_distutils-r1_check_all_phase_mismatch
@@ -1022,7 +1022,7 @@ _distutils-r1_create_setup_cfg() {
[install]
compile = True
optimize = 2
- root = ${D%/}
+ root = ${D}
_EOF_
if [[ ! ${DISTUTILS_SINGLE_IMPL} ]]; then
@@ -1057,7 +1057,7 @@ _distutils-r1_copy_egg_info() {
# Print the DISTUTILS_USE_PEP517 value corresponding to the backend
# passed as the only argument.
_distutils-r1_backend_to_key() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
local backend=${1}
case ${backend} in
@@ -1109,7 +1109,7 @@ _distutils-r1_backend_to_key() {
# Read (or guess, in case of setuptools) the build-backend
# for the package in the current directory.
_distutils-r1_get_backend() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
local build_backend legacy_fallback
if [[ -f pyproject.toml ]]; then
@@ -1179,7 +1179,7 @@ _distutils-r1_get_backend() {
#
# This function is intended for expert use only.
distutils_wheel_install() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
if [[ ${#} -ne 2 ]]; then
die "${FUNCNAME} takes exactly two arguments: <root> <wheel>"
fi
@@ -1236,7 +1236,7 @@ distutils_wheel_install() {
# wrapping executables. The wheel path is returned
# in DISTUTILS_WHEEL_PATH variable.
distutils_pep517_install() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
[[ ${#} -eq 1 ]] || die "${FUNCNAME} takes exactly one argument: root"
if [[ ! ${DISTUTILS_USE_PEP517:-no} != no ]]; then
@@ -1448,7 +1448,7 @@ declare -g -A DISTUTILS_WHEELS=()
# function will be appended to setup.py invocation, i.e. passed
# as options to the 'build' command.
distutils-r1_python_compile() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
_python_check_EPYTHON
@@ -1514,7 +1514,7 @@ distutils-r1_python_compile() {
# @DESCRIPTION:
# Moves and wraps all installed scripts/executables as necessary.
_distutils-r1_wrap_scripts() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
[[ ${#} -eq 1 ]] || die "usage: ${FUNCNAME} <bindir>"
local bindir=${1}
@@ -1522,10 +1522,10 @@ _distutils-r1_wrap_scripts() {
local scriptdir=$(python_get_scriptdir)
local f python_files=() non_python_files=()
- if [[ -d ${D%/}${scriptdir} ]]; then
- for f in "${D%/}${scriptdir}"/*; do
+ if [[ -d ${D}${scriptdir} ]]; then
+ for f in "${D}${scriptdir}"/*; do
[[ -d ${f} ]] && die "Unexpected directory: ${f}"
- debug-print "${FUNCNAME}: found executable at ${f#${D%/}/}"
+ debug-print "${FUNCNAME}: found executable at ${f#${D}/}"
local shebang
read -r shebang < "${f}"
@@ -1537,7 +1537,7 @@ _distutils-r1_wrap_scripts() {
non_python_files+=( "${f}" )
fi
- mkdir -p "${D%/}${bindir}" || die
+ mkdir -p "${D}${bindir}" || die
done
for f in "${python_files[@]}"; do
@@ -1553,8 +1553,8 @@ _distutils-r1_wrap_scripts() {
for f in "${non_python_files[@]}"; do
local basename=${f##*/}
- debug-print "${FUNCNAME}: moving ${f#${D%/}/} to ${bindir}/${basename}"
- mv "${f}" "${D%/}${bindir}/${basename}" || die
+ debug-print "${FUNCNAME}: moving ${f#${D}/} to ${bindir}/${basename}"
+ mv "${f}" "${D}${bindir}/${basename}" || die
done
fi
}
@@ -1568,7 +1568,7 @@ _distutils-r1_wrap_scripts() {
#
# This function is used only if distutils_enable_tests is called.
distutils-r1_python_test() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
if [[ -z ${_DISTUTILS_TEST_RUNNER} ]]; then
die "${FUNCNAME} can be only used after calling distutils_enable_tests"
@@ -1611,7 +1611,7 @@ distutils-r1_python_test() {
# Any parameters passed to this function will be appended
# to the setup.py invocation (i.e. as options to the 'install' command).
distutils-r1_python_install() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
_python_check_EPYTHON
@@ -1662,8 +1662,8 @@ distutils-r1_python_install() {
find "${BUILD_DIR}"/install -type d -empty -delete || die
[[ -d ${BUILD_DIR}/install ]] && merge_root=1
else
- local root=${D%/}/_${EPYTHON}
- [[ ${DISTUTILS_SINGLE_IMPL} ]] && root=${D%/}
+ local root=${D}/_${EPYTHON}
+ [[ ${DISTUTILS_SINGLE_IMPL} ]] && root=${D}
# inline DISTUTILS_ARGS logic from esetup.py in order to make
# argv overwriting easier
@@ -1717,7 +1717,7 @@ distutils-r1_python_install() {
fi
if [[ ${merge_root} ]]; then
- multibuild_merge_root "${root}" "${D%/}"
+ multibuild_merge_root "${root}" "${D}"
fi
if [[ ! ${DISTUTILS_SINGLE_IMPL} ]]; then
_distutils-r1_wrap_scripts "${scriptdir}"
@@ -1728,7 +1728,7 @@ distutils-r1_python_install() {
# @DESCRIPTION:
# The default python_install_all(). It installs the documentation.
distutils-r1_python_install_all() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
_distutils-r1_check_all_phase_mismatch
einstalldocs
@@ -1748,7 +1748,7 @@ distutils-r1_python_install_all() {
# holding the per-implementation copy of sources. BUILD_DIR points
# to the 'build' subdirectory.
distutils-r1_run_phase() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
if [[ ${DISTUTILS_IN_SOURCE_BUILD} ]]; then
[[ ${DISTUTILS_USE_PEP517} ]] &&
@@ -1869,7 +1869,7 @@ _distutils-r1_run_common_phase() {
# Run the given phase for each implementation if multiple implementations
# are enabled, once otherwise.
_distutils-r1_run_foreach_impl() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
# store for restoring after distutils-r1_run_phase.
local _DISTUTILS_INITIAL_CWD=${PWD}
@@ -1890,7 +1890,7 @@ _distutils-r1_run_foreach_impl() {
}
distutils-r1_src_prepare() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
local ret=0
local _DISTUTILS_DEFAULT_CALLED
@@ -1913,7 +1913,7 @@ distutils-r1_src_prepare() {
}
distutils-r1_src_configure() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
local ret=0
if declare -f python_configure >/dev/null; then
@@ -1933,7 +1933,7 @@ distutils-r1_src_configure() {
# Verify the the match between files installed between this and previous
# implementation.
_distutils-r1_compare_installed_files() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
# QA check requires diff(1).
if ! type -P diff &>/dev/null; then
@@ -1971,7 +1971,7 @@ _distutils-r1_compare_installed_files() {
# Post-phase function called after python_compile. In PEP517 mode,
# it adjusts the install tree for venv-style usage.
_distutils-r1_post_python_compile() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
local root=${BUILD_DIR}/install
if [[ ${DISTUTILS_USE_PEP517} && -d ${root} ]]; then
@@ -2005,7 +2005,7 @@ _distutils-r1_post_python_compile() {
}
distutils-r1_src_compile() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
local ret=0
if declare -f python_compile >/dev/null; then
@@ -2040,7 +2040,7 @@ _distutils-r1_clean_egg_info() {
# @DESCRIPTION:
# Post-phase function called after python_test.
_distutils-r1_post_python_test() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
if [[ ! ${DISTUTILS_USE_PEP517} ]]; then
_distutils-r1_clean_egg_info
@@ -2048,7 +2048,7 @@ _distutils-r1_post_python_test() {
}
distutils-r1_src_test() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
local ret=0
if declare -f python_test >/dev/null; then
@@ -2069,7 +2069,7 @@ distutils-r1_src_test() {
# Find and remove setuptools-style namespaces in the specified
# directory.
_distutils-r1_strip_namespace_packages() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
local sitedir=${1}
local f ns had_any=
@@ -2098,9 +2098,9 @@ _distutils-r1_strip_namespace_packages() {
# Post-phase function called after python_install. Performs QA checks.
# In PEP517 mode, additionally optimizes installed Python modules.
_distutils-r1_post_python_install() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
- local sitedir=${D%/}$(python_get_sitedir)
+ local sitedir=${D}$(python_get_sitedir)
if [[ -d ${sitedir} ]]; then
_distutils-r1_strip_namespace_packages "${sitedir}"
@@ -2161,13 +2161,13 @@ _distutils-r1_check_namespace_pth() {
while IFS= read -r -d '' f; do
pth+=( "${f}" )
- done < <(find "${ED%/}" -name '*-nspkg.pth' -print0)
+ done < <(find "${ED}" -name '*-nspkg.pth' -print0)
if [[ ${pth[@]} ]]; then
eerror "The following *-nspkg.pth files were found installed:"
eerror
for f in "${pth[@]}"; do
- eerror " ${f#${ED%/}}"
+ eerror " ${f#${ED}}"
done
eerror
eerror "The presence of those files may break namespaces in Python 3.5+. Please"
@@ -2181,7 +2181,7 @@ _distutils-r1_check_namespace_pth() {
}
distutils-r1_src_install() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
local ret=0
if declare -f python_install >/dev/null; then
diff --git a/eclass/dotnet-pkg-base.eclass b/eclass/dotnet-pkg-base.eclass
index a2d95f15a2fb..15e9ba703baa 100644
--- a/eclass/dotnet-pkg-base.eclass
+++ b/eclass/dotnet-pkg-base.eclass
@@ -188,7 +188,7 @@ dotnet-pkg-base_get-configuration() {
#
# This function is used inside "dotnet-pkg-base_setup".
dotnet-pkg-base_get-output() {
- debug-print-function "${FUNCNAME[0]}" "${@}"
+ debug-print-function ${FUNCNAME} "$@"
[[ -z ${DOTNET_PKG_CONFIGURATION} ]] &&
die "${FUNCNAME[0]}: DOTNET_PKG_CONFIGURATION is not set."
@@ -266,7 +266,7 @@ dotnet-pkg-base_setup() {
#
# Used by "dotnet-pkg_src_prepare" from the "dotnet-pkg" eclass.
dotnet-pkg-base_remove-global-json() {
- debug-print-function "${FUNCNAME[0]}" "${@}"
+ debug-print-function ${FUNCNAME} "$@"
local file="${1:-.}"/global.json
@@ -282,7 +282,7 @@ dotnet-pkg-base_remove-global-json() {
# @DESCRIPTION:
# Call dotnet, passing the supplied arguments.
edotnet() {
- debug-print-function "${FUNCNAME[0]}" "${@}"
+ debug-print-function ${FUNCNAME} "$@"
if [[ -z ${DOTNET_PKG_EXECUTABLE} ]] ; then
die "${FUNCNAME[0]}: DOTNET_PKG_EXECUTABLE not set. Was dotnet-pkg-base_setup called?"
@@ -301,7 +301,7 @@ edotnet() {
# Used by "dotnet-pkg_src_configure" from the "dotnet-pkg" eclass.
dotnet-pkg-base_info() {
if [[ ${CATEGORY}/${PN} == dev-dotnet/csharp-gentoodotnetinfo ]] ; then
- debug-print-function "${FUNCNAME[0]}: ${P} is a special package, skipping dotnet-pkg-base_info"
+ debug-print-function ${FUNCNAME} "${P} is a special package, skipping dotnet-pkg-base_info"
elif command -v gentoo-dotnet-info >/dev/null ; then
gentoo-dotnet-info || die "${FUNCNAME[0]}: failed to execute gentoo-dotnet-info"
else
@@ -316,7 +316,7 @@ dotnet-pkg-base_info() {
#
# Used by "dotnet-pkg_remove-bad" from the "dotnet-pkg" eclass.
dotnet-pkg-base_sln-remove() {
- debug-print-function "${FUNCNAME[0]}" "${@}"
+ debug-print-function ${FUNCNAME} "$@"
[[ -z ${1} ]] && die "${FUNCNAME[0]}: no solution file specified"
[[ -z ${2} ]] && die "${FUNCNAME[0]}: no project file specified"
@@ -334,7 +334,7 @@ dotnet-pkg-base_sln-remove() {
# Used by "dotnet-pkg_src_configure" and "dotnet-pkg_src_test" from
# the "dotnet-pkg" eclass.
dotnet-pkg-base_foreach-solution() {
- debug-print-function "${FUNCNAME[0]}" "${@}"
+ debug-print-function ${FUNCNAME} "$@"
local directory="${1}"
shift
@@ -362,7 +362,7 @@ dotnet-pkg-base_foreach-solution() {
#
# Used by "dotnet-pkg_src_configure" from the "dotnet-pkg" eclass.
dotnet-pkg-base_restore() {
- debug-print-function "${FUNCNAME[0]}" "${@}"
+ debug-print-function ${FUNCNAME} "$@"
local -a restore_args=(
--runtime "${DOTNET_PKG_RUNTIME}"
@@ -385,7 +385,7 @@ dotnet-pkg-base_restore() {
# Additionally any number of "args" maybe be given, they are appended to
# the "dotnet" command invocation.
dotnet-pkg-base_restore-tools() {
- debug-print-function "${FUNCNAME[0]}" "${@}"
+ debug-print-function ${FUNCNAME} "$@"
local -a tool_restore_args=(
--add-source "${NUGET_PACKAGES}"
@@ -421,7 +421,7 @@ dotnet-pkg-base_restore_tools() {
#
# Used by "dotnet-pkg_src_compile" from the "dotnet-pkg" eclass.
dotnet-pkg-base_build() {
- debug-print-function "${FUNCNAME[0]}" "${@}"
+ debug-print-function ${FUNCNAME} "$@"
local -a build_args=(
--configuration "${DOTNET_PKG_CONFIGURATION}"
@@ -459,7 +459,7 @@ dotnet-pkg-base_build() {
#
# Used by "dotnet-pkg_src_test" from the "dotnet-pkg" eclass.
dotnet-pkg-base_test() {
- debug-print-function "${FUNCNAME[0]}" "${@}"
+ debug-print-function ${FUNCNAME} "$@"
local -a test_args=(
--configuration "${DOTNET_PKG_CONFIGURATION}"
@@ -479,7 +479,7 @@ dotnet-pkg-base_test() {
#
# Installation directory is relative to "ED".
dotnet-pkg-base_install() {
- debug-print-function "${FUNCNAME[0]}" "${@}"
+ debug-print-function ${FUNCNAME} "$@"
local installation_directory="${1:-/usr/share/${P}}"
@@ -495,7 +495,7 @@ dotnet-pkg-base_install() {
#
# For more info see the "_DOTNET_PKG_LAUNCHERDEST" variable.
dotnet-pkg-base_launcherinto() {
- debug-print-function "${FUNCNAME[0]}" "${@}"
+ debug-print-function ${FUNCNAME} "$@"
[[ -z ${1} ]] && die "${FUNCNAME[0]}: no directory specified"
@@ -519,7 +519,7 @@ dotnet-pkg-base_launcherinto() {
#
# For more info see the "_DOTNET_PKG_LAUNCHERVARS" variable.
dotnet-pkg-base_append-launchervar() {
- debug-print-function "${FUNCNAME[0]}" "${@}"
+ debug-print-function ${FUNCNAME} "$@"
[[ -z ${1} ]] && die "${FUNCNAME[0]}: no variable setting specified"
@@ -553,7 +553,7 @@ dotnet-pkg-base_append_launchervar() {
#
# The path is prepended by "EPREFIX".
dotnet-pkg-base_dolauncher() {
- debug-print-function "${FUNCNAME[0]}" "${@}"
+ debug-print-function ${FUNCNAME} "$@"
local executable_path executable_name
@@ -618,7 +618,7 @@ dotnet-pkg-base_dolauncher() {
#
# The path is prepended by "EPREFIX".
dotnet-pkg-base_dolauncher-portable() {
- debug-print-function "${FUNCNAME[0]}" "${@}"
+ debug-print-function ${FUNCNAME} "$@"
local dll_path="${1}"
local executable_name="${2}"
diff --git a/eclass/dotnet-pkg.eclass b/eclass/dotnet-pkg.eclass
index 59a8ae799f86..44a806f2af39 100644
--- a/eclass/dotnet-pkg.eclass
+++ b/eclass/dotnet-pkg.eclass
@@ -210,7 +210,7 @@ dotnet-pkg_src_unpack() {
#
# Used by "dotnet-pkg_src_prepare".
dotnet-pkg_remove-bad() {
- debug-print-function "${FUNCNAME[0]}" "${@}"
+ debug-print-function ${FUNCNAME} "$@"
[[ -z ${1} ]] && die "${FUNCNAME[0]}: no solution file specified"
@@ -246,7 +246,7 @@ dotnet-pkg_src_prepare() {
#
# Used by "dotnet-pkg_src_configure" and "dotnet-pkg_src_compile".
dotnet-pkg_foreach-project() {
- debug-print-function "${FUNCNAME[0]}" "${@}"
+ debug-print-function ${FUNCNAME} "$@"
local dotnet_project
for dotnet_project in "${DOTNET_PKG_PROJECTS[@]}" ; do
diff --git a/eclass/dotnet.eclass b/eclass/dotnet.eclass
index 1fb288dd1094..aeaee2f58e94 100644
--- a/eclass/dotnet.eclass
+++ b/eclass/dotnet.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: dotnet.eclass
@@ -17,7 +17,7 @@ case ${EAPI} in
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
-if [[ ! ${_DOTNET_ECLASS} ]]; then
+if [[ -z ${_DOTNET_ECLASS} ]]; then
_DOTNET_ECLASS=1
BDEPEND="dev-lang/mono"
diff --git a/eclass/dune.eclass b/eclass/dune.eclass
index ba54e87ceaf9..cfe81433a5bc 100644
--- a/eclass/dune.eclass
+++ b/eclass/dune.eclass
@@ -19,7 +19,7 @@ case ${EAPI} in
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
-if [[ ! ${_DUNE_ECLASS} ]]; then
+if [[ -z ${_DUNE_ECLASS} ]]; then
_DUNE_ECLASS=1
# @ECLASS_VARIABLE: DUNE_PKG_NAME
@@ -55,7 +55,7 @@ BDEPEND="
# edune clean
# @CODE
edune() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
edo dune "${@}"
}
@@ -74,7 +74,7 @@ edune() {
# dune-release build --target @install menhir menhirLib menhirSdk
# @CODE
dune-release() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
local subcommand
local target
@@ -120,7 +120,7 @@ dune-release() {
# dune-compile menhir menhirLib menhirSdk
# @CODE
dune-compile() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
dune-release build --target @install "${@}"
}
@@ -135,7 +135,7 @@ dune-compile() {
# dune-test menhir menhirLib menhirSdk
# @CODE
dune-test() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
dune-release runtest "${@}"
}
@@ -159,7 +159,7 @@ dune_src_test() {
# dune-install menhir menhirLib menhirSdk
# @CODE
dune-install() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
local -a pkgs=( "${@}" )
diff --git a/eclass/eapi7-ver.eclass b/eclass/eapi7-ver.eclass
deleted file mode 100644
index 85c0856f73b3..000000000000
--- a/eclass/eapi7-ver.eclass
+++ /dev/null
@@ -1,309 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-# @DEAD
-# @ECLASS: eapi7-ver.eclass
-# @MAINTAINER:
-# PMS team <pms@gentoo.org>
-# @AUTHOR:
-# Ulrich Müller <ulm@gentoo.org>
-# Michał Górny <mgorny@gentoo.org>
-# @SUPPORTED_EAPIS: 0 1 2 3 4 5 6
-# @BLURB: Testing implementation of EAPI 7 version manipulators
-# @DESCRIPTION:
-# A stand-alone implementation of the version manipulation functions
-# aimed for EAPI 7. Intended to be used for wider testing of
-# the proposed functions and to allow ebuilds to switch to the new
-# model early, with minimal change needed for actual EAPI 7.
-#
-# https://bugs.gentoo.org/482170
-#
-# @SUBSECTION Version strings
-#
-# The functions support arbitrary version strings consisting of version
-# components interspersed with (possibly empty) version separators.
-#
-# A version component can either consist purely of digits ([0-9]+)
-# or purely of uppercase and lowercase letters ([A-Za-z]+). A version
-# separator is either a string of any other characters ([^A-Za-z0-9]+),
-# or it occurs at the transition between a sequence of letters
-# and a sequence of digits, or vice versa. In the latter case,
-# the version separator is an empty string.
-#
-# The version is processed left-to-right, and each successive component
-# is assigned numbers starting with 1. The components are either split
-# on version separators or on boundaries between digits and letters
-# (in which case the separator between the components is empty).
-# Version separators are assigned numbers starting with 1 for
-# the separator between 1st and 2nd components. As a special case,
-# if the version string starts with a separator, it is assigned index 0.
-#
-# Examples:
-#
-# @CODE
-# 1.2b-alpha4 -> 1 . 2 '' b - alpha '' 4
-# c s c s c s c s c
-# 1 1 2 2 3 3 4 4 5
-#
-# .11. -> . 11 .
-# s c s
-# 0 1 1
-# @CODE
-#
-# @SUBSECTION Ranges
-#
-# A range can be specified as 'm' for m-th version component, 'm-'
-# for all components starting with m-th or 'm-n' for components starting
-# at m-th and ending at n-th (inclusive). If the range spans outside
-# the version string, it is truncated silently.
-
-case ${EAPI:-0} in
- 0|1|2|3|4|5|6) ;;
- 7|8) die "${ECLASS}: EAPI=${EAPI} includes all functions from this eclass" ;;
- *) die "${ECLASS}: EAPI=${EAPI} unknown" ;;
-esac
-
-# @FUNCTION: _ver_parse_range
-# @USAGE: <range> <max>
-# @INTERNAL
-# @DESCRIPTION:
-# Parse the range string <range>, setting 'start' and 'end' variables
-# to the appropriate bounds. <max> specifies the appropriate upper
-# bound for the range; the user-specified value is truncated to this.
-_ver_parse_range() {
- local range=${1}
- local max=${2}
-
- [[ ${range} == [0-9]* ]] \
- || die "${FUNCNAME}: range must start with a number"
- start=${range%-*}
- [[ ${range} == *-* ]] && end=${range#*-} || end=${start}
- if [[ ${end} ]]; then
- [[ ${start} -le ${end} ]] \
- || die "${FUNCNAME}: end of range must be >= start"
- [[ ${end} -le ${max} ]] || end=${max}
- else
- end=${max}
- fi
-}
-
-# @FUNCTION: _ver_split
-# @USAGE: <version>
-# @INTERNAL
-# @DESCRIPTION:
-# Split the version string <version> into separator-component array.
-# Sets 'comp' to an array of the form: ( s_0 c_1 s_1 c_2 s_2 c_3... )
-# where s_i are separators and c_i are components.
-_ver_split() {
- local v=${1} LC_ALL=C
-
- comp=()
-
- # get separators and components
- local s c
- while [[ ${v} ]]; do
- # cut the separator
- s=${v%%[a-zA-Z0-9]*}
- v=${v:${#s}}
- # cut the next component; it can be either digits or letters
- [[ ${v} == [0-9]* ]] && c=${v%%[^0-9]*} || c=${v%%[^a-zA-Z]*}
- v=${v:${#c}}
-
- comp+=( "${s}" "${c}" )
- done
-}
-
-# @FUNCTION: ver_cut
-# @USAGE: <range> [<version>]
-# @DESCRIPTION:
-# Print the substring of the version string containing components
-# defined by the <range> and the version separators between them.
-# Processes <version> if specified, ${PV} otherwise.
-#
-# For the syntax of versions and ranges, please see the eclass
-# description.
-ver_cut() {
- local range=${1}
- local v=${2:-${PV}}
- local start end
- local -a comp
-
- _ver_split "${v}"
- local max=$((${#comp[@]}/2))
- _ver_parse_range "${range}" "${max}"
-
- if [[ ${start} -gt 0 ]]; then
- start=$(( start*2 - 1 ))
- fi
- # Work around a bug in bash-3.2, where "${comp[*]:start:end*2-start}"
- # inserts stray 0x7f characters for empty array elements
- printf "%s" "${comp[@]:start:end*2-start}" $'\n'
-}
-
-# @FUNCTION: ver_rs
-# @USAGE: <range> <repl> [<range> <repl>...] [<version>]
-# @DESCRIPTION:
-# Print the version string after substituting the specified version
-# separators at <range> with <repl> (string). Multiple '<range> <repl>'
-# pairs can be specified. Processes <version> if specified,
-# ${PV} otherwise.
-#
-# For the syntax of versions and ranges, please see the eclass
-# description.
-ver_rs() {
- local v
- (( ${#} & 1 )) && v=${@: -1} || v=${PV}
- local start end i
- local -a comp
-
- _ver_split "${v}"
- local max=$((${#comp[@]}/2 - 1))
-
- while [[ ${#} -ge 2 ]]; do
- _ver_parse_range "${1}" "${max}"
- for (( i = start*2; i <= end*2; i+=2 )); do
- [[ ${i} -eq 0 && -z ${comp[i]} ]] && continue
- comp[i]=${2}
- done
- shift 2
- done
-
- local IFS=
- echo "${comp[*]}"
-}
-
-# @FUNCTION: _ver_compare_int
-# @USAGE: <a> <b>
-# @RETURN: 0 if <a> -eq <b>, 1 if <a> -lt <b>, 3 if <a> -gt <b>
-# @INTERNAL
-# @DESCRIPTION:
-# Compare two non-negative integers <a> and <b>, of arbitrary length.
-# If <a> is equal to, less than, or greater than <b>, return 0, 1, or 3
-# as exit status, respectively.
-_ver_compare_int() {
- local a=$1 b=$2 d=$(( ${#1}-${#2} ))
-
- # Zero-pad to equal length if necessary.
- if [[ ${d} -gt 0 ]]; then
- printf -v b "%0${d}d%s" 0 "${b}"
- elif [[ ${d} -lt 0 ]]; then
- printf -v a "%0$(( -d ))d%s" 0 "${a}"
- fi
-
- [[ ${a} > ${b} ]] && return 3
- [[ ${a} == "${b}" ]]
-}
-
-# @FUNCTION: _ver_compare
-# @USAGE: <va> <vb>
-# @RETURN: 1 if <va> < <vb>, 2 if <va> = <vb>, 3 if <va> > <vb>
-# @INTERNAL
-# @DESCRIPTION:
-# Compare two versions <va> and <vb>. If <va> is less than, equal to,
-# or greater than <vb>, return 1, 2, or 3 as exit status, respectively.
-_ver_compare() {
- local va=${1} vb=${2} a an al as ar b bn bl bs br re LC_ALL=C
-
- re="^([0-9]+(\.[0-9]+)*)([a-z]?)((_(alpha|beta|pre|rc|p)[0-9]*)*)(-r[0-9]+)?$"
-
- [[ ${va} =~ ${re} ]] || die "${FUNCNAME}: invalid version: ${va}"
- an=${BASH_REMATCH[1]}
- al=${BASH_REMATCH[3]}
- as=${BASH_REMATCH[4]}
- ar=${BASH_REMATCH[7]}
-
- [[ ${vb} =~ ${re} ]] || die "${FUNCNAME}: invalid version: ${vb}"
- bn=${BASH_REMATCH[1]}
- bl=${BASH_REMATCH[3]}
- bs=${BASH_REMATCH[4]}
- br=${BASH_REMATCH[7]}
-
- # Compare numeric components (PMS algorithm 3.2)
- # First component
- _ver_compare_int "${an%%.*}" "${bn%%.*}" || return
-
- while [[ ${an} == *.* && ${bn} == *.* ]]; do
- # Other components (PMS algorithm 3.3)
- an=${an#*.}
- bn=${bn#*.}
- a=${an%%.*}
- b=${bn%%.*}
- if [[ ${a} == 0* || ${b} == 0* ]]; then
- # Remove any trailing zeros
- [[ ${a} =~ 0+$ ]] && a=${a%"${BASH_REMATCH[0]}"}
- [[ ${b} =~ 0+$ ]] && b=${b%"${BASH_REMATCH[0]}"}
- [[ ${a} > ${b} ]] && return 3
- [[ ${a} < ${b} ]] && return 1
- else
- _ver_compare_int "${a}" "${b}" || return
- fi
- done
- [[ ${an} == *.* ]] && return 3
- [[ ${bn} == *.* ]] && return 1
-
- # Compare letter components (PMS algorithm 3.4)
- [[ ${al} > ${bl} ]] && return 3
- [[ ${al} < ${bl} ]] && return 1
-
- # Compare suffixes (PMS algorithm 3.5)
- as=${as#_}${as:+_}
- bs=${bs#_}${bs:+_}
- while [[ -n ${as} && -n ${bs} ]]; do
- # Compare each suffix (PMS algorithm 3.6)
- a=${as%%_*}
- b=${bs%%_*}
- if [[ ${a%%[0-9]*} == "${b%%[0-9]*}" ]]; then
- _ver_compare_int "${a##*[a-z]}" "${b##*[a-z]}" || return
- else
- # Check for p first
- [[ ${a%%[0-9]*} == p ]] && return 3
- [[ ${b%%[0-9]*} == p ]] && return 1
- # Hack: Use that alpha < beta < pre < rc alphabetically
- [[ ${a} > ${b} ]] && return 3 || return 1
- fi
- as=${as#*_}
- bs=${bs#*_}
- done
- if [[ -n ${as} ]]; then
- [[ ${as} == p[_0-9]* ]] && return 3 || return 1
- elif [[ -n ${bs} ]]; then
- [[ ${bs} == p[_0-9]* ]] && return 1 || return 3
- fi
-
- # Compare revision components (PMS algorithm 3.7)
- _ver_compare_int "${ar#-r}" "${br#-r}" || return
-
- return 2
-}
-
-# @FUNCTION: ver_test
-# @USAGE: [<v1>] <op> <v2>
-# @DESCRIPTION:
-# Check if the relation <v1> <op> <v2> is true. If <v1> is not specified,
-# default to ${PVR}. <op> can be -gt, -ge, -eq, -ne, -le, -lt.
-# Both versions must conform to the PMS version syntax (with optional
-# revision parts), and the comparison is performed according to
-# the algorithm specified in the PMS.
-ver_test() {
- local va op vb
-
- if [[ $# -eq 3 ]]; then
- va=${1}
- shift
- else
- va=${PVR}
- fi
-
- [[ $# -eq 2 ]] || die "${FUNCNAME}: bad number of arguments"
-
- op=${1}
- vb=${2}
-
- case ${op} in
- -eq|-ne|-lt|-le|-gt|-ge) ;;
- *) die "${FUNCNAME}: invalid operator: ${op}" ;;
- esac
-
- _ver_compare "${va}" "${vb}"
- test $? "${op}" 2
-}
diff --git a/eclass/emboss-r3.eclass b/eclass/emboss-r3.eclass
index 84e258e02058..5db69dd86332 100644
--- a/eclass/emboss-r3.eclass
+++ b/eclass/emboss-r3.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: emboss-r3.eclass
@@ -38,7 +38,7 @@ case ${EAPI} in
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
-if [[ ! ${_EMBOSS_R3_ECLASS} ]]; then
+if [[ -z ${_EMBOSS_R3_ECLASS} ]]; then
_EMBOSS_R3_ECLASS=1
inherit flag-o-matic
diff --git a/eclass/eqawarn.eclass b/eclass/eqawarn.eclass
deleted file mode 100644
index df6b13151d74..000000000000
--- a/eclass/eqawarn.eclass
+++ /dev/null
@@ -1,27 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-# @DEAD
-# @ECLASS: eqawarn.eclass
-# @MAINTAINER:
-# base-system@gentoo.org
-# @SUPPORTED_EAPIS: 6
-# @BLURB: output a QA warning
-
-case ${EAPI} in
- 6) ;;
- *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
-esac
-
-# @FUNCTION: eqawarn
-# @USAGE: [message]
-# @DESCRIPTION:
-# Proxy to ewarn for package managers that don't provide eqawarn and
-# use the PM implementation if available. Reuses PORTAGE_ELOG_CLASSES
-# as set by the dev profile.
-if ! declare -F eqawarn >/dev/null ; then
- eqawarn() {
- has qa ${PORTAGE_ELOG_CLASSES} && ewarn "$@"
- :
- }
-fi
diff --git a/eclass/flag-o-matic.eclass b/eclass/flag-o-matic.eclass
index 02cd2dcfc592..3e67e3b4c11f 100644
--- a/eclass/flag-o-matic.eclass
+++ b/eclass/flag-o-matic.eclass
@@ -4,7 +4,7 @@
# @ECLASS: flag-o-matic.eclass
# @MAINTAINER:
# toolchain@gentoo.org
-# @SUPPORTED_EAPIS: 6 7 8
+# @SUPPORTED_EAPIS: 7 8
# @BLURB: common functions to manipulate and query toolchain flags
# @DESCRIPTION:
# This eclass contains a suite of functions to help developers sanely
@@ -14,18 +14,12 @@ if [[ -z ${_FLAG_O_MATIC_ECLASS} ]]; then
_FLAG_O_MATIC_ECLASS=1
case ${EAPI} in
- 6)
- ewarn "${CATEGORY}/${PF}: ebuild uses ${ECLASS} with deprecated EAPI ${EAPI}!"
- ewarn "${CATEGORY}/${PF}: Support will be removed on 2024-10-08. Please port to newer EAPI."
- ;;
7|8) ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
inherit toolchain-funcs
-[[ ${EAPI} == 6 ]] && inherit eqawarn
-
# @FUNCTION: all-flag-vars
# @DESCRIPTION:
# Return all the flag variables that our high level functions operate on.
@@ -39,7 +33,7 @@ all-flag-vars() {
# {C,CPP,CXX,CCAS,F,FC,LD}FLAGS that we allow in strip-flags
# Note: shell globs and character lists are allowed
setup-allowed-flags() {
- [[ ${EAPI} == [67] ]] ||
+ [[ ${EAPI} == 7 ]] ||
die "Internal function ${FUNCNAME} is not available in EAPI ${EAPI}."
_setup-allowed-flags "$@"
}
@@ -570,7 +564,7 @@ strip-flags() {
# Returns shell true if <flag> is supported by given <compiler>,
# else returns shell false.
test-flag-PROG() {
- [[ ${EAPI} == [67] ]] ||
+ [[ ${EAPI} == 7 ]] ||
die "Internal function ${FUNCNAME} is not available in EAPI ${EAPI}."
_test-flag-PROG "$@"
}
@@ -720,7 +714,7 @@ test-flag-CCLD() { _test-flag-PROG CC c+ld "$@"; }
# Returns shell true if <flags> are supported by given <compiler>,
# else returns shell false.
test-flags-PROG() {
- [[ ${EAPI} == [67] ]] ||
+ [[ ${EAPI} == 7 ]] ||
die "Internal function ${FUNCNAME} is not available in EAPI ${EAPI}."
_test-flags-PROG "$@"
}
diff --git a/eclass/fortran-2.eclass b/eclass/fortran-2.eclass
index 5e2ce1fc68e4..dcf7ee979d8a 100644
--- a/eclass/fortran-2.eclass
+++ b/eclass/fortran-2.eclass
@@ -7,7 +7,7 @@
# @AUTHOR:
# Author Justin Lecher <jlec@gentoo.org>
# Test functions provided by Sebastien Fabbro and Kacper Kowalik
-# @SUPPORTED_EAPIS: 5 6 7 8
+# @SUPPORTED_EAPIS: 7 8
# @BLURB: Simplify fortran compiler management
# @DESCRIPTION:
# If you need a fortran compiler, then you should be inheriting this eclass.
@@ -30,10 +30,6 @@ if [[ -z ${_FORTRAN_2_ECLASS} ]]; then
_FORTRAN_2_ECLASS=1
case ${EAPI} in
- 6)
- ewarn "${CATEGORY}/${PF}: ebuild uses ${ECLASS} with deprecated EAPI ${EAPI}!"
- ewarn "${CATEGORY}/${PF}: Support will be removed on 2024-10-08. Please port to newer EAPI."
- ;;
7|8) ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
@@ -70,9 +66,7 @@ inherit toolchain-funcs
for _f_use in ${FORTRAN_NEEDED}; do
case ${_f_use} in
always)
- if [[ ${EAPI} != [56] ]]; then
- BDEPEND+=" virtual/fortran"
- fi
+ BDEPEND+=" virtual/fortran"
DEPEND+=" virtual/fortran"
RDEPEND+=" virtual/fortran"
break
@@ -81,16 +75,10 @@ for _f_use in ${FORTRAN_NEEDED}; do
break
;;
test)
- if [[ ${EAPI} != [56] ]]; then
- BDEPEND+=" ${_f_use}? ( virtual/fortran )"
- else
- DEPEND+=" ${_f_use}? ( virtual/fortran )"
- fi
+ BDEPEND+=" ${_f_use}? ( virtual/fortran )"
;;
*)
- if [[ ${EAPI} != [56] ]]; then
- BDEPEND+=" ${_f_use}? ( virtual/fortran )"
- fi
+ BDEPEND+=" ${_f_use}? ( virtual/fortran )"
DEPEND+=" ${_f_use}? ( virtual/fortran )"
RDEPEND+=" ${_f_use}? ( virtual/fortran )"
;;
@@ -103,7 +91,7 @@ unset _f_use
# Return the Fortran compiler flag to enable 64 bit integers for
# array indices
fortran_int64_abi_fflags() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
local _FC=$(tc-getFC)
if [[ ${_FC} == *gfortran* ]]; then
@@ -120,7 +108,7 @@ fortran_int64_abi_fflags() {
# @DESCRIPTION:
# writes fortran test code
_fortran_write_testsuite() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
local filebase=${T}/test-fortran
@@ -148,7 +136,7 @@ _fortran_write_testsuite() {
# Takes fortran compiler as first argument and dialect as second.
# Checks whether the passed fortran compiler speaks the fortran dialect
_fortran_compile_test() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
local filebase=${T}/test-fortran
local fcomp=${1}
@@ -175,7 +163,7 @@ _fortran_compile_test() {
# @DESCRIPTION:
# See if the fortran supports OpenMP.
_fortran-has-openmp() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
local flag
local filebase=${T}/test-fc-openmp
@@ -204,7 +192,7 @@ _fortran-has-openmp() {
# @DESCRIPTION:
# Detailed description how to handle fortran support
_fortran_die_msg() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
eerror
eerror "Please install currently selected gcc version with USE=fortran."
@@ -221,7 +209,7 @@ _fortran_die_msg() {
# Internal test function for working fortran compiler.
# It is called in fortran-2_pkg_setup.
_fortran_test_function() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
local dialect
@@ -287,7 +275,7 @@ _fortran-2_pkg_setup() {
# Setup functionality,
# checks for a valid fortran compiler and optionally for its openmp support.
fortran-2_pkg_setup() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
if [[ ${MERGE_TYPE} != binary ]]; then
_fortran-2_pkg_setup
diff --git a/eclass/gap-pkg.eclass b/eclass/gap-pkg.eclass
index e242cc92e8a3..70a8ed9f7607 100644
--- a/eclass/gap-pkg.eclass
+++ b/eclass/gap-pkg.eclass
@@ -42,6 +42,9 @@
# sci-mathematics/gap in DEPEND as well, and may also want a subslot
# dependency.
+if [[ -z ${_GAP_PKG_ECLASS} ]]; then
+_GAP_PKG_ECLASS=1
+
case ${EAPI} in
8) ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
@@ -381,8 +384,10 @@ gap-pkg_src_install() {
# usual "find" command doesn't work here because occasionally we
# find *.la files in GAP packages that are not libtool archives
# and should not be deleted.
- find "${ED%/}$(gap-pkg_dir)/bin" -type f -name '*.la' -delete || die
+ find "${ED}$(gap-pkg_dir)/bin" -type f -name '*.la' -delete || die
fi
}
+fi
+
EXPORT_FUNCTIONS src_configure src_compile src_test src_install
diff --git a/eclass/gkrellm-plugin.eclass b/eclass/gkrellm-plugin.eclass
index 1424fdfe53f9..03b72dffa6e9 100644
--- a/eclass/gkrellm-plugin.eclass
+++ b/eclass/gkrellm-plugin.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: gkrellm-plugin.eclass
@@ -36,7 +36,7 @@ case ${EAPI} in
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
-if [[ ! ${_GKRELLM_PLUGIN_ECLASS} ]]; then
+if [[ -z ${_GKRELLM_PLUGIN_ECLASS} ]]; then
_GKRELLM_PLUGIN_ECLASS=1
inherit multilib
diff --git a/eclass/gnuconfig.eclass b/eclass/gnuconfig.eclass
index afcb8feee04e..a7c9e1672f39 100644
--- a/eclass/gnuconfig.eclass
+++ b/eclass/gnuconfig.eclass
@@ -6,7 +6,7 @@
# Sam James <sam@gentoo.org>
# @AUTHOR:
# Will Woods <wwoods@gentoo.org>
-# @SUPPORTED_EAPIS: 6 7 8
+# @SUPPORTED_EAPIS: 7 8
# @BLURB: Refresh bundled gnuconfig files (config.guess, config.sub)
# @DESCRIPTION:
# This eclass is used to automatically update files that typically come with
@@ -20,10 +20,6 @@ if [[ -z ${_GNUCONFIG_ECLASS} ]] ; then
_GNUCONFIG_CLASS=1
case ${EAPI} in
- 6)
- ewarn "${CATEGORY}/${PF}: ebuild uses ${ECLASS} with deprecated EAPI ${EAPI}!"
- ewarn "${CATEGORY}/${PF}: Support will be removed on 2024-10-08. Please port to newer EAPI."
- ;;
7|8) ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
@@ -41,12 +37,7 @@ GNUCONFIG_DEPEND="sys-devel/gnuconfig"
# ebuilds form conditional depends by using ${GNUCONFIG_DEPEND} in
# their own DEPEND string.
: "${GNUCONFIG_AUTO_DEPEND:=yes}"
-if [[ ${GNUCONFIG_AUTO_DEPEND} != "no" ]] ; then
- case ${EAPI} in
- 6) DEPEND=${GNUCONFIG_DEPEND} ;;
- *) BDEPEND=${GNUCONFIG_DEPEND} ;;
- esac
-fi
+[[ ${GNUCONFIG_AUTO_DEPEND} != "no" ]] && BDEPEND=${GNUCONFIG_DEPEND}
# @FUNCTION: gnuconfig_update
# @USAGE: [file1 file2 ...]
@@ -122,23 +113,11 @@ gnuconfig_do_update() {
# This searches the standard locations for the newest config.{sub|guess}, and
# returns the directory where they can be found.
gnuconfig_findnewest() {
- local locations=()
- local prefix
-
- case ${EAPI} in
- 6)
- prefix="${EPREFIX}"
- ;;
- *)
- prefix="${BROOT}"
- ;;
- esac
-
- locations+=(
- "${prefix}"/usr/share/misc/config.sub
- "${prefix}"/usr/share/gnuconfig/config.sub
- "${prefix}"/usr/share/automake*/config.sub
- "${prefix}"/usr/share/libtool/config.sub
+ local locations=(
+ "${BROOT}"/usr/share/misc/config.sub
+ "${BROOT}"/usr/share/gnuconfig/config.sub
+ "${BROOT}"/usr/share/automake*/config.sub
+ "${BROOT}"/usr/share/libtool/config.sub
)
grep -s '^timestamp' "${locations[@]}" | \
diff --git a/eclass/go-module.eclass b/eclass/go-module.eclass
index cad63ee6d0f0..73e9ee51c7d5 100644
--- a/eclass/go-module.eclass
+++ b/eclass/go-module.eclass
@@ -322,7 +322,7 @@ go-module_set_globals() {
# It sets up the go module proxy in the appropriate location.
go-module_setup_proxy() {
# shellcheck disable=SC2120
- debug-print-function "${FUNCNAME}" "$@"
+ debug-print-function ${FUNCNAME} "$@"
if [[ ! ${_GO_MODULE_SET_GLOBALS_CALLED} ]]; then
die "go-module_set_globals must be called in global scope"
@@ -401,7 +401,7 @@ go-module_src_unpack() {
# directory correctly.
_go-module_src_unpack_gosum() {
# shellcheck disable=SC2120
- debug-print-function "${FUNCNAME}" "$@"
+ debug-print-function ${FUNCNAME} "$@"
if [[ ! ${_GO_MODULE_SET_GLOBALS_CALLED} ]]; then
die "go-module_set_globals must be called in global scope"
@@ -472,7 +472,7 @@ _go-module_gosum_synthesize_files() {
# the package, without actually building it yet.
_go-module_src_unpack_verify_gosum() {
# shellcheck disable=SC2120
- debug-print-function "${FUNCNAME}" "$@"
+ debug-print-function ${FUNCNAME} "$@"
if [[ ! ${_GO_MODULE_SET_GLOBALS_CALLED} ]]; then
die "go-module_set_globals must be called in global scope"
@@ -499,7 +499,7 @@ _go-module_src_unpack_verify_gosum() {
# This function is used in live ebuilds to vendor the dependencies when
# upstream doesn't vendor them.
go-module_live_vendor() {
- debug-print-function "${FUNCNAME}" "$@"
+ debug-print-function ${FUNCNAME} "$@"
# shellcheck disable=SC2086
has live ${PROPERTIES} ||
diff --git a/eclass/greadme.eclass b/eclass/greadme.eclass
index 38190becf91d..a4335b1a6286 100644
--- a/eclass/greadme.eclass
+++ b/eclass/greadme.eclass
@@ -69,7 +69,7 @@ _GREADME_REL_PATH="/usr/share/doc/${PF}/README.gentoo"
# Create the readme doc via stdin. You can use --append to append to an
# existing readme doc.
greadme_stdin() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
local append
if [[ ${1} = --append ]]; then
@@ -97,7 +97,7 @@ greadme_stdin() {
# @DESCRIPTION:
# Installs the provided file as readme doc.
greadme_file() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
local input_doc_file="${1}"
if [[ -z ${input_doc_file} ]]; then
@@ -114,7 +114,7 @@ greadme_file() {
# @DESCRIPTION:
# Installs the readme file from the temp directory into the image.
_greadme_install_doc() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
local greadme="${_GREADME_TMP_FILE}"
if [[ ! ${GREADME_DISABLE_AUTOFORMAT} ]]; then
@@ -148,7 +148,7 @@ _greadme_install_doc() {
# Performs checks like comparing the readme doc from the image with a
# potentially existing one in the live system.
greadme_pkg_preinst() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
if [[ -z ${REPLACING_VERSIONS} ]]; then
_GREADME_SHOW="fresh-install"
@@ -224,7 +224,7 @@ greadme_pkg_preinst() {
# @DESCRIPTION:
# Conditionally shows the contents of the readme doc via elog.
greadme_pkg_postinst() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
if [[ ! -v _GREADME_SHOW ]]; then
die "_GREADME_SHOW not set. Did you call greadme_pkg_preinst?"
diff --git a/eclass/guile-single.eclass b/eclass/guile-single.eclass
index 66898504a6c4..3498044b6d76 100644
--- a/eclass/guile-single.eclass
+++ b/eclass/guile-single.eclass
@@ -129,7 +129,7 @@ inherit guile-utils
# Please keep in ascending order.
_guile_setup() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
# Inhibit generating the GUILE_USEDEP. This variable is not usable
# for single packages.
@@ -162,7 +162,7 @@ unset -f _guile_setup
# "
# @CODE
guile_gen_cond_dep() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
local deps="$1"
shift
@@ -196,7 +196,7 @@ guile_gen_cond_dep() {
#
# For details on the latter three, see guile_export.
guile-single_pkg_setup() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
guile_set_common_vars
@@ -223,7 +223,7 @@ guile-single_pkg_setup() {
# Runs the default prepare stage, and then bumps Guile sources via
# guile_bump_sources.
guile-single_src_prepare() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
default
guile_bump_sources
@@ -234,7 +234,7 @@ guile-single_src_prepare() {
# Runs the default install stage, and then marks ccache files not to be
# stripped using guile_unstrip_ccache.
guile-single_src_install() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
default
guile_unstrip_ccache
diff --git a/eclass/guile-utils.eclass b/eclass/guile-utils.eclass
index 09ca5aabe502..b0660dcfd1ce 100644
--- a/eclass/guile-utils.eclass
+++ b/eclass/guile-utils.eclass
@@ -46,7 +46,7 @@ BDEPEND="virtual/pkgconfig"
# Checks that GUILE_COMPAT is set to an array, and has no invalid
# values.
guile_check_compat() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
if ! [[ ${GUILE_COMPAT@a} == *a* ]]; then
die "GUILE_COMPAT not set to an array"
@@ -86,7 +86,7 @@ guile_check_compat
# Sets common variables that apply to all Guile packages, namely,
# QA_PREBUILT.
guile_set_common_vars() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
# These aren't strictly speaking prebuilt. but they do generated a
# nonstandard ELF object.
@@ -101,7 +101,7 @@ guile_set_common_vars() {
# Alters ${PKG_CONFIG_PATH} such that it does not contain any Guile
# slots besides the ones required by the caller.
guile_filter_pkgconfig_path() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
local filtered_path= unfiltered_path path
IFS=: read -ra unfiltered_path <<<"${PKG_CONFIG_PATH}"
@@ -132,7 +132,7 @@ guile_filter_pkgconfig_path() {
# Generates GUILE_REQUIRED_USE/GUILE_DEPS/GUILE_USEDEP based on
# GUILE_COMPAT, and populates IUSE.
guile_generate_depstrings() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
# Generate IUSE, REQUIRED_USE, GUILE_USEDEP
local prefix="$1" depop="$2"
@@ -169,7 +169,7 @@ guile_generate_depstrings() {
# @DESCRIPTION:
# Marks site-ccache files not to be stripped. Operates on ${D}.
guile_unstrip_ccache() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
local ccache
while read -r -d $'\0' ccache; do
@@ -196,7 +196,7 @@ guile_unstrip_ccache() {
# - GUILE_SITECCACHEDIR - Path to the site-ccache directory,
# - GUILE_SITEDIR - Path to the site Scheme directory
guile_export() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
local gver
if [[ "${GUILE_CURRENT_VERSION}" ]]; then
@@ -243,7 +243,7 @@ guile_export() {
# Creates a guile-config executable for a given Guile version, and
# inserts it into path.
guile_create_temporary_config() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
[[ ${1} ]] || die "Must specify a Guile version"
@@ -267,7 +267,7 @@ guile_create_temporary_config() {
#
# http://debbugs.gnu.org/cgi/bugreport.cgi?bug=38112
guile_bump_sources() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
einfo "bumping *.scm source files..."
find "${S}" -name "*.scm" -exec touch {} + || die
diff --git a/eclass/guile.eclass b/eclass/guile.eclass
index e8fde64266e5..1d4a88caf926 100644
--- a/eclass/guile.eclass
+++ b/eclass/guile.eclass
@@ -124,7 +124,7 @@ inherit guile-utils multibuild
# Please keep in ascending order.
_guile_setup() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
guile_generate_depstrings guile_targets '||'
}
@@ -142,7 +142,7 @@ unset -f _guile_setup
# @DESCRIPTION:
# Sets up eclass-internal variables for this build.
guile_pkg_setup() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
guile_set_common_vars
GUILE_SELECTED_TARGETS=()
@@ -161,7 +161,7 @@ guile_pkg_setup() {
# Create a single copy of the package sources for each selected Guile
# implementation.
guile_copy_sources() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
local MULTIBUILD_VARIANTS
MULTIBUILD_VARIANTS=("${GUILE_SELECTED_TARGETS[@]}")
@@ -177,7 +177,7 @@ guile_copy_sources() {
# guile_foreach_impl.
_guile_multibuild_wrapper() {
local GUILE_CURRENT_VERSION="${MULTIBUILD_VARIANT}"
- debug-print-function ${FUNCNAME} "${@}" "on ${MULTIBUILD_VARIANT}"
+ debug-print-function ${FUNCNAME} "$@" "on ${MULTIBUILD_VARIANT}"
local -x PATH="${PATH}"
guile_create_temporary_config "${GUILE_CURRENT_VERSION}"
@@ -245,7 +245,7 @@ _guile_multibuild_wrapper() {
# This combination should cover Guile detection of a large amount of
# packages out of the box.
guile_foreach_impl() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
local MULTIBUILD_VARIANTS
MULTIBUILD_VARIANTS=("${GUILE_SELECTED_TARGETS[@]}")
@@ -261,7 +261,7 @@ guile_foreach_impl() {
# @DESCRIPTION:
# Runs a single merge_root step for guile_merge_roots.
_guile_merge_single_root() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
multibuild_merge_root "${SLOTTED_D}" "${D}"
}
@@ -270,7 +270,7 @@ _guile_merge_single_root() {
# @DESCRIPTION:
# Merges install roots from all slots, diagnosing conflicts.
guile_merge_roots() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
guile_foreach_impl _guile_merge_single_root
}
@@ -280,7 +280,7 @@ guile_merge_roots() {
# Runs the passed command once, for the best installed Guile
# implementation.
guile_for_best_impl() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
multibuild_for_best_variant _guile_multibuild_wrapper "${@}"
}
@@ -292,7 +292,7 @@ guile_for_best_impl() {
# Bumps SCM sources runs the default src_prepare and bumps all *.scm
# files. See guile_bump_sources of guile-utils.eclass.
guile_src_prepare() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
default
guile_bump_sources
@@ -302,7 +302,7 @@ guile_src_prepare() {
# @DESCRIPTION:
# Runs the default src_configure for each selected variant target.
guile_src_configure() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
guile_foreach_impl default
}
@@ -311,7 +311,7 @@ guile_src_configure() {
# @DESCRIPTION:
# Runs the default src_compile for each selected variant target.
guile_src_compile() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
guile_foreach_impl default
}
@@ -320,7 +320,7 @@ guile_src_compile() {
# @DESCRIPTION:
# Runs the default src_test phase for each implementation.
guile_src_test() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
guile_foreach_impl default
}
@@ -331,7 +331,7 @@ guile_src_test() {
# Imitates the default build system install "substep", but for a given
# ${SLOTTED_D} rather than the usual ${D}. See guile_src_install.
_guile_default_install_slot() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
if [[ -f Makefile ]] || [[ -f GNUmakefile ]] || [[ -f makefile ]]; then
emake DESTDIR="${SLOTTED_D}" install
@@ -344,7 +344,7 @@ _guile_default_install_slot() {
# thing for a GNU Build System based Guile package, for each selected
# variant target. Merges roots after completing the installs.
guile_src_install() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
guile_foreach_impl _guile_default_install_slot
guile_merge_roots
diff --git a/eclass/java-ant-2.eclass b/eclass/java-ant-2.eclass
index ef7d306dc9b1..c34c81331998 100644
--- a/eclass/java-ant-2.eclass
+++ b/eclass/java-ant-2.eclass
@@ -1,6 +1,7 @@
# Copyright 2004-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
+# @DEAD
# @ECLASS: java-ant-2.eclass
# @MAINTAINER:
# java@gentoo.org
diff --git a/eclass/java-pkg-2.eclass b/eclass/java-pkg-2.eclass
index 2b2a298cfe74..eebdec584ccc 100644
--- a/eclass/java-pkg-2.eclass
+++ b/eclass/java-pkg-2.eclass
@@ -6,7 +6,7 @@
# java@gentoo.org
# @AUTHOR:
# Thomas Matthijs <axxo@gentoo.org>
-# @SUPPORTED_EAPIS: 6 7 8
+# @SUPPORTED_EAPIS: 7 8
# @PROVIDES: java-utils-2
# @BLURB: Eclass for Java Packages
# @DESCRIPTION:
@@ -17,10 +17,6 @@ if [[ -z ${_JAVA_PKG_2_ECLASS} ]] ; then
_JAVA_PKG_2_ECLASS=1
case ${EAPI} in
- 6)
- ewarn "${CATEGORY}/${PF}: ebuild uses ${ECLASS} with deprecated EAPI ${EAPI}!"
- ewarn "${CATEGORY}/${PF}: Support will be removed on 2024-10-08. Please port to newer EAPI."
- ;;
7|8) ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
diff --git a/eclass/java-utils-2.eclass b/eclass/java-utils-2.eclass
index 1e9c28d5868f..8d9ef40b3570 100644
--- a/eclass/java-utils-2.eclass
+++ b/eclass/java-utils-2.eclass
@@ -6,7 +6,7 @@
# java@gentoo.org
# @AUTHOR:
# Thomas Matthijs <axxo@gentoo.org>, Karl Trygve Kalleberg <karltk@gentoo.org>
-# @SUPPORTED_EAPIS: 6 7 8
+# @SUPPORTED_EAPIS: 7 8
# @BLURB: Base eclass for Java packages
# @DESCRIPTION:
# This eclass provides functionality which is used by java-pkg-2.eclass and
@@ -20,18 +20,10 @@ if [[ -z ${_JAVA_UTILS_2_ECLASS} ]] ; then
_JAVA_UTILS_2_ECLASS=1
case ${EAPI} in
- 6)
- ewarn "${CATEGORY}/${PF}: ebuild uses ${ECLASS} with deprecated EAPI ${EAPI}!"
- ewarn "${CATEGORY}/${PF}: Support will be removed on 2024-10-08. Please port to newer EAPI."
- ;;
7|8) ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
-# EAPI 7 has version functions built-in. Use eapi7-ver for all earlier EAPIs.
-# Keep versionator inheritance in case consumers are using it implicitly.
-[[ ${EAPI} == 6 ]] && inherit eapi7-ver eqawarn multilib versionator
-
# Make sure we use java-config-2
export WANT_JAVA_CONFIG="2"
@@ -299,12 +291,12 @@ java-pkg_doexamples() {
( # dont want to pollute calling env
insinto "${dest}"
doins -r ${1}/*
- ) || die "Installing examples failed"
+ )
else
( # dont want to pollute calling env
insinto "${dest}"
doins -r "$@"
- ) || die "Installing examples failed"
+ )
fi
# Let's make a symlink to the directory we have everything else under
@@ -429,7 +421,7 @@ java-pkg_dojar() {
(
insinto "${JAVA_PKG_JARDEST}"
doins "${jar}"
- ) || die "failed to install ${jar}"
+ )
java-pkg_append_ JAVA_PKG_CLASSPATH "${EPREFIX}${JAVA_PKG_JARDEST}/${jar_basename}"
debug-print "installed ${jar} to ${ED}${JAVA_PKG_JARDEST}"
# make a symlink to the original jar if it's symlink
@@ -577,7 +569,7 @@ java-pkg_doso() {
insinto "${JAVA_PKG_LIBDEST}"
insopts -m0755
doins "${lib}"
- ) || die "failed to install ${lib}"
+ )
java-pkg_append_ JAVA_PKG_LIBRARY "${JAVA_PKG_LIBDEST}"
debug-print "Installing ${lib} to ${JAVA_PKG_LIBDEST}"
# otherwise make a symlink to the symlink's origin
@@ -809,7 +801,7 @@ java-pkg_dosrc() {
(
insinto "${JAVA_PKG_SOURCESPATH}"
doins ${zip_path}
- ) || die "Failed to install source"
+ )
JAVA_SOURCES="${JAVA_PKG_SOURCESPATH}/${zip_name}"
@@ -1982,8 +1974,9 @@ etestng() {
# src_prepare Searches for bundled jars
# Don't call directly, but via java-pkg-2_src_prepare!
java-utils-2_src_prepare() {
+ # have default_src_prepare starting from EAPI 9, see https://bugs.gentoo.org/780585
case ${EAPI} in
- [678]) eapply_user ;;
+ [78]) eapply_user ;;
*) default_src_prepare ;;
esac
@@ -3031,7 +3024,7 @@ java-pkg_clean() {
# $1 - classpath variable either EANT_GENTOO_CLASSPATH or JAVA_GENTOO_CLASSPATH
# @CODE
java-pkg_gen-cp() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
local atom
for atom in ${CP_DEPEND}; do
diff --git a/eclass/kernel-build.eclass b/eclass/kernel-build.eclass
index ce87fd72acdd..4a2af9845ad4 100644
--- a/eclass/kernel-build.eclass
+++ b/eclass/kernel-build.eclass
@@ -33,7 +33,7 @@ case ${EAPI} in
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
-if [[ ! ${_KERNEL_BUILD_ECLASS} ]]; then
+if [[ -z ${_KERNEL_BUILD_ECLASS} ]]; then
_KERNEL_BUILD_ECLASS=1
PYTHON_COMPAT=( python3_{10..13} )
@@ -171,7 +171,7 @@ kernel-build_pkg_setup() {
# Prepare the toolchain for building the kernel, get the .config file,
# and get build tree configured for modprep.
kernel-build_src_configure() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
if ! tc-is-cross-compiler && use hppa ; then
if [[ ${CHOST} == hppa2.0-* ]] ; then
@@ -294,7 +294,7 @@ kernel-build_src_configure() {
# @DESCRIPTION:
# Compile the kernel sources.
kernel-build_src_compile() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
local targets=( all )
@@ -313,7 +313,7 @@ kernel-build_src_compile() {
# Test the built kernel via qemu. This just wraps the logic
# from kernel-install.eclass with the correct paths.
kernel-build_src_test() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
local targets=( modules_install )
@@ -345,7 +345,7 @@ kernel-build_src_test() {
# Install the built kernel along with subset of sources
# into /usr/src/linux-${KV_FULL}. Install the modules. Save the config.
kernel-build_src_install() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
# do not use 'make install' as it behaves differently based
# on what kind of installkernel is installed
@@ -632,7 +632,7 @@ kernel-build_pkg_postinst() {
#
# This function must be called by the ebuild in the src_prepare phase.
kernel-build_merge_configs() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
[[ -f .config ]] ||
die "${FUNCNAME}: No .config, please copy default config into .config"
diff --git a/eclass/kernel-install.eclass b/eclass/kernel-install.eclass
index dc337c7862fd..c5f218a46b91 100644
--- a/eclass/kernel-install.eclass
+++ b/eclass/kernel-install.eclass
@@ -49,7 +49,7 @@
# packages to depend on for building the generic UKI and their licenses.
# Used in kernel-build.eclass.
-if [[ ! ${_KERNEL_INSTALL_ECLASS} ]]; then
+if [[ -z ${_KERNEL_INSTALL_ECLASS} ]]; then
_KERNEL_INSTALL_ECLASS=1
case ${EAPI} in
@@ -239,7 +239,7 @@ BDEPEND="
# 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} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
[[ ${#} -eq 1 ]] || die "${FUNCNAME}: invalid arguments"
local target=${1}
@@ -282,7 +282,7 @@ kernel-install_can_update_symlink() {
# to <target>-<version> if it's either missing or pointing out to
# an older version of this package.
kernel-install_update_symlink() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
[[ ${#} -eq 2 ]] || die "${FUNCNAME}: invalid arguments"
local target=${1}
@@ -302,7 +302,7 @@ kernel-install_update_symlink() {
# @DESCRIPTION:
# Get appropriate qemu suffix for the current ${ARCH}.
kernel-install_get_qemu_arch() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
case ${ARCH} in
amd64)
@@ -331,7 +331,7 @@ kernel-install_get_qemu_arch() {
# @DESCRIPTION:
# Create minimal /sbin/init
kernel-install_create_init() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
[[ ${#} -eq 1 ]] || die "${FUNCNAME}: invalid arguments"
[[ -z ${1} ]] && die "${FUNCNAME}: empty argument specified"
@@ -369,7 +369,7 @@ kernel-install_create_init() {
# @DESCRIPTION:
# Create minimal qemu raw image
kernel-install_create_qemu_image() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
[[ ${#} -eq 1 ]] || die "${FUNCNAME}: invalid arguments"
[[ -z ${1} ]] && die "${FUNCNAME}: empty argument specified"
@@ -401,7 +401,7 @@ kernel-install_create_qemu_image() {
# in qemu. <version> is the kernel version, <image> path to the image,
# <modules> path to module tree.
kernel-install_test() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
[[ ${#} -eq 3 ]] || die "${FUNCNAME}: invalid arguments"
local version=${1}
@@ -534,7 +534,7 @@ kernel-install_test() {
# @DESCRIPTION:
# Check for missing optional dependencies and output warnings.
kernel-install_pkg_pretend() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
# Check, but don't die because we can fix the problem and then
# emerge --config ... to re-run installation.
@@ -582,7 +582,7 @@ kernel-install_pkg_pretend() {
# @DESCRIPTION:
# Boilerplate function to remind people to call the tests.
kernel-install_src_test() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
die "Please redefine src_test() and call kernel-install_test()."
}
@@ -591,7 +591,7 @@ kernel-install_src_test() {
# @DESCRIPTION:
# Verify whether the kernel has been installed correctly.
kernel-install_pkg_preinst() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
# Set KV_FULL to ${PV}${KV_LOCALVERSION} if it hasn't
# been set elsewhere for backward compatibility with existing
@@ -662,7 +662,7 @@ kernel-install_extract_from_uki() {
# installkernel. This is called from pkg_postinst() and pkg_config().
# <ver> is the full kernel version.
kernel-install_install_all() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
[[ ${#} -eq 1 ]] || die "${FUNCNAME}: invalid arguments"
local dir_ver=${1}
@@ -705,7 +705,7 @@ kernel-install_install_all() {
# Build an initramfs for the kernel, install it and update
# the /usr/src/linux symlink.
kernel-install_pkg_postinst() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
kernel-install_update_symlink "${EROOT}/usr/src/linux" "${KV_FULL}"
dist-kernel_compressed_module_cleanup \
@@ -733,7 +733,7 @@ kernel-install_pkg_postinst() {
# @DESCRIPTION:
# Clean up the generated initramfs from the removed kernel directory.
kernel-install_pkg_postrm() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
if [[ -z ${ROOT} && ! ${KERNEL_IUSE_GENERIC_UKI} ]]; then
local kernel_dir=${EROOT}/usr/src/linux-${KV_FULL}
@@ -762,7 +762,7 @@ kernel-install_pkg_config() {
# @DESCRIPTION:
# Compress modules installed in ED, if USE=modules-compress is enabled.
kernel-install_compress_modules() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
if use modules-compress; then
einfo "Compressing kernel modules ..."
diff --git a/eclass/latex-package.eclass b/eclass/latex-package.eclass
index 784254aecf4f..4082e161b843 100644
--- a/eclass/latex-package.eclass
+++ b/eclass/latex-package.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: latex-package.eclass
@@ -93,7 +93,7 @@ LATEX_DOC_ARGUMENTS=""
# It installs the files found in the current directory to the standard locations
# for a TeX installation
latex-package_src_doinstall() {
- debug-print-function "${FUNCNAME}" "$@"
+ debug-print-function ${FUNCNAME} "$@"
# Avoid generating font cache outside of the sandbox
export VARTEXFONTS="${T}/fonts"
@@ -205,7 +205,7 @@ latex-package_src_doinstall() {
# Calls latex for each *.ins in the current directory in order to generate the
# relevant files that will be installed
latex-package_src_compile() {
- debug-print-function "${FUNCNAME}" "$@"
+ debug-print-function ${FUNCNAME} "$@"
while IFS= read -r -d '' i; do
einfo "Extracting from ${i}"
latex --halt-on-error --interaction=nonstopmode "${i}" || die
@@ -216,7 +216,7 @@ latex-package_src_compile() {
# @DESCRIPTION:
# Installs the package
latex-package_src_install() {
- debug-print-function "${FUNCNAME}" "$@"
+ debug-print-function ${FUNCNAME} "$@"
latex-package_src_doinstall all
einstalldocs
}
@@ -226,7 +226,7 @@ latex-package_src_install() {
# Calls latex-package_rehash to ensure the TeX installation is consistent with
# the kpathsea database
latex-package_pkg_postinst() {
- debug-print-function "${FUNCNAME}" "$@"
+ debug-print-function ${FUNCNAME} "$@"
latex-package_rehash
}
@@ -235,7 +235,7 @@ latex-package_pkg_postinst() {
# Calls latex-package_rehash to ensure the TeX installation is consistent with
# the kpathsea database
latex-package_pkg_postrm() {
- debug-print-function "${FUNCNAME}" "$@"
+ debug-print-function ${FUNCNAME} "$@"
latex-package_rehash
}
@@ -243,7 +243,7 @@ latex-package_pkg_postrm() {
# @DESCRIPTION:
# Rehashes the kpathsea database, according to the current TeX installation
latex-package_rehash() {
- debug-print-function "${FUNCNAME}" "$@"
+ debug-print-function ${FUNCNAME} "$@"
texmf-update
}
diff --git a/eclass/libtool.eclass b/eclass/libtool.eclass
index b36b1fd365d3..8ffc06d6ff98 100644
--- a/eclass/libtool.eclass
+++ b/eclass/libtool.eclass
@@ -4,7 +4,7 @@
# @ECLASS: libtool.eclass
# @MAINTAINER:
# base-system@gentoo.org
-# @SUPPORTED_EAPIS: 5 6 7 8
+# @SUPPORTED_EAPIS: 7 8
# @BLURB: quickly update bundled libtool code
# @DESCRIPTION:
# This eclass patches ltmain.sh distributed with libtoolized packages with the
@@ -18,19 +18,11 @@ if [[ -z ${_LIBTOOL_ECLASS} ]]; then
_LIBTOOL_ECLASS=1
case ${EAPI} in
- 6)
- ewarn "${CATEGORY}/${PF}: ebuild uses ${ECLASS} with deprecated EAPI ${EAPI}!"
- ewarn "${CATEGORY}/${PF}: Support will be removed on 2024-10-08. Please port to newer EAPI."
- ;;
7|8) ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
-case ${EAPI} in
- 6) DEPEND=">=app-portage/elt-patches-20240116" ;;
- 7|8) BDEPEND=">=app-portage/elt-patches-20240116" ;;
- *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
-esac
+BDEPEND=">=app-portage/elt-patches-20240116"
inherit toolchain-funcs
diff --git a/eclass/linux-mod-r1.eclass b/eclass/linux-mod-r1.eclass
index 120fb019d74a..f8a45c607dfd 100644
--- a/eclass/linux-mod-r1.eclass
+++ b/eclass/linux-mod-r1.eclass
@@ -106,7 +106,7 @@ case ${EAPI} in
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
-if [[ ! ${_LINUX_MOD_R1_ECLASS} ]]; then
+if [[ -z ${_LINUX_MOD_R1_ECLASS} ]]; then
_LINUX_MOD_R1_ECLASS=1
inherit dist-kernel-utils edo linux-info multiprocessing toolchain-funcs
@@ -329,7 +329,7 @@ fi
# (normally these should not be used directly, for custom builds)
# 3. perform various sanity checks to fail early on issues
linux-mod-r1_pkg_setup() {
- debug-print-function ${FUNCNAME[0]} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
_MODULES_GLOBAL[ran:pkg_setup]=1
_modules_check_function ${#} 0 0 || return 0
@@ -409,7 +409,7 @@ linux-mod-r1_pkg_setup() {
# different make arguments per modules or intermediate steps -- albeit,
# if atypical, may want to build manually (see eclass' example).
linux-mod-r1_src_compile() {
- debug-print-function ${FUNCNAME[0]} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
_modules_check_function ${#} 0 0 || return 0
[[ ${modlist@a} == *a* && ${#modlist[@]} -gt 0 ]] ||
@@ -480,7 +480,7 @@ linux-mod-r1_src_compile() {
# Installs modules built by linux-mod-r1_src_compile using
# linux_domodule, then runs modules_post_process and einstalldocs.
linux-mod-r1_src_install() {
- debug-print-function ${FUNCNAME[0]} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
_modules_check_function ${#} 0 0 || return 0
(( ${#_MODULES_INSTALL[@]} )) ||
@@ -502,7 +502,7 @@ linux-mod-r1_src_install() {
# @DESCRIPTION:
# Updates module dependencies using depmod.
linux-mod-r1_pkg_postinst() {
- debug-print-function ${FUNCNAME[0]} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
_modules_check_function ${#} 0 0 || return 0
dist-kernel_compressed_module_cleanup "${EROOT}/lib/modules/${KV_FULL}"
@@ -534,7 +534,7 @@ linux-mod-r1_pkg_postinst() {
#
# See also linux_moduleinto.
linux_domodule() {
- debug-print-function ${FUNCNAME[0]} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
_modules_check_function ${#} 1 '' "<module>..." || return 0
(
# linux-mod-r0 formerly supported INSTALL_MOD_PATH (bug #642240), but
@@ -559,7 +559,7 @@ linux_domodule() {
# this is like setting INSTALL_MOD_DIR which has the same default
# for external modules.
linux_moduleinto() {
- debug-print-function ${FUNCNAME[0]} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
_modules_check_function ${#} 1 1 "<install-dir>" || return 0
_MODULES_GLOBAL[moduleinto]=${1}
}
@@ -582,7 +582,7 @@ linux_moduleinto() {
# if modules were unexpectedly pre-compressed possibly due to using
# make install without passing MODULES_MAKEARGS to disable it.
modules_post_process() {
- debug-print-function ${FUNCNAME[0]} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
_modules_check_function ${#} 0 1 '[<path>]' || return 0
[[ ${EBUILD_PHASE} == install ]] ||
die "${FUNCNAME[0]} can only be called in the src_install phase"
diff --git a/eclass/llvm-r1.eclass b/eclass/llvm-r1.eclass
index 0a53b9a3cb5e..7b9f26e17b58 100644
--- a/eclass/llvm-r1.eclass
+++ b/eclass/llvm-r1.eclass
@@ -42,7 +42,7 @@ case ${EAPI} in
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
-if [[ ! ${_LLVM_R1_ECLASS} ]]; then
+if [[ -z ${_LLVM_R1_ECLASS} ]]; then
_LLVM_R1_ECLASS=1
inherit llvm-utils
@@ -101,7 +101,7 @@ _LLVM_NEWEST_STABLE=18
# packages using the same eclass, to enforce a LLVM slot match.
_llvm_set_globals() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
if [[ ${LLVM_COMPAT@a} != *a* ]]; then
die "LLVM_COMPAT must be set to an array before inheriting ${ECLASS}"
@@ -169,7 +169,7 @@ unset -f _llvm_set_globals
# "
# @CODE
llvm_gen_dep() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
[[ ${#} -ne 1 ]] && die "Usage: ${FUNCNAME} <dependency>"
@@ -194,7 +194,7 @@ llvm_gen_dep() {
# With "-b" option, the path is prefixed by BROOT. LLVM dependencies
# should be in BDEPEND then.
get_llvm_prefix() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
[[ ${#} -gt 1 ]] && die "Usage: ${FUNCNAME} [-b|-d]"
@@ -228,7 +228,7 @@ get_llvm_prefix() {
# Note that this function is not exported if LLVM_OPTIONAL is set.
# In that case, it needs to be called manually.
llvm-r1_pkg_setup() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
if [[ ${MERGE_TYPE} != binary ]]; then
[[ -z ${LLVM_SLOT} ]] && die "LLVM_SLOT unset (broken USE_EXPAND?)"
diff --git a/eclass/llvm-utils.eclass b/eclass/llvm-utils.eclass
index 532e609679b8..1ae3295484c8 100644
--- a/eclass/llvm-utils.eclass
+++ b/eclass/llvm-utils.eclass
@@ -18,7 +18,7 @@ case ${EAPI} in
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
-if [[ ! ${_LLVM_UTILS_ECLASS} ]]; then
+if [[ -z ${_LLVM_UTILS_ECLASS} ]]; then
_LLVM_UTILS_ECLASS=1
# @FUNCTION: llvm_tuple_to_target
@@ -27,7 +27,7 @@ _LLVM_UTILS_ECLASS=1
# Translate a tuple into a target suitable for LLVM_TARGETS.
# Defaults to ${CHOST} if not specified.
llvm_tuple_to_target() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
[[ ${#} -gt 1 ]] && die "Usage: ${FUNCNAME} [<tuple>]"
@@ -61,7 +61,7 @@ llvm_tuple_to_target() {
# the major version, to prevent PATH alterations from forcing an older
# clang version being used.
llvm_fix_clang_version() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
local shopt_save=$(shopt -p -o noglob)
set -f
@@ -95,7 +95,7 @@ llvm_fix_clang_version() {
# current location, to prevent PATH alterations from forcing older
# versions being used.
llvm_fix_tool_path() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
local shopt_save=$(shopt -p -o noglob)
set -f
@@ -118,7 +118,7 @@ llvm_fix_tool_path() {
# Prepend the path to the specified LLVM slot to PATH variable,
# and reexport it.
llvm_prepend_path() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
[[ ${#} -ne 1 ]] && die "Usage: ${FUNCNAME} <slot>"
local slot=${1}
diff --git a/eclass/llvm.eclass b/eclass/llvm.eclass
index bb5ff5d78290..9f757e704f7a 100644
--- a/eclass/llvm.eclass
+++ b/eclass/llvm.eclass
@@ -63,7 +63,7 @@ case ${EAPI} in
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
-if [[ ! ${_LLVM_ECLASS} ]]; then
+if [[ -z ${_LLVM_ECLASS} ]]; then
_LLVM_ECLASS=1
inherit llvm-utils
@@ -119,7 +119,7 @@ declare -g -r _LLVM_KNOWN_SLOTS=( {19..8} )
# the function defaults to checking whether sys-devel/llvm:${LLVM_SLOT}
# is installed.
get_llvm_slot() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
local hv_switch=-d
while [[ ${1} == -* ]]; do
@@ -170,7 +170,7 @@ get_llvm_slot() {
#
# The options and behavior is the same as for get_llvm_slot.
get_llvm_prefix() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
local prefix=${ESYSROOT}
[[ ${1} == -b ]] && prefix=${BROOT}
@@ -193,7 +193,7 @@ get_llvm_prefix() {
# If any other behavior is desired, the contents of the function
# should be inlined into the ebuild and modified as necessary.
llvm_pkg_setup() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
if [[ ${LLVM_ECLASS_SKIP_PKG_SETUP} ]]; then
return
diff --git a/eclass/lua-single.eclass b/eclass/lua-single.eclass
index ad7075955153..1a919ad606ef 100644
--- a/eclass/lua-single.eclass
+++ b/eclass/lua-single.eclass
@@ -285,7 +285,7 @@ unset -f _lua_single_set_globals
#
# This is an internal function used to implement lua_gen_cond_dep.
_lua_gen_usedep() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
local impl matches=()
@@ -338,7 +338,7 @@ _lua_impl_matches() {
# Verify whether the patterns passed to the eclass function are correct
# (i.e. can match any valid implementation). Dies on wrong pattern.
_lua_verify_patterns() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
local impl pattern
for pattern; do
@@ -381,7 +381,7 @@ _lua_verify_patterns() {
# dev-lua/backported_core_module[lua_targets_lua5-3(-)?,...] )"
# @CODE
lua_gen_cond_dep() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
local impl matches=()
@@ -440,7 +440,7 @@ lua_gen_cond_dep() {
# )"
# @CODE
lua_gen_impl_dep() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
local impl
local matches=()
@@ -465,7 +465,7 @@ lua_gen_impl_dep() {
# Determine what the selected Lua implementation is and set
# the Lua build environment up for it.
lua_setup() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
unset ELUA
@@ -520,7 +520,7 @@ lua_setup() {
# @DESCRIPTION:
# Runs lua_setup.
lua-single_pkg_setup() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
[[ ${MERGE_TYPE} != binary ]] && lua_setup
}
diff --git a/eclass/lua-utils.eclass b/eclass/lua-utils.eclass
index 7272f80d0370..9be520aeb671 100644
--- a/eclass/lua-utils.eclass
+++ b/eclass/lua-utils.eclass
@@ -124,7 +124,7 @@ _lua_set_impls() {
# setup will be done. If wrapper update is requested, the directory
# shall be removed first.
_lua_wrapper_setup() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
local workdir=${1:-${T}/${ELUA}}
local impl=${2:-${ELUA}}
@@ -234,7 +234,7 @@ _lua_get_library_file() {
# or an ELUA one, e.g. lua5.4). If no implementation passed,
# the current one will be obtained from ${ELUA}.
_lua_export() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
local impl var
@@ -374,7 +374,7 @@ _lua_export() {
# This function must be called in global scope, after RDEPEND has been
# declared. Take care not to overwrite the variables set by it.
lua_enable_tests() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
[[ ${#} -ge 1 ]] || die "${FUNCNAME} takes at least one argument: test-runner (test-directory)"
local test_directory
@@ -431,7 +431,7 @@ lua_enable_tests() {
# Please note that this function requires Lua and pkg-config installed,
# and therefore proper build-time dependencies need be added to the ebuild.
lua_get_CFLAGS() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
_lua_export "${@}" LUA_CFLAGS
echo "${LUA_CFLAGS}"
@@ -447,7 +447,7 @@ lua_get_CFLAGS() {
# Please note that this function requires Lua and pkg-config installed,
# and therefore proper build-time dependencies need be added to the ebuild.
lua_get_cmod_dir() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
_lua_export "${@}" LUA_CMOD_DIR
echo "${LUA_CMOD_DIR}"
@@ -463,7 +463,7 @@ lua_get_cmod_dir() {
# Please note that this function requires Lua and pkg-config installed,
# and therefore proper build-time dependencies need be added to the ebuild.
lua_get_include_dir() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
_lua_export "${@}" LUA_INCLUDE_DIR
echo "${LUA_INCLUDE_DIR}"
@@ -479,7 +479,7 @@ lua_get_include_dir() {
# Please note that this function requires Lua and pkg-config installed,
# and therefore proper build-time dependencies need be added to the ebuild.
lua_get_LIBS() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
_lua_export "${@}" LUA_LIBS
echo "${LUA_LIBS}"
@@ -495,7 +495,7 @@ lua_get_LIBS() {
# Please note that this function requires Lua and pkg-config installed,
# and therefore proper build-time dependencies need be added to the ebuild.
lua_get_lmod_dir() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
_lua_export "${@}" LUA_LMOD_DIR
echo "${LUA_LMOD_DIR}"
@@ -514,7 +514,7 @@ lua_get_lmod_dir() {
# Please note that this function requires Lua and pkg-config installed,
# and therefore proper build-time dependencies need be added to the ebuild.
lua_get_shared_lib() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
_lua_export "${@}" LUA_SHARED_LIB
echo "${LUA_SHARED_LIB}"
@@ -529,7 +529,7 @@ lua_get_shared_lib() {
# Please note that this function requires Lua and pkg-config installed,
# and therefore proper build-time dependencies need be added to the ebuild.
lua_get_version() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
_lua_export "${@}" LUA_VERSION
echo "${LUA_VERSION}"
diff --git a/eclass/lua.eclass b/eclass/lua.eclass
index 380ec274167c..7629033afb07 100644
--- a/eclass/lua.eclass
+++ b/eclass/lua.eclass
@@ -200,7 +200,7 @@ inherit multibuild lua-utils
# Enforce the proper setting of LUA_TARGETS, if LUA_COMPAT_OVERRIDE
# is not in effect. If it is, just warn that the flags will be ignored.
_lua_validate_useflags() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
if [[ ${LUA_COMPAT_OVERRIDE} ]]; then
if [[ ! ${_LUA_COMPAT_OVERRIDE_WARNED} ]]; then
@@ -260,7 +260,7 @@ _lua_obtain_impls() {
# Initialize the environment for the Lua implementation selected
# for multibuild.
_lua_multibuild_wrapper() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
local -x ELUA LUA
_lua_export "${MULTIBUILD_VARIANT}" ELUA LUA
@@ -279,7 +279,7 @@ _lua_multibuild_wrapper() {
# to implementation-specific build directory matching BUILD_DIR used by
# lua_foreach_abi().
lua_copy_sources() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
local MULTIBUILD_VARIANTS
_lua_obtain_impls
@@ -301,7 +301,7 @@ lua_copy_sources() {
# For each command being run, ELUA, LUA and BUILD_DIR are set
# locally, and the former two are exported to the command environment.
lua_foreach_impl() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
local MULTIBUILD_VARIANTS
_lua_obtain_impls
diff --git a/eclass/mercurial.eclass b/eclass/mercurial.eclass
index 16d9fc87cb0a..0d700c79930e 100644
--- a/eclass/mercurial.eclass
+++ b/eclass/mercurial.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: mercurial.eclass
@@ -100,7 +100,7 @@ EHG_OFFLINE="${EHG_OFFLINE:-${EVCS_OFFLINE}}"
# EHG_CHECKOUT_DIR, which defaults to S.
mercurial_fetch() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
EHG_REPO_URI=${1-${EHG_REPO_URI}}
[[ -z "${EHG_REPO_URI}" ]] && die "EHG_REPO_URI is empty"
diff --git a/eclass/mono-env.eclass b/eclass/mono-env.eclass
index 02bd7e8dd9be..5415a7043fed 100644
--- a/eclass/mono-env.eclass
+++ b/eclass/mono-env.eclass
@@ -4,7 +4,7 @@
# @ECLASS: mono-env.eclass
# @MAINTAINER:
# maintainer-needed@gentoo.org
-# @SUPPORTED_EAPIS: 6 7
+# @SUPPORTED_EAPIS: 7
# @BLURB: Set environment variables commonly used by dotnet packages.
# @DESCRIPTION:
# Set environment variables commonly used by dotnet packages.
@@ -13,10 +13,6 @@ if [[ -z ${_MONO_ENV_ECLASS} ]] ; then
_MONO_ENV_ECLASS=1
case ${EAPI} in
- 6)
- ewarn "${CATEGORY}/${PF}: ebuild uses ${ECLASS} with deprecated EAPI ${EAPI}!"
- ewarn "${CATEGORY}/${PF}: Support will be removed on 2024-10-08. Please port to newer EAPI."
- ;;
7|8) ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
diff --git a/eclass/mozcoreconf-v6.eclass b/eclass/mozcoreconf-v6.eclass
index e7cf85fca24a..b814663a8f66 100644
--- a/eclass/mozcoreconf-v6.eclass
+++ b/eclass/mozcoreconf-v6.eclass
@@ -20,7 +20,7 @@ case ${EAPI} in
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
-if [[ ! ${_MOZCORECONF_V6_ECLASS} ]]; then
+if [[ -z ${_MOZCORECONF_V6_ECLASS} ]]; then
_MOZCORECONF_V6_ECLASS=1
inherit toolchain-funcs flag-o-matic python-any-r1
diff --git a/eclass/mozextension.eclass b/eclass/mozextension.eclass
index 52fe26280e6e..f888491d9919 100644
--- a/eclass/mozextension.eclass
+++ b/eclass/mozextension.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: mozextension.eclass
@@ -12,7 +12,7 @@ case ${EAPI} in
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
-if [[ ! ${_MOZEXTENSION_ECLASS} ]]; then
+if [[ -z ${_MOZEXTENSION_ECLASS} ]]; then
_MOZEXTENSION_ECLASS=1
# @ECLASS_VARIABLE: MOZEXTENSION_TARGET
diff --git a/eclass/mozlinguas-v2.eclass b/eclass/mozlinguas-v2.eclass
index 81e00275a8f6..c8e4c2393945 100644
--- a/eclass/mozlinguas-v2.eclass
+++ b/eclass/mozlinguas-v2.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: mozlinguas-v2.eclass
@@ -19,7 +19,7 @@ case ${EAPI} in
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
-if [[ ! ${_MOZLINGUAS_V2_ECLASS} ]]; then
+if [[ -z ${_MOZLINGUAS_V2_ECLASS} ]]; then
_MOZLINGUAS_V2_ECLASS=1
inherit mozextension
diff --git a/eclass/multibuild.eclass b/eclass/multibuild.eclass
index 0677ea346e4c..652a938d5663 100644
--- a/eclass/multibuild.eclass
+++ b/eclass/multibuild.eclass
@@ -6,21 +6,17 @@
# Michał Górny <mgorny@gentoo.org>
# @AUTHOR:
# Author: Michał Górny <mgorny@gentoo.org>
-# @SUPPORTED_EAPIS: 6 7 8
+# @SUPPORTED_EAPIS: 7 8
# @BLURB: A generic eclass for building multiple variants of packages.
# @DESCRIPTION:
# The multibuild eclass aims to provide a generic framework for building
# multiple 'variants' of a package (e.g. multilib, Python
# implementations).
-if [[ ! ${_MULTIBUILD_ECLASS} ]]; then
+if [[ -z ${_MULTIBUILD_ECLASS} ]]; then
_MULTIBUILD_ECLASS=1
case ${EAPI} in
- 6)
- ewarn "${CATEGORY}/${PF}: ebuild uses ${ECLASS} with deprecated EAPI ${EAPI}!"
- ewarn "${CATEGORY}/${PF}: Support will be removed on 2024-10-08. Please port to newer EAPI."
- ;;
7|8)
# backwards compatibility for run_in_build_dir
inherit out-of-source-utils
@@ -99,7 +95,7 @@ esac
# nevertheless. It is preferred to call 'die' inside of the passed
# function.
multibuild_foreach_variant() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
[[ ${MULTIBUILD_VARIANTS} ]] \
|| die "MULTIBUILD_VARIANTS need to be set"
@@ -150,7 +146,7 @@ multibuild_foreach_variant() {
#
# The function returns command exit status.
multibuild_for_best_variant() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
[[ ${MULTIBUILD_VARIANTS} ]] \
|| die "MULTIBUILD_VARIANTS need to be set"
@@ -166,7 +162,7 @@ multibuild_for_best_variant() {
# be placed in directories matching BUILD_DIRs used by
# multibuild_foreach().
multibuild_copy_sources() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
local _MULTIBUILD_INITIAL_BUILD_DIR=${BUILD_DIR:-${S}}
@@ -188,7 +184,7 @@ multibuild_copy_sources() {
# (the real root). Both directories have to be real, absolute paths
# (i.e. including ${D}). Source root will be removed.
multibuild_merge_root() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
local src=${1}
local dest=${2}
diff --git a/eclass/multilib-build.eclass b/eclass/multilib-build.eclass
index 22c4a8bb3048..375adc46531a 100644
--- a/eclass/multilib-build.eclass
+++ b/eclass/multilib-build.eclass
@@ -6,7 +6,7 @@
# Michał Górny <mgorny@gentoo.org>
# @AUTHOR:
# Author: Michał Górny <mgorny@gentoo.org>
-# @SUPPORTED_EAPIS: 6 7 8
+# @SUPPORTED_EAPIS: 7 8
# @BLURB: flags and utility functions for building multilib packages
# @DESCRIPTION:
# The multilib-build.eclass exports USE flags and utility functions
@@ -21,10 +21,6 @@ if [[ -z ${_MULTILIB_BUILD_ECLASS} ]]; then
_MULTILIB_BUILD_ECLASS=1
case ${EAPI} in
- 6)
- ewarn "${CATEGORY}/${PF}: ebuild uses ${ECLASS} with deprecated EAPI ${EAPI}!"
- ewarn "${CATEGORY}/${PF}: Support will be removed on 2024-10-08. Please port to newer EAPI."
- ;;
7|8) ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
@@ -257,8 +253,8 @@ multilib_check_headers() {
_multilib_header_cksum() {
set -o pipefail
- if [[ -d ${ED%/}/usr/include ]]; then
- find "${ED%/}"/usr/include -type f \
+ if [[ -d ${ED}/usr/include ]]; then
+ find "${ED}"/usr/include -type f \
-exec cksum {} + | sort -k2
fi
}
@@ -380,7 +376,7 @@ multilib_prepare_wrappers() {
[[ ${#} -le 1 ]] || die "${FUNCNAME}: too many arguments"
- local root=${1:-${ED%/}}
+ local root=${1:-${ED}}
local f
if [[ ${COMPLETE_MULTILIB} == yes ]]; then
@@ -448,9 +444,9 @@ multilib_prepare_wrappers() {
# Some ABIs may have install less files than others.
if [[ -f ${root}/usr/include${f} ]]; then
- local wrapper=${ED%/}/tmp/multilib-include${f}
+ local wrapper=${ED}/tmp/multilib-include${f}
- if [[ ! -f ${ED%/}/tmp/multilib-include${f} ]]; then
+ if [[ ! -f ${ED}/tmp/multilib-include${f} ]]; then
dodir "/tmp/multilib-include${dir}"
# a generic template
cat > "${wrapper}" <<_EOF_ || die
@@ -508,7 +504,7 @@ _EOF_
# $CHOST shall be set by multilib_toolchain_setup
dodir "/tmp/multilib-include/${CHOST}${dir}"
- mv "${root}/usr/include${f}" "${ED%/}/tmp/multilib-include/${CHOST}${dir}/" || die
+ mv "${root}/usr/include${f}" "${ED}/tmp/multilib-include/${CHOST}${dir}/" || die
# Note: match a space afterwards to avoid collision potential.
sed -e "/${MULTILIB_ABI_FLAG} /s&error.*&include <${CHOST}${f}>&" \
@@ -548,11 +544,11 @@ multilib_install_wrappers() {
local root=${1:-${ED}}
- if [[ -d ${ED%/}/tmp/multilib-include ]]; then
+ if [[ -d ${ED}/tmp/multilib-include ]]; then
multibuild_merge_root \
- "${ED%/}"/tmp/multilib-include "${root}"/usr/include
+ "${ED}"/tmp/multilib-include "${root}"/usr/include
# it can fail if something else uses /tmp
- rmdir "${ED%/}"/tmp &>/dev/null
+ rmdir "${ED}"/tmp &>/dev/null
fi
}
diff --git a/eclass/multilib-minimal.eclass b/eclass/multilib-minimal.eclass
index c84fb3781a97..95748dc8bbe5 100644
--- a/eclass/multilib-minimal.eclass
+++ b/eclass/multilib-minimal.eclass
@@ -4,7 +4,7 @@
# @ECLASS: multilib-minimal.eclass
# @MAINTAINER:
# Michał Górny <mgorny@gentoo.org>
-# @SUPPORTED_EAPIS: 6 7 8
+# @SUPPORTED_EAPIS: 7 8
# @PROVIDES: multilib-build
# @BLURB: wrapper for multilib builds providing convenient multilib_src_* functions
# @DESCRIPTION:
@@ -25,14 +25,10 @@
inherit multilib-build
-if [[ ! ${_MULTILIB_MINIMAL_ECLASS} ]]; then
+if [[ -z ${_MULTILIB_MINIMAL_ECLASS} ]]; then
_MULTILIB_MINIMAL_ECLASS=1
case ${EAPI} in
- 6)
- ewarn "${CATEGORY}/${PF}: ebuild uses ${ECLASS} with deprecated EAPI ${EAPI}!"
- ewarn "${CATEGORY}/${PF}: Support will be removed on 2024-10-08. Please port to newer EAPI."
- ;;
7|8) ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
diff --git a/eclass/multilib.eclass b/eclass/multilib.eclass
index eca8c02d8336..f19ad20af8fd 100644
--- a/eclass/multilib.eclass
+++ b/eclass/multilib.eclass
@@ -4,7 +4,7 @@
# @ECLASS: multilib.eclass
# @MAINTAINER:
# toolchain@gentoo.org
-# @SUPPORTED_EAPIS: 6 7 8
+# @SUPPORTED_EAPIS: 7 8
# @BLURB: This eclass is for all functions pertaining to handling multilib configurations.
# @DESCRIPTION:
# This eclass is for all functions pertaining to handling multilib configurations.
@@ -13,10 +13,6 @@ if [[ -z ${_MULTILIB_ECLASS} ]]; then
_MULTILIB_ECLASS=1
case ${EAPI} in
- 6)
- ewarn "${CATEGORY}/${PF}: ebuild uses ${ECLASS} with deprecated EAPI ${EAPI}!"
- ewarn "${CATEGORY}/${PF}: Support will be removed on 2024-10-08. Please port to newer EAPI."
- ;;
7|8) ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
diff --git a/eclass/multiprocessing.eclass b/eclass/multiprocessing.eclass
index f9627de26c3b..ba6e1b46aaec 100644
--- a/eclass/multiprocessing.eclass
+++ b/eclass/multiprocessing.eclass
@@ -7,7 +7,7 @@
# @AUTHOR:
# Brian Harring <ferringb@gentoo.org>
# Mike Frysinger <vapier@gentoo.org>
-# @SUPPORTED_EAPIS: 5 6 7 8
+# @SUPPORTED_EAPIS: 7 8
# @BLURB: multiprocessing helper functions
# @DESCRIPTION:
# The multiprocessing eclass contains a suite of utility functions
@@ -28,10 +28,6 @@ if [[ -z ${_MULTIPROCESSING_ECLASS} ]]; then
_MULTIPROCESSING_ECLASS=1
case ${EAPI} in
- 5|6)
- ewarn "${CATEGORY}/${PF}: ebuild uses ${ECLASS} with deprecated EAPI ${EAPI}!"
- ewarn "${CATEGORY}/${PF}: Support will be removed on 2024-10-08. Please port to newer EAPI."
- ;;
7|8) ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
diff --git a/eclass/nuget.eclass b/eclass/nuget.eclass
index ac8629848eca..4efbeb909f43 100644
--- a/eclass/nuget.eclass
+++ b/eclass/nuget.eclass
@@ -245,7 +245,7 @@ nuget_unpack-non-nuget-archives() {
# This function is used inside "dotnet-pkg_src_prepare"
# from the "dotnet-pkg" eclass.
nuget_writeconfig() {
- debug-print-function "${FUNCNAME[0]}" "${@}"
+ debug-print-function ${FUNCNAME} "$@"
case "${1}" in
"" ) die "${FUNCNAME[0]}: no directory/file path specified" ;;
diff --git a/eclass/out-of-source-utils.eclass b/eclass/out-of-source-utils.eclass
index 55a88127ca71..b1b5fc05e37c 100644
--- a/eclass/out-of-source-utils.eclass
+++ b/eclass/out-of-source-utils.eclass
@@ -6,20 +6,16 @@
# Michał Górny <mgorny@gentoo.org>
# @AUTHOR:
# Michał Górny <mgorny@gentoo.org>
-# @SUPPORTED_EAPIS: 6 7 8
+# @SUPPORTED_EAPIS: 7 8
# @BLURB: Utility functions for building packages out-of-source
# @DESCRIPTION:
# This eclass provides a run_in_build_dir() helper that can be used
# to execute specified command inside BUILD_DIR.
-if [[ ! ${_OUT_OF_SOURCE_UTILS_ECLASS} ]]; then
+if [[ -z ${_OUT_OF_SOURCE_UTILS_ECLASS} ]]; then
_OUT_OF_SOURCE_UTILS_ECLASS=1
case ${EAPI} in
- 6)
- ewarn "${CATEGORY}/${PF}: ebuild uses ${ECLASS} with deprecated EAPI ${EAPI}!"
- ewarn "${CATEGORY}/${PF}: Support will be removed on 2024-10-08. Please port to newer EAPI."
- ;;
7|8) ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
@@ -29,7 +25,7 @@ esac
# @DESCRIPTION:
# Run the given command in the directory pointed by BUILD_DIR.
run_in_build_dir() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
local ret
[[ ${#} -eq 0 ]] && die "${FUNCNAME}: no command specified."
diff --git a/eclass/pax-utils.eclass b/eclass/pax-utils.eclass
index a7144278fd9a..cc35145a2851 100644
--- a/eclass/pax-utils.eclass
+++ b/eclass/pax-utils.eclass
@@ -7,7 +7,7 @@
# @AUTHOR:
# Author: Kevin F. Quinn <kevquinn@gentoo.org>
# Author: Anthony G. Basile <blueness@gentoo.org>
-# @SUPPORTED_EAPIS: 5 6 7 8
+# @SUPPORTED_EAPIS: 7 8
# @BLURB: functions to provide PaX markings for hardened kernels
# @DESCRIPTION:
#
@@ -25,10 +25,6 @@ if [[ -z ${_PAX_UTILS_ECLASS} ]]; then
_PAX_UTILS_ECLASS=1
case ${EAPI} in
- 5|6)
- ewarn "${CATEGORY}/${PF}: ebuild uses ${ECLASS} with deprecated EAPI ${EAPI}!"
- ewarn "${CATEGORY}/${PF}: Support will be removed on 2024-10-08. Please port to newer EAPI."
- ;;
7|8) ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
diff --git a/eclass/perl-functions.eclass b/eclass/perl-functions.eclass
index d2b6cfb85f73..2b750ce53dca 100644
--- a/eclass/perl-functions.eclass
+++ b/eclass/perl-functions.eclass
@@ -16,11 +16,10 @@
# It provides helper functions, no phases or variable manipulation in
# global scope.
+if [[ -z ${_PERL_FUNCTIONS_ECLASS} ]]; then
+_PERL_FUNCTIONS_ECLASS=1
+
case ${EAPI} in
- 6)
- ewarn "${CATEGORY}/${PF}: ebuild uses ${ECLASS} with deprecated EAPI ${EAPI}!"
- ewarn "${CATEGORY}/${PF}: Support will be removed on 2024-10-08. Please port to newer EAPI."
- ;;
7|8) ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
@@ -158,18 +157,18 @@ perl_fix_packlist() {
einfo "Fixing packlist file /${f#${D}}"
# remove the temporary build dir path
- sed -i -e "s:${D%/}/:/:g" "${f}"
+ sed -i -e "s:${D}/:/:g" "${f}" || die
# remove duplicate entries
- sort -u "${f}" > "${packlist_temp}"
- mv "${packlist_temp}" "${f}"
+ sort -u "${f}" > "${packlist_temp}" || die
+ mv "${packlist_temp}" "${f}" || die
# remove files that dont exist
cat "${f}" | while read -r entry; do
if [[ ! -e ${D}/${entry} ]]; then
einfo "Pruning surplus packlist entry ${entry}"
grep -v -x -F "${entry}" "${f}" > "${packlist_temp}"
- mv "${packlist_temp}" "${f}"
+ mv "${packlist_temp}" "${f}" || die
fi
done
fi
@@ -186,7 +185,7 @@ perl_remove_temppath() {
find "${D}" -type f -not -name '*.so' -print0 | while read -rd '' f ; do
if file "${f}" | grep -q -i " text" ; then
grep -q "${D}" "${f}" && ewarn "QA: File contains a temporary path ${f}"
- sed -i -e "s:${D%/}/:/:g" "${f}"
+ sed -i -e "s:${D}/:/:g" "${f}" || die
fi
done
}
@@ -630,3 +629,5 @@ perl_get_wikiurl_features() {
perl_get_wikiurl_tests() {
perl_get_wikiurl Testing
}
+
+fi
diff --git a/eclass/php-pear-r2.eclass b/eclass/php-pear-r2.eclass
index 567aa9a8144f..782427e09fa6 100644
--- a/eclass/php-pear-r2.eclass
+++ b/eclass/php-pear-r2.eclass
@@ -6,7 +6,7 @@
# Gentoo PHP Team <php-bugs@gentoo.org>
# @AUTHOR:
# Author: Brian Evans <grknight@gentoo.org>
-# @SUPPORTED_EAPIS: 6 7 8
+# @SUPPORTED_EAPIS: 7 8
# @BLURB: Provides means for an easy installation of PEAR packages.
# @DESCRIPTION:
# This eclass provides means for an easy installation of PEAR packages.
@@ -18,16 +18,12 @@ if [[ -z ${_PHP_PEAR_R2_ECLASS} ]]; then
_PHP_PEAR_R2_ECLASS=1
case ${EAPI} in
- 6)
- ewarn "${CATEGORY}/${PF}: ebuild uses ${ECLASS} with deprecated EAPI ${EAPI}!"
- ewarn "${CATEGORY}/${PF}: Support will be removed on 2024-10-08. Please port to newer EAPI."
- ;;
7|8) ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
RDEPEND=">=dev-php/pear-1.8.1"
-[[ ${EAPI} != [67] ]] && IDEPEND=">=dev-php/pear-1.8.1"
+[[ ${EAPI} != 7 ]] && IDEPEND=">=dev-php/pear-1.8.1"
# @ECLASS_VARIABLE: PHP_PEAR_PKG_NAME
# @DESCRIPTION:
@@ -104,20 +100,20 @@ php-pear-r2_src_install() {
# Register package with the local PEAR database.
php-pear-r2_pkg_postinst() {
# Add unknown channels
- if [[ -f "${EROOT%/}/usr/share/php/.packagexml/${PEAR_P}-channel.xml" ]] ; then
- "${EROOT%/}/usr/bin/peardev" channel-info "${PHP_PEAR_DOMAIN}" &> /dev/null
+ if [[ -f "${EROOT}/usr/share/php/.packagexml/${PEAR_P}-channel.xml" ]] ; then
+ "${EROOT}/usr/bin/peardev" channel-info "${PHP_PEAR_DOMAIN}" &> /dev/null
if [[ $? -ne 0 ]]; then
- "${EROOT%/}/usr/bin/peardev" channel-add \
- "${EROOT%/}/usr/share/php/.packagexml/${PEAR_P}-channel.xml" \
+ "${EROOT}/usr/bin/peardev" channel-add \
+ "${EROOT}/usr/share/php/.packagexml/${PEAR_P}-channel.xml" \
|| einfo "Ignore any errors about existing channels"
fi
fi
# Register the package from the package{,2}.xml file
# It is not critical to complete so only warn on failure
- if [[ -f "${EROOT%/}/usr/share/php/.packagexml/${PEAR_P}.xml" ]] ; then
- "${EROOT%/}/usr/bin/peardev" install -nrO --force \
- "${EROOT%/}/usr/share/php/.packagexml/${PEAR_P}.xml" 2> /dev/null \
+ if [[ -f "${EROOT}/usr/share/php/.packagexml/${PEAR_P}.xml" ]] ; then
+ "${EROOT}/usr/bin/peardev" install -nrO --force \
+ "${EROOT}/usr/share/php/.packagexml/${PEAR_P}.xml" 2> /dev/null \
|| ewarn "Failed to insert package into local PEAR database"
fi
}
@@ -127,7 +123,7 @@ php-pear-r2_pkg_postinst() {
# Deregister package from the local PEAR database
php-pear-r2_pkg_postrm() {
# Uninstall known dependency
- "${EROOT%/}/usr/bin/peardev" uninstall -nrO "${PHP_PEAR_DOMAIN}/${PHP_PEAR_PKG_NAME}"
+ "${EROOT}/usr/bin/peardev" uninstall -nrO "${PHP_PEAR_DOMAIN}/${PHP_PEAR_PKG_NAME}"
}
fi
diff --git a/eclass/portability.eclass b/eclass/portability.eclass
index 926ac8b8b825..9efc9bfe4134 100644
--- a/eclass/portability.eclass
+++ b/eclass/portability.eclass
@@ -6,17 +6,13 @@
# base-system@gentoo.org
# @AUTHOR:
# Diego Pettenò <flameeyes@gentoo.org>
-# @SUPPORTED_EAPIS: 6 7 8
+# @SUPPORTED_EAPIS: 7 8
# @BLURB: This eclass is created to avoid using non-portable GNUisms inside ebuilds
if [[ -z ${_PORTABILITY_ECLASS} ]]; then
_PORTABILITY_ECLASS=1
case ${EAPI} in
- 6)
- ewarn "${CATEGORY}/${PF}: ebuild uses ${ECLASS} with deprecated EAPI ${EAPI}!"
- ewarn "${CATEGORY}/${PF}: Support will be removed on 2024-10-08. Please port to newer EAPI."
- ;;
7|8) ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
diff --git a/eclass/postgres-multi.eclass b/eclass/postgres-multi.eclass
index 92299b8cf34c..96aa30d89ad7 100644
--- a/eclass/postgres-multi.eclass
+++ b/eclass/postgres-multi.eclass
@@ -19,7 +19,7 @@ case ${EAPI} in
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
-if [[ ! ${_POSTGRES_MULTI_ECLASS} ]]; then
+if [[ -z ${_POSTGRES_MULTI_ECLASS} ]]; then
_POSTGRES_MULTI_ECLASS=1
inherit multibuild postgres
@@ -55,7 +55,7 @@ export _POSTGRES_INTERSECT_SLOTS=( )
# appearance of @PG_SLOT@ in the command and arguments with value of
# ${PG_SLOT}.
_postgres-multi_multibuild_wrapper() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
export PG_SLOT=${MULTIBUILD_VARIANT}
export PG_CONFIG=$(type -P pg_config${MULTIBUILD_VARIANT//./})
if [[ -n ${PKG_CONFIG_PATH} ]] ; then
diff --git a/eclass/postgres.eclass b/eclass/postgres.eclass
index 2c44358898e6..21490df1965e 100644
--- a/eclass/postgres.eclass
+++ b/eclass/postgres.eclass
@@ -19,7 +19,7 @@ case ${EAPI} in
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
-if [[ ! ${_POSTGRES_ECLASS} ]]; then
+if [[ -z ${_POSTGRES_ECLASS} ]]; then
_POSTGRES_ECLASS=1
# @ECLASS_VARIABLE: _POSTGRES_ALL_VERSIONS
@@ -136,7 +136,7 @@ postgres_check_slot() {
# is required if pkg_setup() is declared in the ebuild.
# Exports PG_SLOT, PG_CONFIG, and PKG_CONFIG_PATH.
postgres_pkg_setup() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
local compat_slot
local best_slot
diff --git a/eclass/prefix.eclass b/eclass/prefix.eclass
index e968e8ae8bac..078f483c6c2b 100644
--- a/eclass/prefix.eclass
+++ b/eclass/prefix.eclass
@@ -5,7 +5,7 @@
# @MAINTAINER:
# Feel free to contact the Prefix team through <prefix@gentoo.org> if
# you have problems, suggestions or questions.
-# @SUPPORTED_EAPIS: 5 6 7 8
+# @SUPPORTED_EAPIS: 7 8
# @BLURB: Eclass to provide Prefix functionality
# @DESCRIPTION:
# Gentoo Prefix allows users to install into a self defined offset
@@ -16,10 +16,6 @@ if [[ -z ${_PREFIX_ECLASS} ]]; then
_PREFIX_ECLASS=1
case ${EAPI} in
- 5|6)
- ewarn "${CATEGORY}/${PF}: ebuild uses ${ECLASS} with deprecated EAPI ${EAPI}!"
- ewarn "${CATEGORY}/${PF}: Support will be removed on 2024-10-08. Please port to newer EAPI."
- ;;
7|8) ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
diff --git a/eclass/preserve-libs.eclass b/eclass/preserve-libs.eclass
index 38571447b945..e97e3f846a09 100644
--- a/eclass/preserve-libs.eclass
+++ b/eclass/preserve-libs.eclass
@@ -4,17 +4,13 @@
# @ECLASS: preserve-libs.eclass
# @MAINTAINER:
# base-system@gentoo.org
-# @SUPPORTED_EAPIS: 5 6 7 8
+# @SUPPORTED_EAPIS: 7 8
# @BLURB: preserve libraries after SONAME changes
if [[ -z ${_PRESERVE_LIBS_ECLASS} ]]; then
_PRESERVE_LIBS_ECLASS=1
case ${EAPI} in
- 5|6)
- ewarn "${CATEGORY}/${PF}: ebuild uses ${ECLASS} with deprecated EAPI ${EAPI}!"
- ewarn "${CATEGORY}/${PF}: Support will be removed on 2024-10-08. Please port to newer EAPI."
- ;;
7|8) ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
diff --git a/eclass/pypi.eclass b/eclass/pypi.eclass
index b80ff9c95d36..47d40449d13a 100644
--- a/eclass/pypi.eclass
+++ b/eclass/pypi.eclass
@@ -1,4 +1,4 @@
-# Copyright 2023 Gentoo Authors
+# Copyright 2023-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: pypi.eclass
@@ -40,7 +40,7 @@ case ${EAPI} in
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
-if [[ ! ${_PYPI_ECLASS} ]]; then
+if [[ -z ${_PYPI_ECLASS} ]]; then
_PYPI_ECLASS=1
# @ECLASS_VARIABLE: PYPI_NO_NORMALIZE
diff --git a/eclass/python-any-r1.eclass b/eclass/python-any-r1.eclass
index c1f27cfbac0d..0c01a49f9000 100644
--- a/eclass/python-any-r1.eclass
+++ b/eclass/python-any-r1.eclass
@@ -43,7 +43,7 @@ case ${EAPI} in
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
-if [[ ! ${_PYTHON_ANY_R1_ECLASS} ]]; then
+if [[ -z ${_PYTHON_ANY_R1_ECLASS} ]]; then
_PYTHON_ANY_R1_ECLASS=1
if [[ ${_PYTHON_R1_ECLASS} ]]; then
@@ -245,7 +245,7 @@ unset -f _python_any_set_globals
# )
# @CODE
python_gen_any_dep() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
local depstr=${1}
[[ ${depstr} ]] || die "No dependency string provided"
@@ -271,7 +271,7 @@ python_gen_any_dep() {
#
# This function will call python_check_deps() if defined.
python_setup() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
_python_sanity_checks
# support developer override
@@ -338,7 +338,7 @@ python_setup() {
# In a binary package installs is a no-op. If you need Python in pkg_*
# phases of a binary package, call python_setup directly.
python-any-r1_pkg_setup() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
[[ ${MERGE_TYPE} != binary ]] && python_setup
}
diff --git a/eclass/python-r1.eclass b/eclass/python-r1.eclass
index adf87c2c52f7..18f4dadfdd37 100644
--- a/eclass/python-r1.eclass
+++ b/eclass/python-r1.eclass
@@ -30,14 +30,14 @@
# For more information, please see the Python Guide:
# https://projects.gentoo.org/python/guide/
+if [[ -z ${_PYTHON_R1_ECLASS} ]]; then
+_PYTHON_R1_ECLASS=1
+
case ${EAPI} in
7|8) ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
-if [[ -z ${_PYTHON_R1_ECLASS} ]]; then
-_PYTHON_R1_ECLASS=1
-
if [[ ${_PYTHON_SINGLE_R1_ECLASS} ]]; then
die 'python-r1.eclass can not be used with python-single-r1.eclass.'
elif [[ ${_PYTHON_ANY_R1_ECLASS} ]]; then
@@ -242,7 +242,7 @@ unset -f _python_set_globals
# Enforce the proper setting of PYTHON_TARGETS, if PYTHON_COMPAT_OVERRIDE
# is not in effect. If it is, just warn that the flags will be ignored.
_python_validate_useflags() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
if [[ ${PYTHON_COMPAT_OVERRIDE} ]]; then
if [[ ! ${_PYTHON_COMPAT_OVERRIDE_WARNED} ]]; then
@@ -282,7 +282,7 @@ _python_validate_useflags() {
#
# This is an internal function used to implement python_gen_cond_dep.
_python_gen_usedep() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
local impl matches=()
@@ -322,7 +322,7 @@ _python_gen_usedep() {
# REQUIRED_USE="doc? ( || ( python_targets_python2_7 ) )"
# @CODE
python_gen_useflags() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
local impl matches=()
@@ -366,7 +366,7 @@ python_gen_useflags() {
# dev-python/unittest2[python_targets_pypy?] )"
# @CODE
python_gen_cond_dep() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
local impl matches=()
local dep=${1}
@@ -428,7 +428,7 @@ python_gen_cond_dep() {
# dev-python/pypy[xml(+)] ) )"
# @CODE
python_gen_impl_dep() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
local impl matches=()
local PYTHON_REQ_USE=${1}
@@ -506,7 +506,7 @@ python_gen_impl_dep() {
# )
# @CODE
python_gen_any_dep() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
local depstr=${1}
shift
@@ -554,7 +554,7 @@ python_gen_any_dep() {
# to implementation-specific build directory matching BUILD_DIR used by
# python_foreach_abi().
python_copy_sources() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
local MULTIBUILD_VARIANTS
_python_obtain_impls
@@ -590,7 +590,7 @@ _python_obtain_impls() {
# Initialize the environment for Python implementation selected
# for multibuild.
_python_multibuild_wrapper() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
local -x EPYTHON PYTHON
local -x PATH=${PATH} PKG_CONFIG_PATH=${PKG_CONFIG_PATH}
@@ -616,7 +616,7 @@ _python_multibuild_wrapper() {
# For each command being run, EPYTHON, PYTHON and BUILD_DIR are set
# locally, and the former two are exported to the command environment.
python_foreach_impl() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
_python_sanity_checks
if [[ ${_DISTUTILS_R1_ECLASS} ]]; then
@@ -708,7 +708,7 @@ python_foreach_impl() {
# }
# @CODE
python_setup() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
_python_sanity_checks
local has_check_deps
@@ -774,7 +774,7 @@ python_setup() {
# All specified files must start with a 'python' shebang. A file not
# having a matching shebang will be refused.
python_replicate_script() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
_python_replicate_script() {
local _PYTHON_FIX_SHEBANG_QUIET=1
@@ -789,7 +789,7 @@ python_replicate_script() {
)
python_fix_shebang -q \
- "${files[@]/*\//${D%/}/${PYTHON_SCRIPTDIR}/}"
+ "${files[@]/*\//${D}${PYTHON_SCRIPTDIR}/}"
}
local files=( "${@}" )
diff --git a/eclass/python-single-r1.eclass b/eclass/python-single-r1.eclass
index 481b6cf91ba0..dc1700393274 100644
--- a/eclass/python-single-r1.eclass
+++ b/eclass/python-single-r1.eclass
@@ -42,7 +42,7 @@ case ${EAPI} in
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
-if [[ ! ${_PYTHON_SINGLE_R1_ECLASS} ]]; then
+if [[ -z ${_PYTHON_SINGLE_R1_ECLASS} ]]; then
_PYTHON_SINGLE_R1_ECLASS=1
if [[ ${_PYTHON_R1_ECLASS} ]]; then
@@ -269,7 +269,7 @@ unset -f _python_single_set_globals
# REQUIRED_USE="doc? ( ^^ ( python_single_target_python2_7 ) )"
# @CODE
python_gen_useflags() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
local impl matches=()
@@ -313,7 +313,7 @@ python_gen_useflags() {
# dev-python/unittest2[python_targets_pypy(-)?,...] )"
# @CODE
python_gen_cond_dep() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
local impl matches=()
@@ -367,7 +367,7 @@ python_gen_cond_dep() {
# dev-python/pypy[xml(+)] ) )"
# @CODE
python_gen_impl_dep() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
local impl
local matches=()
@@ -392,7 +392,7 @@ python_gen_impl_dep() {
# Determine what the selected Python implementation is and set
# the Python build environment up for it.
python_setup() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
_python_sanity_checks
unset EPYTHON
@@ -448,7 +448,7 @@ python_setup() {
# @DESCRIPTION:
# Runs python_setup.
python-single-r1_pkg_setup() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
[[ ${MERGE_TYPE} != binary ]] && python_setup
}
diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass
index 45d3da6bb98c..796be7ab456a 100644
--- a/eclass/python-utils-r1.eclass
+++ b/eclass/python-utils-r1.eclass
@@ -23,14 +23,14 @@
# metadata/install-qa-check.d/60python-pyc
# See bug #704286, bug #781878
+if [[ -z ${_PYTHON_UTILS_R1_ECLASS} ]]; then
+_PYTHON_UTILS_R1_ECLASS=1
+
case ${EAPI} in
7|8) ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
-if [[ ! ${_PYTHON_UTILS_R1_ECLASS} ]]; then
-_PYTHON_UTILS_R1_ECLASS=1
-
[[ ${EAPI} == 7 ]] && inherit eapi8-dosym
inherit multiprocessing toolchain-funcs
@@ -75,7 +75,7 @@ readonly _PYTHON_HISTORICAL_IMPLS
# Verify whether the patterns passed to the eclass function are correct
# (i.e. can match any valid implementation). Dies on wrong pattern.
_python_verify_patterns() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
local impl pattern
for pattern; do
@@ -298,7 +298,7 @@ _python_impl_matches() {
# PYTHON_SITEDIR. They are described more completely in the eclass
# variable documentation.
_python_export() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
local impl var
@@ -483,7 +483,7 @@ _python_export() {
# Obtain and print the 'stdlib' path for the given implementation. If no
# implementation is provided, ${EPYTHON} will be used.
python_get_stdlib() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
_python_export "${@}" PYTHON_STDLIB
echo "${PYTHON_STDLIB}"
@@ -496,7 +496,7 @@ python_get_stdlib() {
# implementation. If no implementation is provided, ${EPYTHON} will
# be used.
python_get_sitedir() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
_python_export "${@}" PYTHON_SITEDIR
echo "${PYTHON_SITEDIR}"
@@ -508,7 +508,7 @@ python_get_sitedir() {
# Obtain and print the include path for the given implementation. If no
# implementation is provided, ${EPYTHON} will be used.
python_get_includedir() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
_python_export "${@}" PYTHON_INCLUDEDIR
echo "${PYTHON_INCLUDEDIR}"
@@ -523,7 +523,7 @@ python_get_includedir() {
# Please note that this function can be used with CPython only. Use
# in another implementation will result in a fatal failure.
python_get_library_path() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
_python_export "${@}" PYTHON_LIBPATH
echo "${PYTHON_LIBPATH}"
@@ -540,7 +540,7 @@ python_get_library_path() {
# It requires Python and pkg-config installed, and therefore proper
# build-time dependencies need be added to the ebuild.
python_get_CFLAGS() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
_python_export "${@}" PYTHON_CFLAGS
echo "${PYTHON_CFLAGS}"
@@ -557,7 +557,7 @@ python_get_CFLAGS() {
# It requires Python and pkg-config installed, and therefore proper
# build-time dependencies need be added to the ebuild.
python_get_LIBS() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
_python_export "${@}" PYTHON_LIBS
echo "${PYTHON_LIBS}"
@@ -574,7 +574,7 @@ python_get_LIBS() {
# It requires Python installed, and therefore proper build-time
# dependencies need be added to the ebuild.
python_get_PYTHON_CONFIG() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
_python_export "${@}" PYTHON_CONFIG
echo "${PYTHON_CONFIG}"
@@ -587,7 +587,7 @@ python_get_PYTHON_CONFIG() {
# implementation. If no implementation is provided, ${EPYTHON} will
# be used.
python_get_scriptdir() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
_python_export "${@}" PYTHON_SCRIPTDIR
echo "${PYTHON_SCRIPTDIR}"
@@ -600,7 +600,7 @@ python_get_scriptdir() {
# paths). If no directories are provided, the default system paths
# are used (prepended with ${D}).
python_optimize() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
[[ ${EPYTHON} ]] || die 'No Python implementation set (EPYTHON is null).'
@@ -617,8 +617,8 @@ python_optimize() {
# 2) skip paths which do not exist
# (python2.6 complains about them verbosely)
- if [[ ${f} == /* && -d ${D%/}${f} ]]; then
- set -- "${D%/}${f}" "${@}"
+ if [[ ${f} == /* && -d ${D}${f} ]]; then
+ set -- "${D}${f}" "${@}"
fi
done < <(
"${PYTHON}" - <<-EOF || die
@@ -634,7 +634,7 @@ python_optimize() {
local d
for d; do
# make sure to get a nice path without //
- local instpath=${d#${D%/}}
+ local instpath=${d#${D}}
instpath=/${instpath##/}
einfo "Optimize Python modules for ${instpath}"
@@ -677,7 +677,7 @@ python_optimize() {
# }
# @CODE
python_scriptinto() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
_PYTHON_SCRIPTROOT=${1}
}
@@ -691,7 +691,7 @@ python_scriptinto() {
# The executable will be wrapped properly for the Python implementation,
# though no shebang mangling will be performed.
python_doexe() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
[[ ${EBUILD_PHASE} != install ]] &&
die "${FUNCNAME} can only be used in src_install"
@@ -712,7 +712,7 @@ python_doexe() {
# though no shebang mangling will be performed. It will be renamed
# to <new-name>.
python_newexe() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
[[ ${EBUILD_PHASE} != install ]] &&
die "${FUNCNAME} can only be used in src_install"
@@ -741,7 +741,7 @@ python_newexe() {
# don't use this at home, just call python_doscript() instead
if [[ ${_PYTHON_REWRITE_SHEBANG} ]]; then
- python_fix_shebang -q "${ED%/}/${d}/${newfn}"
+ python_fix_shebang -q "${ED}${d}/${newfn}"
fi
}
@@ -762,7 +762,7 @@ python_newexe() {
# }
# @CODE
python_doscript() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
[[ ${EBUILD_PHASE} != install ]] &&
die "${FUNCNAME} can only be used in src_install"
@@ -789,7 +789,7 @@ python_doscript() {
# }
# @CODE
python_newscript() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
[[ ${EBUILD_PHASE} != install ]] &&
die "${FUNCNAME} can only be used in src_install"
@@ -827,7 +827,7 @@ python_newscript() {
# }
# @CODE
python_moduleinto() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
_PYTHON_MODULEROOT=${1}
}
@@ -852,7 +852,7 @@ python_moduleinto() {
# }
# @CODE
python_domodule() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
[[ ${EPYTHON} ]] || die 'No Python implementation set (EPYTHON is null).'
@@ -872,15 +872,15 @@ python_domodule() {
insinto "${d}"
doins -r "${@}" || return ${?}
)
- python_optimize "${ED%/}/${d}"
+ python_optimize "${ED}${d}"
elif [[ -n ${BUILD_DIR} ]]; then
local dest=${BUILD_DIR}/install${EPREFIX}/${d}
mkdir -p "${dest}" || die
cp -pR "${@}" "${dest}/" || die
(
- cd "${dest}" &&
- chmod -R a+rX "${@##*/}"
- ) || die
+ cd "${dest}" || die
+ chmod -R a+rX "${@##*/}" || die
+ )
else
die "${FUNCNAME} can only be used in src_install or with BUILD_DIR set"
fi
@@ -900,7 +900,7 @@ python_domodule() {
# }
# @CODE
python_doheader() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
[[ ${EBUILD_PHASE} != install ]] &&
die "${FUNCNAME} can only be used in src_install"
@@ -932,7 +932,7 @@ python_doheader() {
# setup will be done. If wrapper update is requested, the directory
# shall be removed first.
_python_wrapper_setup() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
local workdir=${1:-${T}/${EPYTHON}}
local impl=${2:-${EPYTHON}}
@@ -1034,7 +1034,7 @@ _python_wrapper_setup() {
# Python version (but not non-Python shebangs). --quiet causes
# the function not to list modified files verbosely.
python_fix_shebang() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
[[ ${EPYTHON} ]] || die "${FUNCNAME}: EPYTHON unset (pkg_setup not called?)"
@@ -1103,17 +1103,17 @@ python_fix_shebang() {
fi
if [[ ! ${quiet} ]]; then
- einfo "Fixing shebang in ${f#${D%/}}."
+ einfo "Fixing shebang in ${f#${D}}."
fi
if [[ ! ${error} ]]; then
- debug-print "${FUNCNAME}: in file ${f#${D%/}}"
+ debug-print "${FUNCNAME}: in file ${f#${D}}"
debug-print "${FUNCNAME}: rewriting shebang: ${shebang}"
sed -i -e "1s@${from}@#!${EPREFIX}/usr/bin/${EPYTHON}@" "${f}" || die
any_fixed=1
else
eerror "The file has incompatible shebang:"
- eerror " file: ${f#${D%/}}"
+ eerror " file: ${f#${D}}"
eerror " current shebang: ${shebang}"
eerror " requested impl: ${EPYTHON}"
die "${FUNCNAME}: conversion of incompatible shebang requested"
@@ -1121,7 +1121,7 @@ python_fix_shebang() {
done < <(find -H "${path}" -type f -print0 || die)
if [[ ! ${any_fixed} ]]; then
- eerror "QA error: ${FUNCNAME}, ${path#${D%/}} did not match any fixable files."
+ eerror "QA error: ${FUNCNAME}, ${path#${D}} did not match any fixable files."
eerror "There are no Python files in specified directory."
die "${FUNCNAME} did not match any fixable files"
fi
@@ -1154,7 +1154,7 @@ _python_check_locale_sanity() {
# nothing if LC_ALL is defined, or if the current locale uses a UTF-8 charmap.
# This may be used to work around the quirky open() behavior of python3.
python_export_utf8_locale() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
# If the locale program isn't available, just return.
type locale &>/dev/null || return 0
@@ -1206,7 +1206,7 @@ python_export_utf8_locale() {
# to be taken to run einstalldocs from the same directory
# (usually ${S}).
build_sphinx() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
[[ ${#} -eq 1 ]] || die "${FUNCNAME} takes 1 arg: <directory>"
local dir=${1}
@@ -1252,7 +1252,7 @@ _python_check_EPYTHON() {
# package sources that would block installed packages from being used
# (and effectively e.g. make it impossible to load compiled extensions).
_python_check_occluded_packages() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
[[ -z ${BUILD_DIR} || ! -d ${BUILD_DIR}/install ]] && return
@@ -1362,7 +1362,7 @@ _python_check_occluded_packages() {
#
# This command dies on failure and respects nonfatal.
epytest() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
_python_check_EPYTHON
_python_check_occluded_packages
@@ -1490,7 +1490,7 @@ epytest() {
#
# This command dies on failure and respects nonfatal.
eunittest() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
_python_check_EPYTHON
_python_check_occluded_packages
@@ -1515,7 +1515,7 @@ eunittest() {
# code. Checks whether the interpreter is installed, runs
# python_check_deps() if declared.
_python_run_check_deps() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
local impl=${1}
@@ -1547,7 +1547,7 @@ _python_run_check_deps() {
# The wrapper accepts multiple package specifications. For the check
# to succeed, *all* specified atoms must match.
python_has_version() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
local root_arg=( -b )
case ${1} in
@@ -1572,7 +1572,7 @@ python_has_version() {
# @DESCRIPTION:
# Perform additional environment sanity checks.
_python_sanity_checks() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
[[ ${_PYTHON_SANITY_CHECKED} ]] && return
diff --git a/eclass/readme.gentoo-r1.eclass b/eclass/readme.gentoo-r1.eclass
index 3d2d8244687c..02167a746f5a 100644
--- a/eclass/readme.gentoo-r1.eclass
+++ b/eclass/readme.gentoo-r1.eclass
@@ -6,7 +6,7 @@
# Pacho Ramos <pacho@gentoo.org>
# @AUTHOR:
# Author: Pacho Ramos <pacho@gentoo.org>
-# @SUPPORTED_EAPIS: 6 7 8
+# @SUPPORTED_EAPIS: 7 8
# @BLURB: install a doc file shown via elog messages
# @DESCRIPTION:
# An eclass for installing a README.gentoo doc file recording tips
@@ -21,10 +21,6 @@ if [[ -z ${_README_GENTOO_ECLASS} ]]; then
_README_GENTOO_ECLASS=1
case ${EAPI} in
- 6)
- ewarn "${CATEGORY}/${PF}: ebuild uses ${ECLASS} with deprecated EAPI ${EAPI}!"
- ewarn "${CATEGORY}/${PF}: Support will be removed on 2024-10-08. Please port to newer EAPI."
- ;;
7|8) ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
@@ -58,7 +54,7 @@ esac
# ${FILESDIR}/README.gentoo-${SLOT} also.
# Usually called at src_install phase.
readme.gentoo_create_doc() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
if [[ -n "${DOC_CONTENTS}" ]]; then
if [[ -n "${DISABLE_AUTOFORMATTING}" ]]; then
@@ -82,7 +78,7 @@ readme.gentoo_create_doc() {
( # subshell to avoid pollution of calling environment
docinto .
dodoc "${T}"/README.gentoo
- ) || die
+ )
README_GENTOO_DOC_VALUE=$(< "${T}/README.gentoo")
}
@@ -98,7 +94,7 @@ readme.gentoo_create_doc() {
# rely on specific REPLACING_VERSIONS handling in your ebuild to print messages
# when people update from versions still providing old message.
readme.gentoo_print_elog() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
if [[ -z "${README_GENTOO_DOC_VALUE}" ]]; then
die "readme.gentoo_print_elog invoked without matching readme.gentoo_create_doc call!"
diff --git a/eclass/rebar-utils.eclass b/eclass/rebar-utils.eclass
index 5657908eb8e9..095223cd11a1 100644
--- a/eclass/rebar-utils.eclass
+++ b/eclass/rebar-utils.eclass
@@ -68,7 +68,7 @@ _rebar_find_dep() {
# Coverage is not relevant in this context, so there's no harm to disable it,
# although the issue should be fixed.
rebar_disable_coverage() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
local rebar_config="${1:-rebar.config}"
@@ -88,7 +88,7 @@ rebar_disable_coverage() {
#
# The function dies on failure.
rebar_fix_include_path() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
local pn="${1}"
local rebar_config="${2:-rebar.config}"
@@ -123,7 +123,7 @@ rebar_fix_include_path() {
#
# The function dies on failure.
rebar_remove_deps() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
local rebar_config="${1:-rebar.config}"
@@ -148,7 +148,7 @@ rebar_remove_deps() {
#
# The function dies on failure.
rebar_set_vsn() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
local version="${1:-${PV%_*}}"
diff --git a/eclass/rebar.eclass b/eclass/rebar.eclass
index 1e4e845a9adb..951e29b05a91 100644
--- a/eclass/rebar.eclass
+++ b/eclass/rebar.eclass
@@ -69,7 +69,7 @@ _rebar_find_dep() {
# @DESCRIPTION:
# Run rebar with verbose flag. Die on failure.
erebar() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
(( $# > 0 )) || die "erebar: at least one target is required"
@@ -87,7 +87,7 @@ erebar() {
# Existence of rebar.config is optional, but file description file must exist
# at 'src/${PN}.app.src'.
rebar_src_prepare() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
default
rebar_set_vsn
@@ -101,7 +101,7 @@ rebar_src_prepare() {
# @DESCRIPTION:
# Configure with ERL_LIBS set.
rebar_src_configure() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
local -x ERL_LIBS="${EPREFIX}$(get_erl_libs)"
default
@@ -111,7 +111,7 @@ rebar_src_configure() {
# @DESCRIPTION:
# Compile project with rebar.
rebar_src_compile() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
erebar compile
}
@@ -120,7 +120,7 @@ rebar_src_compile() {
# @DESCRIPTION:
# Run unit tests.
rebar_src_test() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
erebar eunit
}
@@ -132,7 +132,7 @@ rebar_src_test() {
#
# Function expects that project conforms to Erlang/OTP structure.
rebar_src_install() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
local bin
local dest="$(get_erl_libs)/${P}"
diff --git a/eclass/rebar3.eclass b/eclass/rebar3.eclass
index f6383b9c8cdd..f75a3718fdfd 100644
--- a/eclass/rebar3.eclass
+++ b/eclass/rebar3.eclass
@@ -76,7 +76,7 @@ _rebar_find_dep() {
# @DESCRIPTION:
# Run rebar with verbose flag. Die on failure.
erebar3() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
(( $# > 0 )) || die "${FUNCNAME}: at least one target is required"
@@ -99,7 +99,7 @@ erebar3() {
# Existence of rebar.config is optional, but file description file must exist
# at 'src/${PN}.app.src'.
rebar3_src_prepare() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
default
rebar_set_vsn
@@ -118,7 +118,7 @@ rebar3_src_prepare() {
# @DESCRIPTION:
# Configure with ERL_LIBS set.
rebar3_src_configure() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
local -x ERL_LIBS="${EPREFIX}$(get_erl_libs)"
default
@@ -128,7 +128,7 @@ rebar3_src_configure() {
# @DESCRIPTION:
# Compile project with rebar3.
rebar3_src_compile() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
erebar3 as "${REBAR_PROFILE}" release --all
}
@@ -137,7 +137,7 @@ rebar3_src_compile() {
# @DESCRIPTION:
# Run unit tests.
rebar3_src_test() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
erebar3 eunit -v
}
@@ -149,7 +149,7 @@ rebar3_src_test() {
#
# Function expects that project conforms to Erlang/OTP structure.
rebar3_install_lib() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
local dest="$(get_erl_libs)/${P}"
insinto "${dest}"
@@ -169,7 +169,7 @@ rebar3_install_lib() {
#
# Function expects that project conforms to Erlang/OTP structure.
rebar3_src_install() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
pushd "_build/${REBAR_PROFILE}" >/dev/null || die
if [[ -d rel/${PN} ]]; then
diff --git a/eclass/rocm.eclass b/eclass/rocm.eclass
index cf501d5a8861..acf3a5310a06 100644
--- a/eclass/rocm.eclass
+++ b/eclass/rocm.eclass
@@ -89,7 +89,7 @@ case ${EAPI} in
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
-if [[ ! ${_ROCM_ECLASS} ]]; then
+if [[ -z ${_ROCM_ECLASS} ]]; then
_ROCM_ECLASS=1
inherit flag-o-matic
diff --git a/eclass/ruby-fakegem.eclass b/eclass/ruby-fakegem.eclass
index 04099a82ef4f..eb6257a50cf9 100644
--- a/eclass/ruby-fakegem.eclass
+++ b/eclass/ruby-fakegem.eclass
@@ -8,13 +8,21 @@
# Author: Diego E. Pettenò <flameeyes@gentoo.org>
# Author: Alex Legler <a3li@gentoo.org>
# Author: Hans de Graaff <graaff@gentoo.org>
-# @SUPPORTED_EAPIS: 5 6 7 8
+# @SUPPORTED_EAPIS: 7 8
# @PROVIDES: ruby-ng
# @BLURB: An eclass for installing Ruby packages to behave like RubyGems.
# @DESCRIPTION:
# This eclass allows to install arbitrary Ruby libraries (including Gems),
# providing integration into the RubyGems system even for "regular" packages.
+if [[ -z ${_RUBY_FAKEGEM_ECLASS} ]]; then
+_RUBY_FAKEGEM_ECLASS=1
+
+case ${EAPI} in
+ 7|8) ;;
+ *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
+esac
+
inherit ruby-ng
# @ECLASS_VARIABLE: RUBY_FAKEGEM_NAME
@@ -61,14 +69,7 @@ RUBY_FAKEGEM_TASK_TEST="${RUBY_FAKEGEM_TASK_TEST-test}"
# - rdoc (calls `rdoc-2`, adds dev-ruby/rdoc to the dependencies);
# - yard (calls `yard`, adds dev-ruby/yard to the dependencies);
# - none
-case ${EAPI} in
- 5|6)
- RUBY_FAKEGEM_RECIPE_DOC="${RUBY_FAKEGEM_RECIPE_DOC-rake}"
- ;;
- *)
- RUBY_FAKEGEM_RECIPE_DOC="${RUBY_FAKEGEM_RECIPE_DOC-rdoc}"
- ;;
-esac
+: "${RUBY_FAKEGEM_RECIPE_DOC=rdoc}"
# @ECLASS_VARIABLE: RUBY_FAKEGEM_DOCDIR
# @DEFAULT_UNSET
@@ -138,15 +139,6 @@ RUBY_FAKEGEM_BINDIR="${RUBY_FAKEGEM_BINDIR-bin}"
# legacy way to install extensions for a long time.
RUBY_FAKEGEM_EXTENSION_LIBDIR="${RUBY_FAKEGEM_EXTENSION_LIBDIR-lib}"
-case ${EAPI} in
- 6)
- ewarn "${CATEGORY}/${PF}: ebuild uses ${ECLASS} with deprecated EAPI ${EAPI}!"
- ewarn "${CATEGORY}/${PF}: Support will be removed on 2024-10-08. Please port to newer EAPI."
- ;;
- 7|8) ;;
- *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
-esac
-
RUBY_FAKEGEM_SUFFIX="${RUBY_FAKEGEM_SUFFIX:-}"
@@ -215,13 +207,7 @@ SRC_URI="https://rubygems.org/gems/${RUBY_FAKEGEM_NAME}-${RUBY_FAKEGEM_VERSION}$
ruby_add_bdepend "virtual/rubygems"
ruby_add_rdepend virtual/rubygems
-case ${EAPI} in
- 5|6)
- ;;
- *)
- ruby_add_depend virtual/rubygems
- ;;
-esac
+ruby_add_depend virtual/rubygems
# Many (but not all) extensions use pkgconfig in src_configure.
if [[ ${#RUBY_FAKEGEM_EXTENSIONS[@]} -gt 0 ]]; then
@@ -234,7 +220,7 @@ fi
# This function returns the gems data directory for the ruby
# implementation in question.
ruby_fakegem_gemsdir() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
local _gemsitedir=$(ruby_rbconfig_value 'sitelibdir')
_gemsitedir=${_gemsitedir//site_ruby/gems}
@@ -253,12 +239,12 @@ ruby_fakegem_gemsdir() {
# @DESCRIPTION:
# Installs the specified file(s) into the gems directory.
ruby_fakegem_doins() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
(
insinto $(ruby_fakegem_gemsdir)/gems/${RUBY_FAKEGEM_NAME}-${RUBY_FAKEGEM_VERSION}
doins "$@"
- ) || die "failed $0 $@"
+ )
}
# @FUNCTION: ruby_fakegem_newins
@@ -266,7 +252,7 @@ ruby_fakegem_doins() {
# @DESCRIPTION:
# Installs the specified file into the gems directory using the provided filename.
ruby_fakegem_newins() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
(
# Since newins does not accept full paths but just basenames
@@ -278,7 +264,7 @@ ruby_fakegem_newins() {
insinto $(ruby_fakegem_gemsdir)/gems/${RUBY_FAKEGEM_NAME}-${RUBY_FAKEGEM_VERSION}${newdirname}
newins "$1" ${newbasename}
- ) || die "failed $0 $@"
+ )
}
# @FUNCTION: ruby_fakegem_install_gemspec
@@ -287,7 +273,7 @@ ruby_fakegem_newins() {
# by the RUBY_FAKEGEM_GEMSPEC variable, or generate one using
# ruby_fakegem_genspec.
ruby_fakegem_install_gemspec() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
local gemspec="${T}"/${RUBY_FAKEGEM_NAME}-${_ruby_implementation}
@@ -303,7 +289,7 @@ ruby_fakegem_install_gemspec() {
ruby_fakegem_genspec ${gemspec}
fi
fi
- ) || die "Unable to generate gemspec file."
+ )
insinto $(ruby_fakegem_gemsdir)/specifications
newins ${gemspec} ${RUBY_FAKEGEM_NAME}-${RUBY_FAKEGEM_VERSION}.gemspec || die "Unable to install gemspec file."
@@ -316,7 +302,7 @@ ruby_fakegem_install_gemspec() {
# RUBY_FAKEGEM_GEMSPEC. This file is eval'ed to produce a final specification
# in a way similar to packaging the gemspec file.
ruby_fakegem_gemspec_gemspec() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
${RUBY} --disable=did_you_mean -e "puts eval(File::open('$1').read).to_ruby" > $2
}
@@ -328,7 +314,7 @@ ruby_fakegem_gemspec_gemspec() {
# the metadata distributed by the gem itself. This is similar to how
# rubygems creates an installation from a .gem file.
ruby_fakegem_metadata_gemspec() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
${RUBY} --disable=did_you_mean -r yaml -e "puts Gem::Specification.from_yaml(File::open('$1', :encoding => 'UTF-8').read).to_ruby" > $2
}
@@ -347,16 +333,11 @@ ruby_fakegem_metadata_gemspec() {
# See RUBY_FAKEGEM_NAME and RUBY_FAKEGEM_VERSION for setting name and version.
# See RUBY_FAKEGEM_REQUIRE_PATHS for setting extra require paths.
ruby_fakegem_genspec() {
- debug-print-function ${FUNCNAME} "${@}"
-
- case ${EAPI} in
- 5|6) ;;
- *)
- eqawarn "Generating generic fallback gemspec *without* dependencies"
- eqawarn "This will only work when there are no runtime dependencies"
- eqawarn "Set RUBY_FAKEGEM_GEMSPEC to generate a proper specifications file"
- ;;
- esac
+ debug-print-function ${FUNCNAME} "$@"
+
+ eqawarn "Generating generic fallback gemspec *without* dependencies"
+ eqawarn "This will only work when there are no runtime dependencies"
+ eqawarn "Set RUBY_FAKEGEM_GEMSPEC to generate a proper specifications file"
local required_paths="'lib'"
for path in ${RUBY_FAKEGEM_REQUIRE_PATHS}; do
@@ -388,7 +369,7 @@ EOF
# to inject additional ruby code into the wrapper. This may be useful to
# e.g. force a specific version using the gem command.
ruby_fakegem_binwrapper() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
(
local gembinary=$1
@@ -434,14 +415,14 @@ EOF
exeinto ${binpath:-/usr/bin}
newexe "${T}"/gembin-wrapper-${gembinary} $(basename $newbinary)
- ) || die "Unable to create fakegem wrapper"
+ )
}
# @FUNCTION: each_fakegem_configure
# @DESCRIPTION:
# Configure extensions defined in RUBY_FAKEGEM_EXTENSIONS, if any.
each_fakegem_configure() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
tc-export PKG_CONFIG
for extension in "${RUBY_FAKEGEM_EXTENSIONS[@]}" ; do
@@ -453,7 +434,7 @@ each_fakegem_configure() {
# @DESCRIPTION:
# Run each_fakegem_configure for each ruby target
each_ruby_configure() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
each_fakegem_configure
}
@@ -463,7 +444,7 @@ each_ruby_configure() {
# Build documentation for the package if indicated by the doc USE flag
# and if there is a documentation task defined.
all_fakegem_compile() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
if [[ -n ${RUBY_FAKEGEM_DOCDIR} ]] && use doc; then
case ${RUBY_FAKEGEM_RECIPE_DOC} in
@@ -485,7 +466,7 @@ all_fakegem_compile() {
# @DESCRIPTION:
# Compile extensions defined in RUBY_FAKEGEM_EXTENSIONS, if any.
each_fakegem_compile() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
for extension in "${RUBY_FAKEGEM_EXTENSIONS[@]}" ; do
emake V=1 -C ${extension%/*}
@@ -498,7 +479,7 @@ each_fakegem_compile() {
# @DESCRIPTION:
# Run each_fakegem_compile for each ruby target
each_ruby_compile() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
each_fakegem_compile
}
@@ -507,7 +488,7 @@ each_ruby_compile() {
# @DESCRIPTION:
# Unpack the source archive, including support for unpacking gems.
all_ruby_unpack() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
# Special support for extracting .gem files; the file need to be
# extracted twice and the mtime from the archive _has_ to be
@@ -552,7 +533,7 @@ all_ruby_unpack() {
# @DESCRIPTION:
# Compile the package.
all_ruby_compile() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
all_fakegem_compile
}
@@ -561,7 +542,7 @@ all_ruby_compile() {
# @DESCRIPTION:
# Run tests for the package for each ruby target if the test task is defined.
each_fakegem_test() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
case ${RUBY_FAKEGEM_RECIPE_TEST} in
rake)
@@ -603,7 +584,7 @@ fi
# installed. This is normally done as part of the extension
# installation, but may be useful when we handle extensions manually.
ruby_fakegem_extensions_installed() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
mkdir -p "${ED}$(ruby_fakegem_extensionsdir)" || die
touch "${ED}$(ruby_fakegem_extensionsdir)/gem.build_complete" || die
@@ -614,7 +595,7 @@ ruby_fakegem_extensions_installed() {
# The directory where rubygems expects extensions for this package
# version.
ruby_fakegem_extensionsdir() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
# Using formula from ruby src/lib/rubygems/basic_specification.
extensions_dir=$(${RUBY} --disable=did_you_mean -e "puts File.join('extensions', Gem::Platform.local.to_s, Gem.extension_api_version)")
@@ -626,7 +607,7 @@ ruby_fakegem_extensionsdir() {
# @DESCRIPTION:
# Install the package for each ruby target.
each_fakegem_install() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
ruby_fakegem_install_gemspec
@@ -653,7 +634,7 @@ each_fakegem_install() {
# @DESCRIPTION:
# Install the package for each target.
each_ruby_install() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
each_fakegem_install
}
@@ -662,7 +643,7 @@ each_ruby_install() {
# @DESCRIPTION:
# Install files common to all ruby targets.
all_fakegem_install() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
if [[ -n ${RUBY_FAKEGEM_DOCDIR} ]] && use doc; then
for dir in ${RUBY_FAKEGEM_DOCDIR}; do
@@ -697,7 +678,9 @@ all_fakegem_install() {
# @DESCRIPTION:
# Install files common to all ruby targets.
all_ruby_install() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
all_fakegem_install
}
+
+fi
diff --git a/eclass/ruby-ng-gnome2.eclass b/eclass/ruby-ng-gnome2.eclass
index c38c5f15904d..d268e4bd742d 100644
--- a/eclass/ruby-ng-gnome2.eclass
+++ b/eclass/ruby-ng-gnome2.eclass
@@ -18,7 +18,7 @@ case ${EAPI} in
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
-if [[ ! ${_RUBY_NG_GNOME2_ECLASS} ]]; then
+if [[ -z ${_RUBY_NG_GNOME2_ECLASS} ]]; then
_RUBY_NG_GNOME2_ECLASS=1
RUBY_FAKEGEM_NAME="${RUBY_FAKEGEM_NAME:-${PN#ruby-}}"
@@ -76,7 +76,7 @@ all_ruby_prepare() {
# @DESCRIPTION:
# Run the configure script in the subbinding for each specific ruby target.
each_ruby_configure() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
[[ -e extconf.rb ]] || return
@@ -87,7 +87,7 @@ each_ruby_configure() {
# @DESCRIPTION:
# Compile the C bindings in the subbinding for each specific ruby target.
each_ruby_compile() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
[[ -e Makefile ]] || return
@@ -107,7 +107,7 @@ each_ruby_compile() {
# @DESCRIPTION:
# Install the files in the subbinding for each specific ruby target.
each_ruby_install() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
if [[ -e Makefile ]]; then
# Create the directories, or the package will create them as files.
@@ -124,7 +124,7 @@ each_ruby_install() {
# @DESCRIPTION:
# Install the files common to all ruby targets.
all_ruby_install() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
for doc in ../AUTHORS ../NEWS ChangeLog README; do
[[ -s ${doc} ]] && dodoc $doc
@@ -141,7 +141,7 @@ all_ruby_install() {
# @DESCRIPTION:
# Run the tests for this package.
each_ruby_test() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
[[ -e test/run-test.rb ]] || return
diff --git a/eclass/ruby-ng.eclass b/eclass/ruby-ng.eclass
index 2ef6d2247435..f3745b5d3eab 100644
--- a/eclass/ruby-ng.eclass
+++ b/eclass/ruby-ng.eclass
@@ -8,7 +8,7 @@
# Author: Diego E. Pettenò <flameeyes@gentoo.org>
# Author: Alex Legler <a3li@gentoo.org>
# Author: Hans de Graaff <graaff@gentoo.org>
-# @SUPPORTED_EAPIS: 6 7 8
+# @SUPPORTED_EAPIS: 7 8
# @BLURB: An eclass for installing Ruby packages with proper support for multiple Ruby slots.
# @DESCRIPTION:
# The Ruby eclass is designed to allow an easier installation of Ruby packages
@@ -66,19 +66,14 @@
# (e.g. selenium's firefox driver extension). When set this argument is
# passed to "grep -E" to remove reporting of these shared objects.
+if [[ -z ${_RUBY_NG_ECLASS} ]]; then
+_RUBY_NG_ECLASS=1
+
case ${EAPI} in
- 6)
- ewarn "${CATEGORY}/${PF}: ebuild uses ${ECLASS} with deprecated EAPI ${EAPI}!"
- ewarn "${CATEGORY}/${PF}: Support will be removed on 2024-10-08. Please port to newer EAPI."
- ;;
7|8) ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
-if [[ -z ${_RUBY_NG_ECLASS} ]]; then
-_RUBY_NG_ECLASS=1
-
-[[ ${EAPI} == 6 ]] && inherit eqawarn toolchain-funcs
inherit multilib ruby-utils
# S is no longer automatically assigned when it doesn't exist.
@@ -95,7 +90,7 @@ S="${WORKDIR}"
# Set `comparator' and `version' to include a comparator (=, >=, etc.) and a
# version string to the returned string
ruby_implementation_depend() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
_ruby_implementation_depend $1
}
@@ -137,7 +132,7 @@ _ruby_get_all_impls() {
# ruby_add_bdepend(), but may also be useful in an ebuild to specify
# more complex dependencies.
ruby_samelib() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
_ruby_set_globals_invalidate_if_stale
@@ -156,7 +151,7 @@ ruby_samelib() {
# Not all implementations have the same command basename as the
# target; This function translate between the two
ruby_implementation_command() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
local _ruby_name=$1
@@ -217,21 +212,12 @@ _ruby_wrap_conditions() {
# Note: runtime dependencies are also added as build-time test
# dependencies.
ruby_add_rdepend() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
case $# in
1) ;;
2)
- case ${EAPI} in
- 6)
- [[ "${GENTOO_DEV}" == "yes" ]] && eqawarn "You can now use the usual syntax in ruby_add_rdepend for $CATEGORY/$PF"
- ruby_add_rdepend "$(_ruby_wrap_conditions "$1" "$2")"
- return
- ;;
- *)
- die "Use the usual depend syntax with a single argument in ruby_add_rdepend"
- ;;
- esac
+ die "Use the usual depend syntax with a single argument in ruby_add_rdepend"
;;
*)
die "bad number of arguments to $0"
@@ -245,10 +231,7 @@ ruby_add_rdepend() {
# Add the dependency as a test-dependency since we're going to
# execute the code during test phase.
- case ${EAPI} in
- 6) DEPEND+=" test? ( ${_RUBY_ATOMS_SAMELIB_RESULT} )" ;;
- *) BDEPEND+=" test? ( ${_RUBY_ATOMS_SAMELIB_RESULT} )" ;;
- esac
+ BDEPEND+=" test? ( ${_RUBY_ATOMS_SAMELIB_RESULT} )"
if ! has test "$IUSE"; then
IUSE+=" test"
RESTRICT+=" !test? ( test )"
@@ -258,28 +241,19 @@ ruby_add_rdepend() {
# @FUNCTION: ruby_add_bdepend
# @USAGE: dependencies
# @DESCRIPTION:
-# Adds the specified dependencies, with use condition(s) to DEPEND (or
-# BDEPEND in EAPI7), taking the current set of ruby targets into
+# Adds the specified dependencies, with use condition(s) to BDEPEND,
+# taking the current set of ruby targets into
# account. This makes sure that all ruby dependencies of the package are
# installed for the same ruby targets. Use this function for all ruby
# dependencies instead of setting DEPEND or BDEPEND yourself. The list
# of atoms uses the same syntax as normal dependencies.
ruby_add_bdepend() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
case $# in
1) ;;
2)
- case ${EAPI} in
- 6)
- [[ "${GENTOO_DEV}" == "yes" ]] && eqawarn "You can now use the usual syntax in ruby_add_bdepend for $CATEGORY/$PF"
- ruby_add_bdepend "$(_ruby_wrap_conditions "$1" "$2")"
- return
- ;;
- *)
- die "Use the usual depend syntax with a single argument in ruby_add_bdepend"
- ;;
- esac
+ die "Use the usual depend syntax with a single argument in ruby_add_bdepend"
;;
*)
die "bad number of arguments to $0"
@@ -289,24 +263,15 @@ ruby_add_bdepend() {
_ruby_set_globals_invalidate_if_stale
_ruby_atoms_samelib "$1"
- case ${EAPI} in
- 6) DEPEND+=" ${_RUBY_ATOMS_SAMELIB_RESULT}" ;;
- *) BDEPEND+=" ${_RUBY_ATOMS_SAMELIB_RESULT}" ;;
- esac
+ BDEPEND+=" ${_RUBY_ATOMS_SAMELIB_RESULT}"
}
# @FUNCTION: ruby_add_depend
# @USAGE: dependencies
# @DESCRIPTION:
-# Adds the specified dependencies to DEPEND in EAPI7, similar to
-# ruby_add_bdepend.
+# Adds the specified dependencies to DEPEND, similar to ruby_add_bdepend.
ruby_add_depend() {
- debug-print-function ${FUNCNAME} "${@}"
-
- case ${EAPI} in
- 6) die "only available in EAPI 7 and newer" ;;
- *) ;;
- esac
+ debug-print-function ${FUNCNAME} "$@"
case $# in
1) ;;
@@ -323,7 +288,7 @@ ruby_add_depend() {
# @DESCRIPTION:
# Gets an array of ruby use targets enabled by the user
ruby_get_use_implementations() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
_ruby_set_globals_invalidate_if_stale
@@ -338,7 +303,7 @@ ruby_get_use_implementations() {
# @DESCRIPTION:
# Gets an array of ruby use targets that the ebuild sets
ruby_get_use_targets() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
_ruby_set_globals_invalidate_if_stale
_ruby_get_use_targets
@@ -351,7 +316,7 @@ ruby_get_use_targets() {
# Gets an array of ruby use targets that the ebuild sets
_RUBY_GET_USE_TARGETS=""
_ruby_get_use_targets() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
_ruby_set_globals_invalidate_if_stale
@@ -369,7 +334,7 @@ _ruby_get_use_targets() {
# confuse this function with ruby_implementation_depend().
#
# @EXAMPLE:
-# EAPI=7
+# EAPI=8
# RUBY_OPTIONAL=yes
#
# inherit ruby-ng
@@ -378,7 +343,7 @@ _ruby_get_use_targets() {
# RDEPEND="${DEPEND}"
_RUBY_IMPLEMENTATIONS_DEPEND=""
ruby_implementations_depend() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
_ruby_set_globals_invalidate_if_stale
_ruby_implementations_depend
@@ -421,10 +386,7 @@ if [[ ${RUBY_OPTIONAL} != yes ]]; then
DEPEND+=" ${_RUBY_IMPLEMENTATIONS_DEPEND}"
RDEPEND+=" ${_RUBY_IMPLEMENTATIONS_DEPEND}"
REQUIRED_USE+=" || ( ${_RUBY_GET_USE_TARGETS} )"
- case ${EAPI} in
- 6) ;;
- *) BDEPEND+=" ${_RUBY_IMPLEMENTATIONS_DEPEND}" ;;
- esac
+ BDEPEND+=" ${_RUBY_IMPLEMENTATIONS_DEPEND}"
fi
_ruby_invoke_environment() {
@@ -510,7 +472,7 @@ _ruby_each_implementation() {
# @DESCRIPTION:
# Check whether at least one ruby target implementation is present.
ruby-ng_pkg_setup() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
# This only checks that at least one implementation is present
# before doing anything; by leaving the parameters empty we know
@@ -522,7 +484,7 @@ ruby-ng_pkg_setup() {
# @DESCRIPTION:
# Unpack the source archive.
ruby-ng_src_unpack() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
mkdir "${WORKDIR}"/all
pushd "${WORKDIR}"/all &>/dev/null || die
@@ -538,18 +500,9 @@ ruby-ng_src_unpack() {
}
_ruby_apply_patches() {
- case ${EAPI} in
- 6)
- if [[ -n ${RUBY_PATCHES[@]} ]]; then
- eqawarn "RUBY_PATCHES is no longer supported, use PATCHES instead"
- fi
- ;;
- *)
- if [[ -n ${RUBY_PATCHES[@]} ]]; then
- die "RUBY_PATCHES is no longer supported, use PATCHES instead"
- fi
- ;;
- esac
+ if [[ -n ${RUBY_PATCHES[@]} ]]; then
+ die "RUBY_PATCHES is no longer supported, use PATCHES instead"
+ fi
# This is a special case: instead of executing just in the special
# "all" environment, this will actually copy the effects on _all_
@@ -569,7 +522,7 @@ _ruby_source_copy() {
# Apply patches and prepare versions for each ruby target
# implementation. Also carry out common clean up tasks.
ruby-ng_src_prepare() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
# Way too many Ruby packages are prepared on OSX without removing
# the extra data forks, we do it here to avoid repeating it for
@@ -593,7 +546,7 @@ ruby-ng_src_prepare() {
# @DESCRIPTION:
# Configure the package.
ruby-ng_src_configure() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
if type each_ruby_configure &>/dev/null; then
_ruby_each_implementation each_ruby_configure
@@ -607,7 +560,7 @@ ruby-ng_src_configure() {
# @DESCRIPTION:
# Compile the package.
ruby-ng_src_compile() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
if type each_ruby_compile &>/dev/null; then
_ruby_each_implementation each_ruby_compile
@@ -621,7 +574,7 @@ ruby-ng_src_compile() {
# @DESCRIPTION:
# Run tests for the package.
ruby-ng_src_test() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
if type each_ruby_test &>/dev/null; then
_ruby_each_implementation each_ruby_test
@@ -664,7 +617,7 @@ _each_ruby_check_install() {
# @DESCRIPTION:
# Install the package for each ruby target implementation.
ruby-ng_src_install() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
if type each_ruby_install &>/dev/null; then
_ruby_each_implementation each_ruby_install
@@ -681,7 +634,7 @@ ruby-ng_src_install() {
# @USAGE: rbconfig item
# @RETURN: Returns the value of the given rbconfig item of the Ruby interpreter in ${RUBY}.
ruby_rbconfig_value() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
echo $(${RUBY} --disable=did_you_mean -rrbconfig -e "puts RbConfig::CONFIG['$1']" || die "Could not read ruby configuration for '${1}'")
}
@@ -691,7 +644,7 @@ ruby_rbconfig_value() {
# @DESCRIPTION:
# Installs the specified file(s) into the sitelibdir of the Ruby interpreter in ${RUBY}.
doruby() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
[[ -z ${RUBY} ]] && die "\$RUBY is not set"
( # don't want to pollute calling env
@@ -699,13 +652,13 @@ doruby() {
insinto "${sitelibdir#${EPREFIX}}"
insopts -m 0644
doins "$@"
- ) || die "failed to install $@"
+ )
}
# @FUNCTION: ruby_get_libruby
# @RETURN: The location of libruby*.so belonging to the Ruby interpreter in ${RUBY}.
ruby_get_libruby() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
${RUBY} -rrbconfig -e 'puts File.join(RbConfig::CONFIG["libdir"], RbConfig::CONFIG["LIBRUBY"])'
}
@@ -713,7 +666,7 @@ ruby_get_libruby() {
# @FUNCTION: ruby_get_hdrdir
# @RETURN: The location of the header files belonging to the Ruby interpreter in ${RUBY}.
ruby_get_hdrdir() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
local rubyhdrdir=$(ruby_rbconfig_value 'rubyhdrdir')
@@ -727,7 +680,7 @@ ruby_get_hdrdir() {
# @FUNCTION: ruby_get_version
# @RETURN: The version of the Ruby interpreter in ${RUBY}, or what 'ruby' points to.
ruby_get_version() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
local ruby=${RUBY:-$(type -p ruby 2>/dev/null)}
@@ -737,7 +690,7 @@ ruby_get_version() {
# @FUNCTION: ruby_get_implementation
# @RETURN: The implementation of the Ruby interpreter in ${RUBY}, or what 'ruby' points to.
ruby_get_implementation() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
local ruby=${RUBY:-$(type -p ruby 2>/dev/null)}
@@ -760,7 +713,7 @@ ruby_get_implementation() {
# rspec version that must be executed. It defaults to 2 for historical
# compatibility.
ruby-ng_rspec() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
local version=${RSPEC_VERSION-2}
local files="$@"
@@ -802,7 +755,7 @@ ruby-ng_rspec() {
# This is simply a wrapper around the cucumber command (executed by $RUBY})
# which also respects TEST_VERBOSE and NOCOLOR environment variables.
ruby-ng_cucumber() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
if [[ "${DEPEND}${BDEPEND}" != *"dev-util/cucumber"* ]]; then
ewarn "Missing test dependency dev-util/cucumber"
@@ -835,7 +788,7 @@ ruby-ng_cucumber() {
# This is simply a wrapper around the sus-parallel command (executed by $RUBY})
# which also respects TEST_VERBOSE and NOCOLOR environment variables.
ruby-ng_sus() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
if [[ "${DEPEND}${BDEPEND}" != *"dev-ruby/sus"* ]]; then
ewarn "Missing test dependency dev-ruby/sus"
@@ -863,7 +816,7 @@ ruby-ng_sus() {
# their script and we installed a broken wrapper for a while.
# This also respects TEST_VERBOSE and NOCOLOR environment variables.
ruby-ng_testrb-2() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
if [[ "${DEPEND}${BDEPEND}" != *"dev-ruby/test-unit"* ]]; then
ewarn "Missing test dependency dev-ruby/test-unit"
diff --git a/eclass/ruby-single.eclass b/eclass/ruby-single.eclass
index effdbd3e96a0..10d15c6d19f6 100644
--- a/eclass/ruby-single.eclass
+++ b/eclass/ruby-single.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: ruby-single.eclass
@@ -28,7 +28,7 @@ case ${EAPI} in
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
-if [[ ! ${_RUBY_SINGLE_ECLASS} ]]; then
+if [[ -z ${_RUBY_SINGLE_ECLASS} ]]; then
_RUBY_SINGLE_ECLASS=1
inherit ruby-utils
diff --git a/eclass/ruby-utils.eclass b/eclass/ruby-utils.eclass
index 81bda3abfb36..29b9ab396b87 100644
--- a/eclass/ruby-utils.eclass
+++ b/eclass/ruby-utils.eclass
@@ -6,7 +6,7 @@
# Ruby team <ruby@gentoo.org>
# @AUTHOR:
# Author: Hans de Graaff <graaff@gentoo.org>
-# @SUPPORTED_EAPIS: 5 6 7 8
+# @SUPPORTED_EAPIS: 7 8
# @BLURB: An eclass for supporting ruby scripts and bindings in non-ruby packages
# @DESCRIPTION:
# The ruby-utils eclass is designed to allow an easier installation of
@@ -15,13 +15,10 @@
# This eclass does not set any metadata variables nor export any phase
# functions. It can be inherited safely.
-if [[ ! ${_RUBY_UTILS} ]]; then
+if [[ -z ${_RUBY_UTILS_ECLASS} ]] ; then
+_RUBY_UTILS_ECLASS=1
case ${EAPI} in
- 5|6)
- ewarn "${CATEGORY}/${PF}: ebuild uses ${ECLASS} with deprecated EAPI ${EAPI}!"
- ewarn "${CATEGORY}/${PF}: Support will be removed on 2024-10-08. Please port to newer EAPI."
- ;;
7|8) ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
@@ -68,5 +65,4 @@ _ruby_implementation_depend() {
echo "$2${rubypn}$3${rubyslot}"
}
-_RUBY_UTILS=1
fi
diff --git a/eclass/scons-utils.eclass b/eclass/scons-utils.eclass
index b8663d34b1a2..4f5e6962f43e 100644
--- a/eclass/scons-utils.eclass
+++ b/eclass/scons-utils.eclass
@@ -132,7 +132,7 @@ fi
escons() {
local ret
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
if [[ ! ${EPYTHON} ]]; then
eerror "EPYTHON is unset while calling escons. This most likely means that"
diff --git a/eclass/secureboot.eclass b/eclass/secureboot.eclass
index 4459b0341845..52a7a636ddd2 100644
--- a/eclass/secureboot.eclass
+++ b/eclass/secureboot.eclass
@@ -74,7 +74,7 @@ _SECUREBOOT_ECLASS=1
# If USE=secureboot is enabled die if the required user variables are unset
# and die if the keys can't be found.
_secureboot_die_if_unset() {
- debug-print-function ${FUNCNAME[0]} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
use secureboot || return
if [[ -z ${SECUREBOOT_SIGN_KEY} || -z ${SECUREBOOT_SIGN_CERT} ]]; then
@@ -99,7 +99,7 @@ _secureboot_die_if_unset() {
# @DESCRIPTION:
# Checks if required user variables are set before starting the build
secureboot_pkg_setup() {
- debug-print-function ${FUNCNAME[0]} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
use secureboot || return
# If we are merging a binary then the files in this binary
@@ -117,7 +117,7 @@ secureboot_pkg_setup() {
# If no output file is specified the output file will be the same
# as the input file, i.e. the file will be overwritten.
secureboot_sign_efi_file() {
- debug-print-function ${FUNCNAME[0]} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
use secureboot || return
local input_file=${1}
@@ -153,7 +153,7 @@ secureboot_sign_efi_file() {
# By default signed files gain the .signed suffix. If the --in-place
# argument is given the efi files are replaced with a signed version in place.
secureboot_auto_sign() {
- debug-print-function ${FUNCNAME[0]} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
use secureboot || return
[[ ${EBUILD_PHASE} == install ]] ||
diff --git a/eclass/selinux-policy-2.eclass b/eclass/selinux-policy-2.eclass
index e7d6cd9a9e5f..e8b7ef863ad4 100644
--- a/eclass/selinux-policy-2.eclass
+++ b/eclass/selinux-policy-2.eclass
@@ -23,7 +23,7 @@ case ${EAPI} in
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
-if [[ ! ${_SELINUX_POLICY_2_ECLASS} ]]; then
+if [[ -z ${_SELINUX_POLICY_2_ECLASS} ]]; then
_SELINUX_POLICY_2_ECLASS=1
# @ECLASS_VARIABLE: MODS
diff --git a/eclass/shell-completion.eclass b/eclass/shell-completion.eclass
index d582028847b4..caccdee7b19b 100644
--- a/eclass/shell-completion.eclass
+++ b/eclass/shell-completion.eclass
@@ -1,4 +1,4 @@
-# Copyright 2023 Gentoo Authors
+# Copyright 2023-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: shell-completion.eclass
@@ -20,7 +20,7 @@ case ${EAPI} in
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported"
esac
-if [[ ! ${_SHELL_COMPLETION_ECLASS} ]]; then
+if [[ -z ${_SHELL_COMPLETION_ECLASS} ]]; then
_SHELL_COMPLETION_ECLASS=1
# Extend bash-completion-r1
@@ -43,7 +43,7 @@ _shell-completion_get_zshcompdir() {
# @FUNCTION: get_fishcompdir
# @RETURN: the fish completions directory (with EPREFIX)
get_fishcompdir() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
echo "${EPREFIX}$(_shell-completion_get_fishcompdir)"
}
@@ -51,7 +51,7 @@ get_fishcompdir() {
# @FUNCTION: get_zshcompdir
# @RETURN: the zsh completions directory (with EPREFIX)
get_zshcompdir() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
echo "${EPREFIX}$(_shell-completion_get_zshcompdir)"
}
@@ -61,7 +61,7 @@ get_zshcompdir() {
# @DESCRIPTION:
# Install fish completion files passed as args.
dofishcomp() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
(
insopts -m 0644
@@ -75,7 +75,7 @@ dofishcomp() {
# @DESCRIPTION:
# Install zsh completion files passed as args.
dozshcomp() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
(
insopts -m 0644
@@ -89,7 +89,7 @@ dozshcomp() {
# @DESCRIPTION:
# Install fish file under a new name.
newfishcomp() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
(
insopts -m 0644
@@ -103,7 +103,7 @@ newfishcomp() {
# @DESCRIPTION:
# Install zsh file under a new name.
newzshcomp() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
(
insopts -m 0644
diff --git a/eclass/strip-linguas.eclass b/eclass/strip-linguas.eclass
index b31f414c87c3..355bdcc6cd19 100644
--- a/eclass/strip-linguas.eclass
+++ b/eclass/strip-linguas.eclass
@@ -6,17 +6,13 @@
# Ulrich Müller <ulm@gentoo.org>
# @AUTHOR:
# Mike Frysinger <vapier@gentoo.org>
-# @SUPPORTED_EAPIS: 5 6 7 8
+# @SUPPORTED_EAPIS: 7 8
# @BLURB: convenience function for LINGUAS support
if [[ -z ${_STRIP_LINGUAS_ECLASS} ]]; then
_STRIP_LINGUAS_ECLASS=1
case ${EAPI} in
- 5|6)
- ewarn "${CATEGORY}/${PF}: ebuild uses ${ECLASS} with deprecated EAPI ${EAPI}!"
- ewarn "${CATEGORY}/${PF}: Support will be removed on 2024-10-08. Please port to newer EAPI."
- ;;
7|8) ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
diff --git a/eclass/systemd.eclass b/eclass/systemd.eclass
index a5f0decde1e3..f908ad688d9d 100644
--- a/eclass/systemd.eclass
+++ b/eclass/systemd.eclass
@@ -4,7 +4,7 @@
# @ECLASS: systemd.eclass
# @MAINTAINER:
# systemd@gentoo.org
-# @SUPPORTED_EAPIS: 5 6 7 8
+# @SUPPORTED_EAPIS: 7 8
# @BLURB: helper functions to install systemd units
# @DESCRIPTION:
# This eclass provides a set of functions to install unit files for
@@ -24,22 +24,17 @@
# }
# @CODE
+if [[ -z ${_SYSTEMD_ECLASS} ]]; then
+_SYSTEMD_ECLASS=1
+
case ${EAPI} in
- 6)
- ewarn "${CATEGORY}/${PF}: ebuild uses ${ECLASS} with deprecated EAPI ${EAPI}!"
- ewarn "${CATEGORY}/${PF}: Support will be removed on 2024-10-08. Please port to newer EAPI."
- ;;
7|8) ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
inherit toolchain-funcs
-if [[ ${EAPI} == [56] ]]; then
- DEPEND="virtual/pkgconfig"
-else
- BDEPEND="virtual/pkgconfig"
-fi
+BDEPEND="virtual/pkgconfig"
# @FUNCTION: _systemd_get_dir
# @USAGE: <variable-name> <fallback-directory>
@@ -80,27 +75,18 @@ _systemd_unprefix() {
# ${D}). This function always succeeds, even if systemd is not
# installed.
systemd_get_systemunitdir() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
_systemd_get_dir systemdsystemunitdir /lib/systemd/system
}
-# @FUNCTION: systemd_get_unitdir
-# @DESCRIPTION:
-# Deprecated alias for systemd_get_systemunitdir.
-systemd_get_unitdir() {
- [[ ${EAPI} == 5 ]] || die "${FUNCNAME} is banned in EAPI 6, use systemd_get_systemunitdir instead"
-
- systemd_get_systemunitdir
-}
-
# @FUNCTION: systemd_get_userunitdir
# @DESCRIPTION:
# Output the path for the systemd user unit directory (not including
# ${D}). This function always succeeds, even if systemd is not
# installed.
systemd_get_userunitdir() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
_systemd_get_dir systemduserunitdir /usr/lib/systemd/user
}
@@ -111,7 +97,7 @@ systemd_get_userunitdir() {
# ${D}). This function always succeeds, even if systemd is not
# installed.
systemd_get_utildir() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
_systemd_get_dir systemdutildir /lib/systemd
}
@@ -121,7 +107,7 @@ systemd_get_utildir() {
# Output the path for the systemd system generator directory (not including
# ${D}). This function always succeeds, even if systemd is not installed.
systemd_get_systemgeneratordir() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
_systemd_get_dir systemdsystemgeneratordir /lib/systemd/system-generators
}
@@ -131,7 +117,7 @@ systemd_get_systemgeneratordir() {
# Output the path for the systemd system preset directory (not including
# ${D}). This function always succeeds, even if systemd is not installed.
systemd_get_systempresetdir() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
_systemd_get_dir systemdsystempresetdir /lib/systemd/system-preset
}
@@ -140,7 +126,7 @@ systemd_get_systempresetdir() {
# @DESCRIPTION:
# Output the path for the system sleep directory.
systemd_get_sleepdir() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
_systemd_get_dir systemdsleepdir /lib/systemd/system-sleep
}
@@ -149,7 +135,7 @@ systemd_get_sleepdir() {
# @DESCRIPTION:
# Install systemd unit(s). Uses doins, thus it is fatal.
systemd_dounit() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
(
insopts -m 0644
@@ -163,7 +149,7 @@ systemd_dounit() {
# @DESCRIPTION:
# Install systemd unit with a new name. Uses newins, thus it is fatal.
systemd_newunit() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
(
insopts -m 0644
@@ -177,7 +163,7 @@ systemd_newunit() {
# @DESCRIPTION:
# Install systemd user unit(s). Uses doins, thus it is fatal.
systemd_douserunit() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
(
insopts -m 0644
@@ -192,7 +178,7 @@ systemd_douserunit() {
# Install systemd user unit with a new name. Uses newins, thus it
# is fatal.
systemd_newuserunit() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
(
insopts -m 0644
@@ -209,7 +195,7 @@ systemd_newuserunit() {
# <conf-file> with the .conf suffix stripped is used
# (e.g. foo.service.conf -> foo.service.d/00gentoo.conf).
systemd_install_serviced() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
local src=${1}
local service=${2}
@@ -247,7 +233,7 @@ systemd_install_serviced() {
# RestartSec=120
# EOF
systemd_install_dropin() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
local basedir
if [[ $# -ge 1 ]] && [[ $1 == "--user" ]]; then
@@ -279,7 +265,7 @@ systemd_install_dropin() {
# Enable service in desired target, e.g. install a symlink for it.
# Uses dosym, thus it is fatal.
systemd_enable_service() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
[[ ${#} -eq 2 ]] || die "Synopsis: systemd_enable_service target service"
@@ -304,7 +290,7 @@ systemd_enable_service() {
#
# Doc: https://www.freedesktop.org/wiki/Software/systemd/timedated/
systemd_enable_ntpunit() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
if [[ ${#} -lt 2 ]]; then
die "Usage: systemd_enable_ntpunit <NN-name> <service>..."
fi
@@ -339,46 +325,6 @@ systemd_enable_ntpunit() {
return ${ret}
}
-# @FUNCTION: systemd_with_unitdir
-# @USAGE: [<configure-option-name>]
-# @DESCRIPTION:
-# Note: deprecated and banned in EAPI 6. Please use full --with-...=
-# parameter for improved ebuild readability.
-#
-# Output '--with-systemdsystemunitdir' as expected by systemd-aware configure
-# scripts. This function always succeeds. Its output may be quoted in order
-# to preserve whitespace in paths. systemd_to_myeconfargs() is preferred over
-# this function.
-#
-# If upstream does use invalid configure option to handle installing systemd
-# units (e.g. `--with-systemdunitdir'), you can pass the 'suffix' as an optional
-# argument to this function (`$(systemd_with_unitdir systemdunitdir)'). Please
-# remember to report a bug upstream as well.
-systemd_with_unitdir() {
- [[ ${EAPI} == 5 ]] || die "${FUNCNAME} is banned in EAPI ${EAPI}, use --with-${1:-systemdsystemunitdir}=\"\$(systemd_get_systemunitdir)\" instead"
-
- debug-print-function ${FUNCNAME} "${@}"
- local optname=${1:-systemdsystemunitdir}
-
- echo --with-${optname}="$(systemd_get_systemunitdir)"
-}
-
-# @FUNCTION: systemd_with_utildir
-# @DESCRIPTION:
-# Note: deprecated and banned in EAPI 6. Please use full --with-...=
-# parameter for improved ebuild readability.
-#
-# Output '--with-systemdsystemutildir' as used by some packages to install
-# systemd helpers. This function always succeeds. Its output may be quoted
-# in order to preserve whitespace in paths.
-systemd_with_utildir() {
- [[ ${EAPI} == 5 ]] || die "${FUNCNAME} is banned in EAPI ${EAPI}, use --with-systemdutildir=\"\$(systemd_get_utildir)\" instead"
-
- debug-print-function ${FUNCNAME} "${@}"
-
- echo --with-systemdutildir="$(systemd_get_utildir)"
-}
-
# @FUNCTION: systemd_update_catalog
# @DESCRIPTION:
# Update the journald catalog. This needs to be called after installing
@@ -389,7 +335,7 @@ systemd_with_utildir() {
#
# See: https://www.freedesktop.org/wiki/Software/systemd/catalog
systemd_update_catalog() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
[[ ${EBUILD_PHASE} == post* ]] \
|| die "${FUNCNAME} disallowed during ${EBUILD_PHASE_FUNC:-${EBUILD_PHASE}}"
@@ -419,7 +365,7 @@ systemd_update_catalog() {
#
# See: man sd_booted
systemd_is_booted() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
[[ -d /run/systemd/system ]]
local ret=${?}
@@ -448,3 +394,5 @@ systemd_reenable() {
fi
done
}
+
+fi
diff --git a/eclass/tests/versionator_version_compare.sh b/eclass/tests/versionator_version_compare.sh
deleted file mode 100755
index 2875c0f693da..000000000000
--- a/eclass/tests/versionator_version_compare.sh
+++ /dev/null
@@ -1,199 +0,0 @@
-#!/bin/bash
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-source tests-common.sh || exit
-
-inherit versionator
-
-eshopts_push -s extglob
-ver=( "" "lt" "eq" "gt" )
-lt=1 eq=2 gt=3
-
-test_version_compare() {
- tbegin "version_compare ${1} -${ver[${2}]} ${3}"
- version_compare "${1}" "${3}"
- local r=$?
- [[ ${r} -eq ${2} ]]
- tend $? "FAIL: ${@} (got ${r} exp ${2})"
-}
-
-echo "
- 0 $lt 1
- 1 $lt 2
- 2 $gt 1
- 2 $eq 2
- 0 $eq 0
- 10 $lt 20
- 68 $eq 068
- 068 $gt 67
- 068 $lt 69
-
- 1.0 $lt 2.0
- 2.0 $eq 2.0
- 2.0 $gt 1.0
-
- 1.0 $gt 0.0
- 0.0 $eq 0.0
- 0.0 $lt 1.0
-
- 0.1 $lt 0.2
- 0.2 $eq 0.2
- 0.3 $gt 0.2
-
- 1.2 $lt 2.1
- 2.1 $gt 1.2
-
- 1.2.3 $lt 1.2.4
- 1.2.4 $gt 1.2.3
-
- 1.2.0 $gt 1.2
- 1.2.1 $gt 1.2
- 1.2 $lt 1.2.1
-
- 1.2b $eq 1.2b
- 1.2b $lt 1.2c
- 1.2b $gt 1.2a
- 1.2b $gt 1.2
- 1.2 $lt 1.2a
-
- 1.3 $gt 1.2a
- 1.3 $lt 1.3a
-
- 1.0_alpha7 $lt 1.0_beta7
- 1.0_beta $lt 1.0_pre
- 1.0_pre5 $lt 1.0_rc2
- 1.0_rc2 $lt 1.0
-
- 1.0_p1 $gt 1.0
- 1.0_p1-r1 $gt 1.0_p1
-
- 1.0_alpha6-r1 $gt 1.0_alpha6
- 1.0_beta6-r1 $gt 1.0_alpha6-r2
-
- 1.0_pre1 $lt 1.0_p1
-
- 1.0p $gt 1.0_p1
- 1.0r $gt 1.0-r1
- 1.6.15 $gt 1.6.10-r2
- 1.6.10-r2 $lt 1.6.15
-
-" | while read a b c ; do
- [[ -z "${a}${b}${c}" ]] && continue
- test_version_compare "${a}" "${b}" "${c}"
-done
-
-
-for q in "alpha beta pre rc=${lt};${gt}" "p=${gt};${lt}" ; do
- for p in ${q%%=*} ; do
- c=${q##*=}
- alt=${c%%;*} agt=${c##*;}
- test_version_compare "1.0" $agt "1.0_${p}"
- test_version_compare "1.0" $agt "1.0_${p}1"
- test_version_compare "1.0" $agt "1.0_${p}068"
-
- test_version_compare "2.0_${p}" $alt "2.0"
- test_version_compare "2.0_${p}1" $alt "2.0"
- test_version_compare "2.0_${p}068" $alt "2.0"
-
- test_version_compare "1.0_${p}" $eq "1.0_${p}"
- test_version_compare "0.0_${p}" $lt "0.0_${p}1"
- test_version_compare "666_${p}3" $gt "666_${p}"
-
- test_version_compare "1_${p}7" $lt "1_${p}8"
- test_version_compare "1_${p}7" $eq "1_${p}7"
- test_version_compare "1_${p}7" $gt "1_${p}6"
- test_version_compare "1_${p}09" $eq "1_${p}9"
-
- test_version_compare "1_${p}7-r0" $eq "1_${p}7"
- test_version_compare "1_${p}7-r0" $lt "1_${p}7-r1"
- test_version_compare "1_${p}7-r0" $lt "1_${p}7-r01"
- test_version_compare "1_${p}7-r01" $eq "1_${p}7-r1"
- test_version_compare "1_${p}8-r1" $gt "1_${p}7-r100"
-
- test_version_compare "1_${p}_alpha" $lt "1_${p}_beta"
- done
-done
-
-for p in "-r" "_p" ; do
- test_version_compare "7.2${p}1" $lt "7.2${p}2"
- test_version_compare "7.2${p}2" $gt "7.2${p}1"
- test_version_compare "7.2${p}3" $gt "7.2${p}2"
- test_version_compare "7.2${p}2" $lt "7.2${p}3"
-done
-
-# The following tests all come from portage's test cases:
-test_version_compare "6.0" $gt "5.0"
-test_version_compare "5.0" $gt "5"
-test_version_compare "1.0-r1" $gt "1.0-r0"
-test_version_compare "1.0-r1" $gt "1.0"
-test_version_compare "999999999999999999999999999999" $gt "999999999999999999999999999998"
-test_version_compare "1.0.0" $gt "1.0"
-test_version_compare "1.0.0" $gt "1.0b"
-test_version_compare "1b" $gt "1"
-test_version_compare "1b_p1" $gt "1_p1"
-test_version_compare "1.1b" $gt "1.1"
-test_version_compare "12.2.5" $gt "12.2b"
-
-test_version_compare "4.0" $lt "5.0"
-test_version_compare "5" $lt "5.0"
-test_version_compare "1.0_pre2" $lt "1.0_p2"
-test_version_compare "1.0_alpha2" $lt "1.0_p2"
-test_version_compare "1.0_alpha1" $lt "1.0_beta1"
-test_version_compare "1.0_beta3" $lt "1.0_rc3"
-test_version_compare "1.001000000000000000001" $lt "1.001000000000000000002"
-test_version_compare "1.00100000000" $lt "1.0010000000000000001"
-test_version_compare "999999999999999999999999999998" $lt "999999999999999999999999999999"
-test_version_compare "1.01" $lt "1.1"
-test_version_compare "1.0-r0" $lt "1.0-r1"
-test_version_compare "1.0" $lt "1.0-r1"
-test_version_compare "1.0" $lt "1.0.0"
-test_version_compare "1.0b" $lt "1.0.0"
-test_version_compare "1_p1" $lt "1b_p1"
-test_version_compare "1" $lt "1b"
-test_version_compare "1.1" $lt "1.1b"
-test_version_compare "12.2b" $lt "12.2.5"
-
-test_version_compare "4.0" $eq "4.0"
-test_version_compare "1.0" $eq "1.0"
-test_version_compare "1.0-r0" $eq "1.0"
-test_version_compare "1.0" $eq "1.0-r0"
-test_version_compare "1.0-r0" $eq "1.0-r0"
-test_version_compare "1.0-r1" $eq "1.0-r1"
-
-# The following were just tests for != in portage, we need something a bit
-# more precise
-test_version_compare "1" $lt "2"
-test_version_compare "1.0_alpha" $lt "1.0_pre"
-test_version_compare "1.0_beta" $gt "1.0_alpha"
-test_version_compare "0" $lt "0.0"
-test_version_compare "1.0-r0" $lt "1.0-r1"
-test_version_compare "1.0-r1" $gt "1.0-r0"
-test_version_compare "1.0" $lt "1.0-r1"
-test_version_compare "1.0-r1" $gt "1.0"
-test_version_compare "1_p1" $lt "1b_p1"
-test_version_compare "1b" $gt "1"
-test_version_compare "1.1b" $gt "1.1"
-test_version_compare "12.2b" $gt "12.2"
-
-# The following tests all come from paludis's test cases:
-test_version_compare "1.0" $gt "1"
-test_version_compare "1" $lt "1.0"
-test_version_compare "1.0_alpha" $gt "1_alpha"
-test_version_compare "1.0_alpha" $gt "1"
-test_version_compare "1.0_alpha" $lt "1.0"
-test_version_compare "1.2.0.0_alpha7-r4" $gt "1.2_alpha7-r4"
-
-test_version_compare "0001" $eq "1"
-test_version_compare "01" $eq "001"
-test_version_compare "0001.1" $eq "1.1"
-test_version_compare "01.01" $eq "1.01"
-test_version_compare "1.010" $eq "1.01"
-test_version_compare "1.00" $eq "1.0"
-test_version_compare "1.0100" $eq "1.010"
-test_version_compare "1" $eq "1-r0"
-test_version_compare "1-r00" $eq "1-r0"
-
-eshopts_pop
-
-texit
diff --git a/eclass/tmpfiles.eclass b/eclass/tmpfiles.eclass
index 63889a275fef..f543eaf4eb1d 100644
--- a/eclass/tmpfiles.eclass
+++ b/eclass/tmpfiles.eclass
@@ -8,7 +8,7 @@
# @AUTHOR:
# Mike Gilbert <floppym@gentoo.org>
# William Hubbs <williamh@gentoo.org>
-# @SUPPORTED_EAPIS: 5 6 7 8
+# @SUPPORTED_EAPIS: 7 8
# @BLURB: Functions related to tmpfiles.d files
# @DESCRIPTION:
# This eclass provides functionality related to installing and
@@ -32,7 +32,7 @@
# Typical usage of this eclass:
#
# @CODE
-# EAPI=6
+# EAPI=8
# inherit tmpfiles
#
# ...
@@ -56,10 +56,6 @@ if [[ -z ${_TMPFILES_ECLASS} ]]; then
_TMPFILES_ECLASS=1
case ${EAPI} in
- 5|6)
- ewarn "${CATEGORY}/${PF}: ebuild uses ${ECLASS} with deprecated EAPI ${EAPI}!"
- ewarn "${CATEGORY}/${PF}: Support will be removed on 2024-10-08. Please port to newer EAPI."
- ;;
7|8) ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
@@ -80,7 +76,7 @@ fi
# @DESCRIPTION:
# Install one or more tmpfiles.d files into /usr/lib/tmpfiles.d.
dotmpfiles() {
- debug-print-function "${FUNCNAME}" "$@"
+ debug-print-function ${FUNCNAME} "$@"
local f
for f; do
@@ -101,7 +97,7 @@ dotmpfiles() {
# @DESCRIPTION:
# Install a tmpfiles.d file in /usr/lib/tmpfiles.d under a new name.
newtmpfiles() {
- debug-print-function "${FUNCNAME}" "$@"
+ debug-print-function ${FUNCNAME} "$@"
if [[ $2 != *.conf ]]; then
die "tmpfiles.d files must end with .conf"
@@ -120,7 +116,7 @@ newtmpfiles() {
# Call a tmpfiles.d implementation to create new volatile and temporary
# files and directories.
tmpfiles_process() {
- debug-print-function "${FUNCNAME}" "$@"
+ debug-print-function ${FUNCNAME} "$@"
[[ ${EBUILD_PHASE} == postinst ]] || die "${FUNCNAME}: Only valid in pkg_postinst"
[[ ${#} -gt 0 ]] || die "${FUNCNAME}: Must specify at least one filename"
diff --git a/eclass/toolchain-funcs.eclass b/eclass/toolchain-funcs.eclass
index 66819996ea33..478177de141e 100644
--- a/eclass/toolchain-funcs.eclass
+++ b/eclass/toolchain-funcs.eclass
@@ -4,7 +4,7 @@
# @ECLASS: toolchain-funcs.eclass
# @MAINTAINER:
# Toolchain Ninjas <toolchain@gentoo.org>
-# @SUPPORTED_EAPIS: 6 7 8
+# @SUPPORTED_EAPIS: 7 8
# @BLURB: functions to query common info about the toolchain
# @DESCRIPTION:
# The toolchain-funcs aims to provide a complete suite of functions
@@ -17,10 +17,6 @@ if [[ -z ${_TOOLCHAIN_FUNCS_ECLASS} ]]; then
_TOOLCHAIN_FUNCS_ECLASS=1
case ${EAPI} in
- 6)
- ewarn "${CATEGORY}/${PF}: ebuild uses ${ECLASS} with deprecated EAPI ${EAPI}!"
- ewarn "${CATEGORY}/${PF}: Support will be removed on 2024-10-08. Please port to newer EAPI."
- ;;
7|8) ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
@@ -1117,7 +1113,6 @@ gen_usr_ldscript() {
ewarn "${FUNCNAME}: Please migrate to usr-ldscript.eclass"
local lib libdir=$(get_libdir) output_format="" auto=false suffix=$(get_libname)
- [[ -z ${ED+set} ]] && local ED=${D%/}${EPREFIX}/
tc-is-static-only && return
use prefix && return
diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
index 34f595bcd1bc..6bad1def19f4 100644
--- a/eclass/toolchain.eclass
+++ b/eclass/toolchain.eclass
@@ -11,14 +11,14 @@
# GNAT for Ada). If not building GCC itself, please use toolchain-funcs.eclass
# instead.
+if [[ -z ${_TOOLCHAIN_ECLASS} ]]; then
+_TOOLCHAIN_ECLASS=1
+
case ${EAPI} in
7|8) ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
-if [[ -z ${_TOOLCHAIN_ECLASS} ]]; then
-_TOOLCHAIN_ECLASS=1
-
DESCRIPTION="The GNU Compiler Collection"
HOMEPAGE="https://gcc.gnu.org/"
@@ -2647,7 +2647,7 @@ fix_libtool_libdir_paths() {
pushd "${D}" >/dev/null || die
pushd "./${libpath}" >/dev/null || die
- local dir="${PWD#${D%/}}"
+ local dir="${PWD#${D}}"
local allarchives=$(echo *.la)
allarchives="\(${allarchives// /\\|}\)"
popd >/dev/null || die
diff --git a/eclass/tree-sitter-grammar.eclass b/eclass/tree-sitter-grammar.eclass
index 10f29b8a0835..499f1c7259a0 100644
--- a/eclass/tree-sitter-grammar.eclass
+++ b/eclass/tree-sitter-grammar.eclass
@@ -87,7 +87,7 @@ _get_tsg_abi_ver() {
}
tree-sitter-grammar_src_prepare() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
default
@@ -102,7 +102,7 @@ tree-sitter-grammar_src_prepare() {
}
tree-sitter-grammar_src_configure() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
local binding
for binding in "${TS_BINDINGS[@]}"; do
@@ -156,7 +156,7 @@ _tree-sitter-grammar_legacy_compile() {
}
tree-sitter-grammar_src_compile() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
# legacy grammars don't have a pyproject.toml
if [[ -f "${S}/pyproject.toml" ]]; then
@@ -186,13 +186,13 @@ tree-sitter-grammar_src_compile() {
# Runs the Tree Sitter parser's test suite.
# See: https://tree-sitter.github.io/tree-sitter/creating-parsers#command-test
tree-sitter-grammar_src_test() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
tree-sitter test || die "Test suite failed"
}
tree-sitter-grammar_src_install() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
# legacy grammars don't have a pyproject.toml
if [[ -f "${S}/pyproject.toml" ]]; then
diff --git a/eclass/udev.eclass b/eclass/udev.eclass
index 7fd99cbba8b0..9867c68d5836 100644
--- a/eclass/udev.eclass
+++ b/eclass/udev.eclass
@@ -4,7 +4,7 @@
# @ECLASS: udev.eclass
# @MAINTAINER:
# systemd@gentoo.org
-# @SUPPORTED_EAPIS: 5 6 7 8
+# @SUPPORTED_EAPIS: 7 8
# @BLURB: Default eclass for determining udev directories.
# @DESCRIPTION:
# Default eclass for determining udev directories.
@@ -40,21 +40,13 @@ if [[ -z ${_UDEV_ECLASS} ]]; then
_UDEV_ECLASS=1
case ${EAPI} in
- 6)
- ewarn "${CATEGORY}/${PF}: ebuild uses ${ECLASS} with deprecated EAPI ${EAPI}!"
- ewarn "${CATEGORY}/${PF}: Support will be removed on 2024-10-08. Please port to newer EAPI."
- ;;
7|8) ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
inherit toolchain-funcs
-if [[ ${EAPI} == [56] ]]; then
- DEPEND="virtual/pkgconfig"
-else
- BDEPEND="virtual/pkgconfig"
-fi
+BDEPEND="virtual/pkgconfig"
# @FUNCTION: _udev_get_udevdir
# @INTERNAL
@@ -75,7 +67,7 @@ _udev_get_udevdir() {
# @DESCRIPTION:
# Use the short version $(get_udevdir) instead!
udev_get_udevdir() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
eerror "This ebuild should be using the get_udevdir() function instead of the deprecated udev_get_udevdir()"
die "Deprecated function call: udev_get_udevdir(), please report to (overlay) maintainers."
@@ -87,7 +79,7 @@ udev_get_udevdir() {
# This function always succeeds, even if udev is not installed.
# The fallback value is set to /lib/udev
get_udevdir() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
echo "$(_udev_get_udevdir)"
}
@@ -97,7 +89,7 @@ get_udevdir() {
# @DESCRIPTION:
# Install udev rule(s). Uses doins, thus it is fatal.
udev_dorules() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
(
insopts -m 0644
@@ -111,7 +103,7 @@ udev_dorules() {
# @DESCRIPTION:
# Install udev rule with a new name. Uses newins, thus it is fatal.
udev_newrules() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
(
insopts -m 0644
@@ -126,7 +118,7 @@ udev_newrules() {
# Should be called from pkg_postinst and pkg_postrm in packages which install
# udev rules or hwdb data.
udev_reload() {
- if [[ -n ${ROOT%/} ]]; then
+ if [[ -n ${ROOT} ]]; then
return 0
fi
diff --git a/eclass/vcs-clean.eclass b/eclass/vcs-clean.eclass
index 719bdec17676..8558d9998d34 100644
--- a/eclass/vcs-clean.eclass
+++ b/eclass/vcs-clean.eclass
@@ -6,17 +6,13 @@
# base-system@gentoo.org
# @AUTHOR:
# Benedikt Böhm <hollow@gentoo.org>
-# @SUPPORTED_EAPIS: 5 6 7 8
+# @SUPPORTED_EAPIS: 7 8
# @BLURB: helper functions to remove VCS directories
if [[ -z ${_VCS_CLEAN_ECLASS} ]] ; then
_VCS_CLEAN_ECLASS=1
case ${EAPI} in
- 5|6)
- ewarn "${CATEGORY}/${PF}: ebuild uses ${ECLASS} with deprecated EAPI ${EAPI}!"
- ewarn "${CATEGORY}/${PF}: Support will be removed on 2024-10-08. Please port to newer EAPI."
- ;;
7|8) ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
@@ -27,7 +23,7 @@ esac
# Remove CVS directories and .cvs* files recursively. Useful when a
# source tarball contains internal CVS directories. Defaults to ${PWD}.
ecvs_clean() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
[[ $# -eq 0 ]] && set -- .
find "$@" '(' -type d -name 'CVS' -prune -o -type f -name '.cvs*' ')' \
@@ -40,7 +36,7 @@ ecvs_clean() {
# Remove .svn directories recursively. Useful when a source tarball
# contains internal Subversion directories. Defaults to ${PWD}.
esvn_clean() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
[[ $# -eq 0 ]] && set -- .
find "$@" -type d -name '.svn' -prune -exec rm -rf '{}' + || die
@@ -52,7 +48,7 @@ esvn_clean() {
# Remove .git* directories recursively. Useful when a source tarball
# contains internal Git directories. Defaults to ${PWD}.
egit_clean() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
[[ $# -eq 0 ]] && set -- .
find "$@" -type d -name '.git*' -prune -exec rm -rf '{}' + || die
diff --git a/eclass/vcs-snapshot.eclass b/eclass/vcs-snapshot.eclass
index 0279e89ec3ab..998fe348a2ab 100644
--- a/eclass/vcs-snapshot.eclass
+++ b/eclass/vcs-snapshot.eclass
@@ -47,7 +47,7 @@ case ${EAPI} in
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
-if [[ ! ${_VCS_SNAPSHOT_ECLASS} ]]; then
+if [[ -z ${_VCS_SNAPSHOT_ECLASS} ]]; then
_VCS_SNAPSHOT_ECLASS=1
# @FUNCTION: vcs-snapshot_src_unpack
@@ -57,7 +57,7 @@ _VCS_SNAPSHOT_ECLASS=1
# local names. Other archive types will be passed down to regular
# unpack.
vcs-snapshot_src_unpack() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
local renamed_any=
local f
diff --git a/eclass/vdr-plugin-2.eclass b/eclass/vdr-plugin-2.eclass
index dc70ca7c5761..a00426fdad39 100644
--- a/eclass/vdr-plugin-2.eclass
+++ b/eclass/vdr-plugin-2.eclass
@@ -60,14 +60,14 @@
# PO_SUBDIR="bla foo/bla"
# @CODE
+if [[ -z ${_VDR_PLUGIN_2_ECLASS} ]]; then
+_VDR_PLUGIN_2_ECLASS=1
+
case ${EAPI} in
7|8) ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
-if [[ -z ${_VDR_PLUGIN_2_ECLASS} ]]; then
-_VDR_PLUGIN_2_ECLASS=1
-
inherit flag-o-matic strip-linguas toolchain-funcs unpacker
# Name of the plugin stripped from all vdrplugin-, vdr- and -cvs pre- and postfixes
@@ -112,14 +112,14 @@ vdr_create_plugindb_file() {
# EBUILD=${CATEGORY}/${PN}
# EBUILD_V=${PVR}
# EOT
-# obsolet? fix me later...
+# obsolete? fix me later...
{
echo "VDRPLUGIN_DB=1"
echo "CREATOR=ECLASS"
echo "EBUILD=${CATEGORY}/${PN}"
echo "EBUILD_V=${PVR}"
echo "PLUGINS=\"$@\""
- } > "${D%/}/${DB_FILE}"
+ } > "${D}/${DB_FILE}" || die
}
# @FUNCTION: vdr_create_header_checksum_file
@@ -423,7 +423,7 @@ vdr-plugin-2_pkg_setup() {
if [[ -n "${VDR_LOCAL_PATCHES_DIR}" ]]; then
eerror "Using VDR_LOCAL_PATCHES_DIR is deprecated!"
eerror "Please move all your patches into"
- eerror "${EROOT%/}/etc/portage/patches/${CATEGORY}/${P}"
+ eerror "${EROOT}/etc/portage/patches/${CATEGORY}/${P}"
eerror "and remove or unset the VDR_LOCAL_PATCHES_DIR variable."
die
fi
@@ -517,8 +517,7 @@ vdr-plugin-2_src_compile() {
LOCALEDIR="${TMP_LOCALE_DIR}" \
LOCDIR="${TMP_LOCALE_DIR}" \
LIBDIR="${S}" \
- TMPDIR="${T}" \
- || die "emake all failed"
+ TMPDIR="${T}"
;;
esac
@@ -564,8 +563,7 @@ vdr-plugin-2_src_install() {
emake install \
${BUILD_PARAMS} \
TMPDIR="${T}" \
- DESTDIR="${D%/}" \
- || die "emake install (makefile target) failed"
+ DESTDIR="${D}"
else
einfo "Notice: Plugin use still the old Makefile handling"
insinto "${VDR_PLUGIN_DIR}"
@@ -579,12 +577,12 @@ vdr-plugin-2_src_install() {
local linguas
for linguas in ${LINGUAS[*]}; do
insinto "${LOCDIR}"
- cp -r --parents ${linguas}* "${D%/}"/${LOCDIR} \
+ cp -r --parents ${linguas}* "${D}"/${LOCDIR} \
|| die "could not copy linguas files"
done
fi
- cd "${D%/}/usr/$(get_libdir)/vdr/plugins" \
+ cd "${D}/usr/$(get_libdir)/vdr/plugins" \
|| die "could not change to \$D/usr/libdir/vdr/plugins"
# create list of all created plugin libs
diff --git a/eclass/versionator.eclass b/eclass/versionator.eclass
deleted file mode 100644
index 1e491860b6ca..000000000000
--- a/eclass/versionator.eclass
+++ /dev/null
@@ -1,519 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-# @DEAD
-# @ECLASS: versionator.eclass
-# @MAINTAINER:
-# Jonathan Callen <jcallen@gentoo.org>
-# base-system@gentoo.org
-# @SUPPORTED_EAPIS: 0 1 2 3 4 5 6
-# @BLURB: functions which simplify manipulation of ${PV} and similar version strings
-# @DEPRECATED: ver_* functions from EAPI 7
-# @DESCRIPTION:
-# This eclass provides functions which simplify manipulating $PV and similar
-# variables. Most functions default to working with $PV, although other
-# values can be used.
-# @EXAMPLE:
-# Simple Example 1: $PV is 1.2.3b, we want 1_2.3b:
-# MY_PV=$(replace_version_separator 1 '_' )
-#
-# Simple Example 2: $PV is 1.4.5, we want 1:
-# MY_MAJORV=$(get_major_version )
-#
-# Rather than being a number, the index parameter can be a separator character
-# such as '-', '.' or '_'. In this case, the first separator of this kind is
-# selected.
-#
-# There's also:
-# version_is_at_least want have
-# which may be buggy, so use with caution.
-
-if [[ -z ${_VERSIONATOR_ECLASS} ]]; then
-_VERSIONATOR_ECLASS=1
-
-case ${EAPI:-0} in
- 0|1|2|3|4|5|6)
- ;;
- *)
- die "${ECLASS}: banned in EAPI=${EAPI}; use ver_* instead";;
-esac
-
-inherit estack
-
-# @FUNCTION: get_all_version_components
-# @USAGE: [version]
-# @DESCRIPTION:
-# Split up a version string into its component parts. If no parameter is
-# supplied, defaults to $PV.
-# 0.8.3 -> 0 . 8 . 3
-# 7c -> 7 c
-# 3.0_p2 -> 3 . 0 _ p2
-# 20040905 -> 20040905
-# 3.0c-r1 -> 3 . 0 c - r1
-get_all_version_components() {
- eshopts_push -s extglob
- local ver_str=${1:-${PV}} result
- result=()
-
- # sneaky cache trick cache to avoid having to parse the same thing several
- # times.
- if [[ ${VERSIONATOR_CACHE_VER_STR} == ${ver_str} ]] ; then
- echo ${VERSIONATOR_CACHE_RESULT}
- eshopts_pop
- return
- fi
- export VERSIONATOR_CACHE_VER_STR=${ver_str}
-
- while [[ -n $ver_str ]] ; do
- case "${ver_str::1}" in
- # number: parse whilst we have a number
- [[:digit:]])
- result+=("${ver_str%%[^[:digit:]]*}")
- ver_str=${ver_str##+([[:digit:]])}
- ;;
-
- # separator: single character
- [-_.])
- result+=("${ver_str::1}")
- ver_str=${ver_str:1}
- ;;
-
- # letter: grab the letters plus any following numbers
- [[:alpha:]])
- local not_match=${ver_str##+([[:alpha:]])*([[:digit:]])}
- # Can't say "${ver_str::-${#not_match}}" in Bash 3.2
- result+=("${ver_str::${#ver_str} - ${#not_match}}")
- ver_str=${not_match}
- ;;
-
- # huh?
- *)
- result+=("${ver_str::1}")
- ver_str=${ver_str:1}
- ;;
- esac
- done
-
- export VERSIONATOR_CACHE_RESULT=${result[*]}
- echo ${result[@]}
- eshopts_pop
-}
-
-# @FUNCTION: get_version_components
-# @USAGE: [version]
-# @DESCRIPTION:
-# Get the important version components, excluding '.', '-' and '_'. Defaults to
-# $PV if no parameter is supplied.
-# 0.8.3 -> 0 8 3
-# 7c -> 7 c
-# 3.0_p2 -> 3 0 p2
-# 20040905 -> 20040905
-# 3.0c-r1 -> 3 0 c r1
-get_version_components() {
- local c=$(get_all_version_components "${1:-${PV}}")
- echo ${c//[-._]/ }
-}
-
-# @FUNCTION: get_major_version
-# @USAGE: [version]
-# @DESCRIPTION:
-# Get the major version of a value. Defaults to $PV if no parameter is supplied.
-# 0.8.3 -> 0
-# 7c -> 7
-# 3.0_p2 -> 3
-# 20040905 -> 20040905
-# 3.0c-r1 -> 3
-get_major_version() {
- local c=($(get_all_version_components "${1:-${PV}}"))
- echo ${c[0]}
-}
-
-# @FUNCTION: get_version_component_range
-# @USAGE: <range> [version]
-# @DESCRIPTION:
-# Get a particular component or range of components from the version. If no
-# version parameter is supplied, defaults to $PV.
-# 1 1.2.3 -> 1
-# 1-2 1.2.3 -> 1.2
-# 2- 1.2.3 -> 2.3
-get_version_component_range() {
- eshopts_push -s extglob
- local c v="${2:-${PV}}" range="${1}" range_start range_end
- local -i i=-1 j=0
- c=($(get_all_version_components "${v}"))
- range_start=${range%-*}; range_start=${range_start:-1}
- range_end=${range#*-} ; range_end=${range_end:-${#c[@]}}
-
- while ((j < range_start)); do
- i+=1
- ((i > ${#c[@]})) && eshopts_pop && return
- [[ -n "${c[i]//[-._]}" ]] && j+=1
- done
-
- while ((j <= range_end)); do
- echo -n ${c[i]}
- ((i > ${#c[@]})) && eshopts_pop && return
- [[ -n "${c[i]//[-._]}" ]] && j+=1
- i+=1
- done
- eshopts_pop
-}
-
-# @FUNCTION: get_after_major_version
-# @USAGE: [version]
-# @DESCRIPTION:
-# Get everything after the major version and its separator (if present) of a
-# value. Defaults to $PV if no parameter is supplied.
-# 0.8.3 -> 8.3
-# 7c -> c
-# 3.0_p2 -> 0_p2
-# 20040905 -> (empty string)
-# 3.0c-r1 -> 0c-r1
-get_after_major_version() {
- echo $(get_version_component_range 2- "${1:-${PV}}")
-}
-
-# @FUNCTION: replace_version_separator
-# @USAGE: <search> <replacement> [subject]
-# @DESCRIPTION:
-# Replace the $1th separator with $2 in $3 (defaults to $PV if $3 is not
-# supplied). If there are fewer than $1 separators, don't change anything.
-# 1 '_' 1.2.3 -> 1_2.3
-# 2 '_' 1.2.3 -> 1.2_3
-# 1 '_' 1b-2.3 -> 1b_2.3
-# Rather than being a number, $1 can be a separator character such as '-', '.'
-# or '_'. In this case, the first separator of this kind is selected.
-replace_version_separator() {
- eshopts_push -s extglob
- local w c v="${3:-${PV}}"
- declare -i i found=0
- w=${1:-1}
- c=($(get_all_version_components ${v}))
- if [[ ${w} != *[[:digit:]]* ]] ; then
- # it's a character, not an index
- for ((i = 0; i < ${#c[@]}; i++)); do
- if [[ ${c[i]} == ${w} ]]; then
- c[i]=${2}
- break
- fi
- done
- else
- for ((i = 0; i < ${#c[@]}; i++)); do
- if [[ -n "${c[i]//[^-._]}" ]]; then
- found+=1
- if ((found == w)); then
- c[i]=${2}
- break
- fi
- fi
- done
- fi
- c=${c[*]}
- echo ${c// }
- eshopts_pop
-}
-
-# @FUNCTION: replace_all_version_separators
-# @USAGE: <replacement> [subject]
-# @DESCRIPTION:
-# Replace all version separators in $2 (defaults to $PV) with $1.
-# '_' 1b.2.3 -> 1b_2_3
-replace_all_version_separators() {
- local c=($(get_all_version_components "${2:-${PV}}"))
- c=${c[@]//[-._]/$1}
- echo ${c// }
-}
-
-# @FUNCTION: delete_version_separator
-# @USAGE: <search> [subject]
-# @DESCRIPTION:
-# Delete the $1th separator in $2 (defaults to $PV if $2 is not supplied). If
-# there are fewer than $1 separators, don't change anything.
-# 1 1.2.3 -> 12.3
-# 2 1.2.3 -> 1.23
-# 1 1b-2.3 -> 1b2.3
-# Rather than being a number, $1 can be a separator character such as '-', '.'
-# or '_'. In this case, the first separator of this kind is deleted.
-delete_version_separator() {
- replace_version_separator "${1}" "" "${2}"
-}
-
-# @FUNCTION: delete_all_version_separators
-# @USAGE: [subject]
-# @DESCRIPTION:
-# Delete all version separators in $1 (defaults to $PV).
-# 1b.2.3 -> 1b23
-delete_all_version_separators() {
- replace_all_version_separators "" "${1}"
-}
-
-# @FUNCTION: get_version_component_count
-# @USAGE: [version]
-# @DESCRIPTION:
-# How many version components are there in $1 (defaults to $PV)?
-# 1.0.1 -> 3
-# 3.0c-r1 -> 4
-get_version_component_count() {
- local a=($(get_version_components "${1:-${PV}}"))
- echo ${#a[@]}
-}
-
-# @FUNCTION: get_last_version_component_index
-# @USAGE: [version]
-# @DESCRIPTION:
-# What is the index of the last version component in $1 (defaults to $PV)?
-# Equivalent to get_version_component_count - 1.
-# 1.0.1 -> 2
-# 3.0c-r1 -> 3
-get_last_version_component_index() {
- echo $(($(get_version_component_count "${1:-${PV}}" ) - 1))
-}
-
-# @FUNCTION: version_is_at_least
-# @USAGE: <want> [have]
-# @DESCRIPTION:
-# Is $2 (defaults to $PVR) at least version $1? Intended for use in eclasses
-# only. May not be reliable, be sure to do very careful testing before actually
-# using this.
-version_is_at_least() {
- local want_s="$1" have_s="${2:-${PVR}}" r
- version_compare "${want_s}" "${have_s}"
- r=$?
- case $r in
- 1|2)
- return 0
- ;;
- 3)
- return 1
- ;;
- *)
- die "versionator compare bug [atleast, ${want_s}, ${have_s}, ${r}]"
- ;;
- esac
-}
-
-# @FUNCTION: version_compare
-# @USAGE: <A> <B>
-# @DESCRIPTION:
-# Takes two parameters (A, B) which are versions. If A is an earlier version
-# than B, returns 1. If A is identical to B, return 2. If A is later than B,
-# return 3. You probably want version_is_at_least rather than this function.
-# May not be very reliable. Test carefully before using this.
-version_compare() {
- eshopts_push -s extglob
- local ver_a=${1} ver_b=${2} parts_a parts_b
- local cur_tok_a cur_tok_b num_part_a num_part_b
- local -i cur_idx_a=0 cur_idx_b=0 prev_idx_a prev_idx_b
- parts_a=( $(get_all_version_components "${ver_a}" ) )
- parts_b=( $(get_all_version_components "${ver_b}" ) )
-
- ### compare number parts.
- local -i inf_loop=0
- while true; do
- inf_loop+=1
- ((inf_loop > 20)) && \
- die "versionator compare bug [numbers, ${ver_a}, ${ver_b}]"
-
- # Store the current index to test later
- prev_idx_a=cur_idx_a
- prev_idx_b=cur_idx_b
-
- # grab the current number components
- cur_tok_a=${parts_a[cur_idx_a]}
- cur_tok_b=${parts_b[cur_idx_b]}
-
- # number?
- if [[ -n ${cur_tok_a} ]] && [[ -z ${cur_tok_a//[[:digit:]]} ]] ; then
- cur_idx_a+=1
- [[ ${parts_a[cur_idx_a]} == . ]] \
- && cur_idx_a+=1
- else
- cur_tok_a=
- fi
-
- if [[ -n ${cur_tok_b} ]] && [[ -z ${cur_tok_b//[[:digit:]]} ]] ; then
- cur_idx_b+=1
- [[ ${parts_b[cur_idx_b]} == . ]] \
- && cur_idx_b+=1
- else
- cur_tok_b=
- fi
-
- # done with number components?
- [[ -z ${cur_tok_a} && -z ${cur_tok_b} ]] && break
-
- # if a component is blank, then it is the lesser value
- [[ -z ${cur_tok_a} ]] && eshopts_pop && return 1
- [[ -z ${cur_tok_b} ]] && eshopts_pop && return 3
-
- # According to PMS, if we are *not* in the first number part, and either
- # token begins with "0", then we use a different algorithm (that
- # effectively does floating point comparison)
- if (( prev_idx_a != 0 && prev_idx_b != 0 )) \
- && [[ ${cur_tok_a} == 0* || ${cur_tok_b} == 0* ]] ; then
-
- # strip trailing zeros
- cur_tok_a=${cur_tok_a%%+(0)}
- cur_tok_b=${cur_tok_b%%+(0)}
-
- # do a *string* comparison of the resulting values: 2 > 11
- [[ ${cur_tok_a} < ${cur_tok_b} ]] && eshopts_pop && return 1
- [[ ${cur_tok_a} > ${cur_tok_b} ]] && eshopts_pop && return 3
- else
- # to avoid going into octal mode, strip any leading zeros. otherwise
- # bash will throw a hissy fit on versions like 6.3.068.
- cur_tok_a=${cur_tok_a##+(0)}
- cur_tok_b=${cur_tok_b##+(0)}
-
- # now if a component is blank, it was originally 0 -- make it so
- : ${cur_tok_a:=0}
- : ${cur_tok_b:=0}
-
- # compare
- ((cur_tok_a < cur_tok_b)) && eshopts_pop && return 1
- ((cur_tok_a > cur_tok_b)) && eshopts_pop && return 3
- fi
- done
-
- ### number parts equal. compare letter parts.
- local letter_a=
- letter_a=${parts_a[cur_idx_a]}
- if [[ ${#letter_a} -eq 1 && -z ${letter_a/[a-z]} ]] ; then
- cur_idx_a+=1
- else
- letter_a=@
- fi
-
- local letter_b=
- letter_b=${parts_b[cur_idx_b]}
- if [[ ${#letter_b} -eq 1 && -z ${letter_b/[a-z]} ]] ; then
- cur_idx_b+=1
- else
- letter_b=@
- fi
-
- # compare
- [[ ${letter_a} < ${letter_b} ]] && eshopts_pop && return 1
- [[ ${letter_a} > ${letter_b} ]] && eshopts_pop && return 3
-
- ### letter parts equal. compare suffixes in order.
- inf_loop=0
- while true ; do
- inf_loop+=1
- ((inf_loop > 20)) && \
- die "versionator compare bug [numbers, ${ver_a}, ${ver_b}]"
- [[ ${parts_a[cur_idx_a]} == _ ]] && ((cur_idx_a++))
- [[ ${parts_b[cur_idx_b]} == _ ]] && ((cur_idx_b++))
-
- cur_tok_a=${parts_a[cur_idx_a]}
- cur_tok_b=${parts_b[cur_idx_b]}
- num_part_a=0
- num_part_b=0
-
- if has ${cur_tok_a%%+([0-9])} "alpha" "beta" "pre" "rc" "p"; then
- cur_idx_a+=1
- num_part_a=${cur_tok_a##+([a-z])}
- # I don't like octal
- num_part_a=${num_part_a##+(0)}
- : ${num_part_a:=0}
- cur_tok_a=${cur_tok_a%%+([0-9])}
- else
- cur_tok_a=
- fi
-
- if has ${cur_tok_b%%+([0-9])} alpha beta pre rc p; then
- cur_idx_b+=1
- num_part_b=${cur_tok_b##+([a-z])}
- # I still don't like octal
- num_part_b=${num_part_b##+(0)}
- : ${num_part_b:=0}
- cur_tok_b=${cur_tok_b%%+([0-9])}
- else
- cur_tok_b=
- fi
-
- if [[ ${cur_tok_a} != ${cur_tok_b} ]]; then
- local suffix
- for suffix in alpha beta pre rc "" p; do
- [[ ${cur_tok_a} == ${suffix} ]] && eshopts_pop && return 1
- [[ ${cur_tok_b} == ${suffix} ]] && eshopts_pop && return 3
- done
- elif [[ -z ${cur_tok_a} && -z ${cur_tok_b} ]]; then
- break
- else
- ((num_part_a < num_part_b)) && eshopts_pop && return 1
- ((num_part_a > num_part_b)) && eshopts_pop && return 3
- fi
- done
-
- # At this point, the only thing that should be left is the -r# part
- [[ ${parts_a[cur_idx_a]} == - ]] && ((cur_idx_a++))
- [[ ${parts_b[cur_idx_b]} == - ]] && ((cur_idx_b++))
-
- # Sanity check
- if [[ ${parts_a[cur_idx_a]/r+([0-9])} || ${parts_b[cur_idx_b]/r+([0-9])} ]]; then
- die "versionator compare bug [revisions, ${ver_a}, ${ver_b}]"
- fi
-
- num_part_a=${parts_a[cur_idx_a]#r}
- num_part_a=${num_part_a##+(0)}
- : ${num_part_a:=0}
- num_part_b=${parts_b[cur_idx_b]#r}
- num_part_b=${num_part_b##+(0)}
- : ${num_part_b:=0}
-
- ((num_part_a < num_part_b)) && eshopts_pop && return 1
- ((num_part_a > num_part_b)) && eshopts_pop && return 3
-
- ### no differences.
- eshopts_pop
- return 2
-}
-
-# @FUNCTION: version_sort
-# @USAGE: <version> [more versions...]
-# @DESCRIPTION:
-# Returns its parameters sorted, highest version last. We're using a quadratic
-# algorithm for simplicity, so don't call it with more than a few dozen items.
-# Uses version_compare, so be careful.
-version_sort() {
- eshopts_push -s extglob
- local items=
- local -i left=0
- items=("$@")
- while ((left < ${#items[@]})); do
- local -i lowest_idx=left
- local -i idx=lowest_idx+1
- while ((idx < ${#items[@]})); do
- version_compare "${items[lowest_idx]}" "${items[idx]}"
- [[ $? -eq 3 ]] && lowest_idx=idx
- idx+=1
- done
- local tmp=${items[lowest_idx]}
- items[lowest_idx]=${items[left]}
- items[left]=${tmp}
- left+=1
- done
- echo ${items[@]}
- eshopts_pop
-}
-
-# @FUNCTION: version_format_string
-# @USAGE: <format> [version]
-# @DESCRIPTION:
-# Reformat complicated version strings. The first argument is the string
-# to reformat with while the rest of the args are passed on to the
-# get_version_components function. You should make sure to single quote
-# the first argument since it'll have variables that get delayed expansions.
-# @EXAMPLE:
-# P="cow-hat-1.2.3_p4"
-# MY_P=$(version_format_string '${PN}_source_$1_$2-$3_$4')
-# Now MY_P will be: cow-hat_source_1_2-3_p4
-version_format_string() {
- local fstr=$1
- shift
- set -- $(get_version_components "$@")
- eval echo "${fstr}"
-}
-
-fi
diff --git a/eclass/vim-doc.eclass b/eclass/vim-doc.eclass
index f20f7397cf65..ad595c5a67c6 100644
--- a/eclass/vim-doc.eclass
+++ b/eclass/vim-doc.eclass
@@ -4,7 +4,7 @@
# @ECLASS: vim-doc.eclass
# @MAINTAINER:
# vim@gentoo.org
-# @SUPPORTED_EAPIS: 6 7 8
+# @SUPPORTED_EAPIS: 7 8
# @BLURB: Eclass for vim{,-plugin}.eclass to update documentation tags.
# @DESCRIPTION:
# This eclass is used by vim.eclass and vim-plugin.eclass to update
@@ -16,13 +16,10 @@
# DEPEND in vim-plugin or by whatever version of vim is being
# installed by the eclass.
-if [[ ! ${_VIM_DOC_ECLASS} ]] ; then
+if [[ -z ${_VIM_DOC_ECLASS} ]]; then
+_VIM_DOC_ECLASS=1
case ${EAPI} in
- 6)
- ewarn "${CATEGORY}/${PF}: ebuild uses ${ECLASS} with deprecated EAPI ${EAPI}!"
- ewarn "${CATEGORY}/${PF}: Support will be removed on 2024-10-08. Please port to newer EAPI."
- ;;
7|8) ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
@@ -32,7 +29,7 @@ esac
# @DESCRIPTION:
# Update the documentation tags in the versioned Vim directory.
update_vim_helptags() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
local vimfiles helpfile files vim d
@@ -58,7 +55,7 @@ update_vim_helptags() {
# Install the documentation symlinks into the versioned vim
# directory and run :helptags
- for d in "${EROOT%/}"/usr/share/vim/vim[0-9]*; do
+ for d in "${EROOT}"/usr/share/vim/vim[0-9]*; do
[[ -d "${d}/doc" ]] || continue # catch a failed glob
# Remove links
@@ -104,5 +101,4 @@ update_vim_helptags() {
fi
}
-_VIM_DOC_ECLASS=1
fi
diff --git a/eclass/vim-plugin.eclass b/eclass/vim-plugin.eclass
index b2ae0cb9e4c3..d18e2ef8ef5f 100644
--- a/eclass/vim-plugin.eclass
+++ b/eclass/vim-plugin.eclass
@@ -4,7 +4,7 @@
# @ECLASS: vim-plugin.eclass
# @MAINTAINER:
# vim@gentoo.org
-# @SUPPORTED_EAPIS: 6 7 8
+# @SUPPORTED_EAPIS: 7 8
# @BLURB: used for installing vim plugins
# @DESCRIPTION:
# This eclass simplifies installation of app-vim plugins into
@@ -16,17 +16,13 @@ if [[ -z ${_VIM_PLUGIN_ECLASS} ]]; then
_VIM_PLUGIN_ECLASS=1
case ${EAPI} in
- 6)
- ewarn "${CATEGORY}/${PF}: ebuild uses ${ECLASS} with deprecated EAPI ${EAPI}!"
- ewarn "${CATEGORY}/${PF}: Support will be removed on 2024-10-08. Please port to newer EAPI."
- ;;
7|8) ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
inherit vim-doc
-[[ ${EAPI} != [67] ]] && _DEFINE_VIM_PLUGIN_SRC_PREPARE=true
+[[ ${EAPI} != 7 ]] && _DEFINE_VIM_PLUGIN_SRC_PREPARE=true
# @ECLASS_VARIABLE: VIM_PLUGIN_VIM_VERSION
# @DESCRIPTION:
@@ -50,7 +46,7 @@ if [[ ${_DEFINE_VIM_PLUGIN_SRC_PREPARE} ]]; then
# other packages.
# Note that this function is only defined and exported in EAPIs >= 8.
vim-plugin_src_prepare() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
default_src_prepare
@@ -94,7 +90,7 @@ _VIM_PLUGIN_ALLOWED_DIRS=(
# }
# @CODE
vim-plugin_src_install() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
# Install non-vim-help-docs
einstalldocs
@@ -102,8 +98,8 @@ vim-plugin_src_install() {
# Install remainder of plugin
insinto /usr/share/vim/vimfiles/
local d
- case ${EAPI:-0} in
- 6|7)
+ case ${EAPI} in
+ 7)
for d in *; do
[[ -d "${d}" ]] || continue
doins -r "${d}"
@@ -128,7 +124,7 @@ vim-plugin_src_install() {
#
# * display_vim_plugin_help
vim-plugin_pkg_postinst() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
update_vim_helptags # from vim-doc
update_vim_afterscripts # see below
@@ -141,7 +137,7 @@ vim-plugin_pkg_postinst() {
# This function calls the update_vim_helptags and update_vim_afterscripts
# functions and eventually removes a bunch of empty directories.
vim-plugin_pkg_postrm() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
update_vim_helptags # from vim-doc
update_vim_afterscripts # see below
@@ -158,7 +154,7 @@ vim-plugin_pkg_postrm() {
# Creates scripts in /usr/share/vim/vimfiles/after/*
# comprised of the snippets in /usr/share/vim/vimfiles/after/*/*.d
update_vim_afterscripts() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
local d f afterdir="${EROOT}"/usr/share/vim/vimfiles/after
@@ -197,7 +193,7 @@ update_vim_afterscripts() {
# extra message regarding enabling filetype plugins is displayed if
# VIM_PLUGIN_MESSAGES includes the word "filetype".
display_vim_plugin_help() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
local h
diff --git a/eclass/vim-spell.eclass b/eclass/vim-spell.eclass
index 57bcb0dc8021..f9b496e5ffb0 100644
--- a/eclass/vim-spell.eclass
+++ b/eclass/vim-spell.eclass
@@ -6,7 +6,7 @@
# Vim Maintainers <vim@gentoo.org>
# @AUTHOR:
# Ciaran McCreesh <ciaranm@gentoo.org>
-# @SUPPORTED_EAPIS: 6 7 8
+# @SUPPORTED_EAPIS: 7 8
# @BLURB: Eclass for managing Vim spell files.
# @DESCRIPTION:
# How to make a vim spell file package using prebuilt spell lists
@@ -66,10 +66,6 @@ if [[ -z ${_VIM_SPELL_ECLASS} ]] ; then
_VIM_SPELL_ECLASS=1
case ${EAPI} in
- 6)
- ewarn "${CATEGORY}/${PF}: ebuild uses ${ECLASS} with deprecated EAPI ${EAPI}!"
- ewarn "${CATEGORY}/${PF}: Support will be removed on 2024-10-08. Please port to newer EAPI."
- ;;
7|8) ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
diff --git a/eclass/virtualx.eclass b/eclass/virtualx.eclass
index 07d303899582..850e5c5b0892 100644
--- a/eclass/virtualx.eclass
+++ b/eclass/virtualx.eclass
@@ -6,17 +6,13 @@
# x11@gentoo.org
# @AUTHOR:
# Original author: Martin Schlemmer <azarah@gentoo.org>
-# @SUPPORTED_EAPIS: 6 7 8
+# @SUPPORTED_EAPIS: 7 8
# @BLURB: This eclass can be used for packages that need a working X environment to build.
if [[ -z ${_VIRTUALX_ECLASS} ]]; then
_VIRTUALX_ECLASS=1
case ${EAPI} in
- 6)
- ewarn "${CATEGORY}/${PF}: ebuild uses ${ECLASS} with deprecated EAPI ${EAPI}!"
- ewarn "${CATEGORY}/${PF}: Support will be removed on 2024-10-08. Please port to newer EAPI."
- ;;
7|8) ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
@@ -36,15 +32,15 @@ esac
# @OUTPUT_VARIABLE
# @DESCRIPTION:
# Standard dependencies string that is automatically added to BDEPEND
-# (in EAPI-6: DEPEND) unless VIRTUALX_REQUIRED is set to "manual".
+# 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=""
+[[ ${EAPI} != 7 ]] && VIRTUALX_DEPEND=""
VIRTUALX_DEPEND+="
x11-base/xorg-server[xvfb]
x11-apps/xhost
"
-[[ ${EAPI} != [67] ]] && readonly VIRTUALX_DEPEND
+[[ ${EAPI} != 7 ]] && readonly VIRTUALX_DEPEND
[[ ${VIRTUALX_COMMAND} ]] && die "VIRTUALX_COMMAND has been removed and is a no-op"
@@ -62,8 +58,6 @@ case ${VIRTUALX_REQUIRED} in
;;
esac
-[[ ${EAPI} == 6 ]] && DEPEND="${BDEPEND}"
-
# @FUNCTION: virtx
# @USAGE: <command> [command arguments]
diff --git a/eclass/waf-utils.eclass b/eclass/waf-utils.eclass
index f8d4b0aa94b4..377b455de736 100644
--- a/eclass/waf-utils.eclass
+++ b/eclass/waf-utils.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: waf-utils.eclass
@@ -20,7 +20,7 @@ case ${EAPI} in
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
-if [[ ! ${_WAF_UTILS_ECLASS} ]]; then
+if [[ -z ${_WAF_UTILS_ECLASS} ]]; then
_WAF_UTILS_ECLASS=1
inherit multilib toolchain-funcs multiprocessing
diff --git a/eclass/webapp.eclass b/eclass/webapp.eclass
index e8bc127e1b96..ded66fa7f671 100644
--- a/eclass/webapp.eclass
+++ b/eclass/webapp.eclass
@@ -4,7 +4,7 @@
# @ECLASS: webapp.eclass
# @MAINTAINER:
# web-apps@gentoo.org
-# @SUPPORTED_EAPIS: 6 7 8
+# @SUPPORTED_EAPIS: 7 8
# @BLURB: functions for installing applications to run under a web server
# @DESCRIPTION:
# The webapp eclass contains functions to handle web applications with
@@ -14,10 +14,6 @@ if [[ -z ${_WEBAPP_ECLASS} ]]; then
_WEBAPP_ECLASS=1
case ${EAPI} in
- 6)
- ewarn "${CATEGORY}/${PF}: ebuild uses ${ECLASS} with deprecated EAPI ${EAPI}!"
- ewarn "${CATEGORY}/${PF}: Support will be removed on 2024-10-08. Please port to newer EAPI."
- ;;
7|8) ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
@@ -55,9 +51,9 @@ IS_REPLACE=0
INSTALL_CHECK_FILE="installed_by_webapp_eclass"
SETUP_CHECK_FILE="setup_by_webapp_eclass"
-ETC_CONFIG="${ROOT%/}/etc/vhosts/webapp-config"
-WEBAPP_CONFIG="${ROOT%/}/usr/sbin/webapp-config"
-WEBAPP_CLEANER="${ROOT%/}/usr/sbin/webapp-cleaner"
+ETC_CONFIG="${EROOT}/etc/vhosts/webapp-config"
+WEBAPP_CONFIG="${EROOT}/usr/sbin/webapp-config"
+WEBAPP_CLEANER="${EROOT}/usr/sbin/webapp-cleaner"
# ==============================================================================
# INTERNAL FUNCTIONS
@@ -66,7 +62,7 @@ WEBAPP_CLEANER="${ROOT%/}/usr/sbin/webapp-cleaner"
# Load the config file /etc/vhosts/webapp-config
# Supports both the old bash version, and the new python version
webapp_read_config() {
- debug-print-function $FUNCNAME $*
+ debug-print-function ${FUNCNAME} "$@"
if has_version '>=app-admin/webapp-config-1.50'; then
ENVVAR=$(${WEBAPP_CONFIG} --query ${PN} ${PVR}) || die "Could not read settings from webapp-config!"
@@ -83,7 +79,7 @@ webapp_read_config() {
# Check whether a specified file exists in the given directory (`.' by default)
webapp_checkfileexists() {
- debug-print-function $FUNCNAME $*
+ debug-print-function ${FUNCNAME} "$@"
local my_prefix=${2:+${2}/}
@@ -96,12 +92,12 @@ webapp_checkfileexists() {
}
webapp_check_installedat() {
- debug-print-function $FUNCNAME $*
+ debug-print-function ${FUNCNAME} "$@"
${WEBAPP_CONFIG} --show-installed -h localhost -d "${INSTALL_DIR}" 2> /dev/null
}
webapp_getinstalltype() {
- debug-print-function $FUNCNAME $*
+ debug-print-function ${FUNCNAME} "$@"
if ! has vhosts ${IUSE} || use vhosts; then
return
@@ -178,7 +174,7 @@ need_httpd_fastcgi() {
# @DESCRIPTION:
# Mark a file config-protected for a web-based application.
webapp_configfile() {
- debug-print-function $FUNCNAME $*
+ debug-print-function ${FUNCNAME} "$@"
local m
for m in "$@"; do
@@ -201,7 +197,7 @@ webapp_configfile() {
# Install a script that will run after a virtual copy is created, and
# before a virtual copy has been removed.
webapp_hook_script() {
- debug-print-function $FUNCNAME $*
+ debug-print-function ${FUNCNAME} "$@"
webapp_checkfileexists "${1}"
@@ -215,7 +211,7 @@ webapp_hook_script() {
# @DESCRIPTION:
# Install a text file containing post-installation instructions.
webapp_postinst_txt() {
- debug-print-function $FUNCNAME $*
+ debug-print-function ${FUNCNAME} "$@"
webapp_checkfileexists "${2}"
@@ -228,7 +224,7 @@ webapp_postinst_txt() {
# @DESCRIPTION:
# Install a text file containing post-upgrade instructions.
webapp_postupgrade_txt() {
- debug-print-function $FUNCNAME $*
+ debug-print-function ${FUNCNAME} "$@"
webapp_checkfileexists "${2}"
@@ -238,7 +234,7 @@ webapp_postupgrade_txt() {
# helper for webapp_serverowned()
_webapp_serverowned() {
- debug-print-function $FUNCNAME $*
+ debug-print-function ${FUNCNAME} "$@"
webapp_checkfileexists "${1}" "${D}"
local my_file
@@ -257,7 +253,7 @@ _webapp_serverowned() {
# The ownership of the file is NOT set until the application is installed using
# the webapp-config tool. If -R is given directories are handled recursively.
webapp_serverowned() {
- debug-print-function $FUNCNAME $*
+ debug-print-function ${FUNCNAME} "$@"
local m
if [[ "${1}" == "-R" ]]; then
@@ -284,7 +280,7 @@ webapp_serverowned() {
# used by default. Note: this function will automagically prepend $1 to the
# front of your config file's name.
webapp_server_configfile() {
- debug-print-function $FUNCNAME $*
+ debug-print-function ${FUNCNAME} "$@"
webapp_checkfileexists "${2}"
@@ -307,7 +303,7 @@ webapp_server_configfile() {
# If a version is given the script should upgrade the database schema from
# the given version to $PVR.
webapp_sqlscript() {
- debug-print-function $FUNCNAME $*
+ debug-print-function ${FUNCNAME} "$@"
webapp_checkfileexists "${2}"
@@ -334,7 +330,7 @@ webapp_sqlscript() {
# You need to call this function in src_install() BEFORE anything else has run.
# For now we just create required webapp-config directories.
webapp_src_preinst() {
- debug-print-function $FUNCNAME $*
+ debug-print-function ${FUNCNAME} "$@"
# sanity checks, to catch bugs in the ebuild
if [[ ! -f "${T}/${SETUP_CHECK_FILE}" ]]; then
@@ -370,12 +366,12 @@ webapp_src_preinst() {
# @DESCRIPTION:
# The default pkg_setup() for this eclass. This will gather required variables
# from webapp-config and check if there is an application installed to
-# `${ROOT%/}/var/www/localhost/htdocs/${PN}/' if USE=vhosts is not set.
+# `${ROOT}/var/www/localhost/htdocs/${PN}/' if USE=vhosts is not set.
#
# You need to call this function BEFORE anything else has run in your custom
# pkg_setup().
webapp_pkg_setup() {
- debug-print-function $FUNCNAME $*
+ debug-print-function ${FUNCNAME} "$@"
# to test whether or not the ebuild has correctly called this function
# we add an empty file to the filesystem
@@ -394,7 +390,7 @@ webapp_pkg_setup() {
G_HOSTNAME="localhost"
webapp_read_config
- local my_dir="${ROOT%/}/${VHOST_ROOT}/${MY_HTDOCSBASE}/${PN}"
+ local my_dir="${ROOT}/${VHOST_ROOT}/${MY_HTDOCSBASE}/${PN}"
# if USE=vhosts is enabled OR no application is installed we're done here
if ! has vhosts ${IUSE} || use vhosts || [[ ! -d "${my_dir}" ]]; then
@@ -436,7 +432,7 @@ webapp_pkg_setup() {
# You need to call this function AFTER everything else has run in your custom
# src_install().
webapp_src_install() {
- debug-print-function $FUNCNAME $*
+ debug-print-function ${FUNCNAME} "$@"
# to test whether or not the ebuild has correctly called this function
# we add an empty file to the filesystem
@@ -458,18 +454,18 @@ webapp_src_install() {
# @FUNCTION: webapp_pkg_postinst
# @DESCRIPTION:
# The default pkg_postinst() for this eclass. This installs the web application to
-# `${ROOT%/}/var/www/localhost/htdocs/${PN}/' if USE=vhosts is not set. Otherwise
+# `${ROOT}/var/www/localhost/htdocs/${PN}/' if USE=vhosts is not set. Otherwise
# display a short notice how to install this application with webapp-config.
#
# You need to call this function AFTER everything else has run in your custom
# pkg_postinst().
webapp_pkg_postinst() {
- debug-print-function $FUNCNAME $*
+ debug-print-function ${FUNCNAME} "$@"
webapp_read_config
# sanity checks, to catch bugs in the ebuild
- if [[ ! -f "${ROOT%/}/${MY_APPDIR}/${INSTALL_CHECK_FILE}" ]]; then
+ if [[ ! -f "${ROOT}/${MY_APPDIR}/${INSTALL_CHECK_FILE}" ]]; then
eerror
eerror "This ebuild did not call webapp_src_install() at the end"
eerror "of the src_install() function"
@@ -543,7 +539,7 @@ webapp_pkg_postinst() {
# remove all installed copies of this web application. Otherwise instruct the
# user to manually remove those copies. See bug #136959.
webapp_pkg_prerm() {
- debug-print-function $FUNCNAME $*
+ debug-print-function ${FUNCNAME} "$@"
local my_output=
my_output="$(${WEBAPP_CONFIG} --list-installs ${PN} ${PVR})"
diff --git a/eclass/wrapper.eclass b/eclass/wrapper.eclass
index a62bb51d0fe7..1f995a60509f 100644
--- a/eclass/wrapper.eclass
+++ b/eclass/wrapper.eclass
@@ -4,17 +4,13 @@
# @ECLASS: wrapper.eclass
# @MAINTAINER:
# base-system@gentoo.org
-# @SUPPORTED_EAPIS: 5 6 7 8
+# @SUPPORTED_EAPIS: 7 8
# @BLURB: create a shell wrapper script
if [[ -z ${_WRAPPER_ECLASS} ]]; then
_WRAPPER_ECLASS=1
case ${EAPI} in
- 5|6)
- ewarn "${CATEGORY}/${PF}: ebuild uses ${ECLASS} with deprecated EAPI ${EAPI}!"
- ewarn "${CATEGORY}/${PF}: Support will be removed on 2024-10-08. Please port to newer EAPI."
- ;;
7|8) ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
@@ -59,7 +55,7 @@ make_wrapper() {
exeopts -m 0755
exeinto "${path}"
newexe "${tmpwrapper}" "${wrapper}"
- ) || die
+ )
else
newbin "${tmpwrapper}" "${wrapper}"
fi
diff --git a/eclass/xdg-utils.eclass b/eclass/xdg-utils.eclass
index 84f88eee18fc..de383d88cf95 100644
--- a/eclass/xdg-utils.eclass
+++ b/eclass/xdg-utils.eclass
@@ -7,7 +7,7 @@
# freedesktop-bugs@gentoo.org
# @AUTHOR:
# Original author: Gilles Dartiguelongue <eva@gentoo.org>
-# @SUPPORTED_EAPIS: 5 6 7 8
+# @SUPPORTED_EAPIS: 7 8
# @BLURB: Auxiliary functions commonly used by XDG compliant packages.
# @DESCRIPTION:
# This eclass provides a set of auxiliary functions needed by most XDG
@@ -18,10 +18,6 @@
# * XDG mime information database management
case ${EAPI} in
- 5|6)
- ewarn "${CATEGORY}/${PF}: ebuild uses ${ECLASS} with deprecated EAPI ${EAPI}!"
- ewarn "${CATEGORY}/${PF}: Support will be removed on 2024-10-08. Please port to newer EAPI."
- ;;
7|8) ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
@@ -72,7 +68,7 @@ xdg_desktop_database_update() {
fi
ebegin "Updating .desktop files database"
- update-desktop-database -q "${EROOT%/}${DESKTOP_DATABASE_DIR}"
+ update-desktop-database -q "${EROOT}${DESKTOP_DATABASE_DIR}"
eend $?
}
@@ -93,7 +89,7 @@ xdg_icon_cache_update() {
ebegin "Updating icons cache"
local dir retval=0
local fails=()
- for dir in "${EROOT%/}"/usr/share/icons/*; do
+ for dir in "${EROOT}"/usr/share/icons/*; do
if [[ -f ${dir}/index.theme ]]; then
if ! gtk-update-icon-cache -qf "${dir}"; then
debug-print "Updating cache failed on ${dir}"
@@ -134,6 +130,6 @@ xdg_mimeinfo_database_update() {
local -x PKGSYSTEM_ENABLE_FSYNC=0
ebegin "Updating shared mime info database"
- update-mime-database "${EROOT%/}${MIMEINFO_DATABASE_DIR}"
+ update-mime-database "${EROOT}${MIMEINFO_DATABASE_DIR}"
eend $?
}
diff --git a/eclass/xdg.eclass b/eclass/xdg.eclass
index 2e16a438d840..042db2b8682d 100644
--- a/eclass/xdg.eclass
+++ b/eclass/xdg.eclass
@@ -6,7 +6,7 @@
# freedesktop-bugs@gentoo.org
# @AUTHOR:
# Original author: Gilles Dartiguelongue <eva@gentoo.org>
-# @SUPPORTED_EAPIS: 6 7 8
+# @SUPPORTED_EAPIS: 7 8
# @PROVIDES: xdg-utils
# @BLURB: Provides phases for XDG compliant packages.
# @DESCRIPTION:
@@ -17,10 +17,6 @@ if [[ -z ${_XDG_ECLASS} ]]; then
_XDG_ECLASS=1
case ${EAPI} in
- 6)
- ewarn "${CATEGORY}/${PF}: ebuild uses ${ECLASS} with deprecated EAPI ${EAPI}!"
- ewarn "${CATEGORY}/${PF}: Support will be removed on 2024-10-08. Please port to newer EAPI."
- ;;
7|8) ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
@@ -34,7 +30,7 @@ inherit xdg-utils
"
case ${EAPI} in
- 6|7)
+ 7)
# src_prepare is only exported in EAPI < 8.
# @FUNCTION: xdg_src_prepare
# @DESCRIPTION: