diff options
author | David Denoncin <ddenoncin@gmail.com> | 2020-07-27 10:12:57 +0200 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2020-09-02 22:05:18 +0000 |
commit | 3eef193c8525d51db43e3a01c178054b43f55dde (patch) | |
tree | b54e6d8985353c80bf9fc6970601c067fa4b2dbb /app-misc/task | |
parent | app-misc/task: new package maintainer (diff) | |
download | gentoo-3eef193c8525d51db43e3a01c178054b43f55dde.tar.gz gentoo-3eef193c8525d51db43e3a01c178054b43f55dde.tar.bz2 gentoo-3eef193c8525d51db43e3a01c178054b43f55dde.zip |
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@gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/16849
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'app-misc/task')
-rw-r--r-- | app-misc/task/files/task-2.5.1-clang-build-system.patch | 17 | ||||
-rw-r--r-- | app-misc/task/metadata.xml | 2 | ||||
-rw-r--r-- | 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 000000000000..e138134fcd9a --- /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 support@taskwarrior.org.") + 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 e02631a8e72f..3720d3657373 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 000000000000..911ebbfa031e --- /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/* +} |