public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Andreas Sturmlechner" <asturm@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: kde-plasma/plasma-workspace/files/, kde-plasma/plasma-workspace/
Date: Tue, 14 Sep 2021 13:39:43 +0000 (UTC)	[thread overview]
Message-ID: <1631626755.3dbebfcbf698947655af1d3ed9a8444f36772e94.asturm@gentoo> (raw)

commit:     3dbebfcbf698947655af1d3ed9a8444f36772e94
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Tue Sep 14 13:38:32 2021 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Tue Sep 14 13:39:15 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3dbebfcb

kde-plasma/plasma-workspace: Use FindFontconfig.cmake from KF-5.82

Hotfix for build with kde-frameworks/extra-cmake-modules-5.85.0 while
KDE Plasma 5.22.5 is being stabilised.

Closes: https://bugs.gentoo.org/813041
Package-Manager: Portage-3.0.23, Repoman-3.0.3
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 .../plasma-workspace-5.21.5-FindFontconfig.cmake   | 96 ++++++++++++++++++++++
 .../plasma-workspace-5.21.5.ebuild                 |  2 +
 2 files changed, 98 insertions(+)

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
new file mode 100644
index 00000000000..db5f18300ed
--- /dev/null
+++ b/kde-plasma/plasma-workspace/files/plasma-workspace-5.21.5-FindFontconfig.cmake
@@ -0,0 +1,96 @@
+# SPDX-FileCopyrightText: 2006, 2007 Laurent Montel <montel@kde.org>
+# SPDX-FileCopyrightText: 2018 Volker Krause <vkrause@kde.org>
+#
+# SPDX-License-Identifier: BSD-3-Clause
+
+#[=======================================================================[.rst:
+FindFontconfig
+--------------
+
+Try to find Fontconfig.
+Once done this will define the following variables:
+
+``Fontconfig_FOUND``
+    True if Fontconfig is available
+``Fontconfig_INCLUDE_DIRS``
+    The include directory to use for the Fontconfig headers
+``Fontconfig_LIBRARIES``
+    The Fontconfig libraries for linking
+``Fontconfig_DEFINITIONS``
+    Compiler switches required for using Fontconfig
+``Fontconfig_VERSION``
+    The version of Fontconfig that has been found
+
+If ``Fontconfig_FOUND`` is TRUE, it will also define the following
+imported target:
+
+``Fontconfig::Fontconfig``
+
+Since 5.57.0.
+#]=======================================================================]
+
+# use pkg-config to get the directories and then use these values
+# in the FIND_PATH() and FIND_LIBRARY() calls
+find_package(PkgConfig QUIET)
+pkg_check_modules(PC_FONTCONFIG QUIET fontconfig)
+
+set(Fontconfig_DEFINITIONS ${PC_FONTCONFIG_CFLAGS_OTHER})
+
+find_path(Fontconfig_INCLUDE_DIRS fontconfig/fontconfig.h
+    PATHS
+    ${PC_FONTCONFIG_INCLUDE_DIRS}
+    /usr/X11/include
+)
+
+find_library(Fontconfig_LIBRARIES NAMES fontconfig
+    PATHS
+    ${PC_FONTCONFIG_LIBRARY_DIRS}
+)
+
+set(Fontconfig_VERSION ${PC_FONTCONFIG_VERSION})
+if (NOT Fontconfig_VERSION)
+    find_file(Fontconfig_VERSION_HEADER
+        NAMES "fontconfig/fontconfig.h"
+        HINTS ${Fontconfig_INCLUDE_DIRS}
+    )
+    mark_as_advanced(Fontconfig_VERSION_HEADER)
+    if (Fontconfig_VERSION_HEADER)
+        file(READ ${Fontconfig_VERSION_HEADER} _fontconfig_version_header_content)
+        string(REGEX MATCH "#define FC_MAJOR[ \t]+[0-9]+" Fontconfig_MAJOR_VERSION_MATCH ${_fontconfig_version_header_content})
+        string(REGEX MATCH "#define FC_MINOR[ \t]+[0-9]+" Fontconfig_MINOR_VERSION_MATCH ${_fontconfig_version_header_content})
+        string(REGEX MATCH "#define FC_REVISION[ \t]+[0-9]+" Fontconfig_PATCH_VERSION_MATCH ${_fontconfig_version_header_content})
+        string(REGEX REPLACE ".*FC_MAJOR[ \t]+(.*)" "\\1" Fontconfig_MAJOR_VERSION ${Fontconfig_MAJOR_VERSION_MATCH})
+        string(REGEX REPLACE ".*FC_MINOR[ \t]+(.*)" "\\1" Fontconfig_MINOR_VERSION ${Fontconfig_MINOR_VERSION_MATCH})
+        string(REGEX REPLACE ".*FC_REVISION[ \t]+(.*)" "\\1" Fontconfig_PATCH_VERSION ${Fontconfig_PATCH_VERSION_MATCH})
+        set(Fontconfig_VERSION "${Fontconfig_MAJOR_VERSION}.${Fontconfig_MINOR_VERSION}.${Fontconfig_PATCH_VERSION}")
+    endif()
+endif()
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(Fontconfig
+    FOUND_VAR Fontconfig_FOUND
+    REQUIRED_VARS Fontconfig_LIBRARIES Fontconfig_INCLUDE_DIRS
+    VERSION_VAR Fontconfig_VERSION
+)
+mark_as_advanced(Fontconfig_LIBRARIES Fontconfig_INCLUDE_DIRS)
+
+if(Fontconfig_FOUND AND NOT TARGET Fontconfig::Fontconfig)
+    add_library(Fontconfig::Fontconfig UNKNOWN IMPORTED)
+    set_target_properties(Fontconfig::Fontconfig PROPERTIES
+        IMPORTED_LOCATION "${Fontconfig_LIBRARIES}"
+        INTERFACE_INCLUDE_DIRECTORIES "${Fontconfig_INCLUDE_DIRS}"
+        INTERFACE_COMPILER_DEFINITIONS "${Fontconfig_DEFINITIONS}"
+    )
+endif()
+
+# backward compatibility, remove in kf6
+set(FONTCONFIG_INCLUDE_DIR "${Fontconfig_INCLUDE_DIRS}")
+set(FONTCONFIG_LIBRARIES "${Fontconfig_LIBRARIES}")
+set(FONTCONFIG_DEFINITIONS "${Fontconfig_DEFINITIONS}")
+mark_as_advanced(FONTCONFIG_INCLUDE_DIR FONTCONFIG_LIBRARIES FONTCONFIG_DEFINITIONS)
+
+include(FeatureSummary)
+set_package_properties(Fontconfig PROPERTIES
+    URL "https://www.fontconfig.org/"
+    DESCRIPTION "Fontconfig is a library for configuring and customizing font access"
+)

diff --git a/kde-plasma/plasma-workspace/plasma-workspace-5.21.5.ebuild b/kde-plasma/plasma-workspace/plasma-workspace-5.21.5.ebuild
index f23f675a038..22adfc762f4 100644
--- a/kde-plasma/plasma-workspace/plasma-workspace-5.21.5.ebuild
+++ b/kde-plasma/plasma-workspace/plasma-workspace-5.21.5.ebuild
@@ -170,6 +170,8 @@ src_prepare() {
 	# KDE-bug: 433730
 	use calculator ||
 		cmake_run_in runners cmake_comment_add_subdirectory calculator
+
+	cp "${FILESDIR}"/${P}-FindFontconfig.cmake cmake/FindFontconfig.cmake || die # bug 813041
 }
 
 src_configure() {


             reply	other threads:[~2021-09-14 13:39 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-14 13:39 Andreas Sturmlechner [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-01-01 21:05 [gentoo-commits] repo/gentoo:master commit in: kde-plasma/plasma-workspace/files/, kde-plasma/plasma-workspace/ Andreas Sturmlechner
2024-12-10 23:46 Andreas Sturmlechner
2024-09-20 17:11 Andreas Sturmlechner
2024-09-14 21:37 Andreas Sturmlechner
2024-09-10 17:58 Andreas Sturmlechner
2024-09-02 20:13 Andreas Sturmlechner
2023-11-11  1:03 Andreas Sturmlechner
2023-08-16 16:31 Andreas Sturmlechner
2023-03-22 23:01 Andreas Sturmlechner
2022-10-10  9:54 Andreas Sturmlechner
2022-09-23 20:07 Andreas Sturmlechner
2022-09-23 20:07 Andreas Sturmlechner
2022-08-07 15:51 Andreas Sturmlechner
2022-01-25  9:49 Andreas Sturmlechner
2021-11-23 14:59 Andreas Sturmlechner
2021-09-30 17:24 Andreas Sturmlechner
2021-01-24 19:44 Andreas Sturmlechner
2021-01-23  0:25 Andreas Sturmlechner
2021-01-23  0:25 Andreas Sturmlechner
2020-09-17 20:15 Andreas Sturmlechner
2020-09-17 20:15 Andreas Sturmlechner
2019-12-17 23:49 Andreas Sturmlechner
2019-10-29 22:22 Andreas Sturmlechner
2017-08-02 23:22 Andreas Sturmlechner
2017-06-17 18:30 Andreas Sturmlechner
2017-06-09 19:24 Andreas Sturmlechner
2016-11-17 11:35 Michael Palimaka
2016-11-12  8:22 Michael Palimaka
2016-06-26 20:36 Michael Palimaka
2016-06-26 17:19 Michael Palimaka
2015-11-19 16:42 Michael Palimaka

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1631626755.3dbebfcbf698947655af1d3ed9a8444f36772e94.asturm@gentoo \
    --to=asturm@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox