eclass: canonicalize debug-print-function calls

Closes: https://github.com/gentoo/gentoo/pull/37652
Signed-off-by: David Seifert <soap@gentoo.org>
This commit is contained in:
David Seifert 2024-10-08 17:31:52 +02:00
parent ec9bd064a3
commit c8af7eb128
No known key found for this signature in database
GPG Key ID: CE36E117202E3842
58 changed files with 402 additions and 402 deletions

View File

@ -89,7 +89,7 @@ S=${WORKDIR}
# Performs sanity checks for correct eclass usage, and early-checks # Performs sanity checks for correct eclass usage, and early-checks
# whether requested GID can be enforced. # whether requested GID can be enforced.
acct-group_pkg_pretend() { acct-group_pkg_pretend() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
# verify ACCT_GROUP_ID # verify ACCT_GROUP_ID
[[ -n ${ACCT_GROUP_ID} ]] || die "Ebuild error: ACCT_GROUP_ID must be set!" [[ -n ${ACCT_GROUP_ID} ]] || die "Ebuild error: ACCT_GROUP_ID must be set!"
@ -131,7 +131,7 @@ acct-group_pkg_pretend() {
# @DESCRIPTION: # @DESCRIPTION:
# Installs sysusers.d file for the group. # Installs sysusers.d file for the group.
acct-group_src_install() { 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 # 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 # ACCT_GROUP_NAME is not PN and not valid in a bash variable name
@ -156,7 +156,7 @@ acct-group_src_install() {
# @DESCRIPTION: # @DESCRIPTION:
# Creates the group if it does not exist yet. # Creates the group if it does not exist yet.
acct-group_pkg_preinst() { acct-group_pkg_preinst() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
if [[ ${EUID} -ne 0 || -n ${EPREFIX} ]]; then if [[ ${EUID} -ne 0 || -n ${EPREFIX} ]]; then
einfo "Insufficient privileges to execute ${FUNCNAME[0]}" einfo "Insufficient privileges to execute ${FUNCNAME[0]}"

View File

@ -155,7 +155,7 @@ S=${WORKDIR}
# Generate appropriate RDEPEND from ACCT_USER_GROUPS. This must be # Generate appropriate RDEPEND from ACCT_USER_GROUPS. This must be
# called if ACCT_USER_GROUPS are set. # called if ACCT_USER_GROUPS are set.
acct-user_add_deps() { acct-user_add_deps() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
# ACCT_USER_GROUPS sanity check # ACCT_USER_GROUPS sanity check
if [[ $(declare -p ACCT_USER_GROUPS) != "declare -a"* ]]; then if [[ $(declare -p ACCT_USER_GROUPS) != "declare -a"* ]]; then
@ -218,7 +218,7 @@ eislocked() {
# Performs sanity checks for correct eclass usage, and early-checks # Performs sanity checks for correct eclass usage, and early-checks
# whether requested UID can be enforced. # whether requested UID can be enforced.
acct-user_pkg_pretend() { acct-user_pkg_pretend() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
# verify that acct-user_add_deps() has been called # verify that acct-user_add_deps() has been called
# (it verifies ACCT_USER_GROUPS itself) # (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 # Installs a keep-file into the user's home directory to ensure it is
# owned by the package, and sysusers.d file. # owned by the package, and sysusers.d file.
acct-user_src_install() { acct-user_src_install() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
# Replace reserved characters in comment # Replace reserved characters in comment
: "${ACCT_USER_COMMENT:=${DESCRIPTION//[:,=]/;}}" : "${ACCT_USER_COMMENT:=${DESCRIPTION//[:,=]/;}}"
@ -328,7 +328,7 @@ acct-user_src_install() {
# Creates the user if it does not exist yet. Sets permissions # Creates the user if it does not exist yet. Sets permissions
# of the home directory in install image. # of the home directory in install image.
acct-user_pkg_preinst() { acct-user_pkg_preinst() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
unset _ACCT_USER_ADDED unset _ACCT_USER_ADDED
@ -397,7 +397,7 @@ acct-user_pkg_preinst() {
# Updates user properties if necessary. This needs to be done after # Updates user properties if necessary. This needs to be done after
# new home directory is installed. # new home directory is installed.
acct-user_pkg_postinst() { acct-user_pkg_postinst() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
if [[ -n ${_ACCT_USER_ADDED} ]]; then if [[ -n ${_ACCT_USER_ADDED} ]]; then
# We just added the user; no need to update it # We just added the user; no need to update it
@ -481,7 +481,7 @@ acct-user_pkg_postinst() {
# @DESCRIPTION: # @DESCRIPTION:
# Ensures that the user account is locked out when it is removed. # Ensures that the user account is locked out when it is removed.
acct-user_pkg_prerm() { acct-user_pkg_prerm() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
if [[ -n ${REPLACED_BY_VERSION} ]]; then if [[ -n ${REPLACED_BY_VERSION} ]]; then
return return

View File

@ -110,7 +110,7 @@ readonly _ADA_ALL_IMPLS
# unsupported, returns 1 -- and the caller should ignore the entry. # unsupported, returns 1 -- and the caller should ignore the entry.
# If it is invalid, dies with an appropriate error message. # If it is invalid, dies with an appropriate error message.
_ada_impl_supported() { _ada_impl_supported() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
[[ ${#} -eq 1 ]] || die "${FUNCNAME}: takes exactly 1 argument (impl)." [[ ${#} -eq 1 ]] || die "${FUNCNAME}: takes exactly 1 argument (impl)."
@ -208,7 +208,7 @@ _ada_set_impls() {
# They are described more completely in the eclass # They are described more completely in the eclass
# variable documentation. # variable documentation.
ada_export() { ada_export() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
local impl var local impl var
@ -404,7 +404,7 @@ unset -f _ada_single_set_globals
# setup will be done. If wrapper update is requested, the directory # setup will be done. If wrapper update is requested, the directory
# shall be removed first. # shall be removed first.
ada_wrapper_setup() { ada_wrapper_setup() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
local workdir=${1:-${T}/${EADA}} local workdir=${1:-${T}/${EADA}}
local impl=${2:-${EADA}} local impl=${2:-${EADA}}
@ -470,7 +470,7 @@ ada_wrapper_setup() {
# Determine what the selected Ada implementation is and set # Determine what the selected Ada implementation is and set
# the Ada build environment up for it. # the Ada build environment up for it.
ada_setup() { ada_setup() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
unset EADA unset EADA
@ -518,7 +518,7 @@ ada_setup() {
# @DESCRIPTION: # @DESCRIPTION:
# Runs ada_setup. # Runs ada_setup.
ada_pkg_setup() { ada_pkg_setup() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
[[ ${MERGE_TYPE} != binary ]] && ada_setup [[ ${MERGE_TYPE} != binary ]] && ada_setup
} }

View File

@ -105,7 +105,7 @@ inherit depend.apache
# Internal function to construct the default ${APXS2_S} path if required. # Internal function to construct the default ${APXS2_S} path if required.
apache_cd_dir() { apache_cd_dir() {
debug-print-function $FUNCNAME $* debug-print-function ${FUNCNAME} "$@"
local CD_DIR="${APXS2_S}" local CD_DIR="${APXS2_S}"
@ -123,7 +123,7 @@ apache_cd_dir() {
# Internal function to construct the default ${APACHE2_MOD_FILE} if required. # Internal function to construct the default ${APACHE2_MOD_FILE} if required.
apache_mod_file() { apache_mod_file() {
debug-print-function $FUNCNAME $* debug-print-function ${FUNCNAME} "$@"
local MOD_FILE="${APACHE2_MOD_FILE:-$(apache_cd_dir)/.libs/${PN}.so}" local MOD_FILE="${APACHE2_MOD_FILE:-$(apache_cd_dir)/.libs/${PN}.so}"
@ -135,7 +135,7 @@ apache_mod_file() {
# optional first argument `html'; if the first argument is equals `html', only # optional first argument `html'; if the first argument is equals `html', only
# html files are returned, otherwise normal (non-html) docs are returned. # html files are returned, otherwise normal (non-html) docs are returned.
apache_doc_magic() { apache_doc_magic() {
debug-print-function $FUNCNAME $* debug-print-function ${FUNCNAME} "$@"
local DOCS= local DOCS=
@ -161,7 +161,7 @@ apache_doc_magic() {
# module requires a different build setup than this, use ${APXS} in your own # module requires a different build setup than this, use ${APXS} in your own
# src_compile routine. # src_compile routine.
apache-module_src_compile() { apache-module_src_compile() {
debug-print-function $FUNCNAME $* debug-print-function ${FUNCNAME} "$@"
local CD_DIR=$(apache_cd_dir) local CD_DIR=$(apache_cd_dir)
cd "${CD_DIR}" || die "cd ${CD_DIR} failed" cd "${CD_DIR}" || die "cd ${CD_DIR} failed"
@ -180,7 +180,7 @@ apache-module_src_compile() {
# 55_mod_foo.conf, APACHE2_MOD_CONF would be 55_mod_foo. ${DOCFILES} contains # 55_mod_foo.conf, APACHE2_MOD_CONF would be 55_mod_foo. ${DOCFILES} contains
# the list of files you want filed as documentation. # the list of files you want filed as documentation.
apache-module_src_install() { apache-module_src_install() {
debug-print-function $FUNCNAME $* debug-print-function ${FUNCNAME} "$@"
local CD_DIR=$(apache_cd_dir) local CD_DIR=$(apache_cd_dir)
pushd "${CD_DIR}" >/dev/null || die "cd ${CD_DIR} failed" pushd "${CD_DIR}" >/dev/null || die "cd ${CD_DIR} failed"
@ -222,7 +222,7 @@ apache-module_src_install() {
# @DESCRIPTION: # @DESCRIPTION:
# This prints out information about the installed module and how to enable it. # This prints out information about the installed module and how to enable it.
apache-module_pkg_postinst() { apache-module_pkg_postinst() {
debug-print-function $FUNCNAME $* debug-print-function ${FUNCNAME} "$@"
if [[ -n "${APACHE2_MOD_DEFINE}" ]] ; then if [[ -n "${APACHE2_MOD_DEFINE}" ]] ; then
local my_opts="-D ${APACHE2_MOD_DEFINE// / -D }" local my_opts="-D ${APACHE2_MOD_DEFINE// / -D }"

View File

@ -36,7 +36,7 @@ _APP_ALTERNATIVES_ECLASS=1
# @DESCRIPTION: # @DESCRIPTION:
# Set ebuild metadata variables. # Set ebuild metadata variables.
_app-alternatives_set_globals() { _app-alternatives_set_globals() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
if [[ ${ALTERNATIVES@a} != *a* ]]; then if [[ ${ALTERNATIVES@a} != *a* ]]; then
die 'ALTERNATIVES must be an array.' die 'ALTERNATIVES must be an array.'
@ -71,7 +71,7 @@ _app-alternatives_set_globals
# @DESCRIPTION: # @DESCRIPTION:
# Get the flag name for the selected alternative (i.e. the USE flag set). # Get the flag name for the selected alternative (i.e. the USE flag set).
get_alternative() { get_alternative() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
local flag local flag
for flag in "${ALTERNATIVES[@]%%:*}"; do for flag in "${ALTERNATIVES[@]%%:*}"; do

View File

@ -41,7 +41,7 @@ esac
# @EXAMPLE: # @EXAMPLE:
# _bash-completion-r1_get_bashdir completionsdir /usr/share/bash-completion # _bash-completion-r1_get_bashdir completionsdir /usr/share/bash-completion
_bash-completion-r1_get_bashdir() { _bash-completion-r1_get_bashdir() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
if $(tc-getPKG_CONFIG) --exists bash-completion &>/dev/null; then if $(tc-getPKG_CONFIG) --exists bash-completion &>/dev/null; then
local path local path
@ -59,7 +59,7 @@ _bash-completion-r1_get_bashdir() {
# @DESCRIPTION: # @DESCRIPTION:
# Get unprefixed bash-completion completions directory. # Get unprefixed bash-completion completions directory.
_bash-completion-r1_get_bashcompdir() { _bash-completion-r1_get_bashcompdir() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
_bash-completion-r1_get_bashdir completionsdir /usr/share/bash-completion/completions _bash-completion-r1_get_bashdir completionsdir /usr/share/bash-completion/completions
} }
@ -69,7 +69,7 @@ _bash-completion-r1_get_bashcompdir() {
# @DESCRIPTION: # @DESCRIPTION:
# Get unprefixed bash-completion helpers directory. # Get unprefixed bash-completion helpers directory.
_bash-completion-r1_get_bashhelpersdir() { _bash-completion-r1_get_bashhelpersdir() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
_bash-completion-r1_get_bashdir helpersdir /usr/share/bash-completion/helpers _bash-completion-r1_get_bashdir helpersdir /usr/share/bash-completion/helpers
} }
@ -78,7 +78,7 @@ _bash-completion-r1_get_bashhelpersdir() {
# @DESCRIPTION: # @DESCRIPTION:
# Get the bash-completion completions directory. # Get the bash-completion completions directory.
get_bashcompdir() { get_bashcompdir() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
echo "${EPREFIX}$(_bash-completion-r1_get_bashcompdir)" echo "${EPREFIX}$(_bash-completion-r1_get_bashcompdir)"
} }
@ -88,7 +88,7 @@ get_bashcompdir() {
# @DESCRIPTION: # @DESCRIPTION:
# Get the bash-completion helpers directory. # Get the bash-completion helpers directory.
get_bashhelpersdir() { get_bashhelpersdir() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
echo "${EPREFIX}$(_bash-completion-r1_get_bashhelpersdir)" echo "${EPREFIX}$(_bash-completion-r1_get_bashhelpersdir)"
} }
@ -99,7 +99,7 @@ get_bashhelpersdir() {
# Install bash-completion files passed as args. Has EAPI-dependent failure # Install bash-completion files passed as args. Has EAPI-dependent failure
# behavior (like doins). # behavior (like doins).
dobashcomp() { dobashcomp() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
( (
insopts -m 0644 insopts -m 0644
@ -114,7 +114,7 @@ dobashcomp() {
# Install bash-completion file under a new name. Has EAPI-dependent failure # Install bash-completion file under a new name. Has EAPI-dependent failure
# behavior (like newins). # behavior (like newins).
newbashcomp() { newbashcomp() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
( (
insopts -m 0644 insopts -m 0644
@ -128,7 +128,7 @@ newbashcomp() {
# @DESCRIPTION: # @DESCRIPTION:
# Alias <basename> completion to one or more commands (<alias>es). # Alias <basename> completion to one or more commands (<alias>es).
bashcomp_alias() { bashcomp_alias() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
[[ ${#} -lt 2 ]] && die "Usage: ${FUNCNAME} <basename> <alias>..." [[ ${#} -lt 2 ]] && die "Usage: ${FUNCNAME} <basename> <alias>..."
local base=${1} f local base=${1} f

View File

@ -123,7 +123,7 @@ APACHE2_4_DEPEND="=www-servers/apache-2.4*"
# ============================================================================== # ==============================================================================
_init_apache2() { _init_apache2() {
debug-print-function $FUNCNAME $* debug-print-function ${FUNCNAME} "$@"
# WARNING: Do not use these variables with anything that is put # WARNING: Do not use these variables with anything that is put
# into the dependency cache (DEPEND/RDEPEND/etc) # into the dependency cache (DEPEND/RDEPEND/etc)
@ -143,7 +143,7 @@ _init_apache2_late() {
} }
_init_no_apache() { _init_no_apache() {
debug-print-function $FUNCNAME $* debug-print-function ${FUNCNAME} "$@"
APACHE_VERSION="0" APACHE_VERSION="0"
} }
@ -158,7 +158,7 @@ _init_no_apache() {
# apache-2.x support. If the myiuse parameter is not given it defaults to # apache-2.x support. If the myiuse parameter is not given it defaults to
# apache2. # apache2.
depend.apache_pkg_setup() { depend.apache_pkg_setup() {
debug-print-function $FUNCNAME $* debug-print-function ${FUNCNAME} "$@"
if [[ "${EBUILD_PHASE}" != "setup" ]]; then if [[ "${EBUILD_PHASE}" != "setup" ]]; then
die "$FUNCNAME() should be called in pkg_setup()" die "$FUNCNAME() should be called in pkg_setup()"
@ -184,7 +184,7 @@ depend.apache_pkg_setup() {
# An ebuild should additionally call depend.apache_pkg_setup() in pkg_setup() # An ebuild should additionally call depend.apache_pkg_setup() in pkg_setup()
# with the same myiuse parameter. # with the same myiuse parameter.
want_apache() { want_apache() {
debug-print-function $FUNCNAME $* debug-print-function ${FUNCNAME} "$@"
want_apache2 "$@" want_apache2 "$@"
} }
@ -196,7 +196,7 @@ want_apache() {
# An ebuild should additionally call depend.apache_pkg_setup() in pkg_setup() # An ebuild should additionally call depend.apache_pkg_setup() in pkg_setup()
# with the same myiuse parameter. # with the same myiuse parameter.
want_apache2() { want_apache2() {
debug-print-function $FUNCNAME $* debug-print-function ${FUNCNAME} "$@"
local myiuse=${1:-apache2} local myiuse=${1:-apache2}
IUSE="${IUSE} ${myiuse}" IUSE="${IUSE} ${myiuse}"
@ -213,7 +213,7 @@ want_apache2() {
# An ebuild should additionally call depend.apache_pkg_setup() in pkg_setup() # An ebuild should additionally call depend.apache_pkg_setup() in pkg_setup()
# with the same myiuse parameter. # with the same myiuse parameter.
want_apache2_2() { want_apache2_2() {
debug-print-function $FUNCNAME $* debug-print-function ${FUNCNAME} "$@"
case ${EAPI} in case ${EAPI} in
7) 7)
@ -237,7 +237,7 @@ want_apache2_2() {
# An ebuild should additionally call depend.apache_pkg_setup() in pkg_setup() # An ebuild should additionally call depend.apache_pkg_setup() in pkg_setup()
# with the same myiuse parameter. # with the same myiuse parameter.
want_apache2_4() { want_apache2_4() {
debug-print-function $FUNCNAME $* debug-print-function ${FUNCNAME} "$@"
local myiuse=${1:-apache2} local myiuse=${1:-apache2}
IUSE="${IUSE} ${myiuse}" IUSE="${IUSE} ${myiuse}"
@ -249,7 +249,7 @@ want_apache2_4() {
# @DESCRIPTION: # @DESCRIPTION:
# An ebuild calls this to get the dependency information for apache. # An ebuild calls this to get the dependency information for apache.
need_apache() { need_apache() {
debug-print-function $FUNCNAME $* debug-print-function ${FUNCNAME} "$@"
need_apache2 need_apache2
} }
@ -257,7 +257,7 @@ need_apache() {
# @DESCRIPTION: # @DESCRIPTION:
# An ebuild calls this to get the dependency information for apache-2.x. # An ebuild calls this to get the dependency information for apache-2.x.
need_apache2() { need_apache2() {
debug-print-function $FUNCNAME $* debug-print-function ${FUNCNAME} "$@"
DEPEND="${DEPEND} ${APACHE2_DEPEND}" DEPEND="${DEPEND} ${APACHE2_DEPEND}"
RDEPEND="${RDEPEND} ${APACHE2_DEPEND}" RDEPEND="${RDEPEND} ${APACHE2_DEPEND}"
@ -268,7 +268,7 @@ need_apache2() {
# @DESCRIPTION: # @DESCRIPTION:
# An ebuild calls this to get the dependency information for apache-2.2.x. # An ebuild calls this to get the dependency information for apache-2.2.x.
need_apache2_2() { need_apache2_2() {
debug-print-function $FUNCNAME $* debug-print-function ${FUNCNAME} "$@"
case ${EAPI} in case ${EAPI} in
7) 7)
@ -286,7 +286,7 @@ need_apache2_2() {
# @DESCRIPTION: # @DESCRIPTION:
# An ebuild calls this to get the dependency information for apache-2.4.x. # An ebuild calls this to get the dependency information for apache-2.4.x.
need_apache2_4() { need_apache2_4() {
debug-print-function $FUNCNAME $* debug-print-function ${FUNCNAME} "$@"
DEPEND="${DEPEND} ${APACHE2_4_DEPEND}" DEPEND="${DEPEND} ${APACHE2_4_DEPEND}"
RDEPEND="${RDEPEND} ${APACHE2_4_DEPEND}" RDEPEND="${RDEPEND} ${APACHE2_4_DEPEND}"
@ -299,7 +299,7 @@ need_apache2_4() {
# dependency without USE-flag, in which case want_apache does not work. # dependency without USE-flag, in which case want_apache does not work.
# DO NOT call this function in global scope. # DO NOT call this function in global scope.
has_apache() { has_apache() {
debug-print-function $FUNCNAME $* debug-print-function ${FUNCNAME} "$@"
if has_version '>=www-servers/apache-2'; then if has_version '>=www-servers/apache-2'; then
_init_apache2 _init_apache2
@ -315,7 +315,7 @@ has_apache() {
# built with a threaded MPM. If the myflag parameter is not given it defaults to # built with a threaded MPM. If the myflag parameter is not given it defaults to
# threads. # threads.
has_apache_threads() { has_apache_threads() {
debug-print-function $FUNCNAME $* debug-print-function ${FUNCNAME} "$@"
if ! has_version 'www-servers/apache[threads]'; then if ! has_version 'www-servers/apache[threads]'; then
return return
@ -338,7 +338,7 @@ has_apache_threads() {
# package if apache has been built with a threaded MPM. If the myflag parameter # package if apache has been built with a threaded MPM. If the myflag parameter
# is not given it defaults to threads. # is not given it defaults to threads.
has_apache_threads_in() { has_apache_threads_in() {
debug-print-function $FUNCNAME $* debug-print-function ${FUNCNAME} "$@"
if ! has_version 'www-servers/apache[threads]'; then if ! has_version 'www-servers/apache[threads]'; then
return return

View File

@ -72,7 +72,7 @@ dist-kernel_get_image_path() {
# the kernel version, <image> full path to the image, <system.map> # the kernel version, <image> full path to the image, <system.map>
# full path to System.map. # full path to System.map.
dist-kernel_install_kernel() { dist-kernel_install_kernel() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
[[ ${#} -eq 3 ]] || die "${FUNCNAME}: invalid arguments" [[ ${#} -eq 3 ]] || die "${FUNCNAME}: invalid arguments"
local version=${1} local version=${1}
@ -125,7 +125,7 @@ dist-kernel_install_kernel() {
# This function is to be used in pkg_postinst() of ebuilds installing # This function is to be used in pkg_postinst() of ebuilds installing
# kernel modules that are included in the initramfs. # kernel modules that are included in the initramfs.
dist-kernel_reinstall_initramfs() { dist-kernel_reinstall_initramfs() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
[[ ${#} -eq 2 ]] || die "${FUNCNAME}: invalid arguments" [[ ${#} -eq 2 ]] || die "${FUNCNAME}: invalid arguments"
local kernel_dir=${1} local kernel_dir=${1}
@ -148,7 +148,7 @@ dist-kernel_reinstall_initramfs() {
# @DESCRIPTION: # @DESCRIPTION:
# Convert a Gentoo-style ebuild version to kernel "x.y.z[-rcN]" version. # Convert a Gentoo-style ebuild version to kernel "x.y.z[-rcN]" version.
dist-kernel_PV_to_KV() { dist-kernel_PV_to_KV() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
[[ ${#} -ne 1 ]] && die "${FUNCNAME}: invalid arguments" [[ ${#} -ne 1 ]] && die "${FUNCNAME}: invalid arguments"
local pv=${1} local pv=${1}
@ -165,7 +165,7 @@ dist-kernel_PV_to_KV() {
# Returns the suffix for kernel modules based on the CONFIG_MODULES_COMPESS_* # Returns the suffix for kernel modules based on the CONFIG_MODULES_COMPESS_*
# setting in the kernel config and USE=modules-compress. # setting in the kernel config and USE=modules-compress.
dist-kernel_get_module_suffix() { dist-kernel_get_module_suffix() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
[[ ${#} -eq 1 ]] || die "${FUNCNAME}: invalid arguments" [[ ${#} -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 # Traverse path for duplicate (un)compressed modules and remove all
# but the newest variant. # but the newest variant.
dist-kernel_compressed_module_cleanup() { dist-kernel_compressed_module_cleanup() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
[[ ${#} -ne 1 ]] && die "${FUNCNAME}: invalid arguments" [[ ${#} -ne 1 ]] && die "${FUNCNAME}: invalid arguments"
local path=${1} local path=${1}

View File

@ -493,7 +493,7 @@ unset -f _distutils_set_globals
# python_compile_all(), you can call the original implementation # python_compile_all(), you can call the original implementation
# as sphinx_compile_all. # as sphinx_compile_all.
distutils_enable_sphinx() { distutils_enable_sphinx() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
[[ ${#} -ge 1 ]] || die "${FUNCNAME} takes at least one arg: <subdir>" [[ ${#} -ge 1 ]] || die "${FUNCNAME} takes at least one arg: <subdir>"
_DISTUTILS_SPHINX_SUBDIR=${1} _DISTUTILS_SPHINX_SUBDIR=${1}
@ -589,7 +589,7 @@ distutils_enable_sphinx() {
# This function must be called in global scope, after RDEPEND has been # This function must be called in global scope, after RDEPEND has been
# declared. Take care not to overwrite the variables set by it. # declared. Take care not to overwrite the variables set by it.
distutils_enable_tests() { distutils_enable_tests() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
case ${1} in case ${1} in
--install) --install)
@ -670,7 +670,7 @@ distutils_enable_tests() {
# #
# This command dies on failure. # This command dies on failure.
esetup.py() { esetup.py() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
_python_check_EPYTHON _python_check_EPYTHON
@ -729,7 +729,7 @@ distutils_install_for_testing() {
# This function must only be used in python_test(). The created file # This function must only be used in python_test(). The created file
# will automatically be removed upon leaving the test phase. # will automatically be removed upon leaving the test phase.
distutils_write_namespace() { distutils_write_namespace() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
if [[ ! ${DISTUTILS_USE_PEP517:-no} != no ]]; then if [[ ! ${DISTUTILS_USE_PEP517:-no} != no ]]; then
die "${FUNCNAME} is available only in PEP517 mode" 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 # At some point in the future, it may also apply eclass-specific
# distutils patches and/or quirks. # distutils patches and/or quirks.
distutils-r1_python_prepare_all() { distutils-r1_python_prepare_all() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
_python_sanity_checks _python_sanity_checks
_distutils-r1_check_all_phase_mismatch _distutils-r1_check_all_phase_mismatch
@ -1057,7 +1057,7 @@ _distutils-r1_copy_egg_info() {
# Print the DISTUTILS_USE_PEP517 value corresponding to the backend # Print the DISTUTILS_USE_PEP517 value corresponding to the backend
# passed as the only argument. # passed as the only argument.
_distutils-r1_backend_to_key() { _distutils-r1_backend_to_key() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
local backend=${1} local backend=${1}
case ${backend} in case ${backend} in
@ -1109,7 +1109,7 @@ _distutils-r1_backend_to_key() {
# Read (or guess, in case of setuptools) the build-backend # Read (or guess, in case of setuptools) the build-backend
# for the package in the current directory. # for the package in the current directory.
_distutils-r1_get_backend() { _distutils-r1_get_backend() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
local build_backend legacy_fallback local build_backend legacy_fallback
if [[ -f pyproject.toml ]]; then if [[ -f pyproject.toml ]]; then
@ -1179,7 +1179,7 @@ _distutils-r1_get_backend() {
# #
# This function is intended for expert use only. # This function is intended for expert use only.
distutils_wheel_install() { distutils_wheel_install() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
if [[ ${#} -ne 2 ]]; then if [[ ${#} -ne 2 ]]; then
die "${FUNCNAME} takes exactly two arguments: <root> <wheel>" die "${FUNCNAME} takes exactly two arguments: <root> <wheel>"
fi fi
@ -1236,7 +1236,7 @@ distutils_wheel_install() {
# wrapping executables. The wheel path is returned # wrapping executables. The wheel path is returned
# in DISTUTILS_WHEEL_PATH variable. # in DISTUTILS_WHEEL_PATH variable.
distutils_pep517_install() { distutils_pep517_install() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
[[ ${#} -eq 1 ]] || die "${FUNCNAME} takes exactly one argument: root" [[ ${#} -eq 1 ]] || die "${FUNCNAME} takes exactly one argument: root"
if [[ ! ${DISTUTILS_USE_PEP517:-no} != no ]]; then 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 # function will be appended to setup.py invocation, i.e. passed
# as options to the 'build' command. # as options to the 'build' command.
distutils-r1_python_compile() { distutils-r1_python_compile() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
_python_check_EPYTHON _python_check_EPYTHON
@ -1514,7 +1514,7 @@ distutils-r1_python_compile() {
# @DESCRIPTION: # @DESCRIPTION:
# Moves and wraps all installed scripts/executables as necessary. # Moves and wraps all installed scripts/executables as necessary.
_distutils-r1_wrap_scripts() { _distutils-r1_wrap_scripts() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
[[ ${#} -eq 1 ]] || die "usage: ${FUNCNAME} <bindir>" [[ ${#} -eq 1 ]] || die "usage: ${FUNCNAME} <bindir>"
local bindir=${1} local bindir=${1}
@ -1568,7 +1568,7 @@ _distutils-r1_wrap_scripts() {
# #
# This function is used only if distutils_enable_tests is called. # This function is used only if distutils_enable_tests is called.
distutils-r1_python_test() { distutils-r1_python_test() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
if [[ -z ${_DISTUTILS_TEST_RUNNER} ]]; then if [[ -z ${_DISTUTILS_TEST_RUNNER} ]]; then
die "${FUNCNAME} can be only used after calling distutils_enable_tests" 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 # Any parameters passed to this function will be appended
# to the setup.py invocation (i.e. as options to the 'install' command). # to the setup.py invocation (i.e. as options to the 'install' command).
distutils-r1_python_install() { distutils-r1_python_install() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
_python_check_EPYTHON _python_check_EPYTHON
@ -1728,7 +1728,7 @@ distutils-r1_python_install() {
# @DESCRIPTION: # @DESCRIPTION:
# The default python_install_all(). It installs the documentation. # The default python_install_all(). It installs the documentation.
distutils-r1_python_install_all() { distutils-r1_python_install_all() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
_distutils-r1_check_all_phase_mismatch _distutils-r1_check_all_phase_mismatch
einstalldocs einstalldocs
@ -1748,7 +1748,7 @@ distutils-r1_python_install_all() {
# holding the per-implementation copy of sources. BUILD_DIR points # holding the per-implementation copy of sources. BUILD_DIR points
# to the 'build' subdirectory. # to the 'build' subdirectory.
distutils-r1_run_phase() { distutils-r1_run_phase() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
if [[ ${DISTUTILS_IN_SOURCE_BUILD} ]]; then if [[ ${DISTUTILS_IN_SOURCE_BUILD} ]]; then
[[ ${DISTUTILS_USE_PEP517} ]] && [[ ${DISTUTILS_USE_PEP517} ]] &&
@ -1869,7 +1869,7 @@ _distutils-r1_run_common_phase() {
# Run the given phase for each implementation if multiple implementations # Run the given phase for each implementation if multiple implementations
# are enabled, once otherwise. # are enabled, once otherwise.
_distutils-r1_run_foreach_impl() { _distutils-r1_run_foreach_impl() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
# store for restoring after distutils-r1_run_phase. # store for restoring after distutils-r1_run_phase.
local _DISTUTILS_INITIAL_CWD=${PWD} local _DISTUTILS_INITIAL_CWD=${PWD}
@ -1890,7 +1890,7 @@ _distutils-r1_run_foreach_impl() {
} }
distutils-r1_src_prepare() { distutils-r1_src_prepare() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
local ret=0 local ret=0
local _DISTUTILS_DEFAULT_CALLED local _DISTUTILS_DEFAULT_CALLED
@ -1913,7 +1913,7 @@ distutils-r1_src_prepare() {
} }
distutils-r1_src_configure() { distutils-r1_src_configure() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
local ret=0 local ret=0
if declare -f python_configure >/dev/null; then 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 # Verify the the match between files installed between this and previous
# implementation. # implementation.
_distutils-r1_compare_installed_files() { _distutils-r1_compare_installed_files() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
# QA check requires diff(1). # QA check requires diff(1).
if ! type -P diff &>/dev/null; then 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, # Post-phase function called after python_compile. In PEP517 mode,
# it adjusts the install tree for venv-style usage. # it adjusts the install tree for venv-style usage.
_distutils-r1_post_python_compile() { _distutils-r1_post_python_compile() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
local root=${BUILD_DIR}/install local root=${BUILD_DIR}/install
if [[ ${DISTUTILS_USE_PEP517} && -d ${root} ]]; then if [[ ${DISTUTILS_USE_PEP517} && -d ${root} ]]; then
@ -2005,7 +2005,7 @@ _distutils-r1_post_python_compile() {
} }
distutils-r1_src_compile() { distutils-r1_src_compile() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
local ret=0 local ret=0
if declare -f python_compile >/dev/null; then if declare -f python_compile >/dev/null; then
@ -2040,7 +2040,7 @@ _distutils-r1_clean_egg_info() {
# @DESCRIPTION: # @DESCRIPTION:
# Post-phase function called after python_test. # Post-phase function called after python_test.
_distutils-r1_post_python_test() { _distutils-r1_post_python_test() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
if [[ ! ${DISTUTILS_USE_PEP517} ]]; then if [[ ! ${DISTUTILS_USE_PEP517} ]]; then
_distutils-r1_clean_egg_info _distutils-r1_clean_egg_info
@ -2048,7 +2048,7 @@ _distutils-r1_post_python_test() {
} }
distutils-r1_src_test() { distutils-r1_src_test() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
local ret=0 local ret=0
if declare -f python_test >/dev/null; then 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 # Find and remove setuptools-style namespaces in the specified
# directory. # directory.
_distutils-r1_strip_namespace_packages() { _distutils-r1_strip_namespace_packages() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
local sitedir=${1} local sitedir=${1}
local f ns had_any= local f ns had_any=
@ -2098,7 +2098,7 @@ _distutils-r1_strip_namespace_packages() {
# Post-phase function called after python_install. Performs QA checks. # Post-phase function called after python_install. Performs QA checks.
# In PEP517 mode, additionally optimizes installed Python modules. # In PEP517 mode, additionally optimizes installed Python modules.
_distutils-r1_post_python_install() { _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 if [[ -d ${sitedir} ]]; then
@ -2181,7 +2181,7 @@ _distutils-r1_check_namespace_pth() {
} }
distutils-r1_src_install() { distutils-r1_src_install() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
local ret=0 local ret=0
if declare -f python_install >/dev/null; then if declare -f python_install >/dev/null; then

View File

@ -188,7 +188,7 @@ dotnet-pkg-base_get-configuration() {
# #
# This function is used inside "dotnet-pkg-base_setup". # This function is used inside "dotnet-pkg-base_setup".
dotnet-pkg-base_get-output() { dotnet-pkg-base_get-output() {
debug-print-function "${FUNCNAME[0]}" "${@}" debug-print-function ${FUNCNAME} "$@"
[[ -z ${DOTNET_PKG_CONFIGURATION} ]] && [[ -z ${DOTNET_PKG_CONFIGURATION} ]] &&
die "${FUNCNAME[0]}: DOTNET_PKG_CONFIGURATION is not set." 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. # Used by "dotnet-pkg_src_prepare" from the "dotnet-pkg" eclass.
dotnet-pkg-base_remove-global-json() { dotnet-pkg-base_remove-global-json() {
debug-print-function "${FUNCNAME[0]}" "${@}" debug-print-function ${FUNCNAME} "$@"
local file="${1:-.}"/global.json local file="${1:-.}"/global.json
@ -282,7 +282,7 @@ dotnet-pkg-base_remove-global-json() {
# @DESCRIPTION: # @DESCRIPTION:
# Call dotnet, passing the supplied arguments. # Call dotnet, passing the supplied arguments.
edotnet() { edotnet() {
debug-print-function "${FUNCNAME[0]}" "${@}" debug-print-function ${FUNCNAME} "$@"
if [[ -z ${DOTNET_PKG_EXECUTABLE} ]] ; then if [[ -z ${DOTNET_PKG_EXECUTABLE} ]] ; then
die "${FUNCNAME[0]}: DOTNET_PKG_EXECUTABLE not set. Was dotnet-pkg-base_setup called?" 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. # Used by "dotnet-pkg_src_configure" from the "dotnet-pkg" eclass.
dotnet-pkg-base_info() { dotnet-pkg-base_info() {
if [[ ${CATEGORY}/${PN} == dev-dotnet/csharp-gentoodotnetinfo ]] ; then 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 elif command -v gentoo-dotnet-info >/dev/null ; then
gentoo-dotnet-info || die "${FUNCNAME[0]}: failed to execute gentoo-dotnet-info" gentoo-dotnet-info || die "${FUNCNAME[0]}: failed to execute gentoo-dotnet-info"
else else
@ -316,7 +316,7 @@ dotnet-pkg-base_info() {
# #
# Used by "dotnet-pkg_remove-bad" from the "dotnet-pkg" eclass. # Used by "dotnet-pkg_remove-bad" from the "dotnet-pkg" eclass.
dotnet-pkg-base_sln-remove() { dotnet-pkg-base_sln-remove() {
debug-print-function "${FUNCNAME[0]}" "${@}" debug-print-function ${FUNCNAME} "$@"
[[ -z ${1} ]] && die "${FUNCNAME[0]}: no solution file specified" [[ -z ${1} ]] && die "${FUNCNAME[0]}: no solution file specified"
[[ -z ${2} ]] && die "${FUNCNAME[0]}: no project 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 # Used by "dotnet-pkg_src_configure" and "dotnet-pkg_src_test" from
# the "dotnet-pkg" eclass. # the "dotnet-pkg" eclass.
dotnet-pkg-base_foreach-solution() { dotnet-pkg-base_foreach-solution() {
debug-print-function "${FUNCNAME[0]}" "${@}" debug-print-function ${FUNCNAME} "$@"
local directory="${1}" local directory="${1}"
shift shift
@ -362,7 +362,7 @@ dotnet-pkg-base_foreach-solution() {
# #
# Used by "dotnet-pkg_src_configure" from the "dotnet-pkg" eclass. # Used by "dotnet-pkg_src_configure" from the "dotnet-pkg" eclass.
dotnet-pkg-base_restore() { dotnet-pkg-base_restore() {
debug-print-function "${FUNCNAME[0]}" "${@}" debug-print-function ${FUNCNAME} "$@"
local -a restore_args=( local -a restore_args=(
--runtime "${DOTNET_PKG_RUNTIME}" --runtime "${DOTNET_PKG_RUNTIME}"
@ -385,7 +385,7 @@ dotnet-pkg-base_restore() {
# Additionally any number of "args" maybe be given, they are appended to # Additionally any number of "args" maybe be given, they are appended to
# the "dotnet" command invocation. # the "dotnet" command invocation.
dotnet-pkg-base_restore-tools() { dotnet-pkg-base_restore-tools() {
debug-print-function "${FUNCNAME[0]}" "${@}" debug-print-function ${FUNCNAME} "$@"
local -a tool_restore_args=( local -a tool_restore_args=(
--add-source "${NUGET_PACKAGES}" --add-source "${NUGET_PACKAGES}"
@ -421,7 +421,7 @@ dotnet-pkg-base_restore_tools() {
# #
# Used by "dotnet-pkg_src_compile" from the "dotnet-pkg" eclass. # Used by "dotnet-pkg_src_compile" from the "dotnet-pkg" eclass.
dotnet-pkg-base_build() { dotnet-pkg-base_build() {
debug-print-function "${FUNCNAME[0]}" "${@}" debug-print-function ${FUNCNAME} "$@"
local -a build_args=( local -a build_args=(
--configuration "${DOTNET_PKG_CONFIGURATION}" --configuration "${DOTNET_PKG_CONFIGURATION}"
@ -459,7 +459,7 @@ dotnet-pkg-base_build() {
# #
# Used by "dotnet-pkg_src_test" from the "dotnet-pkg" eclass. # Used by "dotnet-pkg_src_test" from the "dotnet-pkg" eclass.
dotnet-pkg-base_test() { dotnet-pkg-base_test() {
debug-print-function "${FUNCNAME[0]}" "${@}" debug-print-function ${FUNCNAME} "$@"
local -a test_args=( local -a test_args=(
--configuration "${DOTNET_PKG_CONFIGURATION}" --configuration "${DOTNET_PKG_CONFIGURATION}"
@ -479,7 +479,7 @@ dotnet-pkg-base_test() {
# #
# Installation directory is relative to "ED". # Installation directory is relative to "ED".
dotnet-pkg-base_install() { dotnet-pkg-base_install() {
debug-print-function "${FUNCNAME[0]}" "${@}" debug-print-function ${FUNCNAME} "$@"
local installation_directory="${1:-/usr/share/${P}}" local installation_directory="${1:-/usr/share/${P}}"
@ -495,7 +495,7 @@ dotnet-pkg-base_install() {
# #
# For more info see the "_DOTNET_PKG_LAUNCHERDEST" variable. # For more info see the "_DOTNET_PKG_LAUNCHERDEST" variable.
dotnet-pkg-base_launcherinto() { dotnet-pkg-base_launcherinto() {
debug-print-function "${FUNCNAME[0]}" "${@}" debug-print-function ${FUNCNAME} "$@"
[[ -z ${1} ]] && die "${FUNCNAME[0]}: no directory specified" [[ -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. # For more info see the "_DOTNET_PKG_LAUNCHERVARS" variable.
dotnet-pkg-base_append-launchervar() { dotnet-pkg-base_append-launchervar() {
debug-print-function "${FUNCNAME[0]}" "${@}" debug-print-function ${FUNCNAME} "$@"
[[ -z ${1} ]] && die "${FUNCNAME[0]}: no variable setting specified" [[ -z ${1} ]] && die "${FUNCNAME[0]}: no variable setting specified"
@ -553,7 +553,7 @@ dotnet-pkg-base_append_launchervar() {
# #
# The path is prepended by "EPREFIX". # The path is prepended by "EPREFIX".
dotnet-pkg-base_dolauncher() { dotnet-pkg-base_dolauncher() {
debug-print-function "${FUNCNAME[0]}" "${@}" debug-print-function ${FUNCNAME} "$@"
local executable_path executable_name local executable_path executable_name
@ -618,7 +618,7 @@ dotnet-pkg-base_dolauncher() {
# #
# The path is prepended by "EPREFIX". # The path is prepended by "EPREFIX".
dotnet-pkg-base_dolauncher-portable() { dotnet-pkg-base_dolauncher-portable() {
debug-print-function "${FUNCNAME[0]}" "${@}" debug-print-function ${FUNCNAME} "$@"
local dll_path="${1}" local dll_path="${1}"
local executable_name="${2}" local executable_name="${2}"

View File

@ -210,7 +210,7 @@ dotnet-pkg_src_unpack() {
# #
# Used by "dotnet-pkg_src_prepare". # Used by "dotnet-pkg_src_prepare".
dotnet-pkg_remove-bad() { dotnet-pkg_remove-bad() {
debug-print-function "${FUNCNAME[0]}" "${@}" debug-print-function ${FUNCNAME} "$@"
[[ -z ${1} ]] && die "${FUNCNAME[0]}: no solution file specified" [[ -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". # Used by "dotnet-pkg_src_configure" and "dotnet-pkg_src_compile".
dotnet-pkg_foreach-project() { dotnet-pkg_foreach-project() {
debug-print-function "${FUNCNAME[0]}" "${@}" debug-print-function ${FUNCNAME} "$@"
local dotnet_project local dotnet_project
for dotnet_project in "${DOTNET_PKG_PROJECTS[@]}" ; do for dotnet_project in "${DOTNET_PKG_PROJECTS[@]}" ; do

View File

@ -55,7 +55,7 @@ BDEPEND="
# edune clean # edune clean
# @CODE # @CODE
edune() { edune() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
edo dune "${@}" edo dune "${@}"
} }
@ -74,7 +74,7 @@ edune() {
# dune-release build --target @install menhir menhirLib menhirSdk # dune-release build --target @install menhir menhirLib menhirSdk
# @CODE # @CODE
dune-release() { dune-release() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
local subcommand local subcommand
local target local target
@ -120,7 +120,7 @@ dune-release() {
# dune-compile menhir menhirLib menhirSdk # dune-compile menhir menhirLib menhirSdk
# @CODE # @CODE
dune-compile() { dune-compile() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
dune-release build --target @install "${@}" dune-release build --target @install "${@}"
} }
@ -135,7 +135,7 @@ dune-compile() {
# dune-test menhir menhirLib menhirSdk # dune-test menhir menhirLib menhirSdk
# @CODE # @CODE
dune-test() { dune-test() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
dune-release runtest "${@}" dune-release runtest "${@}"
} }
@ -159,7 +159,7 @@ dune_src_test() {
# dune-install menhir menhirLib menhirSdk # dune-install menhir menhirLib menhirSdk
# @CODE # @CODE
dune-install() { dune-install() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
local -a pkgs=( "${@}" ) local -a pkgs=( "${@}" )

View File

@ -91,7 +91,7 @@ unset _f_use
# Return the Fortran compiler flag to enable 64 bit integers for # Return the Fortran compiler flag to enable 64 bit integers for
# array indices # array indices
fortran_int64_abi_fflags() { fortran_int64_abi_fflags() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
local _FC=$(tc-getFC) local _FC=$(tc-getFC)
if [[ ${_FC} == *gfortran* ]]; then if [[ ${_FC} == *gfortran* ]]; then
@ -108,7 +108,7 @@ fortran_int64_abi_fflags() {
# @DESCRIPTION: # @DESCRIPTION:
# writes fortran test code # writes fortran test code
_fortran_write_testsuite() { _fortran_write_testsuite() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
local filebase=${T}/test-fortran local filebase=${T}/test-fortran
@ -136,7 +136,7 @@ _fortran_write_testsuite() {
# Takes fortran compiler as first argument and dialect as second. # Takes fortran compiler as first argument and dialect as second.
# Checks whether the passed fortran compiler speaks the fortran dialect # Checks whether the passed fortran compiler speaks the fortran dialect
_fortran_compile_test() { _fortran_compile_test() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
local filebase=${T}/test-fortran local filebase=${T}/test-fortran
local fcomp=${1} local fcomp=${1}
@ -163,7 +163,7 @@ _fortran_compile_test() {
# @DESCRIPTION: # @DESCRIPTION:
# See if the fortran supports OpenMP. # See if the fortran supports OpenMP.
_fortran-has-openmp() { _fortran-has-openmp() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
local flag local flag
local filebase=${T}/test-fc-openmp local filebase=${T}/test-fc-openmp
@ -192,7 +192,7 @@ _fortran-has-openmp() {
# @DESCRIPTION: # @DESCRIPTION:
# Detailed description how to handle fortran support # Detailed description how to handle fortran support
_fortran_die_msg() { _fortran_die_msg() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
eerror eerror
eerror "Please install currently selected gcc version with USE=fortran." eerror "Please install currently selected gcc version with USE=fortran."
@ -209,7 +209,7 @@ _fortran_die_msg() {
# Internal test function for working fortran compiler. # Internal test function for working fortran compiler.
# It is called in fortran-2_pkg_setup. # It is called in fortran-2_pkg_setup.
_fortran_test_function() { _fortran_test_function() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
local dialect local dialect
@ -275,7 +275,7 @@ _fortran-2_pkg_setup() {
# Setup functionality, # Setup functionality,
# checks for a valid fortran compiler and optionally for its openmp support. # checks for a valid fortran compiler and optionally for its openmp support.
fortran-2_pkg_setup() { fortran-2_pkg_setup() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
if [[ ${MERGE_TYPE} != binary ]]; then if [[ ${MERGE_TYPE} != binary ]]; then
_fortran-2_pkg_setup _fortran-2_pkg_setup

View File

@ -322,7 +322,7 @@ go-module_set_globals() {
# It sets up the go module proxy in the appropriate location. # It sets up the go module proxy in the appropriate location.
go-module_setup_proxy() { go-module_setup_proxy() {
# shellcheck disable=SC2120 # shellcheck disable=SC2120
debug-print-function "${FUNCNAME}" "$@" debug-print-function ${FUNCNAME} "$@"
if [[ ! ${_GO_MODULE_SET_GLOBALS_CALLED} ]]; then if [[ ! ${_GO_MODULE_SET_GLOBALS_CALLED} ]]; then
die "go-module_set_globals must be called in global scope" die "go-module_set_globals must be called in global scope"
@ -401,7 +401,7 @@ go-module_src_unpack() {
# directory correctly. # directory correctly.
_go-module_src_unpack_gosum() { _go-module_src_unpack_gosum() {
# shellcheck disable=SC2120 # shellcheck disable=SC2120
debug-print-function "${FUNCNAME}" "$@" debug-print-function ${FUNCNAME} "$@"
if [[ ! ${_GO_MODULE_SET_GLOBALS_CALLED} ]]; then if [[ ! ${_GO_MODULE_SET_GLOBALS_CALLED} ]]; then
die "go-module_set_globals must be called in global scope" 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. # the package, without actually building it yet.
_go-module_src_unpack_verify_gosum() { _go-module_src_unpack_verify_gosum() {
# shellcheck disable=SC2120 # shellcheck disable=SC2120
debug-print-function "${FUNCNAME}" "$@" debug-print-function ${FUNCNAME} "$@"
if [[ ! ${_GO_MODULE_SET_GLOBALS_CALLED} ]]; then if [[ ! ${_GO_MODULE_SET_GLOBALS_CALLED} ]]; then
die "go-module_set_globals must be called in global scope" 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 # This function is used in live ebuilds to vendor the dependencies when
# upstream doesn't vendor them. # upstream doesn't vendor them.
go-module_live_vendor() { go-module_live_vendor() {
debug-print-function "${FUNCNAME}" "$@" debug-print-function ${FUNCNAME} "$@"
# shellcheck disable=SC2086 # shellcheck disable=SC2086
has live ${PROPERTIES} || has live ${PROPERTIES} ||

View File

@ -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 # Create the readme doc via stdin. You can use --append to append to an
# existing readme doc. # existing readme doc.
greadme_stdin() { greadme_stdin() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
local append local append
if [[ ${1} = --append ]]; then if [[ ${1} = --append ]]; then
@ -97,7 +97,7 @@ greadme_stdin() {
# @DESCRIPTION: # @DESCRIPTION:
# Installs the provided file as readme doc. # Installs the provided file as readme doc.
greadme_file() { greadme_file() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
local input_doc_file="${1}" local input_doc_file="${1}"
if [[ -z ${input_doc_file} ]]; then if [[ -z ${input_doc_file} ]]; then
@ -114,7 +114,7 @@ greadme_file() {
# @DESCRIPTION: # @DESCRIPTION:
# Installs the readme file from the temp directory into the image. # Installs the readme file from the temp directory into the image.
_greadme_install_doc() { _greadme_install_doc() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
local greadme="${_GREADME_TMP_FILE}" local greadme="${_GREADME_TMP_FILE}"
if [[ ! ${GREADME_DISABLE_AUTOFORMAT} ]]; then if [[ ! ${GREADME_DISABLE_AUTOFORMAT} ]]; then
@ -148,7 +148,7 @@ _greadme_install_doc() {
# Performs checks like comparing the readme doc from the image with a # Performs checks like comparing the readme doc from the image with a
# potentially existing one in the live system. # potentially existing one in the live system.
greadme_pkg_preinst() { greadme_pkg_preinst() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
if [[ -z ${REPLACING_VERSIONS} ]]; then if [[ -z ${REPLACING_VERSIONS} ]]; then
_GREADME_SHOW="fresh-install" _GREADME_SHOW="fresh-install"
@ -224,7 +224,7 @@ greadme_pkg_preinst() {
# @DESCRIPTION: # @DESCRIPTION:
# Conditionally shows the contents of the readme doc via elog. # Conditionally shows the contents of the readme doc via elog.
greadme_pkg_postinst() { greadme_pkg_postinst() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
if [[ ! -v _GREADME_SHOW ]]; then if [[ ! -v _GREADME_SHOW ]]; then
die "_GREADME_SHOW not set. Did you call greadme_pkg_preinst?" die "_GREADME_SHOW not set. Did you call greadme_pkg_preinst?"

View File

@ -129,7 +129,7 @@ inherit guile-utils
# Please keep in ascending order. # Please keep in ascending order.
_guile_setup() { _guile_setup() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
# Inhibit generating the GUILE_USEDEP. This variable is not usable # Inhibit generating the GUILE_USEDEP. This variable is not usable
# for single packages. # for single packages.
@ -162,7 +162,7 @@ unset -f _guile_setup
# " # "
# @CODE # @CODE
guile_gen_cond_dep() { guile_gen_cond_dep() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
local deps="$1" local deps="$1"
shift shift
@ -196,7 +196,7 @@ guile_gen_cond_dep() {
# #
# For details on the latter three, see guile_export. # For details on the latter three, see guile_export.
guile-single_pkg_setup() { guile-single_pkg_setup() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
guile_set_common_vars guile_set_common_vars
@ -223,7 +223,7 @@ guile-single_pkg_setup() {
# Runs the default prepare stage, and then bumps Guile sources via # Runs the default prepare stage, and then bumps Guile sources via
# guile_bump_sources. # guile_bump_sources.
guile-single_src_prepare() { guile-single_src_prepare() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
default default
guile_bump_sources guile_bump_sources
@ -234,7 +234,7 @@ guile-single_src_prepare() {
# Runs the default install stage, and then marks ccache files not to be # Runs the default install stage, and then marks ccache files not to be
# stripped using guile_unstrip_ccache. # stripped using guile_unstrip_ccache.
guile-single_src_install() { guile-single_src_install() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
default default
guile_unstrip_ccache guile_unstrip_ccache

View File

@ -46,7 +46,7 @@ BDEPEND="virtual/pkgconfig"
# Checks that GUILE_COMPAT is set to an array, and has no invalid # Checks that GUILE_COMPAT is set to an array, and has no invalid
# values. # values.
guile_check_compat() { guile_check_compat() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
if ! [[ ${GUILE_COMPAT@a} == *a* ]]; then if ! [[ ${GUILE_COMPAT@a} == *a* ]]; then
die "GUILE_COMPAT not set to an array" 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, # Sets common variables that apply to all Guile packages, namely,
# QA_PREBUILT. # QA_PREBUILT.
guile_set_common_vars() { guile_set_common_vars() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
# These aren't strictly speaking prebuilt. but they do generated a # These aren't strictly speaking prebuilt. but they do generated a
# nonstandard ELF object. # nonstandard ELF object.
@ -101,7 +101,7 @@ guile_set_common_vars() {
# Alters ${PKG_CONFIG_PATH} such that it does not contain any Guile # Alters ${PKG_CONFIG_PATH} such that it does not contain any Guile
# slots besides the ones required by the caller. # slots besides the ones required by the caller.
guile_filter_pkgconfig_path() { guile_filter_pkgconfig_path() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
local filtered_path= unfiltered_path path local filtered_path= unfiltered_path path
IFS=: read -ra unfiltered_path <<<"${PKG_CONFIG_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 # Generates GUILE_REQUIRED_USE/GUILE_DEPS/GUILE_USEDEP based on
# GUILE_COMPAT, and populates IUSE. # GUILE_COMPAT, and populates IUSE.
guile_generate_depstrings() { guile_generate_depstrings() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
# Generate IUSE, REQUIRED_USE, GUILE_USEDEP # Generate IUSE, REQUIRED_USE, GUILE_USEDEP
local prefix="$1" depop="$2" local prefix="$1" depop="$2"
@ -169,7 +169,7 @@ guile_generate_depstrings() {
# @DESCRIPTION: # @DESCRIPTION:
# Marks site-ccache files not to be stripped. Operates on ${D}. # Marks site-ccache files not to be stripped. Operates on ${D}.
guile_unstrip_ccache() { guile_unstrip_ccache() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
local ccache local ccache
while read -r -d $'\0' ccache; do while read -r -d $'\0' ccache; do
@ -196,7 +196,7 @@ guile_unstrip_ccache() {
# - GUILE_SITECCACHEDIR - Path to the site-ccache directory, # - GUILE_SITECCACHEDIR - Path to the site-ccache directory,
# - GUILE_SITEDIR - Path to the site Scheme directory # - GUILE_SITEDIR - Path to the site Scheme directory
guile_export() { guile_export() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
local gver local gver
if [[ "${GUILE_CURRENT_VERSION}" ]]; then if [[ "${GUILE_CURRENT_VERSION}" ]]; then
@ -243,7 +243,7 @@ guile_export() {
# Creates a guile-config executable for a given Guile version, and # Creates a guile-config executable for a given Guile version, and
# inserts it into path. # inserts it into path.
guile_create_temporary_config() { guile_create_temporary_config() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
[[ ${1} ]] || die "Must specify a Guile version" [[ ${1} ]] || die "Must specify a Guile version"
@ -267,7 +267,7 @@ guile_create_temporary_config() {
# #
# http://debbugs.gnu.org/cgi/bugreport.cgi?bug=38112 # http://debbugs.gnu.org/cgi/bugreport.cgi?bug=38112
guile_bump_sources() { guile_bump_sources() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
einfo "bumping *.scm source files..." einfo "bumping *.scm source files..."
find "${S}" -name "*.scm" -exec touch {} + || die find "${S}" -name "*.scm" -exec touch {} + || die

View File

@ -124,7 +124,7 @@ inherit guile-utils multibuild
# Please keep in ascending order. # Please keep in ascending order.
_guile_setup() { _guile_setup() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
guile_generate_depstrings guile_targets '||' guile_generate_depstrings guile_targets '||'
} }
@ -142,7 +142,7 @@ unset -f _guile_setup
# @DESCRIPTION: # @DESCRIPTION:
# Sets up eclass-internal variables for this build. # Sets up eclass-internal variables for this build.
guile_pkg_setup() { guile_pkg_setup() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
guile_set_common_vars guile_set_common_vars
GUILE_SELECTED_TARGETS=() GUILE_SELECTED_TARGETS=()
@ -161,7 +161,7 @@ guile_pkg_setup() {
# Create a single copy of the package sources for each selected Guile # Create a single copy of the package sources for each selected Guile
# implementation. # implementation.
guile_copy_sources() { guile_copy_sources() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
local MULTIBUILD_VARIANTS local MULTIBUILD_VARIANTS
MULTIBUILD_VARIANTS=("${GUILE_SELECTED_TARGETS[@]}") MULTIBUILD_VARIANTS=("${GUILE_SELECTED_TARGETS[@]}")
@ -177,7 +177,7 @@ guile_copy_sources() {
# guile_foreach_impl. # guile_foreach_impl.
_guile_multibuild_wrapper() { _guile_multibuild_wrapper() {
local GUILE_CURRENT_VERSION="${MULTIBUILD_VARIANT}" local GUILE_CURRENT_VERSION="${MULTIBUILD_VARIANT}"
debug-print-function ${FUNCNAME} "${@}" "on ${MULTIBUILD_VARIANT}" debug-print-function ${FUNCNAME} "$@" "on ${MULTIBUILD_VARIANT}"
local -x PATH="${PATH}" local -x PATH="${PATH}"
guile_create_temporary_config "${GUILE_CURRENT_VERSION}" 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 # This combination should cover Guile detection of a large amount of
# packages out of the box. # packages out of the box.
guile_foreach_impl() { guile_foreach_impl() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
local MULTIBUILD_VARIANTS local MULTIBUILD_VARIANTS
MULTIBUILD_VARIANTS=("${GUILE_SELECTED_TARGETS[@]}") MULTIBUILD_VARIANTS=("${GUILE_SELECTED_TARGETS[@]}")
@ -261,7 +261,7 @@ guile_foreach_impl() {
# @DESCRIPTION: # @DESCRIPTION:
# Runs a single merge_root step for guile_merge_roots. # Runs a single merge_root step for guile_merge_roots.
_guile_merge_single_root() { _guile_merge_single_root() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
multibuild_merge_root "${SLOTTED_D}" "${D}" multibuild_merge_root "${SLOTTED_D}" "${D}"
} }
@ -270,7 +270,7 @@ _guile_merge_single_root() {
# @DESCRIPTION: # @DESCRIPTION:
# Merges install roots from all slots, diagnosing conflicts. # Merges install roots from all slots, diagnosing conflicts.
guile_merge_roots() { guile_merge_roots() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
guile_foreach_impl _guile_merge_single_root guile_foreach_impl _guile_merge_single_root
} }
@ -280,7 +280,7 @@ guile_merge_roots() {
# Runs the passed command once, for the best installed Guile # Runs the passed command once, for the best installed Guile
# implementation. # implementation.
guile_for_best_impl() { guile_for_best_impl() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
multibuild_for_best_variant _guile_multibuild_wrapper "${@}" 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 # Bumps SCM sources runs the default src_prepare and bumps all *.scm
# files. See guile_bump_sources of guile-utils.eclass. # files. See guile_bump_sources of guile-utils.eclass.
guile_src_prepare() { guile_src_prepare() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
default default
guile_bump_sources guile_bump_sources
@ -302,7 +302,7 @@ guile_src_prepare() {
# @DESCRIPTION: # @DESCRIPTION:
# Runs the default src_configure for each selected variant target. # Runs the default src_configure for each selected variant target.
guile_src_configure() { guile_src_configure() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
guile_foreach_impl default guile_foreach_impl default
} }
@ -311,7 +311,7 @@ guile_src_configure() {
# @DESCRIPTION: # @DESCRIPTION:
# Runs the default src_compile for each selected variant target. # Runs the default src_compile for each selected variant target.
guile_src_compile() { guile_src_compile() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
guile_foreach_impl default guile_foreach_impl default
} }
@ -320,7 +320,7 @@ guile_src_compile() {
# @DESCRIPTION: # @DESCRIPTION:
# Runs the default src_test phase for each implementation. # Runs the default src_test phase for each implementation.
guile_src_test() { guile_src_test() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
guile_foreach_impl default guile_foreach_impl default
} }
@ -331,7 +331,7 @@ guile_src_test() {
# Imitates the default build system install "substep", but for a given # Imitates the default build system install "substep", but for a given
# ${SLOTTED_D} rather than the usual ${D}. See guile_src_install. # ${SLOTTED_D} rather than the usual ${D}. See guile_src_install.
_guile_default_install_slot() { _guile_default_install_slot() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
if [[ -f Makefile ]] || [[ -f GNUmakefile ]] || [[ -f makefile ]]; then if [[ -f Makefile ]] || [[ -f GNUmakefile ]] || [[ -f makefile ]]; then
emake DESTDIR="${SLOTTED_D}" install 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 # thing for a GNU Build System based Guile package, for each selected
# variant target. Merges roots after completing the installs. # variant target. Merges roots after completing the installs.
guile_src_install() { guile_src_install() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
guile_foreach_impl _guile_default_install_slot guile_foreach_impl _guile_default_install_slot
guile_merge_roots guile_merge_roots

View File

@ -3024,7 +3024,7 @@ java-pkg_clean() {
# $1 - classpath variable either EANT_GENTOO_CLASSPATH or JAVA_GENTOO_CLASSPATH # $1 - classpath variable either EANT_GENTOO_CLASSPATH or JAVA_GENTOO_CLASSPATH
# @CODE # @CODE
java-pkg_gen-cp() { java-pkg_gen-cp() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
local atom local atom
for atom in ${CP_DEPEND}; do for atom in ${CP_DEPEND}; do

View File

@ -171,7 +171,7 @@ kernel-build_pkg_setup() {
# Prepare the toolchain for building the kernel, get the .config file, # Prepare the toolchain for building the kernel, get the .config file,
# and get build tree configured for modprep. # and get build tree configured for modprep.
kernel-build_src_configure() { kernel-build_src_configure() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
if ! tc-is-cross-compiler && use hppa ; then if ! tc-is-cross-compiler && use hppa ; then
if [[ ${CHOST} == hppa2.0-* ]] ; then if [[ ${CHOST} == hppa2.0-* ]] ; then
@ -294,7 +294,7 @@ kernel-build_src_configure() {
# @DESCRIPTION: # @DESCRIPTION:
# Compile the kernel sources. # Compile the kernel sources.
kernel-build_src_compile() { kernel-build_src_compile() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
local targets=( all ) local targets=( all )
@ -313,7 +313,7 @@ kernel-build_src_compile() {
# Test the built kernel via qemu. This just wraps the logic # Test the built kernel via qemu. This just wraps the logic
# from kernel-install.eclass with the correct paths. # from kernel-install.eclass with the correct paths.
kernel-build_src_test() { kernel-build_src_test() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
local targets=( modules_install ) local targets=( modules_install )
@ -345,7 +345,7 @@ kernel-build_src_test() {
# Install the built kernel along with subset of sources # Install the built kernel along with subset of sources
# into /usr/src/linux-${KV_FULL}. Install the modules. Save the config. # into /usr/src/linux-${KV_FULL}. Install the modules. Save the config.
kernel-build_src_install() { kernel-build_src_install() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
# do not use 'make install' as it behaves differently based # do not use 'make install' as it behaves differently based
# on what kind of installkernel is installed # 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. # This function must be called by the ebuild in the src_prepare phase.
kernel-build_merge_configs() { kernel-build_merge_configs() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
[[ -f .config ]] || [[ -f .config ]] ||
die "${FUNCNAME}: No .config, please copy default config into .config" die "${FUNCNAME}: No .config, please copy default config into .config"

View File

@ -239,7 +239,7 @@ BDEPEND="
# Determine whether the symlink at <target> (full path) should be # Determine whether the symlink at <target> (full path) should be
# updated. Returns 0 if it should, 1 to leave as-is. # updated. Returns 0 if it should, 1 to leave as-is.
kernel-install_can_update_symlink() { kernel-install_can_update_symlink() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
[[ ${#} -eq 1 ]] || die "${FUNCNAME}: invalid arguments" [[ ${#} -eq 1 ]] || die "${FUNCNAME}: invalid arguments"
local target=${1} local target=${1}
@ -282,7 +282,7 @@ kernel-install_can_update_symlink() {
# to <target>-<version> if it's either missing or pointing out to # to <target>-<version> if it's either missing or pointing out to
# an older version of this package. # an older version of this package.
kernel-install_update_symlink() { kernel-install_update_symlink() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
[[ ${#} -eq 2 ]] || die "${FUNCNAME}: invalid arguments" [[ ${#} -eq 2 ]] || die "${FUNCNAME}: invalid arguments"
local target=${1} local target=${1}
@ -302,7 +302,7 @@ kernel-install_update_symlink() {
# @DESCRIPTION: # @DESCRIPTION:
# Get appropriate qemu suffix for the current ${ARCH}. # Get appropriate qemu suffix for the current ${ARCH}.
kernel-install_get_qemu_arch() { kernel-install_get_qemu_arch() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
case ${ARCH} in case ${ARCH} in
amd64) amd64)
@ -331,7 +331,7 @@ kernel-install_get_qemu_arch() {
# @DESCRIPTION: # @DESCRIPTION:
# Create minimal /sbin/init # Create minimal /sbin/init
kernel-install_create_init() { kernel-install_create_init() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
[[ ${#} -eq 1 ]] || die "${FUNCNAME}: invalid arguments" [[ ${#} -eq 1 ]] || die "${FUNCNAME}: invalid arguments"
[[ -z ${1} ]] && die "${FUNCNAME}: empty argument specified" [[ -z ${1} ]] && die "${FUNCNAME}: empty argument specified"
@ -369,7 +369,7 @@ kernel-install_create_init() {
# @DESCRIPTION: # @DESCRIPTION:
# Create minimal qemu raw image # Create minimal qemu raw image
kernel-install_create_qemu_image() { kernel-install_create_qemu_image() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
[[ ${#} -eq 1 ]] || die "${FUNCNAME}: invalid arguments" [[ ${#} -eq 1 ]] || die "${FUNCNAME}: invalid arguments"
[[ -z ${1} ]] && die "${FUNCNAME}: empty argument specified" [[ -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, # in qemu. <version> is the kernel version, <image> path to the image,
# <modules> path to module tree. # <modules> path to module tree.
kernel-install_test() { kernel-install_test() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
[[ ${#} -eq 3 ]] || die "${FUNCNAME}: invalid arguments" [[ ${#} -eq 3 ]] || die "${FUNCNAME}: invalid arguments"
local version=${1} local version=${1}
@ -534,7 +534,7 @@ kernel-install_test() {
# @DESCRIPTION: # @DESCRIPTION:
# Check for missing optional dependencies and output warnings. # Check for missing optional dependencies and output warnings.
kernel-install_pkg_pretend() { 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 # Check, but don't die because we can fix the problem and then
# emerge --config ... to re-run installation. # emerge --config ... to re-run installation.
@ -582,7 +582,7 @@ kernel-install_pkg_pretend() {
# @DESCRIPTION: # @DESCRIPTION:
# Boilerplate function to remind people to call the tests. # Boilerplate function to remind people to call the tests.
kernel-install_src_test() { kernel-install_src_test() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
die "Please redefine src_test() and call kernel-install_test()." die "Please redefine src_test() and call kernel-install_test()."
} }
@ -591,7 +591,7 @@ kernel-install_src_test() {
# @DESCRIPTION: # @DESCRIPTION:
# Verify whether the kernel has been installed correctly. # Verify whether the kernel has been installed correctly.
kernel-install_pkg_preinst() { kernel-install_pkg_preinst() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
# Set KV_FULL to ${PV}${KV_LOCALVERSION} if it hasn't # Set KV_FULL to ${PV}${KV_LOCALVERSION} if it hasn't
# been set elsewhere for backward compatibility with existing # 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(). # installkernel. This is called from pkg_postinst() and pkg_config().
# <ver> is the full kernel version. # <ver> is the full kernel version.
kernel-install_install_all() { kernel-install_install_all() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
[[ ${#} -eq 1 ]] || die "${FUNCNAME}: invalid arguments" [[ ${#} -eq 1 ]] || die "${FUNCNAME}: invalid arguments"
local dir_ver=${1} local dir_ver=${1}
@ -705,7 +705,7 @@ kernel-install_install_all() {
# Build an initramfs for the kernel, install it and update # Build an initramfs for the kernel, install it and update
# the /usr/src/linux symlink. # the /usr/src/linux symlink.
kernel-install_pkg_postinst() { kernel-install_pkg_postinst() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
kernel-install_update_symlink "${EROOT}/usr/src/linux" "${KV_FULL}" kernel-install_update_symlink "${EROOT}/usr/src/linux" "${KV_FULL}"
dist-kernel_compressed_module_cleanup \ dist-kernel_compressed_module_cleanup \
@ -733,7 +733,7 @@ kernel-install_pkg_postinst() {
# @DESCRIPTION: # @DESCRIPTION:
# Clean up the generated initramfs from the removed kernel directory. # Clean up the generated initramfs from the removed kernel directory.
kernel-install_pkg_postrm() { kernel-install_pkg_postrm() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
if [[ -z ${ROOT} && ! ${KERNEL_IUSE_GENERIC_UKI} ]]; then if [[ -z ${ROOT} && ! ${KERNEL_IUSE_GENERIC_UKI} ]]; then
local kernel_dir=${EROOT}/usr/src/linux-${KV_FULL} local kernel_dir=${EROOT}/usr/src/linux-${KV_FULL}
@ -762,7 +762,7 @@ kernel-install_pkg_config() {
# @DESCRIPTION: # @DESCRIPTION:
# Compress modules installed in ED, if USE=modules-compress is enabled. # Compress modules installed in ED, if USE=modules-compress is enabled.
kernel-install_compress_modules() { kernel-install_compress_modules() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
if use modules-compress; then if use modules-compress; then
einfo "Compressing kernel modules ..." einfo "Compressing kernel modules ..."

View File

@ -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 # Distributed under the terms of the GNU General Public License v2
# @ECLASS: latex-package.eclass # @ECLASS: latex-package.eclass
@ -93,7 +93,7 @@ LATEX_DOC_ARGUMENTS=""
# It installs the files found in the current directory to the standard locations # It installs the files found in the current directory to the standard locations
# for a TeX installation # for a TeX installation
latex-package_src_doinstall() { latex-package_src_doinstall() {
debug-print-function "${FUNCNAME}" "$@" debug-print-function ${FUNCNAME} "$@"
# Avoid generating font cache outside of the sandbox # Avoid generating font cache outside of the sandbox
export VARTEXFONTS="${T}/fonts" 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 # Calls latex for each *.ins in the current directory in order to generate the
# relevant files that will be installed # relevant files that will be installed
latex-package_src_compile() { latex-package_src_compile() {
debug-print-function "${FUNCNAME}" "$@" debug-print-function ${FUNCNAME} "$@"
while IFS= read -r -d '' i; do while IFS= read -r -d '' i; do
einfo "Extracting from ${i}" einfo "Extracting from ${i}"
latex --halt-on-error --interaction=nonstopmode "${i}" || die latex --halt-on-error --interaction=nonstopmode "${i}" || die
@ -216,7 +216,7 @@ latex-package_src_compile() {
# @DESCRIPTION: # @DESCRIPTION:
# Installs the package # Installs the package
latex-package_src_install() { latex-package_src_install() {
debug-print-function "${FUNCNAME}" "$@" debug-print-function ${FUNCNAME} "$@"
latex-package_src_doinstall all latex-package_src_doinstall all
einstalldocs einstalldocs
} }
@ -226,7 +226,7 @@ latex-package_src_install() {
# Calls latex-package_rehash to ensure the TeX installation is consistent with # Calls latex-package_rehash to ensure the TeX installation is consistent with
# the kpathsea database # the kpathsea database
latex-package_pkg_postinst() { latex-package_pkg_postinst() {
debug-print-function "${FUNCNAME}" "$@" debug-print-function ${FUNCNAME} "$@"
latex-package_rehash latex-package_rehash
} }
@ -235,7 +235,7 @@ latex-package_pkg_postinst() {
# Calls latex-package_rehash to ensure the TeX installation is consistent with # Calls latex-package_rehash to ensure the TeX installation is consistent with
# the kpathsea database # the kpathsea database
latex-package_pkg_postrm() { latex-package_pkg_postrm() {
debug-print-function "${FUNCNAME}" "$@" debug-print-function ${FUNCNAME} "$@"
latex-package_rehash latex-package_rehash
} }
@ -243,7 +243,7 @@ latex-package_pkg_postrm() {
# @DESCRIPTION: # @DESCRIPTION:
# Rehashes the kpathsea database, according to the current TeX installation # Rehashes the kpathsea database, according to the current TeX installation
latex-package_rehash() { latex-package_rehash() {
debug-print-function "${FUNCNAME}" "$@" debug-print-function ${FUNCNAME} "$@"
texmf-update texmf-update
} }

View File

@ -329,7 +329,7 @@ fi
# (normally these should not be used directly, for custom builds) # (normally these should not be used directly, for custom builds)
# 3. perform various sanity checks to fail early on issues # 3. perform various sanity checks to fail early on issues
linux-mod-r1_pkg_setup() { linux-mod-r1_pkg_setup() {
debug-print-function ${FUNCNAME[0]} "${@}" debug-print-function ${FUNCNAME} "$@"
_MODULES_GLOBAL[ran:pkg_setup]=1 _MODULES_GLOBAL[ran:pkg_setup]=1
_modules_check_function ${#} 0 0 || return 0 _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, # different make arguments per modules or intermediate steps -- albeit,
# if atypical, may want to build manually (see eclass' example). # if atypical, may want to build manually (see eclass' example).
linux-mod-r1_src_compile() { linux-mod-r1_src_compile() {
debug-print-function ${FUNCNAME[0]} "${@}" debug-print-function ${FUNCNAME} "$@"
_modules_check_function ${#} 0 0 || return 0 _modules_check_function ${#} 0 0 || return 0
[[ ${modlist@a} == *a* && ${#modlist[@]} -gt 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 # Installs modules built by linux-mod-r1_src_compile using
# linux_domodule, then runs modules_post_process and einstalldocs. # linux_domodule, then runs modules_post_process and einstalldocs.
linux-mod-r1_src_install() { linux-mod-r1_src_install() {
debug-print-function ${FUNCNAME[0]} "${@}" debug-print-function ${FUNCNAME} "$@"
_modules_check_function ${#} 0 0 || return 0 _modules_check_function ${#} 0 0 || return 0
(( ${#_MODULES_INSTALL[@]} )) || (( ${#_MODULES_INSTALL[@]} )) ||
@ -502,7 +502,7 @@ linux-mod-r1_src_install() {
# @DESCRIPTION: # @DESCRIPTION:
# Updates module dependencies using depmod. # Updates module dependencies using depmod.
linux-mod-r1_pkg_postinst() { linux-mod-r1_pkg_postinst() {
debug-print-function ${FUNCNAME[0]} "${@}" debug-print-function ${FUNCNAME} "$@"
_modules_check_function ${#} 0 0 || return 0 _modules_check_function ${#} 0 0 || return 0
dist-kernel_compressed_module_cleanup "${EROOT}/lib/modules/${KV_FULL}" dist-kernel_compressed_module_cleanup "${EROOT}/lib/modules/${KV_FULL}"
@ -534,7 +534,7 @@ linux-mod-r1_pkg_postinst() {
# #
# See also linux_moduleinto. # See also linux_moduleinto.
linux_domodule() { linux_domodule() {
debug-print-function ${FUNCNAME[0]} "${@}" debug-print-function ${FUNCNAME} "$@"
_modules_check_function ${#} 1 '' "<module>..." || return 0 _modules_check_function ${#} 1 '' "<module>..." || return 0
( (
# linux-mod-r0 formerly supported INSTALL_MOD_PATH (bug #642240), but # 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 # this is like setting INSTALL_MOD_DIR which has the same default
# for external modules. # for external modules.
linux_moduleinto() { linux_moduleinto() {
debug-print-function ${FUNCNAME[0]} "${@}" debug-print-function ${FUNCNAME} "$@"
_modules_check_function ${#} 1 1 "<install-dir>" || return 0 _modules_check_function ${#} 1 1 "<install-dir>" || return 0
_MODULES_GLOBAL[moduleinto]=${1} _MODULES_GLOBAL[moduleinto]=${1}
} }
@ -582,7 +582,7 @@ linux_moduleinto() {
# if modules were unexpectedly pre-compressed possibly due to using # if modules were unexpectedly pre-compressed possibly due to using
# make install without passing MODULES_MAKEARGS to disable it. # make install without passing MODULES_MAKEARGS to disable it.
modules_post_process() { modules_post_process() {
debug-print-function ${FUNCNAME[0]} "${@}" debug-print-function ${FUNCNAME} "$@"
_modules_check_function ${#} 0 1 '[<path>]' || return 0 _modules_check_function ${#} 0 1 '[<path>]' || return 0
[[ ${EBUILD_PHASE} == install ]] || [[ ${EBUILD_PHASE} == install ]] ||
die "${FUNCNAME[0]} can only be called in the src_install phase" die "${FUNCNAME[0]} can only be called in the src_install phase"

View File

@ -101,7 +101,7 @@ _LLVM_NEWEST_STABLE=18
# packages using the same eclass, to enforce a LLVM slot match. # packages using the same eclass, to enforce a LLVM slot match.
_llvm_set_globals() { _llvm_set_globals() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
if [[ ${LLVM_COMPAT@a} != *a* ]]; then if [[ ${LLVM_COMPAT@a} != *a* ]]; then
die "LLVM_COMPAT must be set to an array before inheriting ${ECLASS}" die "LLVM_COMPAT must be set to an array before inheriting ${ECLASS}"
@ -169,7 +169,7 @@ unset -f _llvm_set_globals
# " # "
# @CODE # @CODE
llvm_gen_dep() { llvm_gen_dep() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
[[ ${#} -ne 1 ]] && die "Usage: ${FUNCNAME} <dependency>" [[ ${#} -ne 1 ]] && die "Usage: ${FUNCNAME} <dependency>"
@ -194,7 +194,7 @@ llvm_gen_dep() {
# With "-b" option, the path is prefixed by BROOT. LLVM dependencies # With "-b" option, the path is prefixed by BROOT. LLVM dependencies
# should be in BDEPEND then. # should be in BDEPEND then.
get_llvm_prefix() { get_llvm_prefix() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
[[ ${#} -gt 1 ]] && die "Usage: ${FUNCNAME} [-b|-d]" [[ ${#} -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. # Note that this function is not exported if LLVM_OPTIONAL is set.
# In that case, it needs to be called manually. # In that case, it needs to be called manually.
llvm-r1_pkg_setup() { llvm-r1_pkg_setup() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
if [[ ${MERGE_TYPE} != binary ]]; then if [[ ${MERGE_TYPE} != binary ]]; then
[[ -z ${LLVM_SLOT} ]] && die "LLVM_SLOT unset (broken USE_EXPAND?)" [[ -z ${LLVM_SLOT} ]] && die "LLVM_SLOT unset (broken USE_EXPAND?)"

View File

@ -27,7 +27,7 @@ _LLVM_UTILS_ECLASS=1
# Translate a tuple into a target suitable for LLVM_TARGETS. # Translate a tuple into a target suitable for LLVM_TARGETS.
# Defaults to ${CHOST} if not specified. # Defaults to ${CHOST} if not specified.
llvm_tuple_to_target() { llvm_tuple_to_target() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
[[ ${#} -gt 1 ]] && die "Usage: ${FUNCNAME} [<tuple>]" [[ ${#} -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 # the major version, to prevent PATH alterations from forcing an older
# clang version being used. # clang version being used.
llvm_fix_clang_version() { llvm_fix_clang_version() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
local shopt_save=$(shopt -p -o noglob) local shopt_save=$(shopt -p -o noglob)
set -f set -f
@ -95,7 +95,7 @@ llvm_fix_clang_version() {
# current location, to prevent PATH alterations from forcing older # current location, to prevent PATH alterations from forcing older
# versions being used. # versions being used.
llvm_fix_tool_path() { llvm_fix_tool_path() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
local shopt_save=$(shopt -p -o noglob) local shopt_save=$(shopt -p -o noglob)
set -f set -f
@ -118,7 +118,7 @@ llvm_fix_tool_path() {
# Prepend the path to the specified LLVM slot to PATH variable, # Prepend the path to the specified LLVM slot to PATH variable,
# and reexport it. # and reexport it.
llvm_prepend_path() { llvm_prepend_path() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
[[ ${#} -ne 1 ]] && die "Usage: ${FUNCNAME} <slot>" [[ ${#} -ne 1 ]] && die "Usage: ${FUNCNAME} <slot>"
local slot=${1} local slot=${1}

View File

@ -119,7 +119,7 @@ declare -g -r _LLVM_KNOWN_SLOTS=( {19..8} )
# the function defaults to checking whether sys-devel/llvm:${LLVM_SLOT} # the function defaults to checking whether sys-devel/llvm:${LLVM_SLOT}
# is installed. # is installed.
get_llvm_slot() { get_llvm_slot() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
local hv_switch=-d local hv_switch=-d
while [[ ${1} == -* ]]; do while [[ ${1} == -* ]]; do
@ -170,7 +170,7 @@ get_llvm_slot() {
# #
# The options and behavior is the same as for get_llvm_slot. # The options and behavior is the same as for get_llvm_slot.
get_llvm_prefix() { get_llvm_prefix() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
local prefix=${ESYSROOT} local prefix=${ESYSROOT}
[[ ${1} == -b ]] && prefix=${BROOT} [[ ${1} == -b ]] && prefix=${BROOT}
@ -193,7 +193,7 @@ get_llvm_prefix() {
# If any other behavior is desired, the contents of the function # If any other behavior is desired, the contents of the function
# should be inlined into the ebuild and modified as necessary. # should be inlined into the ebuild and modified as necessary.
llvm_pkg_setup() { llvm_pkg_setup() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
if [[ ${LLVM_ECLASS_SKIP_PKG_SETUP} ]]; then if [[ ${LLVM_ECLASS_SKIP_PKG_SETUP} ]]; then
return return

View File

@ -285,7 +285,7 @@ unset -f _lua_single_set_globals
# #
# This is an internal function used to implement lua_gen_cond_dep. # This is an internal function used to implement lua_gen_cond_dep.
_lua_gen_usedep() { _lua_gen_usedep() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
local impl matches=() local impl matches=()
@ -338,7 +338,7 @@ _lua_impl_matches() {
# Verify whether the patterns passed to the eclass function are correct # Verify whether the patterns passed to the eclass function are correct
# (i.e. can match any valid implementation). Dies on wrong pattern. # (i.e. can match any valid implementation). Dies on wrong pattern.
_lua_verify_patterns() { _lua_verify_patterns() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
local impl pattern local impl pattern
for pattern; do for pattern; do
@ -381,7 +381,7 @@ _lua_verify_patterns() {
# dev-lua/backported_core_module[lua_targets_lua5-3(-)?,...] )" # dev-lua/backported_core_module[lua_targets_lua5-3(-)?,...] )"
# @CODE # @CODE
lua_gen_cond_dep() { lua_gen_cond_dep() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
local impl matches=() local impl matches=()
@ -440,7 +440,7 @@ lua_gen_cond_dep() {
# )" # )"
# @CODE # @CODE
lua_gen_impl_dep() { lua_gen_impl_dep() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
local impl local impl
local matches=() local matches=()
@ -465,7 +465,7 @@ lua_gen_impl_dep() {
# Determine what the selected Lua implementation is and set # Determine what the selected Lua implementation is and set
# the Lua build environment up for it. # the Lua build environment up for it.
lua_setup() { lua_setup() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
unset ELUA unset ELUA
@ -520,7 +520,7 @@ lua_setup() {
# @DESCRIPTION: # @DESCRIPTION:
# Runs lua_setup. # Runs lua_setup.
lua-single_pkg_setup() { lua-single_pkg_setup() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
[[ ${MERGE_TYPE} != binary ]] && lua_setup [[ ${MERGE_TYPE} != binary ]] && lua_setup
} }

View File

@ -124,7 +124,7 @@ _lua_set_impls() {
# setup will be done. If wrapper update is requested, the directory # setup will be done. If wrapper update is requested, the directory
# shall be removed first. # shall be removed first.
_lua_wrapper_setup() { _lua_wrapper_setup() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
local workdir=${1:-${T}/${ELUA}} local workdir=${1:-${T}/${ELUA}}
local impl=${2:-${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, # or an ELUA one, e.g. lua5.4). If no implementation passed,
# the current one will be obtained from ${ELUA}. # the current one will be obtained from ${ELUA}.
_lua_export() { _lua_export() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
local impl var local impl var
@ -374,7 +374,7 @@ _lua_export() {
# This function must be called in global scope, after RDEPEND has been # This function must be called in global scope, after RDEPEND has been
# declared. Take care not to overwrite the variables set by it. # declared. Take care not to overwrite the variables set by it.
lua_enable_tests() { lua_enable_tests() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
[[ ${#} -ge 1 ]] || die "${FUNCNAME} takes at least one argument: test-runner (test-directory)" [[ ${#} -ge 1 ]] || die "${FUNCNAME} takes at least one argument: test-runner (test-directory)"
local test_directory local test_directory
@ -431,7 +431,7 @@ lua_enable_tests() {
# Please note that this function requires Lua and pkg-config installed, # Please note that this function requires Lua and pkg-config installed,
# and therefore proper build-time dependencies need be added to the ebuild. # and therefore proper build-time dependencies need be added to the ebuild.
lua_get_CFLAGS() { lua_get_CFLAGS() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
_lua_export "${@}" LUA_CFLAGS _lua_export "${@}" LUA_CFLAGS
echo "${LUA_CFLAGS}" echo "${LUA_CFLAGS}"
@ -447,7 +447,7 @@ lua_get_CFLAGS() {
# Please note that this function requires Lua and pkg-config installed, # Please note that this function requires Lua and pkg-config installed,
# and therefore proper build-time dependencies need be added to the ebuild. # and therefore proper build-time dependencies need be added to the ebuild.
lua_get_cmod_dir() { lua_get_cmod_dir() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
_lua_export "${@}" LUA_CMOD_DIR _lua_export "${@}" LUA_CMOD_DIR
echo "${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, # Please note that this function requires Lua and pkg-config installed,
# and therefore proper build-time dependencies need be added to the ebuild. # and therefore proper build-time dependencies need be added to the ebuild.
lua_get_include_dir() { lua_get_include_dir() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
_lua_export "${@}" LUA_INCLUDE_DIR _lua_export "${@}" LUA_INCLUDE_DIR
echo "${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, # Please note that this function requires Lua and pkg-config installed,
# and therefore proper build-time dependencies need be added to the ebuild. # and therefore proper build-time dependencies need be added to the ebuild.
lua_get_LIBS() { lua_get_LIBS() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
_lua_export "${@}" LUA_LIBS _lua_export "${@}" LUA_LIBS
echo "${LUA_LIBS}" echo "${LUA_LIBS}"
@ -495,7 +495,7 @@ lua_get_LIBS() {
# Please note that this function requires Lua and pkg-config installed, # Please note that this function requires Lua and pkg-config installed,
# and therefore proper build-time dependencies need be added to the ebuild. # and therefore proper build-time dependencies need be added to the ebuild.
lua_get_lmod_dir() { lua_get_lmod_dir() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
_lua_export "${@}" LUA_LMOD_DIR _lua_export "${@}" LUA_LMOD_DIR
echo "${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, # Please note that this function requires Lua and pkg-config installed,
# and therefore proper build-time dependencies need be added to the ebuild. # and therefore proper build-time dependencies need be added to the ebuild.
lua_get_shared_lib() { lua_get_shared_lib() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
_lua_export "${@}" LUA_SHARED_LIB _lua_export "${@}" LUA_SHARED_LIB
echo "${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, # Please note that this function requires Lua and pkg-config installed,
# and therefore proper build-time dependencies need be added to the ebuild. # and therefore proper build-time dependencies need be added to the ebuild.
lua_get_version() { lua_get_version() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
_lua_export "${@}" LUA_VERSION _lua_export "${@}" LUA_VERSION
echo "${LUA_VERSION}" echo "${LUA_VERSION}"

View File

@ -200,7 +200,7 @@ inherit multibuild lua-utils
# Enforce the proper setting of LUA_TARGETS, if LUA_COMPAT_OVERRIDE # 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. # is not in effect. If it is, just warn that the flags will be ignored.
_lua_validate_useflags() { _lua_validate_useflags() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
if [[ ${LUA_COMPAT_OVERRIDE} ]]; then if [[ ${LUA_COMPAT_OVERRIDE} ]]; then
if [[ ! ${_LUA_COMPAT_OVERRIDE_WARNED} ]]; then if [[ ! ${_LUA_COMPAT_OVERRIDE_WARNED} ]]; then
@ -260,7 +260,7 @@ _lua_obtain_impls() {
# Initialize the environment for the Lua implementation selected # Initialize the environment for the Lua implementation selected
# for multibuild. # for multibuild.
_lua_multibuild_wrapper() { _lua_multibuild_wrapper() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
local -x ELUA LUA local -x ELUA LUA
_lua_export "${MULTIBUILD_VARIANT}" 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 # to implementation-specific build directory matching BUILD_DIR used by
# lua_foreach_abi(). # lua_foreach_abi().
lua_copy_sources() { lua_copy_sources() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
local MULTIBUILD_VARIANTS local MULTIBUILD_VARIANTS
_lua_obtain_impls _lua_obtain_impls
@ -301,7 +301,7 @@ lua_copy_sources() {
# For each command being run, ELUA, LUA and BUILD_DIR are set # For each command being run, ELUA, LUA and BUILD_DIR are set
# locally, and the former two are exported to the command environment. # locally, and the former two are exported to the command environment.
lua_foreach_impl() { lua_foreach_impl() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
local MULTIBUILD_VARIANTS local MULTIBUILD_VARIANTS
_lua_obtain_impls _lua_obtain_impls

View File

@ -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 # Distributed under the terms of the GNU General Public License v2
# @ECLASS: mercurial.eclass # @ECLASS: mercurial.eclass
@ -100,7 +100,7 @@ EHG_OFFLINE="${EHG_OFFLINE:-${EVCS_OFFLINE}}"
# EHG_CHECKOUT_DIR, which defaults to S. # EHG_CHECKOUT_DIR, which defaults to S.
mercurial_fetch() { mercurial_fetch() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
EHG_REPO_URI=${1-${EHG_REPO_URI}} EHG_REPO_URI=${1-${EHG_REPO_URI}}
[[ -z "${EHG_REPO_URI}" ]] && die "EHG_REPO_URI is empty" [[ -z "${EHG_REPO_URI}" ]] && die "EHG_REPO_URI is empty"

View File

@ -95,7 +95,7 @@ esac
# nevertheless. It is preferred to call 'die' inside of the passed # nevertheless. It is preferred to call 'die' inside of the passed
# function. # function.
multibuild_foreach_variant() { multibuild_foreach_variant() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
[[ ${MULTIBUILD_VARIANTS} ]] \ [[ ${MULTIBUILD_VARIANTS} ]] \
|| die "MULTIBUILD_VARIANTS need to be set" || die "MULTIBUILD_VARIANTS need to be set"
@ -146,7 +146,7 @@ multibuild_foreach_variant() {
# #
# The function returns command exit status. # The function returns command exit status.
multibuild_for_best_variant() { multibuild_for_best_variant() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
[[ ${MULTIBUILD_VARIANTS} ]] \ [[ ${MULTIBUILD_VARIANTS} ]] \
|| die "MULTIBUILD_VARIANTS need to be set" || die "MULTIBUILD_VARIANTS need to be set"
@ -162,7 +162,7 @@ multibuild_for_best_variant() {
# be placed in directories matching BUILD_DIRs used by # be placed in directories matching BUILD_DIRs used by
# multibuild_foreach(). # multibuild_foreach().
multibuild_copy_sources() { multibuild_copy_sources() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
local _MULTIBUILD_INITIAL_BUILD_DIR=${BUILD_DIR:-${S}} local _MULTIBUILD_INITIAL_BUILD_DIR=${BUILD_DIR:-${S}}
@ -184,7 +184,7 @@ multibuild_copy_sources() {
# (the real root). Both directories have to be real, absolute paths # (the real root). Both directories have to be real, absolute paths
# (i.e. including ${D}). Source root will be removed. # (i.e. including ${D}). Source root will be removed.
multibuild_merge_root() { multibuild_merge_root() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
local src=${1} local src=${1}
local dest=${2} local dest=${2}

View File

@ -245,7 +245,7 @@ nuget_unpack-non-nuget-archives() {
# This function is used inside "dotnet-pkg_src_prepare" # This function is used inside "dotnet-pkg_src_prepare"
# from the "dotnet-pkg" eclass. # from the "dotnet-pkg" eclass.
nuget_writeconfig() { nuget_writeconfig() {
debug-print-function "${FUNCNAME[0]}" "${@}" debug-print-function ${FUNCNAME} "$@"
case "${1}" in case "${1}" in
"" ) die "${FUNCNAME[0]}: no directory/file path specified" ;; "" ) die "${FUNCNAME[0]}: no directory/file path specified" ;;

View File

@ -25,7 +25,7 @@ esac
# @DESCRIPTION: # @DESCRIPTION:
# Run the given command in the directory pointed by BUILD_DIR. # Run the given command in the directory pointed by BUILD_DIR.
run_in_build_dir() { run_in_build_dir() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
local ret local ret
[[ ${#} -eq 0 ]] && die "${FUNCNAME}: no command specified." [[ ${#} -eq 0 ]] && die "${FUNCNAME}: no command specified."

View File

@ -55,7 +55,7 @@ export _POSTGRES_INTERSECT_SLOTS=( )
# appearance of @PG_SLOT@ in the command and arguments with value of # appearance of @PG_SLOT@ in the command and arguments with value of
# ${PG_SLOT}. # ${PG_SLOT}.
_postgres-multi_multibuild_wrapper() { _postgres-multi_multibuild_wrapper() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
export PG_SLOT=${MULTIBUILD_VARIANT} export PG_SLOT=${MULTIBUILD_VARIANT}
export PG_CONFIG=$(type -P pg_config${MULTIBUILD_VARIANT//./}) export PG_CONFIG=$(type -P pg_config${MULTIBUILD_VARIANT//./})
if [[ -n ${PKG_CONFIG_PATH} ]] ; then if [[ -n ${PKG_CONFIG_PATH} ]] ; then

View File

@ -136,7 +136,7 @@ postgres_check_slot() {
# is required if pkg_setup() is declared in the ebuild. # is required if pkg_setup() is declared in the ebuild.
# Exports PG_SLOT, PG_CONFIG, and PKG_CONFIG_PATH. # Exports PG_SLOT, PG_CONFIG, and PKG_CONFIG_PATH.
postgres_pkg_setup() { postgres_pkg_setup() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
local compat_slot local compat_slot
local best_slot local best_slot

View File

@ -245,7 +245,7 @@ unset -f _python_any_set_globals
# ) # )
# @CODE # @CODE
python_gen_any_dep() { python_gen_any_dep() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
local depstr=${1} local depstr=${1}
[[ ${depstr} ]] || die "No dependency string provided" [[ ${depstr} ]] || die "No dependency string provided"
@ -271,7 +271,7 @@ python_gen_any_dep() {
# #
# This function will call python_check_deps() if defined. # This function will call python_check_deps() if defined.
python_setup() { python_setup() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
_python_sanity_checks _python_sanity_checks
# support developer override # support developer override
@ -338,7 +338,7 @@ python_setup() {
# In a binary package installs is a no-op. If you need Python in pkg_* # In a binary package installs is a no-op. If you need Python in pkg_*
# phases of a binary package, call python_setup directly. # phases of a binary package, call python_setup directly.
python-any-r1_pkg_setup() { python-any-r1_pkg_setup() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
[[ ${MERGE_TYPE} != binary ]] && python_setup [[ ${MERGE_TYPE} != binary ]] && python_setup
} }

View File

@ -242,7 +242,7 @@ unset -f _python_set_globals
# Enforce the proper setting of PYTHON_TARGETS, if PYTHON_COMPAT_OVERRIDE # 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. # is not in effect. If it is, just warn that the flags will be ignored.
_python_validate_useflags() { _python_validate_useflags() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
if [[ ${PYTHON_COMPAT_OVERRIDE} ]]; then if [[ ${PYTHON_COMPAT_OVERRIDE} ]]; then
if [[ ! ${_PYTHON_COMPAT_OVERRIDE_WARNED} ]]; 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. # This is an internal function used to implement python_gen_cond_dep.
_python_gen_usedep() { _python_gen_usedep() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
local impl matches=() local impl matches=()
@ -322,7 +322,7 @@ _python_gen_usedep() {
# REQUIRED_USE="doc? ( || ( python_targets_python2_7 ) )" # REQUIRED_USE="doc? ( || ( python_targets_python2_7 ) )"
# @CODE # @CODE
python_gen_useflags() { python_gen_useflags() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
local impl matches=() local impl matches=()
@ -366,7 +366,7 @@ python_gen_useflags() {
# dev-python/unittest2[python_targets_pypy?] )" # dev-python/unittest2[python_targets_pypy?] )"
# @CODE # @CODE
python_gen_cond_dep() { python_gen_cond_dep() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
local impl matches=() local impl matches=()
local dep=${1} local dep=${1}
@ -428,7 +428,7 @@ python_gen_cond_dep() {
# dev-python/pypy[xml(+)] ) )" # dev-python/pypy[xml(+)] ) )"
# @CODE # @CODE
python_gen_impl_dep() { python_gen_impl_dep() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
local impl matches=() local impl matches=()
local PYTHON_REQ_USE=${1} local PYTHON_REQ_USE=${1}
@ -506,7 +506,7 @@ python_gen_impl_dep() {
# ) # )
# @CODE # @CODE
python_gen_any_dep() { python_gen_any_dep() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
local depstr=${1} local depstr=${1}
shift shift
@ -554,7 +554,7 @@ python_gen_any_dep() {
# to implementation-specific build directory matching BUILD_DIR used by # to implementation-specific build directory matching BUILD_DIR used by
# python_foreach_abi(). # python_foreach_abi().
python_copy_sources() { python_copy_sources() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
local MULTIBUILD_VARIANTS local MULTIBUILD_VARIANTS
_python_obtain_impls _python_obtain_impls
@ -590,7 +590,7 @@ _python_obtain_impls() {
# Initialize the environment for Python implementation selected # Initialize the environment for Python implementation selected
# for multibuild. # for multibuild.
_python_multibuild_wrapper() { _python_multibuild_wrapper() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
local -x EPYTHON PYTHON local -x EPYTHON PYTHON
local -x PATH=${PATH} PKG_CONFIG_PATH=${PKG_CONFIG_PATH} 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 # For each command being run, EPYTHON, PYTHON and BUILD_DIR are set
# locally, and the former two are exported to the command environment. # locally, and the former two are exported to the command environment.
python_foreach_impl() { python_foreach_impl() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
_python_sanity_checks _python_sanity_checks
if [[ ${_DISTUTILS_R1_ECLASS} ]]; then if [[ ${_DISTUTILS_R1_ECLASS} ]]; then
@ -708,7 +708,7 @@ python_foreach_impl() {
# } # }
# @CODE # @CODE
python_setup() { python_setup() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
_python_sanity_checks _python_sanity_checks
local has_check_deps local has_check_deps
@ -774,7 +774,7 @@ python_setup() {
# All specified files must start with a 'python' shebang. A file not # All specified files must start with a 'python' shebang. A file not
# having a matching shebang will be refused. # having a matching shebang will be refused.
python_replicate_script() { python_replicate_script() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
_python_replicate_script() { _python_replicate_script() {
local _PYTHON_FIX_SHEBANG_QUIET=1 local _PYTHON_FIX_SHEBANG_QUIET=1

View File

@ -269,7 +269,7 @@ unset -f _python_single_set_globals
# REQUIRED_USE="doc? ( ^^ ( python_single_target_python2_7 ) )" # REQUIRED_USE="doc? ( ^^ ( python_single_target_python2_7 ) )"
# @CODE # @CODE
python_gen_useflags() { python_gen_useflags() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
local impl matches=() local impl matches=()
@ -313,7 +313,7 @@ python_gen_useflags() {
# dev-python/unittest2[python_targets_pypy(-)?,...] )" # dev-python/unittest2[python_targets_pypy(-)?,...] )"
# @CODE # @CODE
python_gen_cond_dep() { python_gen_cond_dep() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
local impl matches=() local impl matches=()
@ -367,7 +367,7 @@ python_gen_cond_dep() {
# dev-python/pypy[xml(+)] ) )" # dev-python/pypy[xml(+)] ) )"
# @CODE # @CODE
python_gen_impl_dep() { python_gen_impl_dep() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
local impl local impl
local matches=() local matches=()
@ -392,7 +392,7 @@ python_gen_impl_dep() {
# Determine what the selected Python implementation is and set # Determine what the selected Python implementation is and set
# the Python build environment up for it. # the Python build environment up for it.
python_setup() { python_setup() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
_python_sanity_checks _python_sanity_checks
unset EPYTHON unset EPYTHON
@ -448,7 +448,7 @@ python_setup() {
# @DESCRIPTION: # @DESCRIPTION:
# Runs python_setup. # Runs python_setup.
python-single-r1_pkg_setup() { python-single-r1_pkg_setup() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
[[ ${MERGE_TYPE} != binary ]] && python_setup [[ ${MERGE_TYPE} != binary ]] && python_setup
} }

View File

@ -75,7 +75,7 @@ readonly _PYTHON_HISTORICAL_IMPLS
# Verify whether the patterns passed to the eclass function are correct # Verify whether the patterns passed to the eclass function are correct
# (i.e. can match any valid implementation). Dies on wrong pattern. # (i.e. can match any valid implementation). Dies on wrong pattern.
_python_verify_patterns() { _python_verify_patterns() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
local impl pattern local impl pattern
for pattern; do for pattern; do
@ -298,7 +298,7 @@ _python_impl_matches() {
# PYTHON_SITEDIR. They are described more completely in the eclass # PYTHON_SITEDIR. They are described more completely in the eclass
# variable documentation. # variable documentation.
_python_export() { _python_export() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
local impl var local impl var
@ -483,7 +483,7 @@ _python_export() {
# Obtain and print the 'stdlib' path for the given implementation. If no # Obtain and print the 'stdlib' path for the given implementation. If no
# implementation is provided, ${EPYTHON} will be used. # implementation is provided, ${EPYTHON} will be used.
python_get_stdlib() { python_get_stdlib() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
_python_export "${@}" PYTHON_STDLIB _python_export "${@}" PYTHON_STDLIB
echo "${PYTHON_STDLIB}" echo "${PYTHON_STDLIB}"
@ -496,7 +496,7 @@ python_get_stdlib() {
# implementation. If no implementation is provided, ${EPYTHON} will # implementation. If no implementation is provided, ${EPYTHON} will
# be used. # be used.
python_get_sitedir() { python_get_sitedir() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
_python_export "${@}" PYTHON_SITEDIR _python_export "${@}" PYTHON_SITEDIR
echo "${PYTHON_SITEDIR}" echo "${PYTHON_SITEDIR}"
@ -508,7 +508,7 @@ python_get_sitedir() {
# Obtain and print the include path for the given implementation. If no # Obtain and print the include path for the given implementation. If no
# implementation is provided, ${EPYTHON} will be used. # implementation is provided, ${EPYTHON} will be used.
python_get_includedir() { python_get_includedir() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
_python_export "${@}" PYTHON_INCLUDEDIR _python_export "${@}" PYTHON_INCLUDEDIR
echo "${PYTHON_INCLUDEDIR}" echo "${PYTHON_INCLUDEDIR}"
@ -523,7 +523,7 @@ python_get_includedir() {
# Please note that this function can be used with CPython only. Use # Please note that this function can be used with CPython only. Use
# in another implementation will result in a fatal failure. # in another implementation will result in a fatal failure.
python_get_library_path() { python_get_library_path() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
_python_export "${@}" PYTHON_LIBPATH _python_export "${@}" PYTHON_LIBPATH
echo "${PYTHON_LIBPATH}" echo "${PYTHON_LIBPATH}"
@ -540,7 +540,7 @@ python_get_library_path() {
# It requires Python and pkg-config installed, and therefore proper # It requires Python and pkg-config installed, and therefore proper
# build-time dependencies need be added to the ebuild. # build-time dependencies need be added to the ebuild.
python_get_CFLAGS() { python_get_CFLAGS() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
_python_export "${@}" PYTHON_CFLAGS _python_export "${@}" PYTHON_CFLAGS
echo "${PYTHON_CFLAGS}" echo "${PYTHON_CFLAGS}"
@ -557,7 +557,7 @@ python_get_CFLAGS() {
# It requires Python and pkg-config installed, and therefore proper # It requires Python and pkg-config installed, and therefore proper
# build-time dependencies need be added to the ebuild. # build-time dependencies need be added to the ebuild.
python_get_LIBS() { python_get_LIBS() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
_python_export "${@}" PYTHON_LIBS _python_export "${@}" PYTHON_LIBS
echo "${PYTHON_LIBS}" echo "${PYTHON_LIBS}"
@ -574,7 +574,7 @@ python_get_LIBS() {
# It requires Python installed, and therefore proper build-time # It requires Python installed, and therefore proper build-time
# dependencies need be added to the ebuild. # dependencies need be added to the ebuild.
python_get_PYTHON_CONFIG() { python_get_PYTHON_CONFIG() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
_python_export "${@}" PYTHON_CONFIG _python_export "${@}" PYTHON_CONFIG
echo "${PYTHON_CONFIG}" echo "${PYTHON_CONFIG}"
@ -587,7 +587,7 @@ python_get_PYTHON_CONFIG() {
# implementation. If no implementation is provided, ${EPYTHON} will # implementation. If no implementation is provided, ${EPYTHON} will
# be used. # be used.
python_get_scriptdir() { python_get_scriptdir() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
_python_export "${@}" PYTHON_SCRIPTDIR _python_export "${@}" PYTHON_SCRIPTDIR
echo "${PYTHON_SCRIPTDIR}" echo "${PYTHON_SCRIPTDIR}"
@ -600,7 +600,7 @@ python_get_scriptdir() {
# paths). If no directories are provided, the default system paths # paths). If no directories are provided, the default system paths
# are used (prepended with ${D}). # are used (prepended with ${D}).
python_optimize() { python_optimize() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
[[ ${EPYTHON} ]] || die 'No Python implementation set (EPYTHON is null).' [[ ${EPYTHON} ]] || die 'No Python implementation set (EPYTHON is null).'
@ -677,7 +677,7 @@ python_optimize() {
# } # }
# @CODE # @CODE
python_scriptinto() { python_scriptinto() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
_PYTHON_SCRIPTROOT=${1} _PYTHON_SCRIPTROOT=${1}
} }
@ -691,7 +691,7 @@ python_scriptinto() {
# The executable will be wrapped properly for the Python implementation, # The executable will be wrapped properly for the Python implementation,
# though no shebang mangling will be performed. # though no shebang mangling will be performed.
python_doexe() { python_doexe() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
[[ ${EBUILD_PHASE} != install ]] && [[ ${EBUILD_PHASE} != install ]] &&
die "${FUNCNAME} can only be used in src_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 # though no shebang mangling will be performed. It will be renamed
# to <new-name>. # to <new-name>.
python_newexe() { python_newexe() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
[[ ${EBUILD_PHASE} != install ]] && [[ ${EBUILD_PHASE} != install ]] &&
die "${FUNCNAME} can only be used in src_install" die "${FUNCNAME} can only be used in src_install"
@ -762,7 +762,7 @@ python_newexe() {
# } # }
# @CODE # @CODE
python_doscript() { python_doscript() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
[[ ${EBUILD_PHASE} != install ]] && [[ ${EBUILD_PHASE} != install ]] &&
die "${FUNCNAME} can only be used in src_install" die "${FUNCNAME} can only be used in src_install"
@ -789,7 +789,7 @@ python_doscript() {
# } # }
# @CODE # @CODE
python_newscript() { python_newscript() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
[[ ${EBUILD_PHASE} != install ]] && [[ ${EBUILD_PHASE} != install ]] &&
die "${FUNCNAME} can only be used in src_install" die "${FUNCNAME} can only be used in src_install"
@ -827,7 +827,7 @@ python_newscript() {
# } # }
# @CODE # @CODE
python_moduleinto() { python_moduleinto() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
_PYTHON_MODULEROOT=${1} _PYTHON_MODULEROOT=${1}
} }
@ -852,7 +852,7 @@ python_moduleinto() {
# } # }
# @CODE # @CODE
python_domodule() { python_domodule() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
[[ ${EPYTHON} ]] || die 'No Python implementation set (EPYTHON is null).' [[ ${EPYTHON} ]] || die 'No Python implementation set (EPYTHON is null).'
@ -900,7 +900,7 @@ python_domodule() {
# } # }
# @CODE # @CODE
python_doheader() { python_doheader() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
[[ ${EBUILD_PHASE} != install ]] && [[ ${EBUILD_PHASE} != install ]] &&
die "${FUNCNAME} can only be used in src_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 # setup will be done. If wrapper update is requested, the directory
# shall be removed first. # shall be removed first.
_python_wrapper_setup() { _python_wrapper_setup() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
local workdir=${1:-${T}/${EPYTHON}} local workdir=${1:-${T}/${EPYTHON}}
local impl=${2:-${EPYTHON}} local impl=${2:-${EPYTHON}}
@ -1034,7 +1034,7 @@ _python_wrapper_setup() {
# Python version (but not non-Python shebangs). --quiet causes # Python version (but not non-Python shebangs). --quiet causes
# the function not to list modified files verbosely. # the function not to list modified files verbosely.
python_fix_shebang() { python_fix_shebang() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
[[ ${EPYTHON} ]] || die "${FUNCNAME}: EPYTHON unset (pkg_setup not called?)" [[ ${EPYTHON} ]] || die "${FUNCNAME}: EPYTHON unset (pkg_setup not called?)"
@ -1154,7 +1154,7 @@ _python_check_locale_sanity() {
# nothing if LC_ALL is defined, or if the current locale uses a UTF-8 charmap. # 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. # This may be used to work around the quirky open() behavior of python3.
python_export_utf8_locale() { python_export_utf8_locale() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
# If the locale program isn't available, just return. # If the locale program isn't available, just return.
type locale &>/dev/null || return 0 type locale &>/dev/null || return 0
@ -1206,7 +1206,7 @@ python_export_utf8_locale() {
# to be taken to run einstalldocs from the same directory # to be taken to run einstalldocs from the same directory
# (usually ${S}). # (usually ${S}).
build_sphinx() { build_sphinx() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
[[ ${#} -eq 1 ]] || die "${FUNCNAME} takes 1 arg: <directory>" [[ ${#} -eq 1 ]] || die "${FUNCNAME} takes 1 arg: <directory>"
local dir=${1} local dir=${1}
@ -1252,7 +1252,7 @@ _python_check_EPYTHON() {
# package sources that would block installed packages from being used # package sources that would block installed packages from being used
# (and effectively e.g. make it impossible to load compiled extensions). # (and effectively e.g. make it impossible to load compiled extensions).
_python_check_occluded_packages() { _python_check_occluded_packages() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
[[ -z ${BUILD_DIR} || ! -d ${BUILD_DIR}/install ]] && return [[ -z ${BUILD_DIR} || ! -d ${BUILD_DIR}/install ]] && return
@ -1362,7 +1362,7 @@ _python_check_occluded_packages() {
# #
# This command dies on failure and respects nonfatal. # This command dies on failure and respects nonfatal.
epytest() { epytest() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
_python_check_EPYTHON _python_check_EPYTHON
_python_check_occluded_packages _python_check_occluded_packages
@ -1490,7 +1490,7 @@ epytest() {
# #
# This command dies on failure and respects nonfatal. # This command dies on failure and respects nonfatal.
eunittest() { eunittest() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
_python_check_EPYTHON _python_check_EPYTHON
_python_check_occluded_packages _python_check_occluded_packages
@ -1515,7 +1515,7 @@ eunittest() {
# code. Checks whether the interpreter is installed, runs # code. Checks whether the interpreter is installed, runs
# python_check_deps() if declared. # python_check_deps() if declared.
_python_run_check_deps() { _python_run_check_deps() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
local impl=${1} local impl=${1}
@ -1547,7 +1547,7 @@ _python_run_check_deps() {
# The wrapper accepts multiple package specifications. For the check # The wrapper accepts multiple package specifications. For the check
# to succeed, *all* specified atoms must match. # to succeed, *all* specified atoms must match.
python_has_version() { python_has_version() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
local root_arg=( -b ) local root_arg=( -b )
case ${1} in case ${1} in
@ -1572,7 +1572,7 @@ python_has_version() {
# @DESCRIPTION: # @DESCRIPTION:
# Perform additional environment sanity checks. # Perform additional environment sanity checks.
_python_sanity_checks() { _python_sanity_checks() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
[[ ${_PYTHON_SANITY_CHECKED} ]] && return [[ ${_PYTHON_SANITY_CHECKED} ]] && return

View File

@ -54,7 +54,7 @@ esac
# ${FILESDIR}/README.gentoo-${SLOT} also. # ${FILESDIR}/README.gentoo-${SLOT} also.
# Usually called at src_install phase. # Usually called at src_install phase.
readme.gentoo_create_doc() { readme.gentoo_create_doc() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
if [[ -n "${DOC_CONTENTS}" ]]; then if [[ -n "${DOC_CONTENTS}" ]]; then
if [[ -n "${DISABLE_AUTOFORMATTING}" ]]; then if [[ -n "${DISABLE_AUTOFORMATTING}" ]]; then
@ -94,7 +94,7 @@ readme.gentoo_create_doc() {
# rely on specific REPLACING_VERSIONS handling in your ebuild to print messages # rely on specific REPLACING_VERSIONS handling in your ebuild to print messages
# when people update from versions still providing old message. # when people update from versions still providing old message.
readme.gentoo_print_elog() { readme.gentoo_print_elog() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
if [[ -z "${README_GENTOO_DOC_VALUE}" ]]; then if [[ -z "${README_GENTOO_DOC_VALUE}" ]]; then
die "readme.gentoo_print_elog invoked without matching readme.gentoo_create_doc call!" die "readme.gentoo_print_elog invoked without matching readme.gentoo_create_doc call!"

View File

@ -68,7 +68,7 @@ _rebar_find_dep() {
# Coverage is not relevant in this context, so there's no harm to disable it, # Coverage is not relevant in this context, so there's no harm to disable it,
# although the issue should be fixed. # although the issue should be fixed.
rebar_disable_coverage() { rebar_disable_coverage() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
local rebar_config="${1:-rebar.config}" local rebar_config="${1:-rebar.config}"
@ -88,7 +88,7 @@ rebar_disable_coverage() {
# #
# The function dies on failure. # The function dies on failure.
rebar_fix_include_path() { rebar_fix_include_path() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
local pn="${1}" local pn="${1}"
local rebar_config="${2:-rebar.config}" local rebar_config="${2:-rebar.config}"
@ -123,7 +123,7 @@ rebar_fix_include_path() {
# #
# The function dies on failure. # The function dies on failure.
rebar_remove_deps() { rebar_remove_deps() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
local rebar_config="${1:-rebar.config}" local rebar_config="${1:-rebar.config}"
@ -148,7 +148,7 @@ rebar_remove_deps() {
# #
# The function dies on failure. # The function dies on failure.
rebar_set_vsn() { rebar_set_vsn() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
local version="${1:-${PV%_*}}" local version="${1:-${PV%_*}}"

View File

@ -69,7 +69,7 @@ _rebar_find_dep() {
# @DESCRIPTION: # @DESCRIPTION:
# Run rebar with verbose flag. Die on failure. # Run rebar with verbose flag. Die on failure.
erebar() { erebar() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
(( $# > 0 )) || die "erebar: at least one target is required" (( $# > 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 # Existence of rebar.config is optional, but file description file must exist
# at 'src/${PN}.app.src'. # at 'src/${PN}.app.src'.
rebar_src_prepare() { rebar_src_prepare() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
default default
rebar_set_vsn rebar_set_vsn
@ -101,7 +101,7 @@ rebar_src_prepare() {
# @DESCRIPTION: # @DESCRIPTION:
# Configure with ERL_LIBS set. # Configure with ERL_LIBS set.
rebar_src_configure() { rebar_src_configure() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
local -x ERL_LIBS="${EPREFIX}$(get_erl_libs)" local -x ERL_LIBS="${EPREFIX}$(get_erl_libs)"
default default
@ -111,7 +111,7 @@ rebar_src_configure() {
# @DESCRIPTION: # @DESCRIPTION:
# Compile project with rebar. # Compile project with rebar.
rebar_src_compile() { rebar_src_compile() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
erebar compile erebar compile
} }
@ -120,7 +120,7 @@ rebar_src_compile() {
# @DESCRIPTION: # @DESCRIPTION:
# Run unit tests. # Run unit tests.
rebar_src_test() { rebar_src_test() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
erebar eunit erebar eunit
} }
@ -132,7 +132,7 @@ rebar_src_test() {
# #
# Function expects that project conforms to Erlang/OTP structure. # Function expects that project conforms to Erlang/OTP structure.
rebar_src_install() { rebar_src_install() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
local bin local bin
local dest="$(get_erl_libs)/${P}" local dest="$(get_erl_libs)/${P}"

View File

@ -76,7 +76,7 @@ _rebar_find_dep() {
# @DESCRIPTION: # @DESCRIPTION:
# Run rebar with verbose flag. Die on failure. # Run rebar with verbose flag. Die on failure.
erebar3() { erebar3() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
(( $# > 0 )) || die "${FUNCNAME}: at least one target is required" (( $# > 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 # Existence of rebar.config is optional, but file description file must exist
# at 'src/${PN}.app.src'. # at 'src/${PN}.app.src'.
rebar3_src_prepare() { rebar3_src_prepare() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
default default
rebar_set_vsn rebar_set_vsn
@ -118,7 +118,7 @@ rebar3_src_prepare() {
# @DESCRIPTION: # @DESCRIPTION:
# Configure with ERL_LIBS set. # Configure with ERL_LIBS set.
rebar3_src_configure() { rebar3_src_configure() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
local -x ERL_LIBS="${EPREFIX}$(get_erl_libs)" local -x ERL_LIBS="${EPREFIX}$(get_erl_libs)"
default default
@ -128,7 +128,7 @@ rebar3_src_configure() {
# @DESCRIPTION: # @DESCRIPTION:
# Compile project with rebar3. # Compile project with rebar3.
rebar3_src_compile() { rebar3_src_compile() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
erebar3 as "${REBAR_PROFILE}" release --all erebar3 as "${REBAR_PROFILE}" release --all
} }
@ -137,7 +137,7 @@ rebar3_src_compile() {
# @DESCRIPTION: # @DESCRIPTION:
# Run unit tests. # Run unit tests.
rebar3_src_test() { rebar3_src_test() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
erebar3 eunit -v erebar3 eunit -v
} }
@ -149,7 +149,7 @@ rebar3_src_test() {
# #
# Function expects that project conforms to Erlang/OTP structure. # Function expects that project conforms to Erlang/OTP structure.
rebar3_install_lib() { rebar3_install_lib() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
local dest="$(get_erl_libs)/${P}" local dest="$(get_erl_libs)/${P}"
insinto "${dest}" insinto "${dest}"
@ -169,7 +169,7 @@ rebar3_install_lib() {
# #
# Function expects that project conforms to Erlang/OTP structure. # Function expects that project conforms to Erlang/OTP structure.
rebar3_src_install() { rebar3_src_install() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
pushd "_build/${REBAR_PROFILE}" >/dev/null || die pushd "_build/${REBAR_PROFILE}" >/dev/null || die
if [[ -d rel/${PN} ]]; then if [[ -d rel/${PN} ]]; then

View File

@ -220,7 +220,7 @@ fi
# This function returns the gems data directory for the ruby # This function returns the gems data directory for the ruby
# implementation in question. # implementation in question.
ruby_fakegem_gemsdir() { ruby_fakegem_gemsdir() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
local _gemsitedir=$(ruby_rbconfig_value 'sitelibdir') local _gemsitedir=$(ruby_rbconfig_value 'sitelibdir')
_gemsitedir=${_gemsitedir//site_ruby/gems} _gemsitedir=${_gemsitedir//site_ruby/gems}
@ -239,7 +239,7 @@ ruby_fakegem_gemsdir() {
# @DESCRIPTION: # @DESCRIPTION:
# Installs the specified file(s) into the gems directory. # Installs the specified file(s) into the gems directory.
ruby_fakegem_doins() { ruby_fakegem_doins() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
( (
insinto $(ruby_fakegem_gemsdir)/gems/${RUBY_FAKEGEM_NAME}-${RUBY_FAKEGEM_VERSION} insinto $(ruby_fakegem_gemsdir)/gems/${RUBY_FAKEGEM_NAME}-${RUBY_FAKEGEM_VERSION}
@ -252,7 +252,7 @@ ruby_fakegem_doins() {
# @DESCRIPTION: # @DESCRIPTION:
# Installs the specified file into the gems directory using the provided filename. # Installs the specified file into the gems directory using the provided filename.
ruby_fakegem_newins() { ruby_fakegem_newins() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
( (
# Since newins does not accept full paths but just basenames # Since newins does not accept full paths but just basenames
@ -273,7 +273,7 @@ ruby_fakegem_newins() {
# by the RUBY_FAKEGEM_GEMSPEC variable, or generate one using # by the RUBY_FAKEGEM_GEMSPEC variable, or generate one using
# ruby_fakegem_genspec. # ruby_fakegem_genspec.
ruby_fakegem_install_gemspec() { ruby_fakegem_install_gemspec() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
local gemspec="${T}"/${RUBY_FAKEGEM_NAME}-${_ruby_implementation} local gemspec="${T}"/${RUBY_FAKEGEM_NAME}-${_ruby_implementation}
@ -302,7 +302,7 @@ ruby_fakegem_install_gemspec() {
# RUBY_FAKEGEM_GEMSPEC. This file is eval'ed to produce a final specification # RUBY_FAKEGEM_GEMSPEC. This file is eval'ed to produce a final specification
# in a way similar to packaging the gemspec file. # in a way similar to packaging the gemspec file.
ruby_fakegem_gemspec_gemspec() { 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 ${RUBY} --disable=did_you_mean -e "puts eval(File::open('$1').read).to_ruby" > $2
} }
@ -314,7 +314,7 @@ ruby_fakegem_gemspec_gemspec() {
# the metadata distributed by the gem itself. This is similar to how # the metadata distributed by the gem itself. This is similar to how
# rubygems creates an installation from a .gem file. # rubygems creates an installation from a .gem file.
ruby_fakegem_metadata_gemspec() { 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 ${RUBY} --disable=did_you_mean -r yaml -e "puts Gem::Specification.from_yaml(File::open('$1', :encoding => 'UTF-8').read).to_ruby" > $2
} }
@ -333,7 +333,7 @@ ruby_fakegem_metadata_gemspec() {
# See RUBY_FAKEGEM_NAME and RUBY_FAKEGEM_VERSION for setting name and version. # See RUBY_FAKEGEM_NAME and RUBY_FAKEGEM_VERSION for setting name and version.
# See RUBY_FAKEGEM_REQUIRE_PATHS for setting extra require paths. # See RUBY_FAKEGEM_REQUIRE_PATHS for setting extra require paths.
ruby_fakegem_genspec() { ruby_fakegem_genspec() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
eqawarn "Generating generic fallback gemspec *without* dependencies" eqawarn "Generating generic fallback gemspec *without* dependencies"
eqawarn "This will only work when there are no runtime dependencies" eqawarn "This will only work when there are no runtime dependencies"
@ -369,7 +369,7 @@ EOF
# to inject additional ruby code into the wrapper. This may be useful to # to inject additional ruby code into the wrapper. This may be useful to
# e.g. force a specific version using the gem command. # e.g. force a specific version using the gem command.
ruby_fakegem_binwrapper() { ruby_fakegem_binwrapper() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
( (
local gembinary=$1 local gembinary=$1
@ -422,7 +422,7 @@ EOF
# @DESCRIPTION: # @DESCRIPTION:
# Configure extensions defined in RUBY_FAKEGEM_EXTENSIONS, if any. # Configure extensions defined in RUBY_FAKEGEM_EXTENSIONS, if any.
each_fakegem_configure() { each_fakegem_configure() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
tc-export PKG_CONFIG tc-export PKG_CONFIG
for extension in "${RUBY_FAKEGEM_EXTENSIONS[@]}" ; do for extension in "${RUBY_FAKEGEM_EXTENSIONS[@]}" ; do
@ -434,7 +434,7 @@ each_fakegem_configure() {
# @DESCRIPTION: # @DESCRIPTION:
# Run each_fakegem_configure for each ruby target # Run each_fakegem_configure for each ruby target
each_ruby_configure() { each_ruby_configure() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
each_fakegem_configure each_fakegem_configure
} }
@ -444,7 +444,7 @@ each_ruby_configure() {
# Build documentation for the package if indicated by the doc USE flag # Build documentation for the package if indicated by the doc USE flag
# and if there is a documentation task defined. # and if there is a documentation task defined.
all_fakegem_compile() { all_fakegem_compile() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
if [[ -n ${RUBY_FAKEGEM_DOCDIR} ]] && use doc; then if [[ -n ${RUBY_FAKEGEM_DOCDIR} ]] && use doc; then
case ${RUBY_FAKEGEM_RECIPE_DOC} in case ${RUBY_FAKEGEM_RECIPE_DOC} in
@ -466,7 +466,7 @@ all_fakegem_compile() {
# @DESCRIPTION: # @DESCRIPTION:
# Compile extensions defined in RUBY_FAKEGEM_EXTENSIONS, if any. # Compile extensions defined in RUBY_FAKEGEM_EXTENSIONS, if any.
each_fakegem_compile() { each_fakegem_compile() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
for extension in "${RUBY_FAKEGEM_EXTENSIONS[@]}" ; do for extension in "${RUBY_FAKEGEM_EXTENSIONS[@]}" ; do
emake V=1 -C ${extension%/*} emake V=1 -C ${extension%/*}
@ -479,7 +479,7 @@ each_fakegem_compile() {
# @DESCRIPTION: # @DESCRIPTION:
# Run each_fakegem_compile for each ruby target # Run each_fakegem_compile for each ruby target
each_ruby_compile() { each_ruby_compile() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
each_fakegem_compile each_fakegem_compile
} }
@ -488,7 +488,7 @@ each_ruby_compile() {
# @DESCRIPTION: # @DESCRIPTION:
# Unpack the source archive, including support for unpacking gems. # Unpack the source archive, including support for unpacking gems.
all_ruby_unpack() { all_ruby_unpack() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
# Special support for extracting .gem files; the file need to be # Special support for extracting .gem files; the file need to be
# extracted twice and the mtime from the archive _has_ to be # extracted twice and the mtime from the archive _has_ to be
@ -533,7 +533,7 @@ all_ruby_unpack() {
# @DESCRIPTION: # @DESCRIPTION:
# Compile the package. # Compile the package.
all_ruby_compile() { all_ruby_compile() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
all_fakegem_compile all_fakegem_compile
} }
@ -542,7 +542,7 @@ all_ruby_compile() {
# @DESCRIPTION: # @DESCRIPTION:
# Run tests for the package for each ruby target if the test task is defined. # Run tests for the package for each ruby target if the test task is defined.
each_fakegem_test() { each_fakegem_test() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
case ${RUBY_FAKEGEM_RECIPE_TEST} in case ${RUBY_FAKEGEM_RECIPE_TEST} in
rake) rake)
@ -584,7 +584,7 @@ fi
# installed. This is normally done as part of the extension # installed. This is normally done as part of the extension
# installation, but may be useful when we handle extensions manually. # installation, but may be useful when we handle extensions manually.
ruby_fakegem_extensions_installed() { ruby_fakegem_extensions_installed() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
mkdir -p "${ED}$(ruby_fakegem_extensionsdir)" || die mkdir -p "${ED}$(ruby_fakegem_extensionsdir)" || die
touch "${ED}$(ruby_fakegem_extensionsdir)/gem.build_complete" || die touch "${ED}$(ruby_fakegem_extensionsdir)/gem.build_complete" || die
@ -595,7 +595,7 @@ ruby_fakegem_extensions_installed() {
# The directory where rubygems expects extensions for this package # The directory where rubygems expects extensions for this package
# version. # version.
ruby_fakegem_extensionsdir() { ruby_fakegem_extensionsdir() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
# Using formula from ruby src/lib/rubygems/basic_specification. # 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)") extensions_dir=$(${RUBY} --disable=did_you_mean -e "puts File.join('extensions', Gem::Platform.local.to_s, Gem.extension_api_version)")
@ -607,7 +607,7 @@ ruby_fakegem_extensionsdir() {
# @DESCRIPTION: # @DESCRIPTION:
# Install the package for each ruby target. # Install the package for each ruby target.
each_fakegem_install() { each_fakegem_install() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
ruby_fakegem_install_gemspec ruby_fakegem_install_gemspec
@ -634,7 +634,7 @@ each_fakegem_install() {
# @DESCRIPTION: # @DESCRIPTION:
# Install the package for each target. # Install the package for each target.
each_ruby_install() { each_ruby_install() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
each_fakegem_install each_fakegem_install
} }
@ -643,7 +643,7 @@ each_ruby_install() {
# @DESCRIPTION: # @DESCRIPTION:
# Install files common to all ruby targets. # Install files common to all ruby targets.
all_fakegem_install() { all_fakegem_install() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
if [[ -n ${RUBY_FAKEGEM_DOCDIR} ]] && use doc; then if [[ -n ${RUBY_FAKEGEM_DOCDIR} ]] && use doc; then
for dir in ${RUBY_FAKEGEM_DOCDIR}; do for dir in ${RUBY_FAKEGEM_DOCDIR}; do
@ -678,7 +678,7 @@ all_fakegem_install() {
# @DESCRIPTION: # @DESCRIPTION:
# Install files common to all ruby targets. # Install files common to all ruby targets.
all_ruby_install() { all_ruby_install() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
all_fakegem_install all_fakegem_install
} }

View File

@ -76,7 +76,7 @@ all_ruby_prepare() {
# @DESCRIPTION: # @DESCRIPTION:
# Run the configure script in the subbinding for each specific ruby target. # Run the configure script in the subbinding for each specific ruby target.
each_ruby_configure() { each_ruby_configure() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
[[ -e extconf.rb ]] || return [[ -e extconf.rb ]] || return
@ -87,7 +87,7 @@ each_ruby_configure() {
# @DESCRIPTION: # @DESCRIPTION:
# Compile the C bindings in the subbinding for each specific ruby target. # Compile the C bindings in the subbinding for each specific ruby target.
each_ruby_compile() { each_ruby_compile() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
[[ -e Makefile ]] || return [[ -e Makefile ]] || return
@ -107,7 +107,7 @@ each_ruby_compile() {
# @DESCRIPTION: # @DESCRIPTION:
# Install the files in the subbinding for each specific ruby target. # Install the files in the subbinding for each specific ruby target.
each_ruby_install() { each_ruby_install() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
if [[ -e Makefile ]]; then if [[ -e Makefile ]]; then
# Create the directories, or the package will create them as files. # Create the directories, or the package will create them as files.
@ -124,7 +124,7 @@ each_ruby_install() {
# @DESCRIPTION: # @DESCRIPTION:
# Install the files common to all ruby targets. # Install the files common to all ruby targets.
all_ruby_install() { all_ruby_install() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
for doc in ../AUTHORS ../NEWS ChangeLog README; do for doc in ../AUTHORS ../NEWS ChangeLog README; do
[[ -s ${doc} ]] && dodoc $doc [[ -s ${doc} ]] && dodoc $doc
@ -141,7 +141,7 @@ all_ruby_install() {
# @DESCRIPTION: # @DESCRIPTION:
# Run the tests for this package. # Run the tests for this package.
each_ruby_test() { each_ruby_test() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
[[ -e test/run-test.rb ]] || return [[ -e test/run-test.rb ]] || return

View File

@ -90,7 +90,7 @@ S="${WORKDIR}"
# Set `comparator' and `version' to include a comparator (=, >=, etc.) and a # Set `comparator' and `version' to include a comparator (=, >=, etc.) and a
# version string to the returned string # version string to the returned string
ruby_implementation_depend() { ruby_implementation_depend() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
_ruby_implementation_depend $1 _ruby_implementation_depend $1
} }
@ -132,7 +132,7 @@ _ruby_get_all_impls() {
# ruby_add_bdepend(), but may also be useful in an ebuild to specify # ruby_add_bdepend(), but may also be useful in an ebuild to specify
# more complex dependencies. # more complex dependencies.
ruby_samelib() { ruby_samelib() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
_ruby_set_globals_invalidate_if_stale _ruby_set_globals_invalidate_if_stale
@ -151,7 +151,7 @@ ruby_samelib() {
# Not all implementations have the same command basename as the # Not all implementations have the same command basename as the
# target; This function translate between the two # target; This function translate between the two
ruby_implementation_command() { ruby_implementation_command() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
local _ruby_name=$1 local _ruby_name=$1
@ -212,7 +212,7 @@ _ruby_wrap_conditions() {
# Note: runtime dependencies are also added as build-time test # Note: runtime dependencies are also added as build-time test
# dependencies. # dependencies.
ruby_add_rdepend() { ruby_add_rdepend() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
case $# in case $# in
1) ;; 1) ;;
@ -248,7 +248,7 @@ ruby_add_rdepend() {
# dependencies instead of setting DEPEND or BDEPEND yourself. The list # dependencies instead of setting DEPEND or BDEPEND yourself. The list
# of atoms uses the same syntax as normal dependencies. # of atoms uses the same syntax as normal dependencies.
ruby_add_bdepend() { ruby_add_bdepend() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
case $# in case $# in
1) ;; 1) ;;
@ -271,7 +271,7 @@ ruby_add_bdepend() {
# @DESCRIPTION: # @DESCRIPTION:
# Adds the specified dependencies to DEPEND, similar to ruby_add_bdepend. # Adds the specified dependencies to DEPEND, similar to ruby_add_bdepend.
ruby_add_depend() { ruby_add_depend() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
case $# in case $# in
1) ;; 1) ;;
@ -288,7 +288,7 @@ ruby_add_depend() {
# @DESCRIPTION: # @DESCRIPTION:
# Gets an array of ruby use targets enabled by the user # Gets an array of ruby use targets enabled by the user
ruby_get_use_implementations() { ruby_get_use_implementations() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
_ruby_set_globals_invalidate_if_stale _ruby_set_globals_invalidate_if_stale
@ -303,7 +303,7 @@ ruby_get_use_implementations() {
# @DESCRIPTION: # @DESCRIPTION:
# Gets an array of ruby use targets that the ebuild sets # 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 _ruby_set_globals_invalidate_if_stale
_ruby_get_use_targets _ruby_get_use_targets
@ -316,7 +316,7 @@ ruby_get_use_targets() {
# Gets an array of ruby use targets that the ebuild sets # Gets an array of ruby use targets that the ebuild sets
_RUBY_GET_USE_TARGETS="" _RUBY_GET_USE_TARGETS=""
_ruby_get_use_targets() { _ruby_get_use_targets() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
_ruby_set_globals_invalidate_if_stale _ruby_set_globals_invalidate_if_stale
@ -343,7 +343,7 @@ _ruby_get_use_targets() {
# RDEPEND="${DEPEND}" # RDEPEND="${DEPEND}"
_RUBY_IMPLEMENTATIONS_DEPEND="" _RUBY_IMPLEMENTATIONS_DEPEND=""
ruby_implementations_depend() { ruby_implementations_depend() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
_ruby_set_globals_invalidate_if_stale _ruby_set_globals_invalidate_if_stale
_ruby_implementations_depend _ruby_implementations_depend
@ -472,7 +472,7 @@ _ruby_each_implementation() {
# @DESCRIPTION: # @DESCRIPTION:
# Check whether at least one ruby target implementation is present. # Check whether at least one ruby target implementation is present.
ruby-ng_pkg_setup() { ruby-ng_pkg_setup() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
# This only checks that at least one implementation is present # This only checks that at least one implementation is present
# before doing anything; by leaving the parameters empty we know # before doing anything; by leaving the parameters empty we know
@ -484,7 +484,7 @@ ruby-ng_pkg_setup() {
# @DESCRIPTION: # @DESCRIPTION:
# Unpack the source archive. # Unpack the source archive.
ruby-ng_src_unpack() { ruby-ng_src_unpack() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
mkdir "${WORKDIR}"/all mkdir "${WORKDIR}"/all
pushd "${WORKDIR}"/all &>/dev/null || die pushd "${WORKDIR}"/all &>/dev/null || die
@ -522,7 +522,7 @@ _ruby_source_copy() {
# Apply patches and prepare versions for each ruby target # Apply patches and prepare versions for each ruby target
# implementation. Also carry out common clean up tasks. # implementation. Also carry out common clean up tasks.
ruby-ng_src_prepare() { ruby-ng_src_prepare() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
# Way too many Ruby packages are prepared on OSX without removing # Way too many Ruby packages are prepared on OSX without removing
# the extra data forks, we do it here to avoid repeating it for # the extra data forks, we do it here to avoid repeating it for
@ -546,7 +546,7 @@ ruby-ng_src_prepare() {
# @DESCRIPTION: # @DESCRIPTION:
# Configure the package. # Configure the package.
ruby-ng_src_configure() { ruby-ng_src_configure() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
if type each_ruby_configure &>/dev/null; then if type each_ruby_configure &>/dev/null; then
_ruby_each_implementation each_ruby_configure _ruby_each_implementation each_ruby_configure
@ -560,7 +560,7 @@ ruby-ng_src_configure() {
# @DESCRIPTION: # @DESCRIPTION:
# Compile the package. # Compile the package.
ruby-ng_src_compile() { ruby-ng_src_compile() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
if type each_ruby_compile &>/dev/null; then if type each_ruby_compile &>/dev/null; then
_ruby_each_implementation each_ruby_compile _ruby_each_implementation each_ruby_compile
@ -574,7 +574,7 @@ ruby-ng_src_compile() {
# @DESCRIPTION: # @DESCRIPTION:
# Run tests for the package. # Run tests for the package.
ruby-ng_src_test() { ruby-ng_src_test() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
if type each_ruby_test &>/dev/null; then if type each_ruby_test &>/dev/null; then
_ruby_each_implementation each_ruby_test _ruby_each_implementation each_ruby_test
@ -617,7 +617,7 @@ _each_ruby_check_install() {
# @DESCRIPTION: # @DESCRIPTION:
# Install the package for each ruby target implementation. # Install the package for each ruby target implementation.
ruby-ng_src_install() { ruby-ng_src_install() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
if type each_ruby_install &>/dev/null; then if type each_ruby_install &>/dev/null; then
_ruby_each_implementation each_ruby_install _ruby_each_implementation each_ruby_install
@ -634,7 +634,7 @@ ruby-ng_src_install() {
# @USAGE: rbconfig item # @USAGE: rbconfig item
# @RETURN: Returns the value of the given rbconfig item of the Ruby interpreter in ${RUBY}. # @RETURN: Returns the value of the given rbconfig item of the Ruby interpreter in ${RUBY}.
ruby_rbconfig_value() { 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}'") echo $(${RUBY} --disable=did_you_mean -rrbconfig -e "puts RbConfig::CONFIG['$1']" || die "Could not read ruby configuration for '${1}'")
} }
@ -644,7 +644,7 @@ ruby_rbconfig_value() {
# @DESCRIPTION: # @DESCRIPTION:
# Installs the specified file(s) into the sitelibdir of the Ruby interpreter in ${RUBY}. # Installs the specified file(s) into the sitelibdir of the Ruby interpreter in ${RUBY}.
doruby() { doruby() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
[[ -z ${RUBY} ]] && die "\$RUBY is not set" [[ -z ${RUBY} ]] && die "\$RUBY is not set"
( # don't want to pollute calling env ( # don't want to pollute calling env
@ -658,7 +658,7 @@ doruby() {
# @FUNCTION: ruby_get_libruby # @FUNCTION: ruby_get_libruby
# @RETURN: The location of libruby*.so belonging to the Ruby interpreter in ${RUBY}. # @RETURN: The location of libruby*.so belonging to the Ruby interpreter in ${RUBY}.
ruby_get_libruby() { ruby_get_libruby() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
${RUBY} -rrbconfig -e 'puts File.join(RbConfig::CONFIG["libdir"], RbConfig::CONFIG["LIBRUBY"])' ${RUBY} -rrbconfig -e 'puts File.join(RbConfig::CONFIG["libdir"], RbConfig::CONFIG["LIBRUBY"])'
} }
@ -666,7 +666,7 @@ ruby_get_libruby() {
# @FUNCTION: ruby_get_hdrdir # @FUNCTION: ruby_get_hdrdir
# @RETURN: The location of the header files belonging to the Ruby interpreter in ${RUBY}. # @RETURN: The location of the header files belonging to the Ruby interpreter in ${RUBY}.
ruby_get_hdrdir() { ruby_get_hdrdir() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
local rubyhdrdir=$(ruby_rbconfig_value 'rubyhdrdir') local rubyhdrdir=$(ruby_rbconfig_value 'rubyhdrdir')
@ -680,7 +680,7 @@ ruby_get_hdrdir() {
# @FUNCTION: ruby_get_version # @FUNCTION: ruby_get_version
# @RETURN: The version of the Ruby interpreter in ${RUBY}, or what 'ruby' points to. # @RETURN: The version of the Ruby interpreter in ${RUBY}, or what 'ruby' points to.
ruby_get_version() { ruby_get_version() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
local ruby=${RUBY:-$(type -p ruby 2>/dev/null)} local ruby=${RUBY:-$(type -p ruby 2>/dev/null)}
@ -690,7 +690,7 @@ ruby_get_version() {
# @FUNCTION: ruby_get_implementation # @FUNCTION: ruby_get_implementation
# @RETURN: The implementation of the Ruby interpreter in ${RUBY}, or what 'ruby' points to. # @RETURN: The implementation of the Ruby interpreter in ${RUBY}, or what 'ruby' points to.
ruby_get_implementation() { ruby_get_implementation() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
local ruby=${RUBY:-$(type -p ruby 2>/dev/null)} local ruby=${RUBY:-$(type -p ruby 2>/dev/null)}
@ -713,7 +713,7 @@ ruby_get_implementation() {
# rspec version that must be executed. It defaults to 2 for historical # rspec version that must be executed. It defaults to 2 for historical
# compatibility. # compatibility.
ruby-ng_rspec() { ruby-ng_rspec() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
local version=${RSPEC_VERSION-2} local version=${RSPEC_VERSION-2}
local files="$@" local files="$@"
@ -755,7 +755,7 @@ ruby-ng_rspec() {
# This is simply a wrapper around the cucumber command (executed by $RUBY}) # This is simply a wrapper around the cucumber command (executed by $RUBY})
# which also respects TEST_VERBOSE and NOCOLOR environment variables. # which also respects TEST_VERBOSE and NOCOLOR environment variables.
ruby-ng_cucumber() { ruby-ng_cucumber() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
if [[ "${DEPEND}${BDEPEND}" != *"dev-util/cucumber"* ]]; then if [[ "${DEPEND}${BDEPEND}" != *"dev-util/cucumber"* ]]; then
ewarn "Missing test dependency dev-util/cucumber" ewarn "Missing test dependency dev-util/cucumber"
@ -788,7 +788,7 @@ ruby-ng_cucumber() {
# This is simply a wrapper around the sus-parallel command (executed by $RUBY}) # This is simply a wrapper around the sus-parallel command (executed by $RUBY})
# which also respects TEST_VERBOSE and NOCOLOR environment variables. # which also respects TEST_VERBOSE and NOCOLOR environment variables.
ruby-ng_sus() { ruby-ng_sus() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
if [[ "${DEPEND}${BDEPEND}" != *"dev-ruby/sus"* ]]; then if [[ "${DEPEND}${BDEPEND}" != *"dev-ruby/sus"* ]]; then
ewarn "Missing test dependency dev-ruby/sus" ewarn "Missing test dependency dev-ruby/sus"
@ -816,7 +816,7 @@ ruby-ng_sus() {
# their script and we installed a broken wrapper for a while. # their script and we installed a broken wrapper for a while.
# This also respects TEST_VERBOSE and NOCOLOR environment variables. # This also respects TEST_VERBOSE and NOCOLOR environment variables.
ruby-ng_testrb-2() { ruby-ng_testrb-2() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
if [[ "${DEPEND}${BDEPEND}" != *"dev-ruby/test-unit"* ]]; then if [[ "${DEPEND}${BDEPEND}" != *"dev-ruby/test-unit"* ]]; then
ewarn "Missing test dependency dev-ruby/test-unit" ewarn "Missing test dependency dev-ruby/test-unit"

View File

@ -132,7 +132,7 @@ fi
escons() { escons() {
local ret local ret
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
if [[ ! ${EPYTHON} ]]; then if [[ ! ${EPYTHON} ]]; then
eerror "EPYTHON is unset while calling escons. This most likely means that" eerror "EPYTHON is unset while calling escons. This most likely means that"

View File

@ -74,7 +74,7 @@ _SECUREBOOT_ECLASS=1
# If USE=secureboot is enabled die if the required user variables are unset # If USE=secureboot is enabled die if the required user variables are unset
# and die if the keys can't be found. # and die if the keys can't be found.
_secureboot_die_if_unset() { _secureboot_die_if_unset() {
debug-print-function ${FUNCNAME[0]} "${@}" debug-print-function ${FUNCNAME} "$@"
use secureboot || return use secureboot || return
if [[ -z ${SECUREBOOT_SIGN_KEY} || -z ${SECUREBOOT_SIGN_CERT} ]]; then if [[ -z ${SECUREBOOT_SIGN_KEY} || -z ${SECUREBOOT_SIGN_CERT} ]]; then
@ -99,7 +99,7 @@ _secureboot_die_if_unset() {
# @DESCRIPTION: # @DESCRIPTION:
# Checks if required user variables are set before starting the build # Checks if required user variables are set before starting the build
secureboot_pkg_setup() { secureboot_pkg_setup() {
debug-print-function ${FUNCNAME[0]} "${@}" debug-print-function ${FUNCNAME} "$@"
use secureboot || return use secureboot || return
# If we are merging a binary then the files in this binary # 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 # If no output file is specified the output file will be the same
# as the input file, i.e. the file will be overwritten. # as the input file, i.e. the file will be overwritten.
secureboot_sign_efi_file() { secureboot_sign_efi_file() {
debug-print-function ${FUNCNAME[0]} "${@}" debug-print-function ${FUNCNAME} "$@"
use secureboot || return use secureboot || return
local input_file=${1} local input_file=${1}
@ -153,7 +153,7 @@ secureboot_sign_efi_file() {
# By default signed files gain the .signed suffix. If the --in-place # 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. # argument is given the efi files are replaced with a signed version in place.
secureboot_auto_sign() { secureboot_auto_sign() {
debug-print-function ${FUNCNAME[0]} "${@}" debug-print-function ${FUNCNAME} "$@"
use secureboot || return use secureboot || return
[[ ${EBUILD_PHASE} == install ]] || [[ ${EBUILD_PHASE} == install ]] ||

View File

@ -43,7 +43,7 @@ _shell-completion_get_zshcompdir() {
# @FUNCTION: get_fishcompdir # @FUNCTION: get_fishcompdir
# @RETURN: the fish completions directory (with EPREFIX) # @RETURN: the fish completions directory (with EPREFIX)
get_fishcompdir() { get_fishcompdir() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
echo "${EPREFIX}$(_shell-completion_get_fishcompdir)" echo "${EPREFIX}$(_shell-completion_get_fishcompdir)"
} }
@ -51,7 +51,7 @@ get_fishcompdir() {
# @FUNCTION: get_zshcompdir # @FUNCTION: get_zshcompdir
# @RETURN: the zsh completions directory (with EPREFIX) # @RETURN: the zsh completions directory (with EPREFIX)
get_zshcompdir() { get_zshcompdir() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
echo "${EPREFIX}$(_shell-completion_get_zshcompdir)" echo "${EPREFIX}$(_shell-completion_get_zshcompdir)"
} }
@ -61,7 +61,7 @@ get_zshcompdir() {
# @DESCRIPTION: # @DESCRIPTION:
# Install fish completion files passed as args. # Install fish completion files passed as args.
dofishcomp() { dofishcomp() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
( (
insopts -m 0644 insopts -m 0644
@ -75,7 +75,7 @@ dofishcomp() {
# @DESCRIPTION: # @DESCRIPTION:
# Install zsh completion files passed as args. # Install zsh completion files passed as args.
dozshcomp() { dozshcomp() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
( (
insopts -m 0644 insopts -m 0644
@ -89,7 +89,7 @@ dozshcomp() {
# @DESCRIPTION: # @DESCRIPTION:
# Install fish file under a new name. # Install fish file under a new name.
newfishcomp() { newfishcomp() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
( (
insopts -m 0644 insopts -m 0644
@ -103,7 +103,7 @@ newfishcomp() {
# @DESCRIPTION: # @DESCRIPTION:
# Install zsh file under a new name. # Install zsh file under a new name.
newzshcomp() { newzshcomp() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
( (
insopts -m 0644 insopts -m 0644

View File

@ -75,7 +75,7 @@ _systemd_unprefix() {
# ${D}). This function always succeeds, even if systemd is not # ${D}). This function always succeeds, even if systemd is not
# installed. # installed.
systemd_get_systemunitdir() { systemd_get_systemunitdir() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
_systemd_get_dir systemdsystemunitdir /lib/systemd/system _systemd_get_dir systemdsystemunitdir /lib/systemd/system
} }
@ -86,7 +86,7 @@ systemd_get_systemunitdir() {
# ${D}). This function always succeeds, even if systemd is not # ${D}). This function always succeeds, even if systemd is not
# installed. # installed.
systemd_get_userunitdir() { systemd_get_userunitdir() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
_systemd_get_dir systemduserunitdir /usr/lib/systemd/user _systemd_get_dir systemduserunitdir /usr/lib/systemd/user
} }
@ -97,7 +97,7 @@ systemd_get_userunitdir() {
# ${D}). This function always succeeds, even if systemd is not # ${D}). This function always succeeds, even if systemd is not
# installed. # installed.
systemd_get_utildir() { systemd_get_utildir() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
_systemd_get_dir systemdutildir /lib/systemd _systemd_get_dir systemdutildir /lib/systemd
} }
@ -107,7 +107,7 @@ systemd_get_utildir() {
# Output the path for the systemd system generator directory (not including # Output the path for the systemd system generator directory (not including
# ${D}). This function always succeeds, even if systemd is not installed. # ${D}). This function always succeeds, even if systemd is not installed.
systemd_get_systemgeneratordir() { systemd_get_systemgeneratordir() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
_systemd_get_dir systemdsystemgeneratordir /lib/systemd/system-generators _systemd_get_dir systemdsystemgeneratordir /lib/systemd/system-generators
} }
@ -117,7 +117,7 @@ systemd_get_systemgeneratordir() {
# Output the path for the systemd system preset directory (not including # Output the path for the systemd system preset directory (not including
# ${D}). This function always succeeds, even if systemd is not installed. # ${D}). This function always succeeds, even if systemd is not installed.
systemd_get_systempresetdir() { systemd_get_systempresetdir() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
_systemd_get_dir systemdsystempresetdir /lib/systemd/system-preset _systemd_get_dir systemdsystempresetdir /lib/systemd/system-preset
} }
@ -126,7 +126,7 @@ systemd_get_systempresetdir() {
# @DESCRIPTION: # @DESCRIPTION:
# Output the path for the system sleep directory. # Output the path for the system sleep directory.
systemd_get_sleepdir() { systemd_get_sleepdir() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
_systemd_get_dir systemdsleepdir /lib/systemd/system-sleep _systemd_get_dir systemdsleepdir /lib/systemd/system-sleep
} }
@ -135,7 +135,7 @@ systemd_get_sleepdir() {
# @DESCRIPTION: # @DESCRIPTION:
# Install systemd unit(s). Uses doins, thus it is fatal. # Install systemd unit(s). Uses doins, thus it is fatal.
systemd_dounit() { systemd_dounit() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
( (
insopts -m 0644 insopts -m 0644
@ -149,7 +149,7 @@ systemd_dounit() {
# @DESCRIPTION: # @DESCRIPTION:
# Install systemd unit with a new name. Uses newins, thus it is fatal. # Install systemd unit with a new name. Uses newins, thus it is fatal.
systemd_newunit() { systemd_newunit() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
( (
insopts -m 0644 insopts -m 0644
@ -163,7 +163,7 @@ systemd_newunit() {
# @DESCRIPTION: # @DESCRIPTION:
# Install systemd user unit(s). Uses doins, thus it is fatal. # Install systemd user unit(s). Uses doins, thus it is fatal.
systemd_douserunit() { systemd_douserunit() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
( (
insopts -m 0644 insopts -m 0644
@ -178,7 +178,7 @@ systemd_douserunit() {
# Install systemd user unit with a new name. Uses newins, thus it # Install systemd user unit with a new name. Uses newins, thus it
# is fatal. # is fatal.
systemd_newuserunit() { systemd_newuserunit() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
( (
insopts -m 0644 insopts -m 0644
@ -195,7 +195,7 @@ systemd_newuserunit() {
# <conf-file> with the .conf suffix stripped is used # <conf-file> with the .conf suffix stripped is used
# (e.g. foo.service.conf -> foo.service.d/00gentoo.conf). # (e.g. foo.service.conf -> foo.service.d/00gentoo.conf).
systemd_install_serviced() { systemd_install_serviced() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
local src=${1} local src=${1}
local service=${2} local service=${2}
@ -233,7 +233,7 @@ systemd_install_serviced() {
# RestartSec=120 # RestartSec=120
# EOF # EOF
systemd_install_dropin() { systemd_install_dropin() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
local basedir local basedir
if [[ $# -ge 1 ]] && [[ $1 == "--user" ]]; then if [[ $# -ge 1 ]] && [[ $1 == "--user" ]]; then
@ -265,7 +265,7 @@ systemd_install_dropin() {
# Enable service in desired target, e.g. install a symlink for it. # Enable service in desired target, e.g. install a symlink for it.
# Uses dosym, thus it is fatal. # Uses dosym, thus it is fatal.
systemd_enable_service() { systemd_enable_service() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
[[ ${#} -eq 2 ]] || die "Synopsis: systemd_enable_service target service" [[ ${#} -eq 2 ]] || die "Synopsis: systemd_enable_service target service"
@ -290,7 +290,7 @@ systemd_enable_service() {
# #
# Doc: https://www.freedesktop.org/wiki/Software/systemd/timedated/ # Doc: https://www.freedesktop.org/wiki/Software/systemd/timedated/
systemd_enable_ntpunit() { systemd_enable_ntpunit() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
if [[ ${#} -lt 2 ]]; then if [[ ${#} -lt 2 ]]; then
die "Usage: systemd_enable_ntpunit <NN-name> <service>..." die "Usage: systemd_enable_ntpunit <NN-name> <service>..."
fi fi
@ -335,7 +335,7 @@ systemd_enable_ntpunit() {
# #
# See: https://www.freedesktop.org/wiki/Software/systemd/catalog # See: https://www.freedesktop.org/wiki/Software/systemd/catalog
systemd_update_catalog() { systemd_update_catalog() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
[[ ${EBUILD_PHASE} == post* ]] \ [[ ${EBUILD_PHASE} == post* ]] \
|| die "${FUNCNAME} disallowed during ${EBUILD_PHASE_FUNC:-${EBUILD_PHASE}}" || die "${FUNCNAME} disallowed during ${EBUILD_PHASE_FUNC:-${EBUILD_PHASE}}"
@ -365,7 +365,7 @@ systemd_update_catalog() {
# #
# See: man sd_booted # See: man sd_booted
systemd_is_booted() { systemd_is_booted() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
[[ -d /run/systemd/system ]] [[ -d /run/systemd/system ]]
local ret=${?} local ret=${?}

View File

@ -76,7 +76,7 @@ fi
# @DESCRIPTION: # @DESCRIPTION:
# Install one or more tmpfiles.d files into /usr/lib/tmpfiles.d. # Install one or more tmpfiles.d files into /usr/lib/tmpfiles.d.
dotmpfiles() { dotmpfiles() {
debug-print-function "${FUNCNAME}" "$@" debug-print-function ${FUNCNAME} "$@"
local f local f
for f; do for f; do
@ -97,7 +97,7 @@ dotmpfiles() {
# @DESCRIPTION: # @DESCRIPTION:
# Install a tmpfiles.d file in /usr/lib/tmpfiles.d under a new name. # Install a tmpfiles.d file in /usr/lib/tmpfiles.d under a new name.
newtmpfiles() { newtmpfiles() {
debug-print-function "${FUNCNAME}" "$@" debug-print-function ${FUNCNAME} "$@"
if [[ $2 != *.conf ]]; then if [[ $2 != *.conf ]]; then
die "tmpfiles.d files must end with .conf" die "tmpfiles.d files must end with .conf"
@ -116,7 +116,7 @@ newtmpfiles() {
# Call a tmpfiles.d implementation to create new volatile and temporary # Call a tmpfiles.d implementation to create new volatile and temporary
# files and directories. # files and directories.
tmpfiles_process() { tmpfiles_process() {
debug-print-function "${FUNCNAME}" "$@" debug-print-function ${FUNCNAME} "$@"
[[ ${EBUILD_PHASE} == postinst ]] || die "${FUNCNAME}: Only valid in pkg_postinst" [[ ${EBUILD_PHASE} == postinst ]] || die "${FUNCNAME}: Only valid in pkg_postinst"
[[ ${#} -gt 0 ]] || die "${FUNCNAME}: Must specify at least one filename" [[ ${#} -gt 0 ]] || die "${FUNCNAME}: Must specify at least one filename"

View File

@ -87,7 +87,7 @@ _get_tsg_abi_ver() {
} }
tree-sitter-grammar_src_prepare() { tree-sitter-grammar_src_prepare() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
default default
@ -102,7 +102,7 @@ tree-sitter-grammar_src_prepare() {
} }
tree-sitter-grammar_src_configure() { tree-sitter-grammar_src_configure() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
local binding local binding
for binding in "${TS_BINDINGS[@]}"; do for binding in "${TS_BINDINGS[@]}"; do
@ -156,7 +156,7 @@ _tree-sitter-grammar_legacy_compile() {
} }
tree-sitter-grammar_src_compile() { tree-sitter-grammar_src_compile() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
# legacy grammars don't have a pyproject.toml # legacy grammars don't have a pyproject.toml
if [[ -f "${S}/pyproject.toml" ]]; then if [[ -f "${S}/pyproject.toml" ]]; then
@ -186,13 +186,13 @@ tree-sitter-grammar_src_compile() {
# Runs the Tree Sitter parser's test suite. # Runs the Tree Sitter parser's test suite.
# See: https://tree-sitter.github.io/tree-sitter/creating-parsers#command-test # See: https://tree-sitter.github.io/tree-sitter/creating-parsers#command-test
tree-sitter-grammar_src_test() { tree-sitter-grammar_src_test() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
tree-sitter test || die "Test suite failed" tree-sitter test || die "Test suite failed"
} }
tree-sitter-grammar_src_install() { tree-sitter-grammar_src_install() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
# legacy grammars don't have a pyproject.toml # legacy grammars don't have a pyproject.toml
if [[ -f "${S}/pyproject.toml" ]]; then if [[ -f "${S}/pyproject.toml" ]]; then

View File

@ -67,7 +67,7 @@ _udev_get_udevdir() {
# @DESCRIPTION: # @DESCRIPTION:
# Use the short version $(get_udevdir) instead! # Use the short version $(get_udevdir) instead!
udev_get_udevdir() { 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()" 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." die "Deprecated function call: udev_get_udevdir(), please report to (overlay) maintainers."
@ -79,7 +79,7 @@ udev_get_udevdir() {
# This function always succeeds, even if udev is not installed. # This function always succeeds, even if udev is not installed.
# The fallback value is set to /lib/udev # The fallback value is set to /lib/udev
get_udevdir() { get_udevdir() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
echo "$(_udev_get_udevdir)" echo "$(_udev_get_udevdir)"
} }
@ -89,7 +89,7 @@ get_udevdir() {
# @DESCRIPTION: # @DESCRIPTION:
# Install udev rule(s). Uses doins, thus it is fatal. # Install udev rule(s). Uses doins, thus it is fatal.
udev_dorules() { udev_dorules() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
( (
insopts -m 0644 insopts -m 0644
@ -103,7 +103,7 @@ udev_dorules() {
# @DESCRIPTION: # @DESCRIPTION:
# Install udev rule with a new name. Uses newins, thus it is fatal. # Install udev rule with a new name. Uses newins, thus it is fatal.
udev_newrules() { udev_newrules() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
( (
insopts -m 0644 insopts -m 0644

View File

@ -23,7 +23,7 @@ esac
# Remove CVS directories and .cvs* files recursively. Useful when a # Remove CVS directories and .cvs* files recursively. Useful when a
# source tarball contains internal CVS directories. Defaults to ${PWD}. # source tarball contains internal CVS directories. Defaults to ${PWD}.
ecvs_clean() { ecvs_clean() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
[[ $# -eq 0 ]] && set -- . [[ $# -eq 0 ]] && set -- .
find "$@" '(' -type d -name 'CVS' -prune -o -type f -name '.cvs*' ')' \ find "$@" '(' -type d -name 'CVS' -prune -o -type f -name '.cvs*' ')' \
@ -36,7 +36,7 @@ ecvs_clean() {
# Remove .svn directories recursively. Useful when a source tarball # Remove .svn directories recursively. Useful when a source tarball
# contains internal Subversion directories. Defaults to ${PWD}. # contains internal Subversion directories. Defaults to ${PWD}.
esvn_clean() { esvn_clean() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
[[ $# -eq 0 ]] && set -- . [[ $# -eq 0 ]] && set -- .
find "$@" -type d -name '.svn' -prune -exec rm -rf '{}' + || die find "$@" -type d -name '.svn' -prune -exec rm -rf '{}' + || die
@ -48,7 +48,7 @@ esvn_clean() {
# Remove .git* directories recursively. Useful when a source tarball # Remove .git* directories recursively. Useful when a source tarball
# contains internal Git directories. Defaults to ${PWD}. # contains internal Git directories. Defaults to ${PWD}.
egit_clean() { egit_clean() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
[[ $# -eq 0 ]] && set -- . [[ $# -eq 0 ]] && set -- .
find "$@" -type d -name '.git*' -prune -exec rm -rf '{}' + || die find "$@" -type d -name '.git*' -prune -exec rm -rf '{}' + || die

View File

@ -57,7 +57,7 @@ _VCS_SNAPSHOT_ECLASS=1
# local names. Other archive types will be passed down to regular # local names. Other archive types will be passed down to regular
# unpack. # unpack.
vcs-snapshot_src_unpack() { vcs-snapshot_src_unpack() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
local renamed_any= local renamed_any=
local f local f

View File

@ -29,7 +29,7 @@ esac
# @DESCRIPTION: # @DESCRIPTION:
# Update the documentation tags in the versioned Vim directory. # Update the documentation tags in the versioned Vim directory.
update_vim_helptags() { update_vim_helptags() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
local vimfiles helpfile files vim d local vimfiles helpfile files vim d

View File

@ -46,7 +46,7 @@ if [[ ${_DEFINE_VIM_PLUGIN_SRC_PREPARE} ]]; then
# other packages. # other packages.
# Note that this function is only defined and exported in EAPIs >= 8. # Note that this function is only defined and exported in EAPIs >= 8.
vim-plugin_src_prepare() { vim-plugin_src_prepare() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
default_src_prepare default_src_prepare
@ -90,7 +90,7 @@ _VIM_PLUGIN_ALLOWED_DIRS=(
# } # }
# @CODE # @CODE
vim-plugin_src_install() { vim-plugin_src_install() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
# Install non-vim-help-docs # Install non-vim-help-docs
einstalldocs einstalldocs
@ -124,7 +124,7 @@ vim-plugin_src_install() {
# #
# * display_vim_plugin_help # * display_vim_plugin_help
vim-plugin_pkg_postinst() { vim-plugin_pkg_postinst() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
update_vim_helptags # from vim-doc update_vim_helptags # from vim-doc
update_vim_afterscripts # see below update_vim_afterscripts # see below
@ -137,7 +137,7 @@ vim-plugin_pkg_postinst() {
# This function calls the update_vim_helptags and update_vim_afterscripts # This function calls the update_vim_helptags and update_vim_afterscripts
# functions and eventually removes a bunch of empty directories. # functions and eventually removes a bunch of empty directories.
vim-plugin_pkg_postrm() { vim-plugin_pkg_postrm() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
update_vim_helptags # from vim-doc update_vim_helptags # from vim-doc
update_vim_afterscripts # see below update_vim_afterscripts # see below
@ -154,7 +154,7 @@ vim-plugin_pkg_postrm() {
# Creates scripts in /usr/share/vim/vimfiles/after/* # Creates scripts in /usr/share/vim/vimfiles/after/*
# comprised of the snippets in /usr/share/vim/vimfiles/after/*/*.d # comprised of the snippets in /usr/share/vim/vimfiles/after/*/*.d
update_vim_afterscripts() { update_vim_afterscripts() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
local d f afterdir="${EROOT}"/usr/share/vim/vimfiles/after local d f afterdir="${EROOT}"/usr/share/vim/vimfiles/after
@ -193,7 +193,7 @@ update_vim_afterscripts() {
# extra message regarding enabling filetype plugins is displayed if # extra message regarding enabling filetype plugins is displayed if
# VIM_PLUGIN_MESSAGES includes the word "filetype". # VIM_PLUGIN_MESSAGES includes the word "filetype".
display_vim_plugin_help() { display_vim_plugin_help() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "$@"
local h local h

View File

@ -62,7 +62,7 @@ WEBAPP_CLEANER="${EROOT}/usr/sbin/webapp-cleaner"
# Load the config file /etc/vhosts/webapp-config # Load the config file /etc/vhosts/webapp-config
# Supports both the old bash version, and the new python version # Supports both the old bash version, and the new python version
webapp_read_config() { webapp_read_config() {
debug-print-function $FUNCNAME $* debug-print-function ${FUNCNAME} "$@"
if has_version '>=app-admin/webapp-config-1.50'; then if has_version '>=app-admin/webapp-config-1.50'; then
ENVVAR=$(${WEBAPP_CONFIG} --query ${PN} ${PVR}) || die "Could not read settings from webapp-config!" ENVVAR=$(${WEBAPP_CONFIG} --query ${PN} ${PVR}) || die "Could not read settings from webapp-config!"
@ -79,7 +79,7 @@ webapp_read_config() {
# Check whether a specified file exists in the given directory (`.' by default) # Check whether a specified file exists in the given directory (`.' by default)
webapp_checkfileexists() { webapp_checkfileexists() {
debug-print-function $FUNCNAME $* debug-print-function ${FUNCNAME} "$@"
local my_prefix=${2:+${2}/} local my_prefix=${2:+${2}/}
@ -92,12 +92,12 @@ webapp_checkfileexists() {
} }
webapp_check_installedat() { webapp_check_installedat() {
debug-print-function $FUNCNAME $* debug-print-function ${FUNCNAME} "$@"
${WEBAPP_CONFIG} --show-installed -h localhost -d "${INSTALL_DIR}" 2> /dev/null ${WEBAPP_CONFIG} --show-installed -h localhost -d "${INSTALL_DIR}" 2> /dev/null
} }
webapp_getinstalltype() { webapp_getinstalltype() {
debug-print-function $FUNCNAME $* debug-print-function ${FUNCNAME} "$@"
if ! has vhosts ${IUSE} || use vhosts; then if ! has vhosts ${IUSE} || use vhosts; then
return return
@ -174,7 +174,7 @@ need_httpd_fastcgi() {
# @DESCRIPTION: # @DESCRIPTION:
# Mark a file config-protected for a web-based application. # Mark a file config-protected for a web-based application.
webapp_configfile() { webapp_configfile() {
debug-print-function $FUNCNAME $* debug-print-function ${FUNCNAME} "$@"
local m local m
for m in "$@"; do for m in "$@"; do
@ -197,7 +197,7 @@ webapp_configfile() {
# Install a script that will run after a virtual copy is created, and # Install a script that will run after a virtual copy is created, and
# before a virtual copy has been removed. # before a virtual copy has been removed.
webapp_hook_script() { webapp_hook_script() {
debug-print-function $FUNCNAME $* debug-print-function ${FUNCNAME} "$@"
webapp_checkfileexists "${1}" webapp_checkfileexists "${1}"
@ -211,7 +211,7 @@ webapp_hook_script() {
# @DESCRIPTION: # @DESCRIPTION:
# Install a text file containing post-installation instructions. # Install a text file containing post-installation instructions.
webapp_postinst_txt() { webapp_postinst_txt() {
debug-print-function $FUNCNAME $* debug-print-function ${FUNCNAME} "$@"
webapp_checkfileexists "${2}" webapp_checkfileexists "${2}"
@ -224,7 +224,7 @@ webapp_postinst_txt() {
# @DESCRIPTION: # @DESCRIPTION:
# Install a text file containing post-upgrade instructions. # Install a text file containing post-upgrade instructions.
webapp_postupgrade_txt() { webapp_postupgrade_txt() {
debug-print-function $FUNCNAME $* debug-print-function ${FUNCNAME} "$@"
webapp_checkfileexists "${2}" webapp_checkfileexists "${2}"
@ -234,7 +234,7 @@ webapp_postupgrade_txt() {
# helper for webapp_serverowned() # helper for webapp_serverowned()
_webapp_serverowned() { _webapp_serverowned() {
debug-print-function $FUNCNAME $* debug-print-function ${FUNCNAME} "$@"
webapp_checkfileexists "${1}" "${D}" webapp_checkfileexists "${1}" "${D}"
local my_file local my_file
@ -253,7 +253,7 @@ _webapp_serverowned() {
# The ownership of the file is NOT set until the application is installed using # 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. # the webapp-config tool. If -R is given directories are handled recursively.
webapp_serverowned() { webapp_serverowned() {
debug-print-function $FUNCNAME $* debug-print-function ${FUNCNAME} "$@"
local m local m
if [[ "${1}" == "-R" ]]; then if [[ "${1}" == "-R" ]]; then
@ -280,7 +280,7 @@ webapp_serverowned() {
# used by default. Note: this function will automagically prepend $1 to the # used by default. Note: this function will automagically prepend $1 to the
# front of your config file's name. # front of your config file's name.
webapp_server_configfile() { webapp_server_configfile() {
debug-print-function $FUNCNAME $* debug-print-function ${FUNCNAME} "$@"
webapp_checkfileexists "${2}" webapp_checkfileexists "${2}"
@ -303,7 +303,7 @@ webapp_server_configfile() {
# If a version is given the script should upgrade the database schema from # If a version is given the script should upgrade the database schema from
# the given version to $PVR. # the given version to $PVR.
webapp_sqlscript() { webapp_sqlscript() {
debug-print-function $FUNCNAME $* debug-print-function ${FUNCNAME} "$@"
webapp_checkfileexists "${2}" webapp_checkfileexists "${2}"
@ -330,7 +330,7 @@ webapp_sqlscript() {
# You need to call this function in src_install() BEFORE anything else has run. # You need to call this function in src_install() BEFORE anything else has run.
# For now we just create required webapp-config directories. # For now we just create required webapp-config directories.
webapp_src_preinst() { webapp_src_preinst() {
debug-print-function $FUNCNAME $* debug-print-function ${FUNCNAME} "$@"
# sanity checks, to catch bugs in the ebuild # sanity checks, to catch bugs in the ebuild
if [[ ! -f "${T}/${SETUP_CHECK_FILE}" ]]; then if [[ ! -f "${T}/${SETUP_CHECK_FILE}" ]]; then
@ -371,7 +371,7 @@ webapp_src_preinst() {
# You need to call this function BEFORE anything else has run in your custom # You need to call this function BEFORE anything else has run in your custom
# pkg_setup(). # pkg_setup().
webapp_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 # to test whether or not the ebuild has correctly called this function
# we add an empty file to the filesystem # we add an empty file to the filesystem
@ -432,7 +432,7 @@ webapp_pkg_setup() {
# You need to call this function AFTER everything else has run in your custom # You need to call this function AFTER everything else has run in your custom
# src_install(). # src_install().
webapp_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 # to test whether or not the ebuild has correctly called this function
# we add an empty file to the filesystem # we add an empty file to the filesystem
@ -460,7 +460,7 @@ webapp_src_install() {
# You need to call this function AFTER everything else has run in your custom # You need to call this function AFTER everything else has run in your custom
# pkg_postinst(). # pkg_postinst().
webapp_pkg_postinst() { webapp_pkg_postinst() {
debug-print-function $FUNCNAME $* debug-print-function ${FUNCNAME} "$@"
webapp_read_config webapp_read_config
@ -539,7 +539,7 @@ webapp_pkg_postinst() {
# remove all installed copies of this web application. Otherwise instruct the # remove all installed copies of this web application. Otherwise instruct the
# user to manually remove those copies. See bug #136959. # user to manually remove those copies. See bug #136959.
webapp_pkg_prerm() { webapp_pkg_prerm() {
debug-print-function $FUNCNAME $* debug-print-function ${FUNCNAME} "$@"
local my_output= local my_output=
my_output="$(${WEBAPP_CONFIG} --list-installs ${PN} ${PVR})" my_output="$(${WEBAPP_CONFIG} --list-installs ${PN} ${PVR})"