summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2019-05-25 23:03:25 +0200
committerMichał Górny <mgorny@gentoo.org>2019-05-25 23:11:32 +0200
commitbd78224eb9d3692d97a0fe049c8352f511504fb6 (patch)
tree833807474a70853866e5f742fe38c9e4eaed53fd /app-shells/bash-completion/bash-completion-9999.ebuild
parentdev-vcs/svneverever: 1.3.1 (diff)
downloadgentoo-bd78224eb9d3692d97a0fe049c8352f511504fb6.tar.gz
gentoo-bd78224eb9d3692d97a0fe049c8352f511504fb6.tar.bz2
gentoo-bd78224eb9d3692d97a0fe049c8352f511504fb6.zip
app-shells/bash-completion: Make eselect support optional
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'app-shells/bash-completion/bash-completion-9999.ebuild')
-rw-r--r--app-shells/bash-completion/bash-completion-9999.ebuild18
1 files changed, 11 insertions, 7 deletions
diff --git a/app-shells/bash-completion/bash-completion-9999.ebuild b/app-shells/bash-completion/bash-completion-9999.ebuild
index 5c0bff2495fe..ee27e7fcf8fe 100644
--- a/app-shells/bash-completion/bash-completion-9999.ebuild
+++ b/app-shells/bash-completion/bash-completion-9999.ebuild
@@ -13,7 +13,7 @@ EGIT_REPO_URI="https://github.com/scop/bash-completion"
LICENSE="GPL-2+"
SLOT="0"
KEYWORDS=""
-IUSE="test"
+IUSE="+eselect test"
RESTRICT="!test? ( test )"
# completion collision with net-fs/mc
@@ -77,19 +77,21 @@ pkg_setup() {
}
src_unpack() {
- git-r3_fetch https://github.com/mgorny/bashcomp2
+ use eselect && git-r3_fetch https://github.com/mgorny/bashcomp2
git-r3_fetch
- git-r3_checkout https://github.com/mgorny/bashcomp2 \
+ use eselect && git-r3_checkout https://github.com/mgorny/bashcomp2 \
"${WORKDIR}"/bashcomp2
git-r3_checkout
}
src_prepare() {
eapply_user
- # generate and apply patch
- emake -C "${WORKDIR}"/bashcomp2 bash-completion-blacklist-support.patch
- eapply "${WORKDIR}"/bashcomp2/bash-completion-blacklist-support.patch
+ if use eselect; then
+ # generate and apply patch
+ emake -C "${WORKDIR}"/bashcomp2 bash-completion-blacklist-support.patch
+ eapply "${WORKDIR}"/bashcomp2/bash-completion-blacklist-support.patch
+ fi
eautoreconf
}
@@ -128,7 +130,9 @@ src_install() {
dodoc AUTHORS CHANGES CONTRIBUTING.md README.md
# install the eselect module
- emake -C "${WORKDIR}"/bashcomp2 DESTDIR="${D}" PREFIX="${EPREFIX}/usr" install
+ use eselect &&
+ emake -C "${WORKDIR}"/bashcomp2 DESTDIR="${D}" \
+ PREFIX="${EPREFIX}/usr" install
}
pkg_postinst() {