summaryrefslogtreecommitdiff
blob: 2bf6a2b7e776c17a6ec2a921b0fdf9b98d76444c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-shells/bash-completion/bash-completion-2.1-r1.ebuild,v 1.1 2013/07/16 00:13:33 ssuominen Exp $

EAPI=5

DESCRIPTION="Programmable Completion for bash"
HOMEPAGE="http://bash-completion.alioth.debian.org/"
SRC_URI="http://bash-completion.alioth.debian.org/files/${P}.tar.bz2"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x86-interix ~amd64-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris"
IUSE=""

RDEPEND="|| ( >=app-shells/bash-4.1 app-shells/zsh )
	sys-apps/miscfiles
	!<app-shells/gentoo-bashcomp-20130101" #472938#c1

src_install() {
	default

	# use the copies from >=sys-apps/util-linux-2.23 wrt #468544 -> hd and ncal
	# becomes dead symlinks as a result
	local file
	for file in cal dmesg eject hd hexdump hwclock ionice look ncal renice rtcwake; do
		rm -f "${ED}"/usr/share/bash-completion/completions/${file}
	done

	# use the copy from app-editors/vim-core:
	rm -f "${ED}"/usr/share/bash-completion/completions/xxd

	# use the copy from net-misc/networkmanager:
	rm -f "${ED}"/usr/share/bash-completion/completions/nmcli

	dodoc AUTHORS CHANGES README
}

pkg_postinst() {
	if has_version 'app-shells/zsh'; then
		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
}