| 3 |
3 |
|
| 4 |
4 |
EAPI=8
|
| 5 |
5 |
|
| 6 |
|
BASHCOMP_P=bashcomp-2.0.3
|
| 7 |
6 |
PYTHON_COMPAT=( python3_{10..13} )
|
| 8 |
7 |
|
| 9 |
|
inherit eapi9-ver python-any-r1
|
|
8 |
inherit autotools eapi9-ver git-r3 python-any-r1
|
| 10 |
9 |
|
| 11 |
10 |
DESCRIPTION="Programmable Completion for bash"
|
| 12 |
11 |
HOMEPAGE="https://github.com/scop/bash-completion"
|
| 13 |
|
SRC_URI="
|
| 14 |
|
https://github.com/scop/bash-completion/releases/download/${PV}/${P}.tar.xz
|
| 15 |
|
eselect? (
|
| 16 |
|
https://github.com/projg2/bashcomp2/releases/download/v${BASHCOMP_P#*-}/${BASHCOMP_P}.tar.gz
|
| 17 |
|
)
|
| 18 |
|
"
|
|
12 |
EGIT_REPO_URI="https://github.com/scop/bash-completion"
|
| 19 |
13 |
|
| 20 |
14 |
LICENSE="GPL-2+"
|
| 21 |
15 |
SLOT="0"
|
| 22 |
|
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos"
|
| 23 |
16 |
IUSE="+eselect test"
|
| 24 |
17 |
RESTRICT="!test? ( test )"
|
| 25 |
18 |
|
| 26 |
|
# completion collision with net-fs/mc
|
| 27 |
19 |
RDEPEND="
|
| 28 |
20 |
>=app-shells/bash-4.3_p30-r1:0
|
| 29 |
21 |
sys-apps/miscfiles
|
| 30 |
22 |
!<app-text/tree-2.1.1-r1
|
| 31 |
|
!!net-fs/mc
|
| 32 |
23 |
"
|
| 33 |
24 |
BDEPEND="
|
| 34 |
25 |
test? (
|
| ... | ... | |
| 64 |
55 |
# Now-dead symlinks to deprecated completions
|
| 65 |
56 |
hd ncal
|
| 66 |
57 |
|
| 67 |
|
# For GNU mailman, which isn't packaged. If mailman isn't installed,
|
| 68 |
|
# it triggers a QA warning.
|
| 69 |
|
arch
|
|
58 |
# Now installed by patchutils
|
|
59 |
interdiff
|
| 70 |
60 |
)
|
| 71 |
61 |
|
| 72 |
|
local file
|
| 73 |
|
for file in "${strip_completions[@]}"; do
|
| 74 |
|
rm "${ED}"/usr/share/bash-completion/completions/${file} ||
|
| 75 |
|
die "stripping ${file} failed"
|
| 76 |
|
done
|
|
62 |
rm -v "${strip_completions[@]/#/${ED}/usr/share/bash-completion/completions/}" || die
|
| 77 |
63 |
|
| 78 |
64 |
# remove deprecated completions (moved to other packages)
|
| 79 |
65 |
rm "${ED}"/usr/share/bash-completion/completions/_* || die
|
| ... | ... | |
| 89 |
75 |
use test && python-any-r1_pkg_setup
|
| 90 |
76 |
}
|
| 91 |
77 |
|
|
78 |
src_unpack() {
|
|
79 |
use eselect && git-r3_fetch https://github.com/projg2/bashcomp2
|
|
80 |
git-r3_fetch
|
|
81 |
|
|
82 |
use eselect && git-r3_checkout https://github.com/projg2/bashcomp2 \
|
|
83 |
"${WORKDIR}"/bashcomp2
|
|
84 |
git-r3_checkout
|
|
85 |
}
|
|
86 |
|
| 92 |
87 |
src_prepare() {
|
| 93 |
88 |
if use eselect; then
|
| 94 |
|
eapply "${WORKDIR}/${BASHCOMP_P}/bash-completion-blacklist-support.patch"
|
|
89 |
# generate and apply patch
|
|
90 |
emake -C "${WORKDIR}"/bashcomp2 bash-completion-blacklist-support.patch
|
|
91 |
eapply "${WORKDIR}"/bashcomp2/bash-completion-blacklist-support.patch
|
| 95 |
92 |
fi
|
| 96 |
93 |
|
| 97 |
94 |
default
|
|
95 |
eautoreconf
|
| 98 |
96 |
}
|
| 99 |
97 |
|
| 100 |
98 |
src_test() {
|
| ... | ... | |
| 107 |
105 |
test/t/test_vi.py::TestVi::test_2
|
| 108 |
106 |
test/t/test_xmlwf.py::TestXmlwf::test_2 #bug 886159
|
| 109 |
107 |
test/t/test_xrandr.py::TestXrandr::test_output_filter
|
| 110 |
|
test/t/unit/test_unit_dequote.py
|
| 111 |
|
test/t/test_sudo.py::TestSudo::test_1 #bug 935400
|
| 112 |
|
test/t/test_xfreerdp.py::TestXfreerdp::test_6 #bug 935400
|
| 113 |
|
test/t/unit/test_unit_command_offset.py::TestUnitCommandOffset::test_cmd_quoted #bug 931744
|
| 114 |
|
test/t/test_make.py::TestMake::test_6 #bug 931744
|
| 115 |
108 |
)
|
| 116 |
109 |
local EPYTEST_IGNORE=(
|
| 117 |
110 |
# stupid test that async tests work
|
| ... | ... | |
| 150 |
143 |
|
| 151 |
144 |
# install the eselect module
|
| 152 |
145 |
if use eselect; then
|
| 153 |
|
insinto /usr/share/eselect/modules
|
| 154 |
|
doins "${WORKDIR}/${BASHCOMP_P}/bashcomp.eselect"
|
| 155 |
|
doman "${WORKDIR}/${BASHCOMP_P}/bashcomp.eselect.5"
|
|
146 |
emake -C "${WORKDIR}"/bashcomp2 DESTDIR="${D}" \
|
|
147 |
PREFIX="${EPREFIX}/usr" install
|
| 156 |
148 |
fi
|
| 157 |
149 |
}
|
| 158 |
150 |
|