commit:     03833d38596a5dfbe33dc54ecac6e11821a321ea
Author:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
AuthorDate: Tue Mar 17 22:55:58 2020 +0000
Commit:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
CommitDate: Tue Mar 17 22:56:23 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=03833d38

x11-misc/barrier: Fix USE=-gui build when Qt5 is not installed

Closes: https://bugs.gentoo.org/712276
Package-Manager: Portage-2.3.94, Repoman-2.3.20
Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org>

 x11-misc/barrier/barrier-2.3.2-r1.ebuild           |  1 +
 .../barrier/files/barrier-2.3.2-qt-gui-only.patch  | 45 ++++++++++++++++++++++
 2 files changed, 46 insertions(+)

diff --git a/x11-misc/barrier/barrier-2.3.2-r1.ebuild 
b/x11-misc/barrier/barrier-2.3.2-r1.ebuild
index 4b553a9888e..62b3dd6a5f9 100644
--- a/x11-misc/barrier/barrier-2.3.2-r1.ebuild
+++ b/x11-misc/barrier/barrier-2.3.2-r1.ebuild
@@ -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
index 00000000000..bcfe3138610
--- /dev/null
+++ b/x11-misc/barrier/files/barrier-2.3.2-qt-gui-only.patch
@@ -0,0 +1,45 @@
+From af0ce63733e040d6220aaa2157190015d4a9b0fd Mon Sep 17 00:00:00 2001
+From: James Le Cuirot <ch...@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
+

Reply via email to