summaryrefslogtreecommitdiffstats
path: root/patches/qt-everywhere-opensource-src-4.6.3/0006-fix-zlib-handling-for-host-tools.patch
blob: 848951d7f7bfac364131575e411290319ea68a7f (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
From: Michael Olbrich <m.olbrich@pengutronix.de>
Date: Wed, 2 Feb 2011 18:31:53 +0100
Subject: [PATCH] fix zlib handling for host tools

The host-tools build system is broken. It uses the zlib switch for the
target to determine if the system or internal zlib should be used.
This breaks if we select system zlib for the target and there is no zlib.h
installed on the build system.
It is also not possible to add aditional include paths for host tools.

With this patch the host-tools always use the internal zlib when
cross-compiling.
Fixed upstream for Qt 4.7

Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
---
 src/tools/bootstrap/bootstrap.pri |    2 +-
 src/tools/bootstrap/bootstrap.pro |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/tools/bootstrap/bootstrap.pri b/src/tools/bootstrap/bootstrap.pri
index b3ee948..6442526 100644
--- a/src/tools/bootstrap/bootstrap.pri
+++ b/src/tools/bootstrap/bootstrap.pri
@@ -51,7 +51,7 @@ hpux-acc*|hpuxi-acc* {
     }
     LIBS += -lbootstrap
 }
-!contains(QT_CONFIG, zlib):!contains(QT_CONFIG, no-zlib) {
+!contains(QT_CONFIG, zlib):!contains(QT_CONFIG, no-zlib):!cross_compile {
    unix:LIBS += -lz
 #  win32:LIBS += libz.lib
 }
diff --git a/src/tools/bootstrap/bootstrap.pro b/src/tools/bootstrap/bootstrap.pro
index 0dbb90f..7e91333 100644
--- a/src/tools/bootstrap/bootstrap.pro
+++ b/src/tools/bootstrap/bootstrap.pro
@@ -95,7 +95,7 @@ macx: {
    LIBS += -framework CoreServices
 }
 
-contains(QT_CONFIG, zlib) {
+contains(QT_CONFIG, zlib)|cross_compile {
    INCLUDEPATH += ../../3rdparty/zlib
    SOURCES+= \
         ../3rdparty/zlib/adler32.c \
-- 
1.7.2.3