mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-24 04:59:14 -07:00
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@gentoo.org>
This commit is contained in:
107
app-misc/task/files/task-2.6.2-cmake4.patch
Normal file
107
app-misc/task/files/task-2.6.2-cmake4.patch
Normal file
@@ -0,0 +1,107 @@
|
||||
From 93e817e5b6b001a9925ff9fa766cb2d031dec237 Mon Sep 17 00:00:00 2001
|
||||
From: Andreas Sturmlechner <asturm@gentoo.org>
|
||||
Date: Tue, 30 Sep 2025 21:56:14 +0200
|
||||
Subject: [PATCH] Raise CMake minimum required version to 3.5
|
||||
|
||||
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
|
||||
---
|
||||
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
|
||||
71
app-misc/task/task-2.6.2-r1.ebuild
Normal file
71
app-misc/task/task-2.6.2-r1.ebuild
Normal file
@@ -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/*
|
||||
}
|
||||
Reference in New Issue
Block a user