eclass/bash-completion-r1: Sync with Gentoo

It's from Gentoo commit 424acdc15be08f7c2b13c0d1bb8c31f55d26655d.
This commit is contained in:
Krzesimir Nowak 2022-08-23 16:49:02 +02:00
parent cc61cd455d
commit 1059e54407

View File

@ -1,4 +1,4 @@
# Copyright 1999-2021 Gentoo Authors # Copyright 1999-2022 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: bash-completion-r1.eclass # @ECLASS: bash-completion-r1.eclass
@ -28,12 +28,10 @@ _BASH_COMPLETION_R1_ECLASS=1
inherit toolchain-funcs inherit toolchain-funcs
# Flatcar: we still have some packages that use old EAPI, revert this case ${EAPI} in
# change when we update those packages. 5|6|7|8) ;;
#case ${EAPI} in *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
# 5|6|7|8) ;; esac
# *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
#esac
# @FUNCTION: _bash-completion-r1_get_bashdir # @FUNCTION: _bash-completion-r1_get_bashdir
# @INTERNAL # @INTERNAL
@ -45,11 +43,6 @@ inherit toolchain-funcs
_bash-completion-r1_get_bashdir() { _bash-completion-r1_get_bashdir() {
debug-print-function ${FUNCNAME} "${@}" debug-print-function ${FUNCNAME} "${@}"
# Flatcar: Take a fix for pkg-config paths from systemd.eclass.
#
# https://github.com/pkgconf/pkgconf/issues/205
local -x PKG_CONFIG_FDO_SYSROOT_RULES=1
if $(tc-getPKG_CONFIG) --exists bash-completion &>/dev/null; then if $(tc-getPKG_CONFIG) --exists bash-completion &>/dev/null; then
local path local path
path=$($(tc-getPKG_CONFIG) --variable="${1}" bash-completion) || die path=$($(tc-getPKG_CONFIG) --variable="${1}" bash-completion) || die
@ -71,7 +64,7 @@ _bash-completion-r1_get_bashcompdir() {
_bash-completion-r1_get_bashdir completionsdir /usr/share/bash-completion/completions _bash-completion-r1_get_bashdir completionsdir /usr/share/bash-completion/completions
} }
# @FUNCTION: _bash-completion-r1_get_helpersdir # @FUNCTION: _bash-completion-r1_get_bashhelpersdir
# @INTERNAL # @INTERNAL
# @DESCRIPTION: # @DESCRIPTION:
# Get unprefixed bash-completion helpers directory. # Get unprefixed bash-completion helpers directory.