commit:     70cc4bfaaee686d79130f0f3e0a5bc98b467aacc
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Tue Sep 30 20:05:16 2025 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Wed Oct  1 14:49:17 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=70cc4bfa

app-misc/task: update EAPI 7 -> 8, fix build w/ cmake-4

Use cmake.eclass facilities instead of sed to disable install scripts
Fix some insinto deprecations
Use pushd instead of cd for tests

Closes: https://bugs.gentoo.org/951880
Closes: https://bugs.gentoo.org/957231
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 app-misc/task/files/task-2.6.2-cmake4.patch | 107 ++++++++++++++++++++++++++++
 app-misc/task/task-2.6.2-r1.ebuild          |  71 ++++++++++++++++++
 2 files changed, 178 insertions(+)

diff --git a/app-misc/task/files/task-2.6.2-cmake4.patch 
b/app-misc/task/files/task-2.6.2-cmake4.patch
new file mode 100644
index 000000000000..6fd906a77ae2
--- /dev/null
+++ b/app-misc/task/files/task-2.6.2-cmake4.patch
@@ -0,0 +1,107 @@
+From 93e817e5b6b001a9925ff9fa766cb2d031dec237 Mon Sep 17 00:00:00 2001
+From: Andreas Sturmlechner <[email protected]>
+Date: Tue, 30 Sep 2025 21:56:14 +0200
+Subject: [PATCH] Raise CMake minimum required version to 3.5
+
+Signed-off-by: Andreas Sturmlechner <[email protected]>
+---
+ CMakeLists.txt                   | 2 +-
+ doc/CMakeLists.txt               | 2 +-
+ scripts/CMakeLists.txt           | 2 +-
+ src/CMakeLists.txt               | 2 +-
+ src/columns/CMakeLists.txt       | 2 +-
+ src/commands/CMakeLists.txt      | 2 +-
+ src/libshared/CMakeLists.txt     | 2 +-
+ src/libshared/src/CMakeLists.txt | 2 +-
+ 8 files changed, 8 insertions(+), 8 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index cc8005a..e415650 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -1,4 +1,4 @@
+-cmake_minimum_required (VERSION 3.0)
++cmake_minimum_required (VERSION 3.5)
+ set (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake")
+ 
+ include (CheckFunctionExists)
+diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt
+index 81df9d0..1908137 100644
+--- a/doc/CMakeLists.txt
++++ b/doc/CMakeLists.txt
+@@ -1,4 +1,4 @@
+-cmake_minimum_required (VERSION 3.0)
++cmake_minimum_required (VERSION 3.5)
+ message ("-- Configuring man pages")
+ set (man_FILES task-color.5 task-sync.5 taskrc.5 task.1)
+ foreach (man_FILE ${man_FILES})
+diff --git a/scripts/CMakeLists.txt b/scripts/CMakeLists.txt
+index 6c95ca0..d2fd30b 100644
+--- a/scripts/CMakeLists.txt
++++ b/scripts/CMakeLists.txt
+@@ -1,4 +1,4 @@
+-cmake_minimum_required (VERSION 3.0)
++cmake_minimum_required (VERSION 3.5)
+ install (DIRECTORY bash fish vim hooks
+          DESTINATION ${TASK_DOCDIR}/scripts)
+ install (FILES zsh/_task
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index 34cf9b4..3485d4c 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -1,4 +1,4 @@
+-cmake_minimum_required (VERSION 3.0)
++cmake_minimum_required (VERSION 3.5)
+ include_directories (${CMAKE_SOURCE_DIR}
+                      ${CMAKE_SOURCE_DIR}/src
+                      ${CMAKE_SOURCE_DIR}/src/commands
+diff --git a/src/columns/CMakeLists.txt b/src/columns/CMakeLists.txt
+index 79fc10a..7662175 100644
+--- a/src/columns/CMakeLists.txt
++++ b/src/columns/CMakeLists.txt
+@@ -1,4 +1,4 @@
+-cmake_minimum_required (VERSION 3.0)
++cmake_minimum_required (VERSION 3.5)
+ include_directories (${CMAKE_SOURCE_DIR}
+                      ${CMAKE_SOURCE_DIR}/src
+                      ${CMAKE_SOURCE_DIR}/src/commands
+diff --git a/src/commands/CMakeLists.txt b/src/commands/CMakeLists.txt
+index 14f640e..b8d89ab 100644
+--- a/src/commands/CMakeLists.txt
++++ b/src/commands/CMakeLists.txt
+@@ -1,4 +1,4 @@
+-cmake_minimum_required (VERSION 3.0)
++cmake_minimum_required (VERSION 3.5)
+ include_directories (${CMAKE_SOURCE_DIR}
+                      ${CMAKE_SOURCE_DIR}/src
+                      ${CMAKE_SOURCE_DIR}/src/commands
+diff --git a/src/libshared/CMakeLists.txt b/src/libshared/CMakeLists.txt
+index 03a26c7..83f84b2 100644
+--- a/src/libshared/CMakeLists.txt
++++ b/src/libshared/CMakeLists.txt
+@@ -1,4 +1,4 @@
+-cmake_minimum_required (VERSION 3.1)
++cmake_minimum_required (VERSION 3.5)
+ set (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake")
+ set (HAVE_CMAKE true)
+ # https://cmake.org/cmake/help/latest/prop_tgt/CXX_STANDARD.html
+diff --git a/src/libshared/src/CMakeLists.txt 
b/src/libshared/src/CMakeLists.txt
+index 5feb7a6..146896e 100644
+--- a/src/libshared/src/CMakeLists.txt
++++ b/src/libshared/src/CMakeLists.txt
+@@ -1,4 +1,4 @@
+-cmake_minimum_required (VERSION 2.8)
++cmake_minimum_required (VERSION 3.5)
+ include_directories (${CMAKE_SOURCE_DIR}
+                      ${CMAKE_SOURCE_DIR}/src)
+ 
+--- a/test/CMakeLists.txt
++++ b/test/CMakeLists.txt
+@@ -1,4 +1,4 @@
+-cmake_minimum_required (VERSION 3.0)
++cmake_minimum_required (VERSION 3.5)
+ 
+ # This is a work-around for the following CMake issue:
+ # https://gitlab.kitware.com/cmake/cmake/issues/16062
+-- 
+2.51.0

diff --git a/app-misc/task/task-2.6.2-r1.ebuild 
b/app-misc/task/task-2.6.2-r1.ebuild
new file mode 100644
index 000000000000..b9a230f572b0
--- /dev/null
+++ b/app-misc/task/task-2.6.2-r1.ebuild
@@ -0,0 +1,71 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+CMAKE_MAKEFILE_GENERATOR="emake"
+inherit bash-completion-r1 cmake
+
+DESCRIPTION="Taskwarrior is a command-line todo list manager"
+HOMEPAGE="https://taskwarrior.org/";
+SRC_URI="https://github.com/GothenburgBitFactory/taskwarrior/releases/download/v${PV}/${P}.tar.gz
+       
https://github.com/GothenburgBitFactory/taskwarrior/releases/download/v${PV}/tests-${PV}.tar.gz";
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~x86 ~x64-macos"
+IUSE="+sync"
+
+DEPEND="
+       sync? ( net-libs/gnutls )
+"
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+       "${FILESDIR}/${P}-gcc15-cstdint-include.patch"
+       "${FILESDIR}/${P}-cmake4.patch" # bug 951880, downstream
+)
+
+src_prepare() {
+       # move test directory into source directory
+       mv "${WORKDIR}"/test . || die
+
+       cmake_src_prepare
+       cmake_comment_add_subdirectory scripts # don't install scripts
+}
+
+src_configure() {
+       local mycmakeargs=(
+               -DENABLE_SYNC=$(usex sync)
+               -DTASK_DOCDIR=share/doc/${PF}
+               -DTASK_RCDIR=share/${PN}/rc
+       )
+
+       cmake_src_configure
+}
+
+src_test() {
+       pushd "${BUILD_DIR}" > /dev/null || die
+               emake test
+       popd > /dev/null || die
+}
+
+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
+       dozshcomp scripts/zsh/*
+
+       # fish-completions
+       dofishcomp scripts/fish/*
+
+       exeinto "/usr/share/${PN}/scripts"
+       doexe scripts/add-ons/*
+}

Reply via email to