summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Harder <radhermit@gentoo.org>2016-12-09 02:31:55 -0500
committerTim Harder <radhermit@gentoo.org>2016-12-09 02:31:55 -0500
commit1978510740e740764266b6f76ea754f26ae394c7 (patch)
treea0a634d31e49e19b9483ac5e21eb08fbeb9c2c34 /app-misc
parentmedia-video/mkvtoolnix: bump to EAPI 6 and drop ruby:2.0 support (diff)
downloadgentoo-1978510740e740764266b6f76ea754f26ae394c7.tar.gz
gentoo-1978510740e740764266b6f76ea754f26ae394c7.tar.bz2
gentoo-1978510740e740764266b6f76ea754f26ae394c7.zip
app-misc/task: fix unicode issue (bug #601948) and rename gnutls use flag to sync
Diffstat (limited to 'app-misc')
-rw-r--r--app-misc/task/files/0001-TW-1778-Unicode-strings-are-truncated-in-task-descri.patch23
-rw-r--r--app-misc/task/metadata.xml11
-rw-r--r--app-misc/task/task-2.5.1-r1.ebuild59
3 files changed, 89 insertions, 4 deletions
diff --git a/app-misc/task/files/0001-TW-1778-Unicode-strings-are-truncated-in-task-descri.patch b/app-misc/task/files/0001-TW-1778-Unicode-strings-are-truncated-in-task-descri.patch
new file mode 100644
index 000000000000..6ff8ac22e21a
--- /dev/null
+++ b/app-misc/task/files/0001-TW-1778-Unicode-strings-are-truncated-in-task-descri.patch
@@ -0,0 +1,23 @@
+From d025f3deb6349f56a7fc49551e819cfe13f97917 Mon Sep 17 00:00:00 2001
+From: Paul Beckingham <paul@beckingham.net>
+Date: Wed, 31 Aug 2016 17:48:45 -0400
+Subject: [PATCH] TW-1778: Unicode strings are truncated in task description
+
+- Thanks to Andrew, bjonnh, OKOMPer, Vladimir.
+---
+diff --git a/src/text.cpp b/src/text.cpp
+index f5e3496b..bc8353f7 100644
+--- a/src/text.cpp
++++ b/src/text.cpp
+@@ -248,7 +248,7 @@ bool extractLine (
+ // Premature EOL.
+ if (character == '\n')
+ {
+- line = text.substr (offset, line_length);
++ line = text.substr (offset, prior_cursor - offset);
+ offset = cursor;
+ return true;
+ }
+--
+2.11.0
+
diff --git a/app-misc/task/metadata.xml b/app-misc/task/metadata.xml
index 0fb174c9c85c..bba57a4435e2 100644
--- a/app-misc/task/metadata.xml
+++ b/app-misc/task/metadata.xml
@@ -1,8 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
-<maintainer type="person">
- <email>radhermit@gentoo.org</email>
- <name>Tim Harder</name>
-</maintainer>
+ <maintainer type="person">
+ <email>radhermit@gentoo.org</email>
+ <name>Tim Harder</name>
+ </maintainer>
+ <use>
+ <flag name="sync">Enable "task sync" support</flag>
+ </use>
</pkgmetadata>
diff --git a/app-misc/task/task-2.5.1-r1.ebuild b/app-misc/task/task-2.5.1-r1.ebuild
new file mode 100644
index 000000000000..0d8b558bd2bd
--- /dev/null
+++ b/app-misc/task/task-2.5.1-r1.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+inherit cmake-utils bash-completion-r1
+
+DESCRIPTION="Taskwarrior is a command-line todo list manager"
+HOMEPAGE="http://taskwarrior.org/"
+SRC_URI="http://taskwarrior.org/download/${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86 ~x64-macos"
+IUSE="+sync vim-syntax zsh-completion"
+
+DEPEND="sys-libs/readline:0
+ sync? ( net-libs/gnutls:0= )
+ elibc_glibc? ( sys-apps/util-linux )"
+RDEPEND="${DEPEND}"
+
+PATCHES=( "${FILESDIR}"/0001-TW-1778-Unicode-strings-are-truncated-in-task-descri.patch )
+
+src_prepare() {
+ default
+
+ # don't automatically install scripts
+ sed -i '/scripts/d' CMakeLists.txt || die
+}
+
+src_configure() {
+ mycmakeargs=(
+ -DENABLE_SYNC=$(usex sync)
+ -DTASK_DOCDIR=share/doc/${PF}
+ -DTASK_RCDIR=share/${PN}/rc
+ )
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+
+ newbashcomp scripts/bash/task.sh task
+
+ if use vim-syntax ; then
+ rm scripts/vim/README
+ insinto /usr/share/vim/vimfiles
+ doins -r scripts/vim/*
+ fi
+
+ if use zsh-completion ; then
+ insinto /usr/share/zsh/site-functions
+ doins scripts/zsh/*
+ fi
+
+ exeinto /usr/share/${PN}/scripts
+ doexe scripts/add-ons/*
+}