Gentoo Archives: gentoo-commits

From: Andreas Sturmlechner <asturm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-office/calligra/files/, app-office/calligra/
Date: Thu, 17 Jun 2021 12:20:01
Message-Id: 1623932328.502c8c6d98afd5a69a0323dfa2ea708c94bbafeb.asturm@gentoo
1 commit: 502c8c6d98afd5a69a0323dfa2ea708c94bbafeb
2 Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
3 AuthorDate: Thu Jun 17 12:18:00 2021 +0000
4 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
5 CommitDate: Thu Jun 17 12:18:48 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=502c8c6d
7
8 app-office/calligra: Fix Fontconfig/Freetype cmake args/targets
9
10 Closes: https://bugs.gentoo.org/796224
11 Package-Manager: Portage-3.0.20, Repoman-3.0.3
12 Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
13
14 app-office/calligra/calligra-3.2.1-r2.ebuild | 5 +-
15 .../calligra/files/calligra-3.2.1-cmake-3.16.patch | 86 ++++++++++++++++++++++
16 2 files changed, 90 insertions(+), 1 deletion(-)
17
18 diff --git a/app-office/calligra/calligra-3.2.1-r2.ebuild b/app-office/calligra/calligra-3.2.1-r2.ebuild
19 index 88df884a68a..7fa46d30c39 100644
20 --- a/app-office/calligra/calligra-3.2.1-r2.ebuild
21 +++ b/app-office/calligra/calligra-3.2.1-r2.ebuild
22 @@ -117,7 +117,10 @@ RDEPEND="${COMMON_DEPEND}
23
24 RESTRICT+=" test"
25
26 -PATCHES=( "${FILESDIR}"/${PN}-3.1.89-no-arch-detection.patch )
27 +PATCHES=(
28 + "${FILESDIR}"/${PN}-3.1.89-no-arch-detection.patch
29 + "${FILESDIR}"/${P}-cmake-3.16.patch # bug 796224
30 +)
31
32 pkg_pretend() {
33 check-reqs_pkg_pretend
34
35 diff --git a/app-office/calligra/files/calligra-3.2.1-cmake-3.16.patch b/app-office/calligra/files/calligra-3.2.1-cmake-3.16.patch
36 new file mode 100644
37 index 00000000000..7e1fd9d41ea
38 --- /dev/null
39 +++ b/app-office/calligra/files/calligra-3.2.1-cmake-3.16.patch
40 @@ -0,0 +1,86 @@
41 +From c7636fb343c848000300a9429410b74d17a4d54d Mon Sep 17 00:00:00 2001
42 +From: =?UTF-8?q?=C3=96mer=20Fad=C4=B1l=20Usta?= <omerusta@×××××.com>
43 +Date: Tue, 8 Jun 2021 05:13:23 +0000
44 +Subject: [PATCH] Partial update of Commit 62f51070 to make it compileable
45 + again
46 +
47 +Cmake to 3.16
48 +Fix Fontconfig's FOUND variable
49 +Fix Fontconfig's include_dirs variable
50 +Use Correct Target to link FontConfig and Freetype
51 +---
52 + CMakeLists.txt | 14 +++++---------
53 + libs/text/CMakeLists.txt | 4 ++--
54 + 2 files changed, 7 insertions(+), 11 deletions(-)
55 +
56 +diff --git a/CMakeLists.txt b/CMakeLists.txt
57 +index 1ce210ebe01..71272ffef2d 100644
58 +--- a/CMakeLists.txt
59 ++++ b/CMakeLists.txt
60 +@@ -1,4 +1,4 @@
61 +-cmake_minimum_required(VERSION 2.8.12)
62 ++cmake_minimum_required(VERSION 3.16)
63 +
64 + project(calligra)
65 +
66 +@@ -168,6 +168,8 @@ calligra_set_productset(${PRODUCTSET})
67 + ## Look for ECM, Qt, KF5 ##
68 + ###########################
69 + ##########################
70 ++set(REQUIRED_KF5_VERSION "5.7.0")
71 ++set(REQUIRED_QT_VERSION "5.3.0")
72 +
73 + find_package(ECM 5.19 REQUIRED NO_MODULE)
74 + set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR})
75 +@@ -199,9 +201,6 @@ include(MacroOptionalFindPackage)
76 + include(MacroEnsureVersion)
77 + include(MacroDesktopToJson)
78 +
79 +-
80 +-set(REQUIRED_KF5_VERSION "5.7.0")
81 +-
82 + find_package(KF5 ${REQUIRED_KF5_VERSION} REQUIRED
83 + COMPONENTS
84 + Archive
85 +@@ -251,9 +250,6 @@ if(${KF5_VERSION} VERSION_LESS "5.16.0")
86 + set(CALLIGRA_OLD_PLUGIN_METADATA TRUE)
87 + endif()
88 +
89 +-
90 +-set(REQUIRED_QT_VERSION "5.3.0")
91 +-
92 + find_package(Qt5 ${REQUIRED_QT_VERSION} REQUIRED
93 + COMPONENTS
94 + Core
95 +@@ -641,8 +637,8 @@ if(NOT WIN32 AND NOT APPLE)
96 + )
97 + endif()
98 +
99 +-if(NOT FONTCONFIG_FOUND OR NOT FREETYPE_FOUND)
100 +- set(FONTCONFIG_INCLUDE_DIR "")
101 ++if(NOT Fontconfig_FOUND OR NOT FREETYPE_FOUND)
102 ++ set(Fontconfig_INCLUDE_DIRS "")
103 + set(FREETYPE_INCLUDE_DIRS "")
104 + else()
105 + add_definitions( -DSHOULD_BUILD_FONT_CONVERSION )
106 +diff --git a/libs/text/CMakeLists.txt b/libs/text/CMakeLists.txt
107 +index 16d7e066fa2..429afe79704 100644
108 +--- a/libs/text/CMakeLists.txt
109 ++++ b/libs/text/CMakeLists.txt
110 +@@ -152,11 +152,11 @@ if( SHOULD_BUILD_FEATURE_RDF )
111 + endif()
112 +
113 + if( FONTCONFIG_FOUND )
114 +- target_link_libraries(kotext PRIVATE ${FONTCONFIG_LIBRARIES})
115 ++ target_link_libraries(kotext PRIVATE Fontconfig::Fontconfig)
116 + endif()
117 +
118 + if( FREETYPE_FOUND )
119 +- target_link_libraries(kotext PRIVATE ${FREETYPE_LIBRARIES})
120 ++ target_link_libraries(kotext PRIVATE Freetype::Freetype)
121 + endif()
122 +
123 +
124 +--
125 +GitLab
126 +