aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-qt/qt5/qtbase-5.0.2/0004-qt_functions-temporary-remove-isEmpty-check.patch
blob: 572d25cba537781798d0b9dfe545e8416df59dba (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
From 2a3c7bb40de7ae8f060e69bdaa77522172101f00 Mon Sep 17 00:00:00 2001
From: Martin Jansa <Martin.Jansa@gmail.com>
Date: Wed, 17 Apr 2013 18:06:25 +0200
Subject: [PATCH 04/16] qt_functions: temporary remove isEmpty check

* now we assume that every build will provide QT_EXTERNAL_HOST_BINS value
* isEmpty works correctly only with qmake variables (e.g. $$FOO -
  isEmpty(FOO)), but doesn't work with system properties like $$[FOO].

Upstream-Status: Pending

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
 mkspecs/features/qt_functions.prf | 6 +++++-
 mkspecs/features/qt_tool.prf      | 2 +-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/mkspecs/features/qt_functions.prf b/mkspecs/features/qt_functions.prf
index 876f657..0e094a8 100644
--- a/mkspecs/features/qt_functions.prf
+++ b/mkspecs/features/qt_functions.prf
@@ -194,7 +194,11 @@ defineTest(qtPrepareTool) {
     $$1 = $$eval(QT_TOOL.$${2}.command)
     isEmpty($$1) {
         $$1 = $$[QT_EXTERNAL_HOST_BINS]/$$2
-        isEmpty($$[QT_EXTERNAL_HOST_BINS]) {
+        # for some reason isEmpty does not work here, FIXME before submitting upstream
+        # DEBUG 1: mkspecs/features/qt_functions.prf:198: calling built-in isEmpty(/OE/oe-core/tmp-eglibc/sysroots/x86_64-linux/usr/bin/qt5)
+        # DEBUG 1: mkspecs/features/qt_functions.prf:198: test function returned true
+        # DEBUG 1: mkspecs/features/qt_functions.prf:198: taking 'then' branch
+        !exists($$[QT_EXTERNAL_HOST_BINS]/$$2) {
             $$1 = $$[QT_HOST_BINS]/$$2
         }
         contains(QMAKE_HOST.os, Windows):!contains($$1, .*\\.(exe|bat)$) {
diff --git a/mkspecs/features/qt_tool.prf b/mkspecs/features/qt_tool.prf
index 8a636c7..0dad97c 100644
--- a/mkspecs/features/qt_tool.prf
+++ b/mkspecs/features/qt_tool.prf
@@ -31,7 +31,7 @@ load(qt_targets)
 
 # If we are doing a prefix build, create a "module" pri which enables
 # qtPrepareTool() to work with the non-installed build.
-!build_pass:force_independent:isEmpty($$[QT_EXTERNAL_HOST_BINS]) {
+!build_pass:force_independent:!exists($$[QT_EXTERNAL_HOST_BINS]) {
 
     isEmpty(MODULE):MODULE = $$TARGET
 
-- 
1.8.2.1