commit:     0a6a7eb6872844a29deb97827114e2b1dbb58249
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Tue Apr  8 20:54:15 2025 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Tue Apr  8 20:57:28 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0a6a7eb6

media-gfx/inkscape: Fix build w/ >=cmake-4

Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 media-gfx/inkscape/files/inkscape-1.4-cmake4.patch | 48 ++++++++++++++++++++++
 media-gfx/inkscape/inkscape-1.4-r1.ebuild          |  1 +
 2 files changed, 49 insertions(+)

diff --git a/media-gfx/inkscape/files/inkscape-1.4-cmake4.patch 
b/media-gfx/inkscape/files/inkscape-1.4-cmake4.patch
new file mode 100644
index 000000000000..38e8a4955f2e
--- /dev/null
+++ b/media-gfx/inkscape/files/inkscape-1.4-cmake4.patch
@@ -0,0 +1,48 @@
+From e412149bd1da7b30846e87c09813f0b719a61089 Mon Sep 17 00:00:00 2001
+From: Marc Jeanmougin <[email protected]>
+Date: Mon, 3 Feb 2025 19:40:11 +0100
+Subject: [PATCH] Bump cmake requirements
+
+---
+ CMakeLists.txt                           | 12 ++++--------
+ CMakeScripts/DefineDependsandFlags.cmake |  2 +-
+ 2 files changed, 5 insertions(+), 9 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 3765ed4bd92..79bfa42a842 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -1,13 +1,9 @@
+ # SPDX-License-Identifier: GPL-2.0-or-later
+-cmake_minimum_required(VERSION 3.1.0)
++cmake_minimum_required(VERSION 3.12.0)
+ 
+-cmake_policy(SET CMP0003 NEW) # don't be prolific with library paths
+-cmake_policy(SET CMP0005 NEW) # proper define quoting
+-cmake_policy(SET CMP0009 NEW) # don't follow symbolic links when using GLOB
+-
+-if(POLICY CMP0075)
+-    cmake_policy(SET CMP0075 NEW) # link check-executable to 
CMAKE_REQUIRED_LIBRARIES (CMake 3.12.1)
+-endif(POLICY CMP0075)
++if(POLICY CMP0167)
++    cmake_policy(SET CMP0167 NEW) # use FindBoost from boost 1.70+ (cmake 
3.30+)
++endif()
+ 
+ message("------------------------------")
+ message("Building Makefile for Inkscape")
+diff --git a/CMakeScripts/DefineDependsandFlags.cmake 
b/CMakeScripts/DefineDependsandFlags.cmake
+index bebb49e5e05..744e9787c34 100644
+--- a/CMakeScripts/DefineDependsandFlags.cmake
++++ b/CMakeScripts/DefineDependsandFlags.cmake
+@@ -164,7 +164,7 @@ add_definitions(${Intl_DEFINITIONS})
+ 
+ # Check for system-wide version of 2geom and fallback to internal copy if not 
found
+ if(NOT WITH_INTERNAL_2GEOM)
+-    pkg_check_modules(2Geom QUIET IMPORTED_TARGET GLOBAL 2geom>=1.4.0)
++    pkg_check_modules(2Geom QUIET IMPORTED_TARGET GLOBAL 
2geom>=${INKSCAPE_VERSION_MAJOR}.${INKSCAPE_VERSION_MINOR})
+     if(2Geom_FOUND)
+         add_library(2Geom::2geom ALIAS PkgConfig::2Geom)
+     else()
+-- 
+GitLab
+

diff --git a/media-gfx/inkscape/inkscape-1.4-r1.ebuild 
b/media-gfx/inkscape/inkscape-1.4-r1.ebuild
index 5991d288758d..636bda3819fc 100644
--- a/media-gfx/inkscape/inkscape-1.4-r1.ebuild
+++ b/media-gfx/inkscape/inkscape-1.4-r1.ebuild
@@ -118,6 +118,7 @@ PATCHES=(
        "${FILESDIR}"/${P}-poppler-24.11.0.patch # bug 943499
        "${FILESDIR}"/${P}-poppler-24.12.0.patch # bug 946597
        "${FILESDIR}"/${P}-poppler-25.02.0.patch # bug 949531
+       "${FILESDIR}"/${P}-cmake4.patch
 )
 
 pkg_pretend() {

Reply via email to