Gentoo Archives: gentoo-commits

From: "Jeremy Olexa (darkside)" <darkside@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in app-shells/bash-completion: ChangeLog bash-completion-20081218-r1.ebuild bash-completion-20081218.ebuild
Date: Fri, 20 Feb 2009 05:32:43
Message-Id: E1LaNzI-0000Hg-Gn@stork.gentoo.org
1 darkside 09/02/20 05:31:48
2
3 Modified: ChangeLog
4 Added: bash-completion-20081218-r1.ebuild
5 Removed: bash-completion-20081218.ebuild
6 Log:
7 Fix bug in bash completion for lzma man pages. Fix by Jan Hruban in bug 254814. Convert to EAPI-2, add die() messages as needed
8 (Portage version: 2.2_rc23/cvs/Linux x86_64)
9
10 Revision Changes Path
11 1.151 app-shells/bash-completion/ChangeLog
12
13 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-shells/bash-completion/ChangeLog?rev=1.151&view=markup
14 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-shells/bash-completion/ChangeLog?rev=1.151&content-type=text/plain
15 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-shells/bash-completion/ChangeLog?r1=1.150&r2=1.151
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/app-shells/bash-completion/ChangeLog,v
20 retrieving revision 1.150
21 retrieving revision 1.151
22 diff -u -r1.150 -r1.151
23 --- ChangeLog 11 Feb 2009 19:07:44 -0000 1.150
24 +++ ChangeLog 20 Feb 2009 05:31:48 -0000 1.151
25 @@ -1,6 +1,13 @@
26 # ChangeLog for app-shells/bash-completion
27 # Copyright 2002-2009 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/app-shells/bash-completion/ChangeLog,v 1.150 2009/02/11 19:07:44 darkside Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/app-shells/bash-completion/ChangeLog,v 1.151 2009/02/20 05:31:48 darkside Exp $
30 +
31 +*bash-completion-20081218-r1 (20 Feb 2009)
32 +
33 + 20 Feb 2009; Jeremy Olexa <darkside@g.o>
34 + -bash-completion-20081218.ebuild, +bash-completion-20081218-r1.ebuild:
35 + Fix bug in bash completion for lzma man pages. Fix by Jan Hruban in bug
36 + 254814. Convert to EAPI-2, add die() messages as needed
37
38 11 Feb 2009; Jeremy Olexa <darkside@g.o> metadata.xml:
39 add myself to metadata
40
41
42
43 1.1 app-shells/bash-completion/bash-completion-20081218-r1.ebuild
44
45 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-shells/bash-completion/bash-completion-20081218-r1.ebuild?rev=1.1&view=markup
46 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-shells/bash-completion/bash-completion-20081218-r1.ebuild?rev=1.1&content-type=text/plain
47
48 Index: bash-completion-20081218-r1.ebuild
49 ===================================================================
50 # Copyright 1999-2009 Gentoo Foundation
51 # Distributed under the terms of the GNU General Public License v2
52 # $Header: /var/cvsroot/gentoo-x86/app-shells/bash-completion/bash-completion-20081218-r1.ebuild,v 1.1 2009/02/20 05:31:48 darkside Exp $
53
54 EAPI="2"
55
56 DESCRIPTION="Programmable Completion for bash"
57 HOMEPAGE="http://bash-completion.alioth.debian.org/"
58 #SRC_URI="mirror://debian/pool/main/b/${PN}/${PN}_${PV}.tar.gz"
59 SRC_URI="mirror://gentoo/${PN}_${PV}.tar.gz"
60
61 LICENSE="GPL-2"
62 SLOT="0"
63 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86"
64 IUSE=""
65
66 DEPEND=""
67 RDEPEND="app-admin/eselect
68 || (
69 >=app-shells/bash-2.05a
70 app-shells/zsh
71 )"
72 PDEPEND="app-shells/gentoo-bashcomp"
73
74 S=${WORKDIR}/${PN}
75
76 src_prepare() {
77 # bug #111681
78 sed -i -e "/^complete.* xine /d" \
79 -e '0,/gz|bz2/s//gz|bz2|lzma/' bash_completion || die "sed failed"
80 }
81
82 src_install() {
83 # split /etc/bash_completion into three parts:
84 # 1. /usr/share/bash-completion/.pre -- hidden from eselect
85 # 2. /usr/share/bash-completion/base -- eselectable
86 # 3. /usr/share/bash-completion/.post -- hidden from eselect
87 dodir /usr/share/bash-completion || die "dodir failed"
88 awk -v D="$D" '
89 BEGIN { out=".pre" }
90 /^# A lot of the following one-liners/ { out="base" }
91 /^# source completion directory/ { out="" }
92 /^unset -f have/ { out=".post" }
93 out != "" { print > D"/usr/share/bash-completion/"out }' \
94 bash_completion || die "failed to split bash_completion"
95
96 exeinto /etc/profile.d
97 doexe "${FILESDIR}"/bash-completion.sh \
98 || die "failed to install profile.d"
99
100 insinto /usr/share/bash-completion
101 doins contrib/* || die "failed to install contrib completions"
102
103 dodoc debian/changelog README TODO
104 }
105
106 pkg_preinst() {
107 # This file is now being installed as bash-completion.sh, so rename it
108 # first. That allows CONFIG_PROTECT to kick in properly
109 if [[ -f ${ROOT}/etc/profile.d/bash-completion && \
110 ! -f ${ROOT}/etc/profile.d/bash-completion.sh ]]
111 then
112 mv "${ROOT}"/etc/profile.d/bash-completion{,.sh}
113 fi
114 }
115
116 pkg_postinst() {
117 elog
118 elog "Versions of bash-completion prior to 20060301-r1 required each user to"
119 elog "explicitly source /etc/profile.d/bash-completion in ~/.bashrc. This"
120 elog "was inconsistent with the completion modules which are"
121 elog "enabled with eselect bashcomp. Now any user can enable the base"
122 elog "completions without editing their .bashrc by running"
123 elog
124 elog " eselect bashcomp enable base"
125 elog
126 elog "The system administrator can also be enable this globally with"
127 elog
128 elog " eselect bashcomp enable --global base"
129 elog
130 elog "Additional completion functions can also be enabled or"
131 elog "disabled using eselect's bashcomp module."
132 elog
133 elog "If you use non-login shells you still need to source"
134 elog "/etc/profile.d/bash-completion.sh in your ~/.bashrc."
135 elog "Note this is bash-completion.sh, not bash-completion. Lots of people"
136 elog "overlook this"
137 elog
138
139 if has_version 'app-shells/zsh' ; then
140 elog "If you are interested in using the provided bash completion functions with"
141 elog "zsh, valuable tips on the effective use of bashcompinit are available:"
142 elog " http://www.zsh.org/mla/workers/2003/msg00046.html"
143 #elog " http://zshwiki.org/ZshSwitchingTo" (doesn't exist)
144 elog
145 fi
146 }