1 |
commit: bd78224eb9d3692d97a0fe049c8352f511504fb6 |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat May 25 21:03:25 2019 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat May 25 21:11:32 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bd78224e |
7 |
|
8 |
app-shells/bash-completion: Make eselect support optional |
9 |
|
10 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
11 |
|
12 |
app-shells/bash-completion/bash-completion-9999.ebuild | 18 +++++++++++------- |
13 |
app-shells/bash-completion/metadata.xml | 6 ++++++ |
14 |
2 files changed, 17 insertions(+), 7 deletions(-) |
15 |
|
16 |
diff --git a/app-shells/bash-completion/bash-completion-9999.ebuild b/app-shells/bash-completion/bash-completion-9999.ebuild |
17 |
index 5c0bff2495f..ee27e7fcf8f 100644 |
18 |
--- a/app-shells/bash-completion/bash-completion-9999.ebuild |
19 |
+++ b/app-shells/bash-completion/bash-completion-9999.ebuild |
20 |
@@ -13,7 +13,7 @@ EGIT_REPO_URI="https://github.com/scop/bash-completion" |
21 |
LICENSE="GPL-2+" |
22 |
SLOT="0" |
23 |
KEYWORDS="" |
24 |
-IUSE="test" |
25 |
+IUSE="+eselect test" |
26 |
RESTRICT="!test? ( test )" |
27 |
|
28 |
# completion collision with net-fs/mc |
29 |
@@ -77,19 +77,21 @@ pkg_setup() { |
30 |
} |
31 |
|
32 |
src_unpack() { |
33 |
- git-r3_fetch https://github.com/mgorny/bashcomp2 |
34 |
+ use eselect && git-r3_fetch https://github.com/mgorny/bashcomp2 |
35 |
git-r3_fetch |
36 |
|
37 |
- git-r3_checkout https://github.com/mgorny/bashcomp2 \ |
38 |
+ use eselect && git-r3_checkout https://github.com/mgorny/bashcomp2 \ |
39 |
"${WORKDIR}"/bashcomp2 |
40 |
git-r3_checkout |
41 |
} |
42 |
|
43 |
src_prepare() { |
44 |
eapply_user |
45 |
- # generate and apply patch |
46 |
- emake -C "${WORKDIR}"/bashcomp2 bash-completion-blacklist-support.patch |
47 |
- eapply "${WORKDIR}"/bashcomp2/bash-completion-blacklist-support.patch |
48 |
+ if use eselect; then |
49 |
+ # generate and apply patch |
50 |
+ emake -C "${WORKDIR}"/bashcomp2 bash-completion-blacklist-support.patch |
51 |
+ eapply "${WORKDIR}"/bashcomp2/bash-completion-blacklist-support.patch |
52 |
+ fi |
53 |
|
54 |
eautoreconf |
55 |
} |
56 |
@@ -128,7 +130,9 @@ src_install() { |
57 |
dodoc AUTHORS CHANGES CONTRIBUTING.md README.md |
58 |
|
59 |
# install the eselect module |
60 |
- emake -C "${WORKDIR}"/bashcomp2 DESTDIR="${D}" PREFIX="${EPREFIX}/usr" install |
61 |
+ use eselect && |
62 |
+ emake -C "${WORKDIR}"/bashcomp2 DESTDIR="${D}" \ |
63 |
+ PREFIX="${EPREFIX}/usr" install |
64 |
} |
65 |
|
66 |
pkg_postinst() { |
67 |
|
68 |
diff --git a/app-shells/bash-completion/metadata.xml b/app-shells/bash-completion/metadata.xml |
69 |
index 2bb3ef23624..159d6c88d62 100644 |
70 |
--- a/app-shells/bash-completion/metadata.xml |
71 |
+++ b/app-shells/bash-completion/metadata.xml |
72 |
@@ -9,6 +9,12 @@ |
73 |
<email>shell-tools@g.o</email> |
74 |
<name>Gentoo Shell Tools Project</name> |
75 |
</maintainer> |
76 |
+ <use> |
77 |
+ <flag name='eselect'> |
78 |
+ Support blacklisting of completions via 'eselect bash-completion'. |
79 |
+ This enables custom Gentoo patching of upstream completion loader. |
80 |
+ </flag> |
81 |
+ </use> |
82 |
<longdescription> |
83 |
Since v2.04, bash has allowed you to intelligently program and extend its |
84 |
standard completion behavior to achieve complex command lines with just a |