e668edd9219b6381ecdd8b45345e3a4a1bf212c7
[scm/bb/tizen-distro.git] / meta-qt5 / recipes-qt / qt5 / qttools / 0001-Allow-to-build-only-lrelease-lupdate-lconvert.patch
1 From f4eb217f9b706a13e7f8256b8540970cfc78d805 Mon Sep 17 00:00:00 2001
2 From: Martin Jansa <Martin.jansa@gmail.com>
3 Date: Wed, 11 Sep 2013 18:30:08 +0200
4 Subject: [PATCH 1/3] Allow to build only lrelease + lupdate + lconvert
5
6 This is useful e.g. when cross compiling with OpenEmbedded where qtbase-native
7 is built without GUI support (no-png is set) and we still want to build
8 native lrelease + lupdate + lconvert tools.
9
10 Upstream-Status: Pending
11
12 Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
13 ---
14  examples/examples.pro     |  4 ++--
15  src/designer/src/src.pro  | 16 +++++++++-------
16  src/linguist/linguist.pro |  2 +-
17  src/src.pro               | 14 ++++++++------
18  tests/auto/auto.pro       | 24 +++++++++++++-----------
19  5 files changed, 33 insertions(+), 27 deletions(-)
20
21 diff --git a/examples/examples.pro b/examples/examples.pro
22 index 4955969..8e86419 100644
23 --- a/examples/examples.pro
24 +++ b/examples/examples.pro
25 @@ -1,3 +1,3 @@
26  TEMPLATE = subdirs
27 -qtHaveModule(widgets): SUBDIRS += help designer linguist uitools assistant
28 -
29 +!linguistonly:qtHaveModule(widgets): SUBDIRS += help designer assistant
30 +qtHaveModule(widgets): SUBDIRS += linguist uitools
31 diff --git a/src/designer/src/src.pro b/src/designer/src/src.pro
32 index e02ca8e..49527c5 100644
33 --- a/src/designer/src/src.pro
34 +++ b/src/designer/src/src.pro
35 @@ -1,18 +1,20 @@
36  TEMPLATE = subdirs
37  
38 -SUBDIRS = \
39 -    uitools \
40 -    lib \
41 -    components \
42 -    designer
43 +!linguistonly {
44 +    SUBDIRS = \
45 +        lib \
46 +        components \
47 +        designer
48 +}
49 +SUBDIRS += uitools
50  
51 -contains(QT_CONFIG, shared): SUBDIRS += plugins
52 +!linguistonly:contains(QT_CONFIG, shared): SUBDIRS += plugins
53  
54  components.depends = lib
55  designer.depends = components
56  plugins.depends = lib
57  
58 -qtNomakeTools( \
59 +!linguistonly:qtNomakeTools( \
60      lib \
61      components \
62      designer \
63 diff --git a/src/linguist/linguist.pro b/src/linguist/linguist.pro
64 index 3a70580..a977878 100644
65 --- a/src/linguist/linguist.pro
66 +++ b/src/linguist/linguist.pro
67 @@ -3,7 +3,7 @@ SUBDIRS  = \
68      lrelease \
69      lupdate \
70      lconvert
71 -!no-png:qtHaveModule(widgets): SUBDIRS += linguist
72 +!linguistonly:!no-png:qtHaveModule(widgets): SUBDIRS += linguist
73  
74  qtNomakeTools( \
75      linguist \
76 diff --git a/src/src.pro b/src/src.pro
77 index a486d65..3aeac1e 100644
78 --- a/src/src.pro
79 +++ b/src/src.pro
80 @@ -4,10 +4,12 @@ qtHaveModule(widgets) {
81      no-png {
82          message("Some graphics-related tools are unavailable without PNG support")
83      } else {
84 -        SUBDIRS = assistant \
85 +        !linguistonly {
86 +            SUBDIRS = assistant \
87                    pixeltool \
88 -                  qtestlib \
89 -                  designer
90 +                  qtestlib
91 +        }
92 +        SUBDIRS += designer
93  #    unix:!mac:!embedded:!qpa:SUBDIRS += qtconfig
94  
95          linguist.depends = designer
96 @@ -15,7 +17,7 @@ qtHaveModule(widgets) {
97  }
98  
99  SUBDIRS += linguist
100 -if(!android|android_app):!ios: SUBDIRS += qtpaths
101 +if(!android|android_app):!linguistonly:!ios: SUBDIRS += qtpaths
102  
103  mac {
104      SUBDIRS += macdeployqt
105 @@ -25,11 +27,11 @@ android {
106      SUBDIRS += androiddeployqt
107  }
108  
109 -qtHaveModule(dbus): SUBDIRS += qdbus
110 +!linguistonly:qtHaveModule(dbus): SUBDIRS += qdbus
111  
112  win32|winrt:SUBDIRS += windeployqt
113  winrt:SUBDIRS += winrtrunner qtd3dservice
114 -qtHaveModule(gui):!android:!ios:!qnx:!wince*:!winrt*:SUBDIRS += qtdiag
115 +!linguistonly:qtHaveModule(gui):!android:!ios:!qnx:!wince*:!winrt*:SUBDIRS += qtdiag
116  
117  qtNomakeTools( \
118      pixeltool \
119 diff --git a/tests/auto/auto.pro b/tests/auto/auto.pro
120 index c3acfe3..f2f88f7 100644
121 --- a/tests/auto/auto.pro
122 +++ b/tests/auto/auto.pro
123 @@ -1,15 +1,17 @@
124  TEMPLATE=subdirs
125 -SUBDIRS=\
126 -    linguist \
127 -    host.pro \
128 -    qhelpcontentmodel \
129 -    qhelpenginecore \
130 -    qhelpgenerator \
131 -    qhelpindexmodel \
132 -    qhelpprojectdata \
133 -    cmake \
134 -    installed_cmake \
135 -    qtdiag
136 +!linguistonly {
137 +    SUBDIRS=\
138 +        linguist \
139 +        host.pro \
140 +        qhelpcontentmodel \
141 +        qhelpenginecore \
142 +        qhelpgenerator \
143 +        qhelpindexmodel \
144 +        qhelpprojectdata \
145 +        cmake \
146 +        installed_cmake
147 +        qtdiag
148 +}
149  
150  installed_cmake.depends = cmake
151  
152 -- 
153 2.0.0
154