3 |
3 |
|
4 |
4 |
EAPI=8
|
5 |
5 |
|
6 |
|
BASHCOMP_P=bashcomp-2.0.3
|
7 |
6 |
PYTHON_COMPAT=( python3_{9..11} )
|
8 |
7 |
|
9 |
|
inherit python-any-r1
|
|
8 |
inherit autotools 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 ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos"
|
|
16 |
KEYWORDS=""
|
23 |
17 |
IUSE="+eselect test"
|
24 |
18 |
RESTRICT="!test? ( test )"
|
25 |
19 |
|
... | ... | |
82 |
76 |
use test && python-any-r1_pkg_setup
|
83 |
77 |
}
|
84 |
78 |
|
|
79 |
src_unpack() {
|
|
80 |
use eselect && git-r3_fetch https://github.com/projg2/bashcomp2
|
|
81 |
git-r3_fetch
|
|
82 |
|
|
83 |
use eselect && git-r3_checkout https://github.com/projg2/bashcomp2 \
|
|
84 |
"${WORKDIR}"/bashcomp2
|
|
85 |
git-r3_checkout
|
|
86 |
}
|
|
87 |
|
85 |
88 |
src_prepare() {
|
86 |
89 |
if use eselect; then
|
87 |
|
eapply "${WORKDIR}/${BASHCOMP_P}/bash-completion-blacklist-support.patch"
|
|
90 |
# generate and apply patch
|
|
91 |
emake -C "${WORKDIR}"/bashcomp2 bash-completion-blacklist-support.patch
|
|
92 |
eapply "${WORKDIR}"/bashcomp2/bash-completion-blacklist-support.patch
|
88 |
93 |
fi
|
89 |
94 |
|
90 |
95 |
eapply_user
|
|
96 |
eautoreconf
|
91 |
97 |
}
|
92 |
98 |
|
93 |
99 |
src_test() {
|
... | ... | |
96 |
102 |
test/t/test_if{down,up}.py
|
97 |
103 |
# not available for icedtea
|
98 |
104 |
test/t/test_javaws.py
|
99 |
|
# TODO
|
100 |
|
test/t/test_xmlwf.py::TestXmlwf::test_2
|
101 |
105 |
)
|
102 |
106 |
|
103 |
107 |
# portage's HOME override breaks tests
|
... | ... | |
122 |
126 |
|
123 |
127 |
# install the eselect module
|
124 |
128 |
if use eselect; then
|
125 |
|
insinto /usr/share/eselect/modules
|
126 |
|
doins "${WORKDIR}/${BASHCOMP_P}/bashcomp.eselect"
|
127 |
|
doman "${WORKDIR}/${BASHCOMP_P}/bashcomp.eselect.5"
|
|
129 |
emake -C "${WORKDIR}"/bashcomp2 DESTDIR="${D}" \
|
|
130 |
PREFIX="${EPREFIX}/usr" install
|
128 |
131 |
fi
|
129 |
132 |
}
|
130 |
133 |
|