commit:     6ea836afd0212a8580ecd50b6cd0dbaccf925e86
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sat Oct 18 21:51:37 2025 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sat Oct 18 21:52:25 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6ea836af

media-libs/kcolorpicker: Fix CMake < 3.10 warning

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

 .../kcolorpicker-0.3.1-cmake-minreqver-3.10.patch  | 35 ++++++++++++++++++
 .../kcolorpicker/kcolorpicker-0.3.1-r1.ebuild      | 43 ++++++++++++++++++++++
 2 files changed, 78 insertions(+)

diff --git 
a/media-libs/kcolorpicker/files/kcolorpicker-0.3.1-cmake-minreqver-3.10.patch 
b/media-libs/kcolorpicker/files/kcolorpicker-0.3.1-cmake-minreqver-3.10.patch
new file mode 100644
index 000000000000..eaeb8e06385d
--- /dev/null
+++ 
b/media-libs/kcolorpicker/files/kcolorpicker-0.3.1-cmake-minreqver-3.10.patch
@@ -0,0 +1,35 @@
+Source: https://github.com/ksnip/kColorPicker/pull/15
+
+From d91ba101b65bc9e2a5506959295472ed42bde943 Mon Sep 17 00:00:00 2001
+From: Andreas Sturmlechner <[email protected]>
+Date: Sat, 18 Oct 2025 23:44:14 +0200
+Subject: [PATCH] Raise CMake minimum version to 3.10..3.31 range
+
+CMake 3.10 was released in 2017, fixes warning since CMake-3.31:
+
+CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
+Compatibility with CMake < 3.10 will be removed from a future version of
+CMake.
+
+Update the VERSION argument value. Or, use the ... syntax
+to tell CMake that the project requires at least but has been updated
+to work with policies introduced by or earlier.
+
+Signed-off-by: Andreas Sturmlechner <[email protected]>
+---
+ CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 1d15048..8d07fd5 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -1,4 +1,4 @@
+-cmake_minimum_required(VERSION 3.5)
++cmake_minimum_required(VERSION 3.10..3.31)
+ project(kColorPicker LANGUAGES CXX VERSION 0.3.1)
+ 
+ set(QT_MIN_VERSION 5.15.2)
+-- 
+2.51.1
+

diff --git a/media-libs/kcolorpicker/kcolorpicker-0.3.1-r1.ebuild 
b/media-libs/kcolorpicker/kcolorpicker-0.3.1-r1.ebuild
new file mode 100644
index 000000000000..f0b572a89e36
--- /dev/null
+++ b/media-libs/kcolorpicker/kcolorpicker-0.3.1-r1.ebuild
@@ -0,0 +1,43 @@
+# Copyright 2020-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake
+
+MY_PN=kColorPicker
+MY_P="${MY_PN}-${PV}"
+
+DESCRIPTION="Qt based color picker with popup menu"
+HOMEPAGE="https://github.com/ksnip/kColorPicker";
+SRC_URI="https://github.com/ksnip/${MY_PN}/archive/v${PV}.tar.gz -> 
${MY_P}.tar.gz"
+S="${WORKDIR}/${MY_P}"
+
+LICENSE="LGPL-3+"
+SLOT="0"
+KEYWORDS="amd64 arm64 ~loong ~ppc64 ~riscv ~x86"
+IUSE="test"
+
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+       dev-qt/qtbase:6[gui,widgets]
+"
+DEPEND="${RDEPEND}
+       test? ( dev-qt/qtbase:6 )
+"
+
+PATCHES=( "${FILESDIR}/${P}-cmake-minreqver-3.10.patch" ) # bug #964473
+
+src_configure() {
+       local mycmakeargs=(
+               -DBUILD_TESTS=$(usex test)
+               -DBUILD_WITH_QT6=ON
+       )
+       cmake_src_configure
+}
+
+src_test() {
+       local -x QT_QPA_PLATFORM=offscreen
+       cmake_src_test
+}

Reply via email to