commit:     0b01ca373c77869e8ea182cc848428a738c2fc22
Author:     Moritz Schlarb <moschlar <AT> metalabs <DOT> de>
AuthorDate: Wed Apr 26 17:29:21 2017 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Thu Apr 27 14:33:29 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0b01ca37

net-misc/seafile-client: Fix Qt5 selection

Closes: https://bugs.gentoo.org/show_bug.cgi?id=602440#c1

 .../files/seafile-client-6.0.4-select-qt5.patch        | 18 ++++++++++++++++++
 ...-6.0.4-r1.ebuild => seafile-client-6.0.4-r2.ebuild} |  4 ++--
 2 files changed, 20 insertions(+), 2 deletions(-)

diff --git 
a/net-misc/seafile-client/files/seafile-client-6.0.4-select-qt5.patch 
b/net-misc/seafile-client/files/seafile-client-6.0.4-select-qt5.patch
new file mode 100644
index 00000000000..ed48dcf4757
--- /dev/null
+++ b/net-misc/seafile-client/files/seafile-client-6.0.4-select-qt5.patch
@@ -0,0 +1,18 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 4261fba..24fbbda 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -158,11 +158,8 @@ SET(QT_VERSION_MAJOR 5)
+ # have to keep using QtWebKit on windows because QtWebEngine can't be
+ # compiled in msys2/mingw (QtWebEnigne is based on chrome, which has to be
+ # compiled with MSVC.)
+-FIND_PROGRAM(qmake_executable NAMES qmake qmake.exe)
+-EXECUTE_PROCESS(COMMAND
+-    bash -c "${qmake_executable} --version | grep -iE '^using qt version 
[0-9.]+' | awk '{print $4}'"
+-    OUTPUT_VARIABLE DETECTED_QT_VERSION
+-    OUTPUT_STRIP_TRAILING_WHITESPACE)
++FIND_PACKAGE(Qt5Core)
++SET(DETECTED_QT_VERSION ${Qt5Core_VERSION})
+ MESSAGE("qt5 version: ${DETECTED_QT_VERSION}")
+ IF(WIN32 OR DETECTED_QT_VERSION VERSION_LESS 5.6.0)
+     ADD_DEFINITIONS(-DSEAFILE_USE_WEBKIT)

diff --git a/net-misc/seafile-client/seafile-client-6.0.4-r1.ebuild 
b/net-misc/seafile-client/seafile-client-6.0.4-r2.ebuild
similarity index 91%
rename from net-misc/seafile-client/seafile-client-6.0.4-r1.ebuild
rename to net-misc/seafile-client/seafile-client-6.0.4-r2.ebuild
index 1f1aa3a7483..b417c30619c 100644
--- a/net-misc/seafile-client/seafile-client-6.0.4-r1.ebuild
+++ b/net-misc/seafile-client/seafile-client-6.0.4-r2.ebuild
@@ -32,7 +32,8 @@ DEPEND="${RDEPEND}
        test? ( dev-qt/qttest:5 )"
 
 src_prepare() {
-       eapply "${FILESDIR}/${P}-only-use-qttest-when-needed.patch"
+       eapply "${FILESDIR}/${P}-select-qt5.patch"
+       eapply "${FILESDIR}/${P}-only-use-qttest-where-needed.patch"
        cmake-utils_src_prepare
        if use shibboleth ; then
                if ! has_version "dev-qt/qtwebengine:5[widgets]" ; then
@@ -42,7 +43,6 @@ src_prepare() {
 }
 
 src_configure() {
-       export QT_SELECT=qt5
        local mycmakeargs=(
                -DBUILD_SHIBBOLETH_SUPPORT="$(usex shibboleth)"
                -DBUILD_TESTING="$(usex test)"

Reply via email to