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