x11-misc/barrier: Fix USE=-gui build when Qt5 is not installed
authorJames Le Cuirot <chewi@gentoo.org>
Tue, 17 Mar 2020 22:55:58 +0000 (22:55 +0000)
committerJames Le Cuirot <chewi@gentoo.org>
Tue, 17 Mar 2020 22:56:23 +0000 (22:56 +0000)
Closes: https://bugs.gentoo.org/712276
Package-Manager: Portage-2.3.94, Repoman-2.3.20
Signed-off-by: James Le Cuirot <chewi@gentoo.org>
x11-misc/barrier/barrier-2.3.2-r1.ebuild
x11-misc/barrier/files/barrier-2.3.2-qt-gui-only.patch [new file with mode: 0644]

index 4b553a9888e2e5d2eecd7169dbdc9c33036e3f84..62b3dd6a5f9713e56c634125bbfbbdf0576e51a4 100644 (file)
@@ -43,6 +43,7 @@ PATCHES=(
        "${FILESDIR}"/${P}-inf-loop.patch
        "${FILESDIR}"/${P}-no-avahi.patch
        "${FILESDIR}"/${P}-pthread.patch
+       "${FILESDIR}"/${P}-qt-gui-only.patch
 )
 
 DOCS=(
diff --git a/x11-misc/barrier/files/barrier-2.3.2-qt-gui-only.patch b/x11-misc/barrier/files/barrier-2.3.2-qt-gui-only.patch
new file mode 100644 (file)
index 0000000..bcfe313
--- /dev/null
@@ -0,0 +1,45 @@
+From af0ce63733e040d6220aaa2157190015d4a9b0fd Mon Sep 17 00:00:00 2001
+From: James Le Cuirot <chewi@gentoo.org>
+Date: Tue, 17 Mar 2020 22:45:20 +0000
+Subject: [PATCH] Only require Qt5 when building the GUI
+
+Commit 6c888437 made Qt5 mandatory for all builds when it is only
+required for the GUI. There's already a find_package call in src/gui,
+it just needed the REQUIRED flag to be added.
+---
+ CMakeLists.txt         | 6 ------
+ src/gui/CMakeLists.txt | 2 +-
+ 2 files changed, 1 insertion(+), 7 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 8e10776e..ee0835ec 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -357,12 +357,6 @@ else()
+     set (OPENSSL_LIBS ${lib_ssl} ${lib_crypto})
+ endif()
+-
+-# Check we have the *required* Qt5 libs.
+-find_package(Qt5Core REQUIRED)
+-find_package(Qt5Network REQUIRED)
+-find_package(Qt5Widgets REQUIRED)
+-
+ #
+ # Configure_file... but for directories, recursively.
+ #
+diff --git a/src/gui/CMakeLists.txt b/src/gui/CMakeLists.txt
+index 4988fe6a..f29fd910 100644
+--- a/src/gui/CMakeLists.txt
++++ b/src/gui/CMakeLists.txt
+@@ -1,6 +1,6 @@
+ cmake_minimum_required (VERSION 3.4)
+-find_package (Qt5 COMPONENTS Core Widgets Network)
++find_package (Qt5 REQUIRED COMPONENTS Core Widgets Network)
+ set (CMAKE_AUTOMOC ON)
+ set (CMAKE_AUTORCC ON)
+ set (CMAKE_AUTOUIC ON)
+-- 
+2.25.1
+