kate/search-for-kf5i18n-kdoctools.patch

49 lines
1.7 KiB
Diff

From 565fd945b52a107c4b7b89f96146bdf8acbd9757 Mon Sep 17 00:00:00 2001
From: Heiko Becker <heirecka@exherbo.org>
Date: Tue, 19 Nov 2019 20:28:18 +0100
Subject: Search for KF5I18n and KF5DocTools
Summary:
KF5I18n is required anyway. If it isn't searched and found when the
ki18n_install call, which is injected by the release scripts, is
encountered the build will fail with "CMake Error: No script
specified for argument -P" because a variable usually set by
ki18n_install is not defined.
The same applies to KF5DocTools and kdoctools_install as well, but
it is guarded by a "if (KF5DocTools_FOUND)" so it doesn't error out
but just doesn't install any handbooks, even if KF5DocTools is found.
Test Plan: The 19.11.80 tarball builds fine with the patch applied
Reviewers: #kate, cullmann
Subscribers: kwrite-devel
Tags: #kate
Differential Revision: https://phabricator.kde.org/D25411
---
CMakeLists.txt | 9 +++++++++
1 file changed, 9 insertions(+)
Index: kate-19.11.80/CMakeLists.txt
===================================================================
--- kate-19.11.80.orig/CMakeLists.txt 2019-11-15 01:26:28.000000000 +0100
+++ kate-19.11.80/CMakeLists.txt 2019-11-28 07:03:33.482667194 +0100
@@ -35,6 +35,15 @@
# forbid some old things
add_definitions(-DQT_NO_FOREACH)
+# Required here so that the ki18n_install/kdoctools_install calls injected by
+# the release scripts work.
+find_package(KF5I18n ${KF5_REQUIRED_VERSION}
+ REQUIRED COMPONENTS
+ I18n
+ OPTIONAL_COMPONENTS
+ DocTools
+)
+
# Qt 5.13 deprecated QComboBox::currentIndexChanged(QString) and Qt 5.14 undid that...
if (Qt5Widgets_VERSION VERSION_GREATER_EQUAL 5.14.0)
add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x050d00)