From b0b2c5ed3f6cdd90927754a8bf487586133d9c3f Mon Sep 17 00:00:00 2001 From: Andreas Sturmlechner Date: Wed, 26 Nov 2025 21:59:09 +0100 Subject: [PATCH] media-libs/kimageannotator: add 0.7.2 Signed-off-by: Andreas Sturmlechner --- media-libs/kimageannotator/Manifest | 1 + .../kimageannotator-0.7.1-cmake-cleanup.patch | 54 ++++++++++++++++++ ...annotator-0.7.1-cmake-minreqver-3.16.patch | 43 ++------------- ...annotator-0.7.2-cmake-minreqver-3.16.patch | 30 ++++++++++ .../kimageannotator-0.7.1-r1.ebuild | 4 +- .../kimageannotator-0.7.2.ebuild | 55 +++++++++++++++++++ 6 files changed, 147 insertions(+), 40 deletions(-) create mode 100644 media-libs/kimageannotator/files/kimageannotator-0.7.1-cmake-cleanup.patch create mode 100644 media-libs/kimageannotator/files/kimageannotator-0.7.2-cmake-minreqver-3.16.patch create mode 100644 media-libs/kimageannotator/kimageannotator-0.7.2.ebuild diff --git a/media-libs/kimageannotator/Manifest b/media-libs/kimageannotator/Manifest index 835ed655763ab..36600b41a036d 100644 --- a/media-libs/kimageannotator/Manifest +++ b/media-libs/kimageannotator/Manifest @@ -1 +1,2 @@ DIST kImageAnnotator-0.7.1.tar.gz 266861 BLAKE2B 861aedec7481e022db4c75bcd5d10e202da2073d7ffde7c60ab6ebe16b25d301045c6ef7ade0c69b594719e5094031842b96f62981565f7fe7252474486e41b1 SHA512 cb5e7e87f1b7c72108a8ace7fb60ef644e2de19e78b3e61e50e6d534b235710e5e62464f8d136ee46b7f96cb3235601eb80b09b41d972d8df9ef6fe09cb34c95 +DIST kImageAnnotator-0.7.2.tar.gz 271741 BLAKE2B c1da165928fa38dccdc7b5d89d7f06e32b8b2d57bad922c2ad84cdf187ff911ef641369a7d41cf30b55ddf49e6c56fc9c364949b40b890e436b746199ccefc51 SHA512 baccdac1972d9bebdf2bf7fbaaacad9a3cd8a7149f3505e620e093069f985208cd097077bc0e4fb3fdd2c0a5885aaf1d385a2b568efebf7146a5aac157e0c5ea diff --git a/media-libs/kimageannotator/files/kimageannotator-0.7.1-cmake-cleanup.patch b/media-libs/kimageannotator/files/kimageannotator-0.7.1-cmake-cleanup.patch new file mode 100644 index 0000000000000..951bb2b849fcb --- /dev/null +++ b/media-libs/kimageannotator/files/kimageannotator-0.7.1-cmake-cleanup.patch @@ -0,0 +1,54 @@ +Source: https://github.com/ksnip/kImageAnnotator/pull/344 + +From 357c66330ac99fbfd3a1aa884a318750e7774237 Mon Sep 17 00:00:00 2001 +From: Andreas Sturmlechner +Date: Thu, 23 Oct 2025 10:28:26 +0200 +Subject: [PATCH] Cleanup related conditionals + +CMake 3.16 minimum allows to clean up existing CMAKE_VERSION conditionals. + +Signed-off-by: Andreas Sturmlechner +--- + CMakeLists.txt | 7 +------ + tests/CMakeLists.txt | 7 +------ + 2 files changed, 2 insertions(+), 12 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 24dd825..360b555 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -79,12 +79,7 @@ target_include_directories(kImageAnnotator + target_link_libraries(kImageAnnotator PUBLIC Qt${QT_MAJOR_VERSION}::Widgets Qt${QT_MAJOR_VERSION}::Svg PRIVATE kColorPicker::kColorPicker) + + if (UNIX AND NOT APPLE) +- # X11::X11 imported target only available with sufficiently new CMake +- if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.14.0) +- target_link_libraries(kImageAnnotator PRIVATE X11::X11) +- else() +- target_link_libraries(kImageAnnotator PRIVATE X11) +- endif() ++ target_link_libraries(kImageAnnotator PRIVATE X11::X11) + endif () + + target_compile_definitions(kImageAnnotator PRIVATE KIMAGEANNOTATOR_LIB) +diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt +index fe2d1da..4dcddb1 100644 +--- a/tests/CMakeLists.txt ++++ b/tests/CMakeLists.txt +@@ -75,12 +75,7 @@ target_link_libraries(KIMAGEANNOTATOR_STATIC + Qt${QT_MAJOR_VERSION}::Svg) + + if (UNIX AND NOT APPLE) +- # X11::X11 imported target only available with sufficiently new CMake +- if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.14.0) +- target_link_libraries(KIMAGEANNOTATOR_STATIC X11::X11) +- else() +- target_link_libraries(KIMAGEANNOTATOR_STATIC X11) +- endif() ++ target_link_libraries(KIMAGEANNOTATOR_STATIC X11::X11) + endif () + + target_compile_definitions(KIMAGEANNOTATOR_STATIC PRIVATE KIMAGEANNOTATOR_LANG_INSTALL_DIR="${KIMAGEANNOTATOR_LANG_INSTALL_DIR}") +-- +2.51.1 + diff --git a/media-libs/kimageannotator/files/kimageannotator-0.7.1-cmake-minreqver-3.16.patch b/media-libs/kimageannotator/files/kimageannotator-0.7.1-cmake-minreqver-3.16.patch index a5f115b42c280..b81b776749e2e 100644 --- a/media-libs/kimageannotator/files/kimageannotator-0.7.1-cmake-minreqver-3.16.patch +++ b/media-libs/kimageannotator/files/kimageannotator-0.7.1-cmake-minreqver-3.16.patch @@ -3,20 +3,17 @@ Source: https://github.com/ksnip/kImageAnnotator/pull/344 From 357c66330ac99fbfd3a1aa884a318750e7774237 Mon Sep 17 00:00:00 2001 From: Andreas Sturmlechner Date: Thu, 23 Oct 2025 10:28:26 +0200 -Subject: [PATCH] Raise minimum CMake version to 3.16 and cleanup related - conditionals +Subject: [PATCH] Raise minimum CMake version to 3.16 CMake 3.31 warns about compat. for <3.10 being removed in the future. -Qt6 CMake modules already require 3.16 though, and it allows to clean -up existing CMAKE_VERSION conditionals a bit. +Qt6 CMake modules already require 3.16 though. CMake 3.16 was released in 2019. Signed-off-by: Andreas Sturmlechner --- - CMakeLists.txt | 9 ++------- - tests/CMakeLists.txt | 7 +------ - 2 files changed, 3 insertions(+), 13 deletions(-) + CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 24dd825..360b555 100644 @@ -28,38 +25,6 @@ index 24dd825..360b555 100644 project(kImageAnnotator LANGUAGES CXX VERSION 0.7.1) set(CMAKE_CXX_STANDARD 17) -@@ -79,12 +79,7 @@ target_include_directories(kImageAnnotator - target_link_libraries(kImageAnnotator PUBLIC Qt${QT_MAJOR_VERSION}::Widgets Qt${QT_MAJOR_VERSION}::Svg PRIVATE kColorPicker::kColorPicker) - - if (UNIX AND NOT APPLE) -- # X11::X11 imported target only available with sufficiently new CMake -- if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.14.0) -- target_link_libraries(kImageAnnotator PRIVATE X11::X11) -- else() -- target_link_libraries(kImageAnnotator PRIVATE X11) -- endif() -+ target_link_libraries(kImageAnnotator PRIVATE X11::X11) - endif () - - target_compile_definitions(kImageAnnotator PRIVATE KIMAGEANNOTATOR_LIB) -diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt -index fe2d1da..4dcddb1 100644 ---- a/tests/CMakeLists.txt -+++ b/tests/CMakeLists.txt -@@ -75,12 +75,7 @@ target_link_libraries(KIMAGEANNOTATOR_STATIC - Qt${QT_MAJOR_VERSION}::Svg) - - if (UNIX AND NOT APPLE) -- # X11::X11 imported target only available with sufficiently new CMake -- if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.14.0) -- target_link_libraries(KIMAGEANNOTATOR_STATIC X11::X11) -- else() -- target_link_libraries(KIMAGEANNOTATOR_STATIC X11) -- endif() -+ target_link_libraries(KIMAGEANNOTATOR_STATIC X11::X11) - endif () - - target_compile_definitions(KIMAGEANNOTATOR_STATIC PRIVATE KIMAGEANNOTATOR_LANG_INSTALL_DIR="${KIMAGEANNOTATOR_LANG_INSTALL_DIR}") -- 2.51.1 diff --git a/media-libs/kimageannotator/files/kimageannotator-0.7.2-cmake-minreqver-3.16.patch b/media-libs/kimageannotator/files/kimageannotator-0.7.2-cmake-minreqver-3.16.patch new file mode 100644 index 0000000000000..158327664bd65 --- /dev/null +++ b/media-libs/kimageannotator/files/kimageannotator-0.7.2-cmake-minreqver-3.16.patch @@ -0,0 +1,30 @@ +Source: https://github.com/ksnip/kImageAnnotator/pull/344 + +From 357c66330ac99fbfd3a1aa884a318750e7774237 Mon Sep 17 00:00:00 2001 +From: Andreas Sturmlechner +Date: Thu, 23 Oct 2025 10:28:26 +0200 +Subject: [PATCH] Raise minimum CMake version to 3.16 + +CMake 3.31 warns about compat. for <3.10 being removed in the future. +Qt6 CMake modules already require 3.16 though. + +CMake 3.16 was released in 2019. + +Signed-off-by: Andreas Sturmlechner +--- + CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 24dd825..360b555 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,4 +1,4 @@ +-cmake_minimum_required(VERSION 3.5) ++cmake_minimum_required(VERSION 3.16) + project(kImageAnnotator LANGUAGES CXX VERSION 0.7.2) + + set(CMAKE_CXX_STANDARD 17) +-- +2.51.1 + diff --git a/media-libs/kimageannotator/kimageannotator-0.7.1-r1.ebuild b/media-libs/kimageannotator/kimageannotator-0.7.1-r1.ebuild index 13c1ca3980c5a..459943b5cb3b3 100644 --- a/media-libs/kimageannotator/kimageannotator-0.7.1-r1.ebuild +++ b/media-libs/kimageannotator/kimageannotator-0.7.1-r1.ebuild @@ -39,7 +39,9 @@ PATCHES=( "${FILESDIR}/${P}-fix_KeyInputHelperTest.patch" # Pending upstream fixes: "${FILESDIR}/${P}-revert-custom-scaling.patch" - "${FILESDIR}/${P}-cmake-minreqver-3.16.patch" # bug #965014 + # bug #965014: + "${FILESDIR}/${P}-cmake-minreqver-3.16.patch" + "${FILESDIR}/${P}-cmake-cleanup.patch" ) src_configure() { diff --git a/media-libs/kimageannotator/kimageannotator-0.7.2.ebuild b/media-libs/kimageannotator/kimageannotator-0.7.2.ebuild new file mode 100644 index 0000000000000..73147e614b823 --- /dev/null +++ b/media-libs/kimageannotator/kimageannotator-0.7.2.ebuild @@ -0,0 +1,55 @@ +# Copyright 2020-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake + +MY_PN=kImageAnnotator +MY_P="${MY_PN}-${PV}" + +DESCRIPTION="Tool for annotating images" +HOMEPAGE="https://github.com/ksnip/kImageAnnotator" +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] + dev-qt/qtsvg:6 + >=media-libs/kcolorpicker-0.3.1 + x11-libs/libX11 +" +DEPEND="${RDEPEND} + x11-base/xorg-proto + test? ( + dev-cpp/gtest + dev-qt/qtbase:6 + ) +" +BDEPEND="dev-qt/qttools:6[linguist]" + +PATCHES=( + # Pending upstream fix, bug #965014: + "${FILESDIR}/${P}-cmake-minreqver-3.16.patch" + "${FILESDIR}/${PN}-0.7.1-cmake-cleanup.patch" +) + +src_configure() { + local mycmakeargs=( + -DBUILD_TESTS=$(usex test) + -DBUILD_WITH_QT6=ON + ) + cmake_src_configure +} + +src_test() { + local -x QT_QPA_PLATFORM=offscreen + BUILD_DIR="${BUILD_DIR}/tests" cmake_src_test +}