Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-misc/task/, app-misc/task/files/
Date: Wed, 02 Sep 2020 22:05:27
Message-Id: 1599084318.3eef193c8525d51db43e3a01c178054b43f55dde.sam@gentoo
1 commit: 3eef193c8525d51db43e3a01c178054b43f55dde
2 Author: David Denoncin <ddenoncin <AT> gmail <DOT> com>
3 AuthorDate: Mon Jul 27 08:12:57 2020 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Wed Sep 2 22:05:18 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3eef193c
7
8 app-misc/task: cleanup and bug fix
9
10 This revision bump uses the more recent cmake.eclass
11 and allows compilation with clang
12
13 Closes:https://bugs.gentoo.org/729560
14
15 Package-Manager: Portage-2.3.103, Repoman-2.3.22
16 Signed-off-by: David Denoncin <ddenoncin <AT> gmail.com>
17 Closes: https://github.com/gentoo/gentoo/pull/16849
18 Signed-off-by: Sam James <sam <AT> gentoo.org>
19
20 .../task/files/task-2.5.1-clang-build-system.patch | 17 ++++++
21 app-misc/task/metadata.xml | 2 -
22 app-misc/task/task-2.5.1-r2.ebuild | 62 ++++++++++++++++++++++
23 3 files changed, 79 insertions(+), 2 deletions(-)
24
25 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
26 new file mode 100644
27 index 00000000000..e138134fcd9
28 --- /dev/null
29 +++ b/app-misc/task/files/task-2.5.1-clang-build-system.patch
30 @@ -0,0 +1,17 @@
31 +Do not force the use of libc++ when compiling with Clang
32 +Fix by David Denoncin
33 +https://bugs.gentoo.org/729560
34 +
35 +--- a/CMakeLists.txt 2020-08-09 14:04:40.095904996 -0000
36 ++++ b/CMakeLists.txt 2020-08-09 14:04:59.449238208 -0000
37 +@@ -43,10 +43,6 @@
38 + 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 support@×××××××××××.org.")
39 + endif (_HAS_CXX11)
40 +
41 +-if (${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang")
42 +- set (_CXX11_FLAGS "${_CXX11_FLAGS} -stdlib=libc++")
43 +-endif (${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang")
44 +-
45 + if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
46 + set (LINUX true)
47 + elseif (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
48
49 diff --git a/app-misc/task/metadata.xml b/app-misc/task/metadata.xml
50 index e02631a8e72..3720d365737 100644
51 --- a/app-misc/task/metadata.xml
52 +++ b/app-misc/task/metadata.xml
53 @@ -13,5 +13,3 @@
54 <flag name="sync">Enable "task sync" support</flag>
55 </use>
56 </pkgmetadata>
57 -
58 -
59
60 diff --git a/app-misc/task/task-2.5.1-r2.ebuild b/app-misc/task/task-2.5.1-r2.ebuild
61 new file mode 100644
62 index 00000000000..911ebbfa031
63 --- /dev/null
64 +++ b/app-misc/task/task-2.5.1-r2.ebuild
65 @@ -0,0 +1,62 @@
66 +# Copyright 1999-2020 Gentoo Authors
67 +# Distributed under the terms of the GNU General Public License v2
68 +
69 +EAPI=7
70 +
71 +inherit bash-completion-r1 cmake
72 +
73 +DESCRIPTION="Taskwarrior is a command-line todo list manager"
74 +HOMEPAGE="https://taskwarrior.org/"
75 +SRC_URI="https://taskwarrior.org/download/${P}.tar.gz"
76 +
77 +LICENSE="MIT"
78 +SLOT="0"
79 +KEYWORDS="~amd64 ~arm ~x86 ~x64-macos"
80 +IUSE="+sync"
81 +
82 +DEPEND="
83 + sync? ( net-libs/gnutls )
84 +"
85 +
86 +RDEPEND="${DEPEND}"
87 +
88 +PATCHES=(
89 + "${FILESDIR}/0001-TW-1778-Unicode-strings-are-truncated-in-task-descri.patch"
90 + "${FILESDIR}/${P}-clang-build-system.patch"
91 +)
92 +
93 +src_prepare() {
94 + cmake_src_prepare
95 +
96 + # don't automatically install scripts
97 + sed -i '/scripts/d' CMakeLists.txt || die
98 +}
99 +
100 +src_configure() {
101 + mycmakeargs=(
102 + -DENABLE_SYNC=$(usex sync)
103 + -DTASK_DOCDIR=share/doc/${PF}
104 + -DTASK_RCDIR=share/${PN}/rc
105 + -DCMAKE_BUILD_TYPE=release
106 + )
107 +
108 + cmake_src_configure
109 +}
110 +
111 +src_install() {
112 + cmake_src_install
113 +
114 + newbashcomp scripts/bash/task.sh task
115 +
116 + # vim syntax
117 + rm scripts/vim/README || die
118 + insinto /usr/share/vim/vimfiles
119 + doins -r scripts/vim/*
120 +
121 + # zsh-completions
122 + insinto /usr/share/zsh/site-functions
123 + doins scripts/zsh/*
124 +
125 + exeinto "/usr/share/${PN}/scripts"
126 + doexe scripts/add-ons/*
127 +}