dev-util/kdevelop-php: Fix build w/o Qt5Test
authorAndreas Sturmlechner <asturm@gentoo.org>
Sun, 7 Oct 2018 11:14:07 +0000 (13:14 +0200)
committerAndreas Sturmlechner <asturm@gentoo.org>
Sun, 7 Oct 2018 11:16:09 +0000 (13:16 +0200)
Closes: https://bugs.gentoo.org/667922
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Package-Manager: Portage-2.3.50, Repoman-2.3.11

dev-util/kdevelop-php/files/kdevelop-php-5.2.4-tests-optional.patch [new file with mode: 0644]
dev-util/kdevelop-php/kdevelop-php-5.2.4.ebuild

diff --git a/dev-util/kdevelop-php/files/kdevelop-php-5.2.4-tests-optional.patch b/dev-util/kdevelop-php/files/kdevelop-php-5.2.4-tests-optional.patch
new file mode 100644 (file)
index 0000000..3e37616
--- /dev/null
@@ -0,0 +1,28 @@
+From 5cee4d7ea10de55af2d421f5f596eb9f09830740 Mon Sep 17 00:00:00 2001
+From: Andreas Sturmlechner <andreas.sturmlechner@gmail.com>
+Date: Sun, 7 Oct 2018 12:05:45 +0200
+Subject: [PATCH] Make Qt5Test optional
+
+---
+ CMakeLists.txt | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index c09ca29..c1e25d6 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -21,7 +21,10 @@ include(GenerateExportHeader)
+ include(FeatureSummary)
+ set(QT_MIN_VERSION "5.5.0")
+-find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED Core Widgets Test)
++find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED Core Widgets)
++if(BUILD_TESTING)
++  find_package(Qt5Test ${QT_MIN_VERSION} CONFIG REQUIRED)
++endif()
+ set(KF5_DEP_VERSION "5.15.0")
+ find_package(KF5 ${KF5_DEP_VERSION} REQUIRED COMPONENTS Archive ThreadWeaver TextEditor I18n ItemModels KCMUtils)
+ find_package(KDevPlatform ${KDEVPLATFORM_VERSION} REQUIRED)
+-- 
+2.19.1
+
index bdc85574736bb2d73a25c8c0548ce6e9c90bb966..e8a5c29a01b2e9bca0c876c758e73064aac0fb17 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=6
@@ -7,7 +7,7 @@ EGIT_BRANCH="5.2"
 KDEBASE="kdevelop"
 KDE_DOC_DIR="docs"
 KDE_HANDBOOK="forceoptional"
-KDE_TEST="forceoptional"
+KDE_TEST="true"
 KMNAME="kdev-php"
 VIRTUALX_REQUIRED="test"
 inherit kde5
@@ -38,3 +38,5 @@ DEPEND="
 RDEPEND="${DEPEND}
        !dev-util/kdevelop-php-docs
 "
+
+PATCHES=( "${FILESDIR}/${P}-tests-optional.patch" )