Lines 3-9
Link Here
|
3 |
# $Header: /var/cvsroot/gentoo-x86/app-shells/bash-completion/bash-completion-2.1.ebuild,v 1.2 2013/06/04 01:54:26 jer Exp $ |
3 |
# $Header: /var/cvsroot/gentoo-x86/app-shells/bash-completion/bash-completion-2.1.ebuild,v 1.2 2013/06/04 01:54:26 jer Exp $ |
4 |
|
4 |
|
5 |
EAPI=5 |
5 |
EAPI=5 |
6 |
inherit prefix |
|
|
7 |
|
6 |
|
8 |
DESCRIPTION="Programmable Completion for bash" |
7 |
DESCRIPTION="Programmable Completion for bash" |
9 |
HOMEPAGE="http://bash-completion.alioth.debian.org/" |
8 |
HOMEPAGE="http://bash-completion.alioth.debian.org/" |
Lines 14-94
Link Here
|
14 |
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" |
13 |
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" |
15 |
IUSE="" |
14 |
IUSE="" |
16 |
|
15 |
|
17 |
RDEPEND="app-admin/eselect |
16 |
RDEPEND="|| ( >=app-shells/bash-3.2 app-shells/zsh ) |
18 |
|| ( >=app-shells/bash-3.2 app-shells/zsh ) |
17 |
sys-apps/miscfiles |
19 |
sys-apps/miscfiles" |
18 |
!app-shells/gentoo-bashcomp" #472938#c1 |
20 |
PDEPEND="app-shells/gentoo-bashcomp" |
|
|
21 |
|
22 |
src_prepare() { |
23 |
cp "${FILESDIR}"/bash-completion.sh-gentoo-1.2 "${T}"/bash-completion.sh || die |
24 |
eprefixify "${T}"/bash-completion.sh |
25 |
|
19 |
|
26 |
find completions -name 'Makefile*' -exec rm -f {} + |
20 |
src_install() { |
|
|
21 |
default |
27 |
|
22 |
|
28 |
# Part of >=sys-apps/util-linux-2.23 wrt #468544 |
23 |
# use the copies from >=sys-apps/util-linux-2.23 wrt #468544 -> hd and ncal |
|
|
24 |
# becomes dead symlinks as a result |
29 |
local file |
25 |
local file |
30 |
for file in cal dmesg eject hexdump hwclock ionice look renice rtcwake; do |
26 |
for file in cal dmesg eject hd hexdump hwclock ionice look ncal renice rtcwake xxd; do |
31 |
rm -f completions/${file} |
27 |
rm -f "${ED}"/usr/share/bash-completion/completions/${file} |
32 |
done |
28 |
done |
33 |
|
29 |
|
34 |
# app-editors/vim-core: |
30 |
# use the copy from app-editors/vim-core: |
35 |
rm -f completions/xxd |
31 |
rm -f "${ED}"/usr/share/bash-completion/completions/xxd |
36 |
} |
|
|
37 |
|
38 |
src_configure() { :; } # no-op |
39 |
src_compile() { :; } # no-op |
40 |
|
41 |
src_install() { |
42 |
# Gentoo specific bash-completion.sh file. |
43 |
insinto /etc/profile.d |
44 |
doins "${T}"/bash-completion.sh |
45 |
|
46 |
# All files from contrib/ in source package get installed |
47 |
insinto /usr/share/bash-completion |
48 |
doins -r "${S}"/completions/* |
49 |
|
50 |
awk -v D="$ED" ' |
51 |
BEGIN { out=".pre" } |
52 |
/^# A lot of the following one-liners/ { out="base" } |
53 |
/^# start of section containing completion functions called by other functions/ { out=".pre" } |
54 |
/^# start of section containing completion functions for external programs/ { out="base" } |
55 |
/^# source completion directory/ { out="" } |
56 |
/^unset -f have/ { out=".post" } |
57 |
out != "" { print > D"/usr/share/bash-completion/"out }' \ |
58 |
bash_completion || die "failed to split bash_completion" |
59 |
|
32 |
|
60 |
dodoc AUTHORS CHANGES README |
33 |
dodoc AUTHORS CHANGES README |
61 |
|
|
|
62 |
# This is backported from upstream 2.0 release. You can stop installing |
63 |
# this file after 2.0 is in Portage and use the one from the tarball |
64 |
# instead. |
65 |
# Installed to datadir instead of libdir because bash-completion(s) |
66 |
# are not ELF files. |
67 |
insinto /usr/share/pkgconfig |
68 |
doins "${FILESDIR}"/bash-completion.pc |
69 |
} |
34 |
} |
70 |
|
35 |
|
71 |
pkg_postinst() { |
36 |
pkg_postinst() { |
72 |
if ! has_version "${CATEGORY}/${PN}"; then |
37 |
if has_version 'app-shells/zsh'; then |
73 |
elog "Any user can enable the module completions without editing their" |
|
|
74 |
elog ".bashrc by running:" |
75 |
elog |
76 |
elog " eselect bashcomp enable <module>" |
77 |
elog |
78 |
elog "The system administrator can also be enable this globally with" |
79 |
elog |
80 |
elog " eselect bashcomp enable --global <module>" |
81 |
elog |
82 |
elog "Make sure you at least enable the base module! Additional completion" |
83 |
elog "modules can be found by running" |
84 |
elog |
85 |
elog " eselect bashcomp list" |
86 |
elog |
87 |
elog "If you use non-login shells you still need to source" |
88 |
elog "/etc/profile.d/bash-completion.sh in your ~/.bashrc." |
89 |
fi |
90 |
|
91 |
if has_version 'app-shells/zsh' ; then |
92 |
elog "If you are interested in using the provided bash completion functions with" |
38 |
elog "If you are interested in using the provided bash completion functions with" |
93 |
elog "zsh, valuable tips on the effective use of bashcompinit are available:" |
39 |
elog "zsh, valuable tips on the effective use of bashcompinit are available:" |
94 |
elog " http://www.zsh.org/mla/workers/2003/msg00046.html" |
40 |
elog " http://www.zsh.org/mla/workers/2003/msg00046.html" |