commit:     3eef193c8525d51db43e3a01c178054b43f55dde
Author:     David Denoncin <ddenoncin <AT> gmail <DOT> com>
AuthorDate: Mon Jul 27 08:12:57 2020 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Sep  2 22:05:18 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3eef193c

app-misc/task: cleanup and bug fix

This revision bump uses the more recent cmake.eclass
and allows compilation with clang

Closes:https://bugs.gentoo.org/729560

Package-Manager: Portage-2.3.103, Repoman-2.3.22
Signed-off-by: David Denoncin <ddenoncin <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/16849
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../task/files/task-2.5.1-clang-build-system.patch | 17 ++++++
 app-misc/task/metadata.xml                         |  2 -
 app-misc/task/task-2.5.1-r2.ebuild                 | 62 ++++++++++++++++++++++
 3 files changed, 79 insertions(+), 2 deletions(-)

diff --git a/app-misc/task/files/task-2.5.1-clang-build-system.patch 
b/app-misc/task/files/task-2.5.1-clang-build-system.patch
new file mode 100644
index 00000000000..e138134fcd9
--- /dev/null
+++ b/app-misc/task/files/task-2.5.1-clang-build-system.patch
@@ -0,0 +1,17 @@
+Do not force the use of libc++ when compiling with Clang
+Fix by David Denoncin
+https://bugs.gentoo.org/729560
+
+--- a/CMakeLists.txt   2020-08-09 14:04:40.095904996 -0000
++++ b/CMakeLists.txt   2020-08-09 14:04:59.449238208 -0000
+@@ -43,10 +43,6 @@
+  message (FATAL_ERROR "C++11 support missing. Try upgrading your C++ 
compiler. If you have a good reason for using an outdated compiler, please let 
us know at [email protected].")
+ endif (_HAS_CXX11)
+ 
+-if (${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang")
+-  set (_CXX11_FLAGS "${_CXX11_FLAGS} -stdlib=libc++")
+-endif (${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang")
+-
+ if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
+   set (LINUX true)
+ elseif (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")

diff --git a/app-misc/task/metadata.xml b/app-misc/task/metadata.xml
index e02631a8e72..3720d365737 100644
--- a/app-misc/task/metadata.xml
+++ b/app-misc/task/metadata.xml
@@ -13,5 +13,3 @@
                <flag name="sync">Enable "task sync" support</flag>
        </use>
 </pkgmetadata>
-
-       

diff --git a/app-misc/task/task-2.5.1-r2.ebuild 
b/app-misc/task/task-2.5.1-r2.ebuild
new file mode 100644
index 00000000000..911ebbfa031
--- /dev/null
+++ b/app-misc/task/task-2.5.1-r2.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit bash-completion-r1 cmake
+
+DESCRIPTION="Taskwarrior is a command-line todo list manager"
+HOMEPAGE="https://taskwarrior.org/";
+SRC_URI="https://taskwarrior.org/download/${P}.tar.gz";
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86 ~x64-macos"
+IUSE="+sync"
+
+DEPEND="
+       sync? ( net-libs/gnutls )
+"
+
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+       
"${FILESDIR}/0001-TW-1778-Unicode-strings-are-truncated-in-task-descri.patch"
+       "${FILESDIR}/${P}-clang-build-system.patch"
+)
+
+src_prepare() {
+       cmake_src_prepare
+
+       # 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
+                       -DCMAKE_BUILD_TYPE=release
+       )
+
+       cmake_src_configure
+}
+
+src_install() {
+       cmake_src_install
+
+       newbashcomp scripts/bash/task.sh task
+
+       # vim syntax
+       rm scripts/vim/README || die
+       insinto /usr/share/vim/vimfiles
+       doins -r scripts/vim/*
+
+       # zsh-completions
+       insinto /usr/share/zsh/site-functions
+       doins scripts/zsh/*
+
+       exeinto "/usr/share/${PN}/scripts"
+       doexe scripts/add-ons/*
+}

Reply via email to