mirror of
https://github.com/flatcar/scripts.git
synced 2026-04-15 18:41:28 +02:00
app-shells/bash-completion: Sync with Gentoo
It's from Gentoo commit 174f9d370504e291aeff1f41634bb39ea9894003. Signed-off-by: Flatcar Buildbot <buildbot@flatcar-linux.org>
This commit is contained in:
parent
504496c635
commit
9893a512c3
@ -1,5 +1,3 @@
|
||||
DIST bash-completion-2.14.0.tar.xz 428980 BLAKE2B c28ec0cd348a3954461f7a865823a358e47c4b479c7812baa6d54aef856c958510967806550e62784955f9daf233a0b01edade19884e534df857472a3196e63e SHA512 2e12d2e57c932b931a6cfe59234f9d33d715538d6ea4eb72ed4ed3d8d2cf2cedaf08fcb6abaf3117e06115d892283e38a07b3abe5c91c026d2c06a0f64e347bd
|
||||
DIST bash-completion-2.15.0.tar.xz 457836 BLAKE2B d2234cb2baf8494d2159e8abe6780e0879efb6fe9e851c0d51ebf09363c83652ef610658e2beca181adc0d6c844472a68a219be8b3ca51271fdfc53477f174ba SHA512 3b7e98801c3ceab7853c0603bdaa0cd6f0a658e0f7f24b092f341bd1794633b62d33e664035b6ab3c03b5a3dd941b16f87a415aade8a2707578c59cc48b1a9f7
|
||||
DIST bash-completion-2.16.0.tar.xz 464764 BLAKE2B 389be47536f8f9aa383ff85bf19a00562b30b6d3e3652feaa01284987af13c2dc9850b59341956dd8e94e54251cd36902a60d5e3420ebfa2567216546144f675 SHA512 3711d6cb53cedff94efca0325479ac73f40b536fce250dbcc18ef120a8d0d2248f086ca26e245d163e6058d1b1087d57ced041317163d0e25592d6cb7acbc102
|
||||
DIST bash-completion-2.17.0.tar.xz 482896 BLAKE2B ee11f2bff82b0852979e4843c7ad5e5b976e4d1e44ab5ed1b96da64fe9b32d91150f12f32bf7c6c0286cd2a0c424d786bbad47066403c71f8d3c8425487427dd SHA512 79f7a22de7df7a6a5cad2e8088ce7e013a3cd5542f3af825c04b2607c824022913dd775202ddab7964dd759e50d5bdf9be6451c70d488efaef10f7cf2f7ac73e
|
||||
DIST bashcomp-2.0.3.tar.gz 3539 BLAKE2B 75304d144792cc7f6ad5455a05a65c33c646d6f7384d020a06a1fcf012cd51625a3dd0750ad539253453b1eede196c340286a1e81737f0835b5091609ba01295 SHA512 b2bd185ccbd4456939ccc731cc1983fcec2b9564a9920642a753fadd5d897fdb96b925ac1524657629d621d45b37d99076c8ae72511a827e96ff6c388d720008
|
||||
|
||||
@ -1,188 +0,0 @@
|
||||
# Copyright 1999-2025 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
BASHCOMP_P=bashcomp-2.0.3
|
||||
PYTHON_COMPAT=( python3_{10..12} )
|
||||
|
||||
inherit python-any-r1
|
||||
|
||||
DESCRIPTION="Programmable Completion for bash"
|
||||
HOMEPAGE="https://github.com/scop/bash-completion"
|
||||
SRC_URI="
|
||||
https://github.com/scop/bash-completion/releases/download/${PV}/${P}.tar.xz
|
||||
eselect? (
|
||||
https://github.com/projg2/bashcomp2/releases/download/v${BASHCOMP_P#*-}/${BASHCOMP_P}.tar.gz
|
||||
)
|
||||
"
|
||||
|
||||
LICENSE="GPL-2+"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~x64-macos"
|
||||
IUSE="+eselect test"
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
# completion collision with net-fs/mc
|
||||
RDEPEND="
|
||||
>=app-shells/bash-4.3_p30-r1:0
|
||||
sys-apps/miscfiles
|
||||
!<app-text/tree-2.1.1-r1
|
||||
!!net-fs/mc
|
||||
"
|
||||
BDEPEND="
|
||||
test? (
|
||||
${RDEPEND}
|
||||
$(python_gen_any_dep '
|
||||
dev-python/pexpect[${PYTHON_USEDEP}]
|
||||
dev-python/pytest[${PYTHON_USEDEP}]
|
||||
dev-python/pytest-xdist[${PYTHON_USEDEP}]
|
||||
')
|
||||
)
|
||||
"
|
||||
PDEPEND="
|
||||
>=app-shells/gentoo-bashcomp-20140911
|
||||
"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-2.14.0-optimize-kernel-modules.patch
|
||||
)
|
||||
|
||||
strip_completions() {
|
||||
# Remove unwanted completions.
|
||||
local strip_completions=(
|
||||
# Slackware package stuff, quite generic names cause collisions
|
||||
# (e.g. with sys-apps/pacman)
|
||||
explodepkg installpkg makepkg pkgtool removepkg upgradepkg
|
||||
|
||||
# Debian/Red Hat network stuff
|
||||
ifdown ifup ifquery ifstatus
|
||||
|
||||
# Installed in app-editors/vim-core
|
||||
xxd
|
||||
|
||||
# Now-dead symlinks to deprecated completions
|
||||
hd ncal
|
||||
|
||||
# FreeBSD
|
||||
freebsd-update kldload kldunload portinstall portsnap
|
||||
pkg_deinstall pkg_delete pkg_info
|
||||
|
||||
# For GNU mailman, which isn't packaged. If mailman isn't installed,
|
||||
# it triggers a QA warning.
|
||||
arch
|
||||
)
|
||||
|
||||
if [[ ${CHOST} != *solaris* ]]; then
|
||||
# Triggers QA warning since it only defines a completion on Solaris,
|
||||
# to avoid defining a bad one on macOS.
|
||||
strip_completions+=(pkgutil)
|
||||
fi
|
||||
|
||||
local file
|
||||
for file in "${strip_completions[@]}"; do
|
||||
rm "${ED}"/usr/share/bash-completion/completions/${file} ||
|
||||
die "stripping ${file} failed"
|
||||
done
|
||||
|
||||
# remove deprecated completions (moved to other packages)
|
||||
rm "${ED}"/usr/share/bash-completion/completions/_* || die
|
||||
}
|
||||
|
||||
python_check_deps() {
|
||||
python_has_version "dev-python/pexpect[${PYTHON_USEDEP}]" &&
|
||||
python_has_version "dev-python/pytest[${PYTHON_USEDEP}]" &&
|
||||
python_has_version "dev-python/pytest-xdist[${PYTHON_USEDEP}]"
|
||||
}
|
||||
|
||||
pkg_setup() {
|
||||
use test && python-any-r1_pkg_setup
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
if use eselect; then
|
||||
eapply "${WORKDIR}/${BASHCOMP_P}/bash-completion-blacklist-support.patch"
|
||||
fi
|
||||
|
||||
default
|
||||
}
|
||||
|
||||
src_test() {
|
||||
local EPYTEST_DESELECT=(
|
||||
# redhat-specific, we strip these completions
|
||||
test/t/test_if{down,up}.py
|
||||
# not available for icedtea
|
||||
test/t/test_javaws.py
|
||||
# TODO
|
||||
test/t/test_vi.py::TestVi::test_2
|
||||
test/t/test_xmlwf.py::TestXmlwf::test_2 #bug 886159
|
||||
test/t/test_xrandr.py::TestXrandr::test_output_filter
|
||||
)
|
||||
local EPYTEST_IGNORE=(
|
||||
# stupid test that async tests work
|
||||
test/fixtures/pytest/test_async.py
|
||||
)
|
||||
local EPYTEST_XDIST=1
|
||||
|
||||
# portage's HOME override breaks tests
|
||||
local -x HOME=$(unset HOME; echo ~)
|
||||
addpredict "${HOME}"
|
||||
# used in pytest tests
|
||||
local -x NETWORK=none
|
||||
local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
|
||||
local -x PYTEST_PLUGINS=xdist.plugin
|
||||
emake -C completions check
|
||||
epytest
|
||||
}
|
||||
|
||||
src_install() {
|
||||
# work-around race conditions, bug #526996
|
||||
mkdir -p "${ED}"/usr/share/bash-completion/{completions,helpers} || die
|
||||
|
||||
emake DESTDIR="${D}" profiledir="${EPREFIX}"/etc/bash/bashrc.d install
|
||||
|
||||
strip_completions
|
||||
|
||||
dodoc AUTHORS CHANGELOG.md CONTRIBUTING.md README.md
|
||||
|
||||
# install the python completions for all targets, bug #622892
|
||||
local TARGET
|
||||
for TARGET in "${PYTHON_COMPAT[@]}"; do
|
||||
if [[ ! -e "${ED}"/usr/share/bash-completion/completions/${TARGET/_/.} ]]; then
|
||||
dosym python "${ED}"/usr/share/bash-completion/completions/${TARGET/_/.}
|
||||
fi
|
||||
done
|
||||
|
||||
# install the eselect module
|
||||
if use eselect; then
|
||||
insinto /usr/share/eselect/modules
|
||||
doins "${WORKDIR}/${BASHCOMP_P}/bashcomp.eselect"
|
||||
doman "${WORKDIR}/${BASHCOMP_P}/bashcomp.eselect.5"
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
local v
|
||||
for v in ${REPLACING_VERSIONS}; do
|
||||
if ver_test "${v}" -lt 2.1-r90; then
|
||||
ewarn "For bash-completion autoloader to work, all completions need to"
|
||||
ewarn "be installed in /usr/share/bash-completion/completions. You may"
|
||||
ewarn "need to rebuild packages that installed completions in the old"
|
||||
ewarn "location. You can do this using:"
|
||||
ewarn
|
||||
ewarn "$ find ${EPREFIX}/usr/share/bash-completion -maxdepth 1 -type f '!' -name 'bash_completion' -exec emerge -1v {} +"
|
||||
ewarn
|
||||
ewarn "After the rebuild, you should remove the old setup symlinks:"
|
||||
ewarn
|
||||
ewarn "$ find ${EPREFIX}/etc/bash_completion.d -type l -delete"
|
||||
fi
|
||||
done
|
||||
|
||||
if has_version 'app-shells/zsh'; then
|
||||
elog
|
||||
elog "If you are interested in using the provided bash completion functions with"
|
||||
elog "zsh, valuable tips on the effective use of bashcompinit are available:"
|
||||
elog " http://www.zsh.org/mla/workers/2003/msg00046.html"
|
||||
elog
|
||||
fi
|
||||
}
|
||||
@ -1,180 +0,0 @@
|
||||
# Copyright 1999-2025 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
BASHCOMP_P=bashcomp-2.0.3
|
||||
PYTHON_COMPAT=( python3_{10..13} )
|
||||
|
||||
inherit eapi9-ver python-any-r1
|
||||
|
||||
DESCRIPTION="Programmable Completion for bash"
|
||||
HOMEPAGE="https://github.com/scop/bash-completion"
|
||||
SRC_URI="
|
||||
https://github.com/scop/bash-completion/releases/download/${PV}/${P}.tar.xz
|
||||
eselect? (
|
||||
https://github.com/projg2/bashcomp2/releases/download/v${BASHCOMP_P#*-}/${BASHCOMP_P}.tar.gz
|
||||
)
|
||||
"
|
||||
|
||||
LICENSE="GPL-2+"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~x64-macos"
|
||||
IUSE="+eselect test"
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
# completion collision with net-fs/mc
|
||||
RDEPEND="
|
||||
>=app-shells/bash-4.3_p30-r1:0
|
||||
sys-apps/miscfiles
|
||||
!<app-text/tree-2.1.1-r1
|
||||
!!net-fs/mc
|
||||
"
|
||||
BDEPEND="
|
||||
test? (
|
||||
${RDEPEND}
|
||||
$(python_gen_any_dep '
|
||||
dev-python/pexpect[${PYTHON_USEDEP}]
|
||||
dev-python/pytest[${PYTHON_USEDEP}]
|
||||
dev-python/pytest-xdist[${PYTHON_USEDEP}]
|
||||
')
|
||||
)
|
||||
"
|
||||
PDEPEND="
|
||||
>=app-shells/gentoo-bashcomp-20140911
|
||||
"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-2.14.0-optimize-kernel-modules.patch
|
||||
)
|
||||
|
||||
strip_completions() {
|
||||
# Remove unwanted completions.
|
||||
local strip_completions=(
|
||||
# Slackware package stuff, quite generic names cause collisions
|
||||
# (e.g. with sys-apps/pacman)
|
||||
explodepkg installpkg makepkg pkgtool removepkg upgradepkg
|
||||
|
||||
# Debian/Red Hat network stuff
|
||||
ifdown ifup ifquery ifstatus
|
||||
|
||||
# Installed in app-editors/vim-core
|
||||
xxd
|
||||
|
||||
# Now-dead symlinks to deprecated completions
|
||||
hd ncal
|
||||
|
||||
# For GNU mailman, which isn't packaged. If mailman isn't installed,
|
||||
# it triggers a QA warning.
|
||||
arch
|
||||
)
|
||||
|
||||
local file
|
||||
for file in "${strip_completions[@]}"; do
|
||||
rm "${ED}"/usr/share/bash-completion/completions/${file} ||
|
||||
die "stripping ${file} failed"
|
||||
done
|
||||
|
||||
# remove deprecated completions (moved to other packages)
|
||||
rm "${ED}"/usr/share/bash-completion/completions/_* || die
|
||||
}
|
||||
|
||||
python_check_deps() {
|
||||
python_has_version "dev-python/pexpect[${PYTHON_USEDEP}]" &&
|
||||
python_has_version "dev-python/pytest[${PYTHON_USEDEP}]" &&
|
||||
python_has_version "dev-python/pytest-xdist[${PYTHON_USEDEP}]"
|
||||
}
|
||||
|
||||
pkg_setup() {
|
||||
use test && python-any-r1_pkg_setup
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
if use eselect; then
|
||||
eapply "${WORKDIR}/${BASHCOMP_P}/bash-completion-blacklist-support.patch"
|
||||
fi
|
||||
|
||||
default
|
||||
}
|
||||
|
||||
src_test() {
|
||||
local EPYTEST_DESELECT=(
|
||||
# redhat-specific, we strip these completions
|
||||
test/t/test_if{down,up}.py
|
||||
# not available for icedtea
|
||||
test/t/test_javaws.py
|
||||
# TODO
|
||||
test/t/test_vi.py::TestVi::test_2
|
||||
test/t/test_xmlwf.py::TestXmlwf::test_2 #bug 886159
|
||||
test/t/test_xrandr.py::TestXrandr::test_output_filter
|
||||
test/t/unit/test_unit_dequote.py
|
||||
test/t/test_sudo.py::TestSudo::test_1 #bug 935400
|
||||
test/t/test_xfreerdp.py::TestXfreerdp::test_6 #bug 935400
|
||||
test/t/unit/test_unit_command_offset.py::TestUnitCommandOffset::test_cmd_quoted #bug 931744
|
||||
test/t/test_make.py::TestMake::test_6 #bug 931744
|
||||
)
|
||||
local EPYTEST_IGNORE=(
|
||||
# stupid test that async tests work
|
||||
test/fixtures/pytest/test_async.py
|
||||
)
|
||||
local EPYTEST_XDIST=1
|
||||
|
||||
# portage's HOME override breaks tests
|
||||
local -x HOME=$(unset HOME; echo ~)
|
||||
addpredict "${HOME}"
|
||||
# used in pytest tests
|
||||
local -x NETWORK=none
|
||||
local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
|
||||
local -x PYTEST_PLUGINS=xdist.plugin
|
||||
emake -C completions check
|
||||
epytest
|
||||
}
|
||||
|
||||
src_install() {
|
||||
# work-around race conditions, bug #526996
|
||||
mkdir -p "${ED}"/usr/share/bash-completion/{completions,helpers} || die
|
||||
|
||||
emake DESTDIR="${D}" profiledir="${EPREFIX}"/etc/bash/bashrc.d install
|
||||
|
||||
strip_completions
|
||||
|
||||
dodoc AUTHORS CHANGELOG.md CONTRIBUTING.md README.md
|
||||
|
||||
# install the python completions for all targets, bug #622892
|
||||
local TARGET
|
||||
for TARGET in "${PYTHON_COMPAT[@]}"; do
|
||||
if [[ ! -e "${ED}"/usr/share/bash-completion/completions/${TARGET/_/.} ]]; then
|
||||
dosym python "${ED}"/usr/share/bash-completion/completions/${TARGET/_/.}
|
||||
fi
|
||||
done
|
||||
|
||||
# install the eselect module
|
||||
if use eselect; then
|
||||
insinto /usr/share/eselect/modules
|
||||
doins "${WORKDIR}/${BASHCOMP_P}/bashcomp.eselect"
|
||||
doman "${WORKDIR}/${BASHCOMP_P}/bashcomp.eselect.5"
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
if ver_replacing -lt 2.1-r90; then
|
||||
ewarn "For bash-completion autoloader to work, all completions need to"
|
||||
ewarn "be installed in /usr/share/bash-completion/completions. You may"
|
||||
ewarn "need to rebuild packages that installed completions in the old"
|
||||
ewarn "location. You can do this using:"
|
||||
ewarn
|
||||
ewarn "$ find ${EPREFIX}/usr/share/bash-completion -maxdepth 1 -type f '!' -name 'bash_completion' -exec emerge -1v {} +"
|
||||
ewarn
|
||||
ewarn "After the rebuild, you should remove the old setup symlinks:"
|
||||
ewarn
|
||||
ewarn "$ find ${EPREFIX}/etc/bash_completion.d -type l -delete"
|
||||
fi
|
||||
|
||||
if has_version 'app-shells/zsh'; then
|
||||
elog
|
||||
elog "If you are interested in using the provided bash completion functions with"
|
||||
elog "zsh, valuable tips on the effective use of bashcompinit are available:"
|
||||
elog " http://www.zsh.org/mla/workers/2003/msg00046.html"
|
||||
elog
|
||||
fi
|
||||
}
|
||||
@ -1,170 +0,0 @@
|
||||
# Copyright 1999-2025 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
BASHCOMP_P=bashcomp-2.0.3
|
||||
PYTHON_COMPAT=( python3_{10..13} )
|
||||
|
||||
inherit autotools python-any-r1
|
||||
|
||||
DESCRIPTION="Programmable Completion for bash"
|
||||
HOMEPAGE="https://github.com/scop/bash-completion"
|
||||
SRC_URI="
|
||||
https://github.com/scop/bash-completion/releases/download/${PV}/${P}.tar.xz
|
||||
eselect? (
|
||||
https://github.com/projg2/bashcomp2/releases/download/v${BASHCOMP_P#*-}/${BASHCOMP_P}.tar.gz
|
||||
)
|
||||
"
|
||||
|
||||
LICENSE="GPL-2+"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~x64-macos"
|
||||
IUSE="+eselect test"
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
# completion collision with net-fs/mc
|
||||
RDEPEND="
|
||||
>=app-shells/bash-4.3_p30-r1:0
|
||||
sys-apps/miscfiles
|
||||
!<app-text/tree-2.1.1-r1
|
||||
!!net-fs/mc
|
||||
"
|
||||
BDEPEND="
|
||||
test? (
|
||||
${RDEPEND}
|
||||
$(python_gen_any_dep '
|
||||
dev-python/pexpect[${PYTHON_USEDEP}]
|
||||
dev-python/pytest[${PYTHON_USEDEP}]
|
||||
dev-python/pytest-xdist[${PYTHON_USEDEP}]
|
||||
')
|
||||
)
|
||||
"
|
||||
PDEPEND="
|
||||
>=app-shells/gentoo-bashcomp-20140911
|
||||
"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-2.14.0-optimize-kernel-modules.patch
|
||||
"${FILESDIR}"/${PN}-2.16.0-libsecret-completion.patch
|
||||
)
|
||||
|
||||
strip_completions() {
|
||||
# Remove unwanted completions.
|
||||
local strip_completions=(
|
||||
# Slackware package stuff, quite generic names cause collisions
|
||||
# (e.g. with sys-apps/pacman)
|
||||
explodepkg installpkg makepkg pkgtool removepkg upgradepkg
|
||||
|
||||
# Debian/Red Hat network stuff
|
||||
ifdown ifup ifquery ifstatus
|
||||
|
||||
# Installed in app-editors/vim-core
|
||||
xxd
|
||||
|
||||
# Now-dead symlinks to deprecated completions
|
||||
hd ncal
|
||||
|
||||
# For GNU mailman, which isn't packaged. If mailman isn't installed,
|
||||
# it triggers a QA warning.
|
||||
arch
|
||||
)
|
||||
|
||||
local file
|
||||
for file in "${strip_completions[@]}"; do
|
||||
rm "${ED}"/usr/share/bash-completion/completions/${file} ||
|
||||
die "stripping ${file} failed"
|
||||
done
|
||||
|
||||
# remove deprecated completions (moved to other packages)
|
||||
rm "${ED}"/usr/share/bash-completion/completions/_* || die
|
||||
}
|
||||
|
||||
python_check_deps() {
|
||||
python_has_version "dev-python/pexpect[${PYTHON_USEDEP}]" &&
|
||||
python_has_version "dev-python/pytest[${PYTHON_USEDEP}]" &&
|
||||
python_has_version "dev-python/pytest-xdist[${PYTHON_USEDEP}]"
|
||||
}
|
||||
|
||||
pkg_setup() {
|
||||
use test && python-any-r1_pkg_setup
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
if use eselect; then
|
||||
eapply "${WORKDIR}/${BASHCOMP_P}/bash-completion-blacklist-support.patch"
|
||||
fi
|
||||
|
||||
default
|
||||
# Only needed for ${PN}-2.16.0-libsecret-completion.patch
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
src_test() {
|
||||
local EPYTEST_DESELECT=(
|
||||
# redhat-specific, we strip these completions
|
||||
test/t/test_if{down,up}.py
|
||||
# not available for icedtea
|
||||
test/t/test_javaws.py
|
||||
# TODO
|
||||
test/t/test_vi.py::TestVi::test_2
|
||||
test/t/test_xmlwf.py::TestXmlwf::test_2 #bug 886159
|
||||
test/t/test_xrandr.py::TestXrandr::test_output_filter
|
||||
test/t/unit/test_unit_dequote.py
|
||||
test/t/test_sudo.py::TestSudo::test_1 #bug 935400
|
||||
test/t/test_xfreerdp.py::TestXfreerdp::test_6 #bug 935400
|
||||
test/t/unit/test_unit_command_offset.py::TestUnitCommandOffset::test_cmd_quoted #bug 931744
|
||||
test/t/test_make.py::TestMake::test_6 #bug 931744
|
||||
)
|
||||
local EPYTEST_IGNORE=(
|
||||
# stupid test that async tests work
|
||||
test/fixtures/pytest/test_async.py
|
||||
)
|
||||
local EPYTEST_XDIST=1
|
||||
|
||||
# portage's HOME override breaks tests
|
||||
local -x HOME=$(unset HOME; echo ~)
|
||||
addpredict "${HOME}"
|
||||
# used in pytest tests
|
||||
local -x NETWORK=none
|
||||
local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
|
||||
local -x PYTEST_PLUGINS=xdist.plugin
|
||||
emake -C completions check
|
||||
epytest
|
||||
}
|
||||
|
||||
src_install() {
|
||||
# work-around race conditions, bug #526996
|
||||
mkdir -p "${ED}"/usr/share/bash-completion/{completions,helpers} || die
|
||||
|
||||
emake DESTDIR="${D}" profiledir="${EPREFIX}"/etc/bash/bashrc.d install
|
||||
|
||||
strip_completions
|
||||
|
||||
dodoc AUTHORS CHANGELOG.md CONTRIBUTING.md README.md
|
||||
|
||||
# install the python completions for all targets, bug #622892
|
||||
local TARGET
|
||||
for TARGET in "${PYTHON_COMPAT[@]}"; do
|
||||
if [[ ! -e "${ED}"/usr/share/bash-completion/completions/${TARGET/_/.} ]]; then
|
||||
dosym python "${ED}"/usr/share/bash-completion/completions/${TARGET/_/.}
|
||||
fi
|
||||
done
|
||||
|
||||
# install the eselect module
|
||||
if use eselect; then
|
||||
insinto /usr/share/eselect/modules
|
||||
doins "${WORKDIR}/${BASHCOMP_P}/bashcomp.eselect"
|
||||
doman "${WORKDIR}/${BASHCOMP_P}/bashcomp.eselect.5"
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
if has_version 'app-shells/zsh'; then
|
||||
elog
|
||||
elog "If you are interested in using the provided bash completion functions with"
|
||||
elog "zsh, valuable tips on the effective use of bashcompinit are available:"
|
||||
elog " http://www.zsh.org/mla/workers/2003/msg00046.html"
|
||||
elog
|
||||
fi
|
||||
}
|
||||
@ -1,169 +0,0 @@
|
||||
# Copyright 1999-2025 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
BASHCOMP_P=bashcomp-2.0.3
|
||||
PYTHON_COMPAT=( python3_{11..13} )
|
||||
|
||||
inherit autotools python-any-r1
|
||||
|
||||
DESCRIPTION="Programmable Completion for bash"
|
||||
HOMEPAGE="https://github.com/scop/bash-completion"
|
||||
SRC_URI="
|
||||
https://github.com/scop/bash-completion/releases/download/${PV}/${P}.tar.xz
|
||||
eselect? (
|
||||
https://github.com/projg2/bashcomp2/releases/download/v${BASHCOMP_P#*-}/${BASHCOMP_P}.tar.gz
|
||||
)
|
||||
"
|
||||
|
||||
LICENSE="GPL-2+"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~x64-macos"
|
||||
IUSE="+eselect test"
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
RDEPEND="
|
||||
>=app-shells/bash-4.3_p30-r1:0
|
||||
sys-apps/miscfiles
|
||||
!<app-text/tree-2.1.1-r1
|
||||
!!<=net-fs/mc-2025.04.16.18.13.26
|
||||
"
|
||||
BDEPEND="
|
||||
test? (
|
||||
${RDEPEND}
|
||||
$(python_gen_any_dep '
|
||||
dev-python/pexpect[${PYTHON_USEDEP}]
|
||||
dev-python/pytest[${PYTHON_USEDEP}]
|
||||
dev-python/pytest-xdist[${PYTHON_USEDEP}]
|
||||
')
|
||||
)
|
||||
"
|
||||
PDEPEND="
|
||||
>=app-shells/gentoo-bashcomp-20140911
|
||||
"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-2.14.0-optimize-kernel-modules.patch
|
||||
"${FILESDIR}"/${PN}-2.16.0-libsecret-completion.patch
|
||||
)
|
||||
|
||||
strip_completions() {
|
||||
# Remove unwanted completions.
|
||||
local strip_completions=(
|
||||
# Slackware package stuff, quite generic names cause collisions
|
||||
# (e.g. with sys-apps/pacman)
|
||||
explodepkg installpkg makepkg pkgtool removepkg upgradepkg
|
||||
|
||||
# Debian/Red Hat network stuff
|
||||
ifdown ifup ifquery ifstatus
|
||||
|
||||
# Installed in app-editors/vim-core
|
||||
xxd
|
||||
|
||||
# Now-dead symlinks to deprecated completions
|
||||
hd ncal
|
||||
|
||||
# For GNU mailman, which isn't packaged. If mailman isn't installed,
|
||||
# it triggers a QA warning.
|
||||
arch
|
||||
)
|
||||
|
||||
local file
|
||||
for file in "${strip_completions[@]}"; do
|
||||
rm "${ED}"/usr/share/bash-completion/completions/${file} ||
|
||||
die "stripping ${file} failed"
|
||||
done
|
||||
|
||||
# remove deprecated completions (moved to other packages)
|
||||
rm "${ED}"/usr/share/bash-completion/completions/_* || die
|
||||
}
|
||||
|
||||
python_check_deps() {
|
||||
python_has_version "dev-python/pexpect[${PYTHON_USEDEP}]" &&
|
||||
python_has_version "dev-python/pytest[${PYTHON_USEDEP}]" &&
|
||||
python_has_version "dev-python/pytest-xdist[${PYTHON_USEDEP}]"
|
||||
}
|
||||
|
||||
pkg_setup() {
|
||||
use test && python-any-r1_pkg_setup
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
if use eselect; then
|
||||
eapply "${WORKDIR}/${BASHCOMP_P}/bash-completion-blacklist-support.patch"
|
||||
fi
|
||||
|
||||
default
|
||||
# Only needed for ${PN}-2.16.0-libsecret-completion.patch
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
src_test() {
|
||||
local EPYTEST_DESELECT=(
|
||||
# redhat-specific, we strip these completions
|
||||
test/t/test_if{down,up}.py
|
||||
# not available for icedtea
|
||||
test/t/test_javaws.py
|
||||
# TODO
|
||||
test/t/test_vi.py::TestVi::test_2
|
||||
test/t/test_xmlwf.py::TestXmlwf::test_2 #bug 886159
|
||||
test/t/test_xrandr.py::TestXrandr::test_output_filter
|
||||
test/t/unit/test_unit_dequote.py
|
||||
test/t/test_sudo.py::TestSudo::test_1 #bug 935400
|
||||
test/t/test_xfreerdp.py::TestXfreerdp::test_6 #bug 935400
|
||||
test/t/unit/test_unit_command_offset.py::TestUnitCommandOffset::test_cmd_quoted #bug 931744
|
||||
test/t/test_make.py::TestMake::test_6 #bug 931744
|
||||
)
|
||||
local EPYTEST_IGNORE=(
|
||||
# stupid test that async tests work
|
||||
test/fixtures/pytest/test_async.py
|
||||
)
|
||||
local EPYTEST_XDIST=1
|
||||
|
||||
# portage's HOME override breaks tests
|
||||
local -x HOME=$(unset HOME; echo ~)
|
||||
addpredict "${HOME}"
|
||||
# used in pytest tests
|
||||
local -x NETWORK=none
|
||||
local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
|
||||
local -x PYTEST_PLUGINS=xdist.plugin
|
||||
emake -C completions check
|
||||
epytest
|
||||
}
|
||||
|
||||
src_install() {
|
||||
# work-around race conditions, bug #526996
|
||||
mkdir -p "${ED}"/usr/share/bash-completion/{completions,helpers} || die
|
||||
|
||||
emake DESTDIR="${D}" profiledir="${EPREFIX}"/etc/bash/bashrc.d install
|
||||
|
||||
strip_completions
|
||||
|
||||
dodoc AUTHORS CHANGELOG.md CONTRIBUTING.md README.md
|
||||
|
||||
# install the python completions for all targets, bug #622892
|
||||
local TARGET
|
||||
for TARGET in "${PYTHON_COMPAT[@]}"; do
|
||||
if [[ ! -e "${ED}"/usr/share/bash-completion/completions/${TARGET/_/.} ]]; then
|
||||
dosym python "${ED}"/usr/share/bash-completion/completions/${TARGET/_/.}
|
||||
fi
|
||||
done
|
||||
|
||||
# install the eselect module
|
||||
if use eselect; then
|
||||
insinto /usr/share/eselect/modules
|
||||
doins "${WORKDIR}/${BASHCOMP_P}/bashcomp.eselect"
|
||||
doman "${WORKDIR}/${BASHCOMP_P}/bashcomp.eselect.5"
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
if has_version 'app-shells/zsh'; then
|
||||
elog
|
||||
elog "If you are interested in using the provided bash completion functions with"
|
||||
elog "zsh, valuable tips on the effective use of bashcompinit are available:"
|
||||
elog " http://www.zsh.org/mla/workers/2003/msg00046.html"
|
||||
elog
|
||||
fi
|
||||
}
|
||||
@ -1,167 +0,0 @@
|
||||
# Copyright 1999-2025 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
BASHCOMP_P=bashcomp-2.0.3
|
||||
PYTHON_COMPAT=( python3_{10..13} )
|
||||
|
||||
inherit python-any-r1
|
||||
|
||||
DESCRIPTION="Programmable Completion for bash"
|
||||
HOMEPAGE="https://github.com/scop/bash-completion"
|
||||
SRC_URI="
|
||||
https://github.com/scop/bash-completion/releases/download/${PV}/${P}.tar.xz
|
||||
eselect? (
|
||||
https://github.com/projg2/bashcomp2/releases/download/v${BASHCOMP_P#*-}/${BASHCOMP_P}.tar.gz
|
||||
)
|
||||
"
|
||||
|
||||
LICENSE="GPL-2+"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~x64-macos"
|
||||
IUSE="+eselect test"
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
# completion collision with net-fs/mc
|
||||
RDEPEND="
|
||||
>=app-shells/bash-4.3_p30-r1:0
|
||||
sys-apps/miscfiles
|
||||
!<app-text/tree-2.1.1-r1
|
||||
!!net-fs/mc
|
||||
"
|
||||
BDEPEND="
|
||||
test? (
|
||||
${RDEPEND}
|
||||
$(python_gen_any_dep '
|
||||
dev-python/pexpect[${PYTHON_USEDEP}]
|
||||
dev-python/pytest[${PYTHON_USEDEP}]
|
||||
dev-python/pytest-xdist[${PYTHON_USEDEP}]
|
||||
')
|
||||
)
|
||||
"
|
||||
PDEPEND="
|
||||
>=app-shells/gentoo-bashcomp-20140911
|
||||
"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-2.14.0-optimize-kernel-modules.patch
|
||||
)
|
||||
|
||||
strip_completions() {
|
||||
# Remove unwanted completions.
|
||||
local strip_completions=(
|
||||
# Slackware package stuff, quite generic names cause collisions
|
||||
# (e.g. with sys-apps/pacman)
|
||||
explodepkg installpkg makepkg pkgtool removepkg upgradepkg
|
||||
|
||||
# Debian/Red Hat network stuff
|
||||
ifdown ifup ifquery ifstatus
|
||||
|
||||
# Installed in app-editors/vim-core
|
||||
xxd
|
||||
|
||||
# Now-dead symlinks to deprecated completions
|
||||
hd ncal
|
||||
|
||||
# For GNU mailman, which isn't packaged. If mailman isn't installed,
|
||||
# it triggers a QA warning.
|
||||
arch
|
||||
)
|
||||
|
||||
local file
|
||||
for file in "${strip_completions[@]}"; do
|
||||
rm "${ED}"/usr/share/bash-completion/completions/${file} ||
|
||||
die "stripping ${file} failed"
|
||||
done
|
||||
|
||||
# remove deprecated completions (moved to other packages)
|
||||
rm "${ED}"/usr/share/bash-completion/completions/_* || die
|
||||
}
|
||||
|
||||
python_check_deps() {
|
||||
python_has_version "dev-python/pexpect[${PYTHON_USEDEP}]" &&
|
||||
python_has_version "dev-python/pytest[${PYTHON_USEDEP}]" &&
|
||||
python_has_version "dev-python/pytest-xdist[${PYTHON_USEDEP}]"
|
||||
}
|
||||
|
||||
pkg_setup() {
|
||||
use test && python-any-r1_pkg_setup
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
if use eselect; then
|
||||
eapply "${WORKDIR}/${BASHCOMP_P}/bash-completion-blacklist-support.patch"
|
||||
fi
|
||||
|
||||
default
|
||||
}
|
||||
|
||||
src_test() {
|
||||
local EPYTEST_DESELECT=(
|
||||
# redhat-specific, we strip these completions
|
||||
test/t/test_if{down,up}.py
|
||||
# not available for icedtea
|
||||
test/t/test_javaws.py
|
||||
# TODO
|
||||
test/t/test_vi.py::TestVi::test_2
|
||||
test/t/test_xmlwf.py::TestXmlwf::test_2 #bug 886159
|
||||
test/t/test_xrandr.py::TestXrandr::test_output_filter
|
||||
test/t/unit/test_unit_dequote.py
|
||||
test/t/test_sudo.py::TestSudo::test_1 #bug 935400
|
||||
test/t/test_xfreerdp.py::TestXfreerdp::test_6 #bug 935400
|
||||
test/t/unit/test_unit_command_offset.py::TestUnitCommandOffset::test_cmd_quoted #bug 931744
|
||||
test/t/test_make.py::TestMake::test_6 #bug 931744
|
||||
)
|
||||
local EPYTEST_IGNORE=(
|
||||
# stupid test that async tests work
|
||||
test/fixtures/pytest/test_async.py
|
||||
)
|
||||
local EPYTEST_XDIST=1
|
||||
|
||||
# portage's HOME override breaks tests
|
||||
local -x HOME=$(unset HOME; echo ~)
|
||||
addpredict "${HOME}"
|
||||
# used in pytest tests
|
||||
local -x NETWORK=none
|
||||
local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
|
||||
local -x PYTEST_PLUGINS=xdist.plugin
|
||||
emake -C completions check
|
||||
epytest
|
||||
}
|
||||
|
||||
src_install() {
|
||||
# work-around race conditions, bug #526996
|
||||
mkdir -p "${ED}"/usr/share/bash-completion/{completions,helpers} || die
|
||||
|
||||
emake DESTDIR="${D}" profiledir="${EPREFIX}"/etc/bash/bashrc.d install
|
||||
|
||||
strip_completions
|
||||
|
||||
dodoc AUTHORS CHANGELOG.md CONTRIBUTING.md README.md
|
||||
|
||||
# install the python completions for all targets, bug #622892
|
||||
local TARGET
|
||||
for TARGET in "${PYTHON_COMPAT[@]}"; do
|
||||
if [[ ! -e "${ED}"/usr/share/bash-completion/completions/${TARGET/_/.} ]]; then
|
||||
dosym python "${ED}"/usr/share/bash-completion/completions/${TARGET/_/.}
|
||||
fi
|
||||
done
|
||||
|
||||
# install the eselect module
|
||||
if use eselect; then
|
||||
insinto /usr/share/eselect/modules
|
||||
doins "${WORKDIR}/${BASHCOMP_P}/bashcomp.eselect"
|
||||
doman "${WORKDIR}/${BASHCOMP_P}/bashcomp.eselect.5"
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
if has_version 'app-shells/zsh'; then
|
||||
elog
|
||||
elog "If you are interested in using the provided bash completion functions with"
|
||||
elog "zsh, valuable tips on the effective use of bashcompinit are available:"
|
||||
elog " http://www.zsh.org/mla/workers/2003/msg00046.html"
|
||||
elog
|
||||
fi
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user