Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-shells/bash-completion/
Date: Sat, 25 May 2019 21:11:50
Message-Id: 1558818693.b0d590787b5e8e0581e68eb1b8ed50f6b04d7722.mgorny@gentoo
1 commit: b0d590787b5e8e0581e68eb1b8ed50f6b04d7722
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Sat May 25 20:55:07 2019 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Sat May 25 21:11:33 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b0d59078
7
8 app-shells/bash-completion: Bump Gentoo support to 2.0.3
9
10 Bump Gentoo support package to a new version including fix for 'grep'
11 being defined as alias by the user.
12
13 Closes: https://bugs.gentoo.org/686590
14 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
15
16 app-shells/bash-completion/Manifest | 1 +
17 .../bash-completion/bash-completion-2.9-r1.ebuild | 157 +++++++++++++++++++++
18 2 files changed, 158 insertions(+)
19
20 diff --git a/app-shells/bash-completion/Manifest b/app-shells/bash-completion/Manifest
21 index cfe339f613e..8e6ca751c11 100644
22 --- a/app-shells/bash-completion/Manifest
23 +++ b/app-shells/bash-completion/Manifest
24 @@ -2,3 +2,4 @@ DIST bash-completion-2.7.tar.xz 280048 BLAKE2B 88b09f451fd4e14daf8e139951a4b65aa
25 DIST bash-completion-2.8.tar.xz 286128 BLAKE2B a99faeb3c9ee2ea6d1cc9988e61951f4e688ac0b3c6837d1fd43381519fedf5f95167e8dbc166543b0235f3ac61d92af35eb8399efc0cd297a62849071dee5c7 SHA512 d839ef5a98811a2aade7ebdc0bc84c84a41c74db384f89913b06f3c25add1ba22528ac25392b19d27280685d258c74dcdc11247cbaae5b8d82f2c0b546abc268
26 DIST bash-completion-2.9.tar.xz 305788 BLAKE2B c8a05bbb16fb671d73025c2fc579f77569251974a57fa4125a8e0aebcbed4e50fc1a47b9743abab0264599ffdef30b33cb540c6c3ab0d8a3577c6dda95f622b6 SHA512 e864091196d670699bdb2af3fc40464788e79c932fa564afa7ba34a637aa1583db7dbceab0e7ba6718fac99e9fd2dfb03d1ee51d7cf279d925ad63f60401d7d5
27 DIST bashcomp-2.0.2.tar.gz 3625 BLAKE2B ebd835e23634e8a7491467ad66c53941763cea43bad75fe24982d3885be2d2ba132e5273a655fec34705224315d7a3f0248c030fb7685fc613ac4f489cde5bf5 SHA512 46bc1bcc32263135f44be68569459a409250dd2c81c18190735f11e13a26508e9d3cb91d24a8fe7b21bdea678347873b7ac1b67d5e8c78c8444011f85dfdcdce
28 +DIST bashcomp-2.0.3.tar.gz 3539 BLAKE2B 75304d144792cc7f6ad5455a05a65c33c646d6f7384d020a06a1fcf012cd51625a3dd0750ad539253453b1eede196c340286a1e81737f0835b5091609ba01295 SHA512 b2bd185ccbd4456939ccc731cc1983fcec2b9564a9920642a753fadd5d897fdb96b925ac1524657629d621d45b37d99076c8ae72511a827e96ff6c388d720008
29
30 diff --git a/app-shells/bash-completion/bash-completion-2.9-r1.ebuild b/app-shells/bash-completion/bash-completion-2.9-r1.ebuild
31 new file mode 100644
32 index 00000000000..91aa3bb0061
33 --- /dev/null
34 +++ b/app-shells/bash-completion/bash-completion-2.9-r1.ebuild
35 @@ -0,0 +1,157 @@
36 +# Copyright 1999-2019 Gentoo Authors
37 +# Distributed under the terms of the GNU General Public License v2
38 +
39 +EAPI=7
40 +
41 +BASHCOMP_P=bashcomp-2.0.3
42 +PYTHON_COMPAT=( python3_{5,6,7} )
43 +inherit bash-completion-r1 python-any-r1
44 +
45 +DESCRIPTION="Programmable Completion for bash"
46 +HOMEPAGE="https://github.com/scop/bash-completion"
47 +SRC_URI="
48 + https://github.com/scop/bash-completion/releases/download/${PV}/${P}.tar.xz
49 + eselect? ( https://github.com/mgorny/bashcomp2/releases/download/v${BASHCOMP_P#*-}/${BASHCOMP_P}.tar.gz )"
50 +
51 +LICENSE="GPL-2+"
52 +SLOT="0"
53 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris"
54 +IUSE="+eselect test"
55 +RESTRICT="test"
56 +
57 +# completion collision with net-fs/mc
58 +RDEPEND=">=app-shells/bash-4.3_p30-r1:0
59 + sys-apps/miscfiles
60 + !app-eselect/eselect-bashcomp
61 + !!net-fs/mc"
62 +DEPEND="app-arch/xz-utils
63 + test? (
64 + ${RDEPEND}
65 + app-misc/dtach
66 + dev-util/dejagnu
67 + dev-tcltk/tcllib
68 + $(python_gen_any_dep '
69 + dev-python/pexpect[${PYTHON_USEDEP}]
70 + dev-python/pytest[${PYTHON_USEDEP}]
71 + ')
72 + )"
73 +PDEPEND=">=app-shells/gentoo-bashcomp-20140911"
74 +
75 +strip_completions() {
76 + # Remove unwanted completions.
77 + local strip_completions=(
78 + # Slackware package stuff, quite generic names cause collisions
79 + # (e.g. with sys-apps/pacman)
80 + explodepkg installpkg makepkg pkgtool removepkg upgradepkg
81 +
82 + # Debian/Red Hat network stuff
83 + ifdown ifup ifquery ifstatus
84 +
85 + # Installed in app-editors/vim-core
86 + xxd
87 +
88 + # Now-dead symlinks to deprecated completions
89 + hd ncal
90 + )
91 + if [[ ${ARCH} != *-fbsd && ${ARCH} != *-freebsd ]]; then
92 + strip_completions+=(
93 + freebsd-update kldload kldunload portinstall portsnap
94 + pkg_deinstall pkg_delete pkg_info
95 + )
96 + fi
97 +
98 + local file
99 + for file in "${strip_completions[@]}"; do
100 + rm "${ED}"/usr/share/bash-completion/completions/${file} ||
101 + die "stripping ${file} failed"
102 + done
103 +
104 + # remove deprecated completions (moved to other packages)
105 + rm "${ED}"/usr/share/bash-completion/completions/_* || die
106 +}
107 +
108 +pkg_setup() {
109 + use test && python-any-r1_pkg_setup
110 +}
111 +
112 +python_check_deps() {
113 + has_version "dev-python/pexpect[${PYTHON_USEDEP}]" &&
114 + has_version "dev-python/pytest[${PYTHON_USEDEP}]"
115 +}
116 +
117 +src_prepare() {
118 + use eselect &&
119 + eapply "${WORKDIR}/${BASHCOMP_P}/bash-completion-blacklist-support.patch"
120 + # Bug 543100, update bug 601194
121 + eapply "${FILESDIR}/${PN}-2.1-escape-characters-r1.patch"
122 + eapply_user
123 +}
124 +
125 +src_test() {
126 + # Tests need an interactive shell, #477066
127 + # idea stolen from:
128 + # http://pkgs.fedoraproject.org/cgit/rpms/bash-completion.git/tree/bash-completion.spec
129 +
130 + # real-time output of the log ;-)
131 + touch "${T}/dtach-test.log" || die
132 + tail -f "${T}/dtach-test.log" &
133 + local tail_pid=${!}
134 +
135 + # override the default expect timeout and buffer size to avoid tests
136 + # failing randomly due to cold cache, busy system or just more output
137 + # than upstream anticipated (they run tests on pristine docker
138 + # installs of binary distros)
139 + nonfatal dtach -N "${T}/dtach.sock" \
140 + bash -c 'emake check RUNTESTFLAGS="OPT_TIMEOUT=300 OPT_BUFFER_SIZE=1000000" PYTESTFLAGS="-vv" \
141 + &> "${T}"/dtach-test.log; echo ${?} > "${T}"/dtach-test.out'
142 +
143 + kill "${tail_pid}"
144 + [[ -f ${T}/dtach-test.out ]] || die "Unable to run tests"
145 + [[ $(<"${T}"/dtach-test.out) == 0 ]] || die "Tests failed"
146 +}
147 +
148 +src_install() {
149 + # work-around race conditions, bug #526996
150 + mkdir -p "${ED}"/usr/share/bash-completion/{completions,helpers} || die
151 +
152 + emake DESTDIR="${D}" profiledir="${EPREFIX}"/etc/bash/bashrc.d install
153 +
154 + strip_completions
155 + # fix missing aliases
156 + bashcomp_alias tar bsdtar gtar star
157 +
158 + dodoc AUTHORS CHANGES CONTRIBUTING.md README.md
159 +
160 + # install the eselect module
161 + if use eselect; then
162 + insinto /usr/share/eselect/modules
163 + doins "${WORKDIR}/${BASHCOMP_P}/bashcomp.eselect"
164 + doman "${WORKDIR}/${BASHCOMP_P}/bashcomp.eselect.5"
165 + fi
166 +}
167 +
168 +pkg_postinst() {
169 + local v
170 + for v in ${REPLACING_VERSIONS}; do
171 + if ver_test "${v}" -lt 2.1-r90; then
172 + ewarn "For bash-completion autoloader to work, all completions need to"
173 + ewarn "be installed in /usr/share/bash-completion/completions. You may"
174 + ewarn "need to rebuild packages that installed completions in the old"
175 + ewarn "location. You can do this using:"
176 + ewarn
177 + ewarn "$ find ${EPREFIX}/usr/share/bash-completion -maxdepth 1 -type f '!' -name 'bash_completion' -exec emerge -1v {} +"
178 + ewarn
179 + ewarn "After the rebuild, you should remove the old setup symlinks:"
180 + ewarn
181 + ewarn "$ find ${EPREFIX}/etc/bash_completion.d -type l -delete"
182 + fi
183 + done
184 +
185 + if has_version 'app-shells/zsh'; then
186 + elog
187 + elog "If you are interested in using the provided bash completion functions with"
188 + elog "zsh, valuable tips on the effective use of bashcompinit are available:"
189 + elog " http://www.zsh.org/mla/workers/2003/msg00046.html"
190 + elog
191 + fi
192 +}