1 |
commit: 3ab41e097caa4a39f508aee73da35d51bb9d69c4 |
2 |
Author: Patrice Clement <monsieurp <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Apr 8 21:56:11 2017 +0000 |
4 |
Commit: Patrice Clement <monsieurp <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Apr 8 21:56:11 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3ab41e09 |
7 |
|
8 |
app-misc/todo: add patch to fix bash completion. |
9 |
|
10 |
Courtesy of Ferenc Erki <erkiferenc <AT> gmail.com>. |
11 |
|
12 |
Gentoo-Bug: https://bugs.gentoo.org/614400 |
13 |
|
14 |
Package-Manager: Portage-2.3.3, Repoman-2.3.1 |
15 |
|
16 |
.../todo/files/todo-2.10-fix-bash-completion.patch | 12 ++++++++ |
17 |
app-misc/todo/todo-2.10-r1.ebuild | 35 ++++++++++++++++++++++ |
18 |
2 files changed, 47 insertions(+) |
19 |
|
20 |
diff --git a/app-misc/todo/files/todo-2.10-fix-bash-completion.patch b/app-misc/todo/files/todo-2.10-fix-bash-completion.patch |
21 |
new file mode 100644 |
22 |
index 00000000000..7e6de2f1056 |
23 |
--- /dev/null |
24 |
+++ b/app-misc/todo/files/todo-2.10-fix-bash-completion.patch |
25 |
@@ -0,0 +1,12 @@ |
26 |
+--- ./todo_completion 2017-04-08 15:18:23.102736966 +0200 |
27 |
++++ ./todo_completion 2017-04-08 15:18:56.839725605 +0200 |
28 |
+@@ -85,6 +85,9 @@ |
29 |
+ } |
30 |
+ complete -F _todo todo.sh |
31 |
+ |
32 |
++# Gentoo bug 614400 |
33 |
++complete -F _todo todotxt |
34 |
++ |
35 |
+ # If you define an alias (e.g. "t") to todo.sh, you need to explicitly enable |
36 |
+ # completion for it, too: |
37 |
+ #complete -F _todo t |
38 |
|
39 |
diff --git a/app-misc/todo/todo-2.10-r1.ebuild b/app-misc/todo/todo-2.10-r1.ebuild |
40 |
new file mode 100644 |
41 |
index 00000000000..5fa2cd242a9 |
42 |
--- /dev/null |
43 |
+++ b/app-misc/todo/todo-2.10-r1.ebuild |
44 |
@@ -0,0 +1,35 @@ |
45 |
+# Copyright 1999-2017 Gentoo Foundation |
46 |
+# Distributed under the terms of the GNU General Public License v2 |
47 |
+ |
48 |
+EAPI=6 |
49 |
+ |
50 |
+inherit bash-completion-r1 |
51 |
+ |
52 |
+DESCRIPTION="A CLI-based TODO list manager" |
53 |
+HOMEPAGE="http://todotxt.com/" |
54 |
+SRC_URI="https://github.com/ginatrapani/${PN}.txt-cli/archive/v${PV}.tar.gz -> ${P}.tar.gz" |
55 |
+ |
56 |
+LICENSE="GPL-3" |
57 |
+SLOT="0" |
58 |
+KEYWORDS="~amd64 ~x86" |
59 |
+IUSE="test" |
60 |
+ |
61 |
+RDEPEND="app-shells/bash" |
62 |
+ |
63 |
+PATCHES=( "${FILESDIR}/${P}-fix-bash-completion.patch" ) |
64 |
+ |
65 |
+S="${WORKDIR}/${PN}.txt-cli-${PV}" |
66 |
+ |
67 |
+DOCS=( README.textile CONTRIBUTING.md LICENSE todo.cfg ) |
68 |
+ |
69 |
+src_test() { |
70 |
+ make test || die "tests failed" |
71 |
+} |
72 |
+ |
73 |
+src_install() { |
74 |
+ dobin "${PN}.sh" |
75 |
+ dosym "/usr/bin/${PN}.sh" "/usr/bin/${PN}txt" |
76 |
+ newbashcomp "${PN}_completion" "${PN}.sh" |
77 |
+ bashcomp_alias "${PN}.sh" "${PN}txt" |
78 |
+ einstalldocs |
79 |
+} |