public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: app-misc/todo/, app-misc/todo/files/
@ 2017-04-08 21:57 Patrice Clement
  0 siblings, 0 replies; 2+ messages in thread
From: Patrice Clement @ 2017-04-08 21:57 UTC (permalink / raw
  To: gentoo-commits

commit:     3ab41e097caa4a39f508aee73da35d51bb9d69c4
Author:     Patrice Clement <monsieurp <AT> gentoo <DOT> org>
AuthorDate: Sat Apr  8 21:56:11 2017 +0000
Commit:     Patrice Clement <monsieurp <AT> gentoo <DOT> org>
CommitDate: Sat Apr  8 21:56:11 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3ab41e09

app-misc/todo: add patch to fix bash completion.

Courtesy of Ferenc Erki <erkiferenc <AT> gmail.com>.

Gentoo-Bug: https://bugs.gentoo.org/614400

Package-Manager: Portage-2.3.3, Repoman-2.3.1

 .../todo/files/todo-2.10-fix-bash-completion.patch | 12 ++++++++
 app-misc/todo/todo-2.10-r1.ebuild                  | 35 ++++++++++++++++++++++
 2 files changed, 47 insertions(+)

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
new file mode 100644
index 00000000000..7e6de2f1056
--- /dev/null
+++ b/app-misc/todo/files/todo-2.10-fix-bash-completion.patch
@@ -0,0 +1,12 @@
+--- ./todo_completion	2017-04-08 15:18:23.102736966 +0200
++++ ./todo_completion	2017-04-08 15:18:56.839725605 +0200
+@@ -85,6 +85,9 @@
+ }
+ complete -F _todo todo.sh
+ 
++# Gentoo bug 614400
++complete -F _todo todotxt
++
+ # If you define an alias (e.g. "t") to todo.sh, you need to explicitly enable
+ # completion for it, too:
+ #complete -F _todo t

diff --git a/app-misc/todo/todo-2.10-r1.ebuild b/app-misc/todo/todo-2.10-r1.ebuild
new file mode 100644
index 00000000000..5fa2cd242a9
--- /dev/null
+++ b/app-misc/todo/todo-2.10-r1.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit bash-completion-r1
+
+DESCRIPTION="A CLI-based TODO list manager"
+HOMEPAGE="http://todotxt.com/"
+SRC_URI="https://github.com/ginatrapani/${PN}.txt-cli/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="test"
+
+RDEPEND="app-shells/bash"
+
+PATCHES=( "${FILESDIR}/${P}-fix-bash-completion.patch" )
+
+S="${WORKDIR}/${PN}.txt-cli-${PV}"
+
+DOCS=( README.textile CONTRIBUTING.md LICENSE todo.cfg )
+
+src_test() {
+	make test || die "tests failed"
+}
+
+src_install() {
+	dobin "${PN}.sh"
+	dosym "/usr/bin/${PN}.sh" "/usr/bin/${PN}txt"
+	newbashcomp "${PN}_completion" "${PN}.sh"
+	bashcomp_alias "${PN}.sh" "${PN}txt"
+	einstalldocs
+}


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-misc/todo/, app-misc/todo/files/
@ 2020-03-09 20:45 Patrice Clement
  0 siblings, 0 replies; 2+ messages in thread
From: Patrice Clement @ 2020-03-09 20:45 UTC (permalink / raw
  To: gentoo-commits

commit:     3a09ce336f19caeca26a32ea10913766687f454a
Author:     Ferenc Erki <erkiferenc <AT> gmail <DOT> com>
AuthorDate: Sun Jan 12 19:46:33 2020 +0000
Commit:     Patrice Clement <monsieurp <AT> gentoo <DOT> org>
CommitDate: Mon Mar  9 20:45:10 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3a09ce33

app-misc/todo: bump version to 2.11.0

Closes: https://bugs.gentoo.org/705306
Package-Manager: Portage-2.3.84, Repoman-2.3.20
Signed-off-by: Ferenc Erki <erkiferenc <AT> gmail.com>
Signed-off-by: Patrice Clement <monsieurp <AT> gentoo.org>

 app-misc/todo/Manifest                             |  1 +
 .../files/todo-2.11.0-fix-bash-completion.patch    | 15 +++++
 app-misc/todo/todo-2.11.0.ebuild                   | 68 ++++++++++++++++++++++
 3 files changed, 84 insertions(+)

diff --git a/app-misc/todo/Manifest b/app-misc/todo/Manifest
index 620b2cb65da..4be1e46c267 100644
--- a/app-misc/todo/Manifest
+++ b/app-misc/todo/Manifest
@@ -1 +1,2 @@
 DIST todo-2.10.tar.gz 56509 BLAKE2B ec89d12506b5025bab8d05bab1122d48ef2e9edb811c4091c1ff96b4b18c2ced54026d3d908a565278804c15c6fbde8aef3ae5a0cb23d4b12bb36133fce5bb2c SHA512 b14d9d13948836d971f72b941770e8e2c59d171d35f074205900619c5c3efd7ca0a482887046c1865890afb6595fe27c69677c54ea5824163d291e16fa5329d3
+DIST todo-2.11.0.tar.gz 712455 BLAKE2B f9d0fa53712a49c2f6ee94c02a62c16b8184734f7bb0c9354db9d640e2f619c75e3b3468065cb51204c7872f1f155bda51b9e3387f62f0f478f80f6a99f199b4 SHA512 5500ed1aa10eceaaa3e5116605eed4f4228337fdc0f2ceaa5b889753a60576918c0953adbfbf80c40008d6dfdf854e8a538103bfed4d1015aa1c5a9876c2e47c

diff --git a/app-misc/todo/files/todo-2.11.0-fix-bash-completion.patch b/app-misc/todo/files/todo-2.11.0-fix-bash-completion.patch
new file mode 100644
index 00000000000..254c454ab8a
--- /dev/null
+++ b/app-misc/todo/files/todo-2.11.0-fix-bash-completion.patch
@@ -0,0 +1,15 @@
+diff --git a/todo_completion b/todo_completion
+index 644be6e..964383e 100755
+--- a/todo_completion
++++ b/todo_completion
+@@ -85,6 +85,10 @@ _todo()
+ }
+ complete -F _todo todo.sh
+ 
++# Gentoo bug 614400
++complete -F _todo todocli
++complete -F _todo todotxt
++
+ # If you define an alias (e.g. "t") to todo.sh, you need to explicitly enable
+ # completion for it, too:
+ #complete -F _todo t

diff --git a/app-misc/todo/todo-2.11.0.ebuild b/app-misc/todo/todo-2.11.0.ebuild
new file mode 100644
index 00000000000..4db4b749f06
--- /dev/null
+++ b/app-misc/todo/todo-2.11.0.ebuild
@@ -0,0 +1,68 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit bash-completion-r1
+
+DESCRIPTION="A CLI-based TODO list manager"
+HOMEPAGE="http://todotxt.org"
+SRC_URI="https://github.com/todotxt/${PN}.txt-cli/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="app-shells/bash"
+
+PATCHES=( "${FILESDIR}/${P}-fix-bash-completion.patch" )
+
+DOCS=( README.md CONTRIBUTING.md LICENSE todo.cfg )
+
+S="${WORKDIR}/${PN}.txt-cli-${PV}"
+
+src_prepare() {
+	default
+
+	# fix version string
+	sed -i -e "s/@DEV_VERSION@/${PV}/" todo.sh || die
+
+	# TODO_DIR variable is bogus
+	sed -i -e '/export TODO_DIR/d' todo.cfg || die
+	sed -i -e '4i export TODO_DIR="$HOME/.todo"' todo.cfg || die
+}
+
+src_test() {
+	make test || die "tests failed"
+}
+
+src_install() {
+	dobin "${PN}.sh"
+	dosym "${PN}.sh" "/usr/bin/${PN}cli"
+	dosym "${PN}.sh" "/usr/bin/${PN}txt"
+	newbashcomp "${PN}_completion" "${PN}.sh"
+	bashcomp_alias "${PN}.sh" "${PN}cli" "${PN}txt"
+	einstalldocs
+}
+
+pkg_postinst() {
+	einfo
+	einfo 'Before starting todo, make sure to create'
+	einfo 'a .todo directory in your home directory:'
+	einfo '  $ mkdir -p $HOME/.todo'
+	einfo
+	einfo 'and make sure to copy the default todo'
+	einfo 'configuration file in the same location:'
+	einfo "  $ bzcat /usr/share/doc/${PF}/todo.cfg.bz2 > \$HOME/.todo/config"
+	einfo
+	einfo 'Alternatively, you can use XDG directories instead:'
+	einfo '  $ mkdir -p $HOME/.local/share/todo'
+	einfo '  $ mkdir -p $HOME/.config/todo'
+	einfo "  $ bzcat /usr/share/doc/${PF}/todo.cfg.bz2 > \$HOME/.config/todo/config"
+	einfo
+	einfo 'You can then edit this file as you see fit.'
+	einfo 'Enjoy!'
+	einfo
+}


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-03-09 20:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-03-09 20:45 [gentoo-commits] repo/gentoo:master commit in: app-misc/todo/, app-misc/todo/files/ Patrice Clement
  -- strict thread matches above, loose matches on Subject: below --
2017-04-08 21:57 Patrice Clement

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox