dev-util/kdevelop-php: Fix build w/o Qt5Test

Closes: https://bugs.gentoo.org/667922
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Package-Manager: Portage-2.3.50, Repoman-2.3.11
This commit is contained in:
Andreas Sturmlechner
2018-10-07 13:16:09 +02:00
parent 3eb6c2acf7
commit daf6157fb4
2 changed files with 32 additions and 2 deletions
@@ -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
@@ -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" )