1 |
commit: 3dbebfcbf698947655af1d3ed9a8444f36772e94 |
2 |
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Sep 14 13:38:32 2021 +0000 |
4 |
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Sep 14 13:39:15 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3dbebfcb |
7 |
|
8 |
kde-plasma/plasma-workspace: Use FindFontconfig.cmake from KF-5.82 |
9 |
|
10 |
Hotfix for build with kde-frameworks/extra-cmake-modules-5.85.0 while |
11 |
KDE Plasma 5.22.5 is being stabilised. |
12 |
|
13 |
Closes: https://bugs.gentoo.org/813041 |
14 |
Package-Manager: Portage-3.0.23, Repoman-3.0.3 |
15 |
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org> |
16 |
|
17 |
.../plasma-workspace-5.21.5-FindFontconfig.cmake | 96 ++++++++++++++++++++++ |
18 |
.../plasma-workspace-5.21.5.ebuild | 2 + |
19 |
2 files changed, 98 insertions(+) |
20 |
|
21 |
diff --git a/kde-plasma/plasma-workspace/files/plasma-workspace-5.21.5-FindFontconfig.cmake b/kde-plasma/plasma-workspace/files/plasma-workspace-5.21.5-FindFontconfig.cmake |
22 |
new file mode 100644 |
23 |
index 00000000000..db5f18300ed |
24 |
--- /dev/null |
25 |
+++ b/kde-plasma/plasma-workspace/files/plasma-workspace-5.21.5-FindFontconfig.cmake |
26 |
@@ -0,0 +1,96 @@ |
27 |
+# SPDX-FileCopyrightText: 2006, 2007 Laurent Montel <montel@×××.org> |
28 |
+# SPDX-FileCopyrightText: 2018 Volker Krause <vkrause@×××.org> |
29 |
+# |
30 |
+# SPDX-License-Identifier: BSD-3-Clause |
31 |
+ |
32 |
+#[=======================================================================[.rst: |
33 |
+FindFontconfig |
34 |
+-------------- |
35 |
+ |
36 |
+Try to find Fontconfig. |
37 |
+Once done this will define the following variables: |
38 |
+ |
39 |
+``Fontconfig_FOUND`` |
40 |
+ True if Fontconfig is available |
41 |
+``Fontconfig_INCLUDE_DIRS`` |
42 |
+ The include directory to use for the Fontconfig headers |
43 |
+``Fontconfig_LIBRARIES`` |
44 |
+ The Fontconfig libraries for linking |
45 |
+``Fontconfig_DEFINITIONS`` |
46 |
+ Compiler switches required for using Fontconfig |
47 |
+``Fontconfig_VERSION`` |
48 |
+ The version of Fontconfig that has been found |
49 |
+ |
50 |
+If ``Fontconfig_FOUND`` is TRUE, it will also define the following |
51 |
+imported target: |
52 |
+ |
53 |
+``Fontconfig::Fontconfig`` |
54 |
+ |
55 |
+Since 5.57.0. |
56 |
+#]=======================================================================] |
57 |
+ |
58 |
+# use pkg-config to get the directories and then use these values |
59 |
+# in the FIND_PATH() and FIND_LIBRARY() calls |
60 |
+find_package(PkgConfig QUIET) |
61 |
+pkg_check_modules(PC_FONTCONFIG QUIET fontconfig) |
62 |
+ |
63 |
+set(Fontconfig_DEFINITIONS ${PC_FONTCONFIG_CFLAGS_OTHER}) |
64 |
+ |
65 |
+find_path(Fontconfig_INCLUDE_DIRS fontconfig/fontconfig.h |
66 |
+ PATHS |
67 |
+ ${PC_FONTCONFIG_INCLUDE_DIRS} |
68 |
+ /usr/X11/include |
69 |
+) |
70 |
+ |
71 |
+find_library(Fontconfig_LIBRARIES NAMES fontconfig |
72 |
+ PATHS |
73 |
+ ${PC_FONTCONFIG_LIBRARY_DIRS} |
74 |
+) |
75 |
+ |
76 |
+set(Fontconfig_VERSION ${PC_FONTCONFIG_VERSION}) |
77 |
+if (NOT Fontconfig_VERSION) |
78 |
+ find_file(Fontconfig_VERSION_HEADER |
79 |
+ NAMES "fontconfig/fontconfig.h" |
80 |
+ HINTS ${Fontconfig_INCLUDE_DIRS} |
81 |
+ ) |
82 |
+ mark_as_advanced(Fontconfig_VERSION_HEADER) |
83 |
+ if (Fontconfig_VERSION_HEADER) |
84 |
+ file(READ ${Fontconfig_VERSION_HEADER} _fontconfig_version_header_content) |
85 |
+ string(REGEX MATCH "#define FC_MAJOR[ \t]+[0-9]+" Fontconfig_MAJOR_VERSION_MATCH ${_fontconfig_version_header_content}) |
86 |
+ string(REGEX MATCH "#define FC_MINOR[ \t]+[0-9]+" Fontconfig_MINOR_VERSION_MATCH ${_fontconfig_version_header_content}) |
87 |
+ string(REGEX MATCH "#define FC_REVISION[ \t]+[0-9]+" Fontconfig_PATCH_VERSION_MATCH ${_fontconfig_version_header_content}) |
88 |
+ string(REGEX REPLACE ".*FC_MAJOR[ \t]+(.*)" "\\1" Fontconfig_MAJOR_VERSION ${Fontconfig_MAJOR_VERSION_MATCH}) |
89 |
+ string(REGEX REPLACE ".*FC_MINOR[ \t]+(.*)" "\\1" Fontconfig_MINOR_VERSION ${Fontconfig_MINOR_VERSION_MATCH}) |
90 |
+ string(REGEX REPLACE ".*FC_REVISION[ \t]+(.*)" "\\1" Fontconfig_PATCH_VERSION ${Fontconfig_PATCH_VERSION_MATCH}) |
91 |
+ set(Fontconfig_VERSION "${Fontconfig_MAJOR_VERSION}.${Fontconfig_MINOR_VERSION}.${Fontconfig_PATCH_VERSION}") |
92 |
+ endif() |
93 |
+endif() |
94 |
+ |
95 |
+include(FindPackageHandleStandardArgs) |
96 |
+find_package_handle_standard_args(Fontconfig |
97 |
+ FOUND_VAR Fontconfig_FOUND |
98 |
+ REQUIRED_VARS Fontconfig_LIBRARIES Fontconfig_INCLUDE_DIRS |
99 |
+ VERSION_VAR Fontconfig_VERSION |
100 |
+) |
101 |
+mark_as_advanced(Fontconfig_LIBRARIES Fontconfig_INCLUDE_DIRS) |
102 |
+ |
103 |
+if(Fontconfig_FOUND AND NOT TARGET Fontconfig::Fontconfig) |
104 |
+ add_library(Fontconfig::Fontconfig UNKNOWN IMPORTED) |
105 |
+ set_target_properties(Fontconfig::Fontconfig PROPERTIES |
106 |
+ IMPORTED_LOCATION "${Fontconfig_LIBRARIES}" |
107 |
+ INTERFACE_INCLUDE_DIRECTORIES "${Fontconfig_INCLUDE_DIRS}" |
108 |
+ INTERFACE_COMPILER_DEFINITIONS "${Fontconfig_DEFINITIONS}" |
109 |
+ ) |
110 |
+endif() |
111 |
+ |
112 |
+# backward compatibility, remove in kf6 |
113 |
+set(FONTCONFIG_INCLUDE_DIR "${Fontconfig_INCLUDE_DIRS}") |
114 |
+set(FONTCONFIG_LIBRARIES "${Fontconfig_LIBRARIES}") |
115 |
+set(FONTCONFIG_DEFINITIONS "${Fontconfig_DEFINITIONS}") |
116 |
+mark_as_advanced(FONTCONFIG_INCLUDE_DIR FONTCONFIG_LIBRARIES FONTCONFIG_DEFINITIONS) |
117 |
+ |
118 |
+include(FeatureSummary) |
119 |
+set_package_properties(Fontconfig PROPERTIES |
120 |
+ URL "https://www.fontconfig.org/" |
121 |
+ DESCRIPTION "Fontconfig is a library for configuring and customizing font access" |
122 |
+) |
123 |
|
124 |
diff --git a/kde-plasma/plasma-workspace/plasma-workspace-5.21.5.ebuild b/kde-plasma/plasma-workspace/plasma-workspace-5.21.5.ebuild |
125 |
index f23f675a038..22adfc762f4 100644 |
126 |
--- a/kde-plasma/plasma-workspace/plasma-workspace-5.21.5.ebuild |
127 |
+++ b/kde-plasma/plasma-workspace/plasma-workspace-5.21.5.ebuild |
128 |
@@ -170,6 +170,8 @@ src_prepare() { |
129 |
# KDE-bug: 433730 |
130 |
use calculator || |
131 |
cmake_run_in runners cmake_comment_add_subdirectory calculator |
132 |
+ |
133 |
+ cp "${FILESDIR}"/${P}-FindFontconfig.cmake cmake/FindFontconfig.cmake || die # bug 813041 |
134 |
} |
135 |
|
136 |
src_configure() { |