diff options
Diffstat (limited to 'recipes-qt/qt5/nativesdk-qtbase.inc')
-rw-r--r-- | recipes-qt/qt5/nativesdk-qtbase.inc | 193 |
1 files changed, 193 insertions, 0 deletions
diff --git a/recipes-qt/qt5/nativesdk-qtbase.inc b/recipes-qt/qt5/nativesdk-qtbase.inc new file mode 100644 index 00000000..8e9a8097 --- /dev/null +++ b/recipes-qt/qt5/nativesdk-qtbase.inc | |||
@@ -0,0 +1,193 @@ | |||
1 | DESCRIPTION = "SDK version of Qt/[X11|Mac|Embedded]" | ||
2 | DEPENDS = "nativesdk-zlib nativesdk-dbus qtbase-native" | ||
3 | SECTION = "libs" | ||
4 | HOMEPAGE = "http://qt-project.org" | ||
5 | |||
6 | QT_MODULE = "qtbase" | ||
7 | |||
8 | require nativesdk-qt5.inc | ||
9 | |||
10 | # shared with target version | ||
11 | SRC_URI += " \ | ||
12 | file://0001-Add-linux-oe-g-platform.patch \ | ||
13 | file://0002-qlibraryinfo-allow-to-set-qt.conf-from-the-outside-u.patch \ | ||
14 | file://0003-Add-external-hostbindir-option.patch \ | ||
15 | file://0004-qt_functions-temporary-remove-isEmpty-check.patch \ | ||
16 | file://0006-Allow-building-a-separate-qmake-for-the-target.patch \ | ||
17 | file://0007-configureapp-Prefix-default-LIBDIRS-and-INCDIRS-with.patch \ | ||
18 | file://0008-qt_module-Fix-pkgconfig-replacement.patch \ | ||
19 | file://0009-qt_module-Fix-paths-in-.prl-files.patch \ | ||
20 | file://0011-configure-don-t-export-SYSTEM_VARIABLES-to-.qmake.va.patch \ | ||
21 | file://0012-configure.prf-Allow-to-add-extra-arguments-to-make.patch \ | ||
22 | file://0013-Disable-mkv8snapshot.patch \ | ||
23 | file://0014-enables-tslib-device-to-be-read-from-env-variable.patch \ | ||
24 | file://0015-qtbase-allow-build-of-examples.patch \ | ||
25 | file://0021-configure-make-pulseaudio-a-configurable-option.patch \ | ||
26 | file://0022-configure-make-alsa-a-configurable-option.patch \ | ||
27 | file://0023-configure-make-freetype-a-configurable-option.patch \ | ||
28 | file://0024-Use-OE_QMAKE_PATH_EXTERNAL_HOST_BINS-to-determine-pa.patch \ | ||
29 | " | ||
30 | |||
31 | # specific for nativesdk version | ||
32 | SRC_URI += " \ | ||
33 | file://0001-Always-build-uic.patch \ | ||
34 | file://0001-configure-preserve-built-qmake-and-swap-with-native-.patch \ | ||
35 | file://0001-configure-bump-path-length-from-256-to-512-character.patch \ | ||
36 | " | ||
37 | |||
38 | PACKAGES = "${PN}-tools-dbg ${PN}-tools" | ||
39 | |||
40 | PACKAGE_DEBUG_SPLIT_STYLE = "debug-without-src" | ||
41 | |||
42 | FILES_${PN}-tools-dbg = " \ | ||
43 | ${OE_QMAKE_PATH_BINS}/.debug \ | ||
44 | " | ||
45 | |||
46 | FILES_${PN}-tools = " \ | ||
47 | ${OE_QMAKE_PATH_BINS}/* \ | ||
48 | " | ||
49 | |||
50 | QT_CONFIG_FLAGS += " \ | ||
51 | -reduce-relocations \ | ||
52 | -shared \ | ||
53 | -silent \ | ||
54 | -no-pch \ | ||
55 | -no-rpath \ | ||
56 | -pkg-config \ | ||
57 | ${EXTRA_OECONF} \ | ||
58 | " | ||
59 | |||
60 | # qtbase is exception, as these are used as install path for sysroots | ||
61 | OE_QMAKE_PATH_HOST_DATA = "${libdir}/${QT_DIR_NAME}" | ||
62 | OE_QMAKE_PATH_HOST_LIBS = "${libdir}" | ||
63 | |||
64 | do_generate_qt_config_file() { | ||
65 | cat > ${QT_CONF_PATH} <<EOF | ||
66 | [Paths] | ||
67 | Prefix = ${OE_QMAKE_PATH_PREFIX} | ||
68 | Headers = ${OE_QMAKE_PATH_HEADERS} | ||
69 | Libraries = ${OE_QMAKE_PATH_LIBS} | ||
70 | ArchData = ${OE_QMAKE_PATH_ARCHDATA} | ||
71 | Data = ${OE_QMAKE_PATH_DATA} | ||
72 | Binaries = ${OE_QMAKE_PATH_BINS} | ||
73 | LibraryExecutables = ${OE_QMAKE_PATH_LIBEXECS} | ||
74 | Plugins = ${OE_QMAKE_PATH_PLUGINS} | ||
75 | Imports = ${OE_QMAKE_PATH_IMPORTS} | ||
76 | Qml2Imports = ${OE_QMAKE_PATH_QML} | ||
77 | Translations = ${OE_QMAKE_PATH_TRANSLATIONS} | ||
78 | Documentation = ${OE_QMAKE_PATH_DOCS} | ||
79 | Settings = ${OE_QMAKE_PATH_SETTINGS} | ||
80 | Examples = ${OE_QMAKE_PATH_EXAMPLES} | ||
81 | Tests = ${OE_QMAKE_PATH_TESTS} | ||
82 | HostBinaries = ${OE_QMAKE_PATH_HOST_BINS} | ||
83 | HostData = ${OE_QMAKE_PATH_HOST_DATA} | ||
84 | HostLibraries = ${OE_QMAKE_PATH_HOST_LIBS} | ||
85 | HostSpec = ${OE_QMAKESPEC} | ||
86 | TartgetSpec = ${OE_XQMAKESPEC} | ||
87 | ExternalHostBinaries = ${OE_QMAKE_PATH_EXTERNAL_HOST_BINS} | ||
88 | Sysroot = | ||
89 | EOF | ||
90 | } | ||
91 | |||
92 | do_generate_qt_config_file_append() { | ||
93 | cat >> ${QT_CONF_PATH} <<EOF | ||
94 | |||
95 | [EffectivePaths] | ||
96 | Prefix=.. | ||
97 | EOF | ||
98 | } | ||
99 | |||
100 | # qtbase is exception, we need to use mkspecs from ${S} | ||
101 | QMAKE_MKSPEC_PATH = "${B}" | ||
102 | |||
103 | # qtbase is exception, configure script is using our get(X)QEvalMakeConf and setBootstrapEvalVariable functions to read it from shell | ||
104 | export OE_QMAKE_COMPILER | ||
105 | export OE_QMAKE_CC | ||
106 | export OE_QMAKE_CFLAGS | ||
107 | export OE_QMAKE_CXX | ||
108 | export OE_QMAKE_CXXFLAGS | ||
109 | export OE_QMAKE_LINK | ||
110 | export OE_QMAKE_LDFLAGS | ||
111 | export OE_QMAKE_AR | ||
112 | export OE_QMAKE_STRIP | ||
113 | |||
114 | # another exception is that we need to run bin/qmake, because EffectivePaths are relative to qmake location | ||
115 | OE_QMAKE_QMAKE_ORIG = "${STAGING_BINDIR_NATIVE}/${QT_DIR_NAME}/qmake" | ||
116 | OE_QMAKE_QMAKE = "bin/qmake" | ||
117 | |||
118 | do_configure() { | ||
119 | # we need symlink in path relative to source, because | ||
120 | # EffectivePaths:Prefix is relative to qmake location | ||
121 | # Also, configure expects qmake-native to swap with real one | ||
122 | if [ ! -e ${B}/bin/qmake-native ]; then | ||
123 | mkdir ${B}/bin | ||
124 | ln -sf ${OE_QMAKE_QMAKE_ORIG} ${B}/bin/qmake-native | ||
125 | fi | ||
126 | |||
127 | ${S}/configure -v \ | ||
128 | -dont-process \ | ||
129 | -opensource -confirm-license \ | ||
130 | -sysroot ${STAGING_DIR_NATIVE} \ | ||
131 | -no-gcc-sysroot \ | ||
132 | -system-zlib \ | ||
133 | -no-libjpeg \ | ||
134 | -no-libpng \ | ||
135 | -no-gif \ | ||
136 | -no-accessibility \ | ||
137 | -no-cups \ | ||
138 | -no-nis \ | ||
139 | -no-gui \ | ||
140 | -no-qml-debug \ | ||
141 | -no-sql-mysql \ | ||
142 | -no-sql-sqlite \ | ||
143 | -no-opengl \ | ||
144 | -no-openssl \ | ||
145 | -no-xcb \ | ||
146 | -verbose \ | ||
147 | -release \ | ||
148 | -prefix ${OE_QMAKE_PATH_PREFIX} \ | ||
149 | -bindir ${OE_QMAKE_PATH_BINS} \ | ||
150 | -libdir ${OE_QMAKE_PATH_LIBS} \ | ||
151 | -datadir ${OE_QMAKE_PATH_DATA} \ | ||
152 | -sysconfdir ${OE_QMAKE_PATH_SETTINGS} \ | ||
153 | -docdir ${OE_QMAKE_PATH_DOCS} \ | ||
154 | -headerdir ${OE_QMAKE_PATH_HEADERS} \ | ||
155 | -archdatadir ${OE_QMAKE_PATH_ARCHDATA} \ | ||
156 | -libexecdir ${OE_QMAKE_PATH_LIBEXECS} \ | ||
157 | -plugindir ${OE_QMAKE_PATH_PLUGINS} \ | ||
158 | -importdir ${OE_QMAKE_PATH_IMPORTS} \ | ||
159 | -qmldir ${OE_QMAKE_PATH_QML} \ | ||
160 | -translationdir ${OE_QMAKE_PATH_TRANSLATIONS} \ | ||
161 | -testsdir ${OE_QMAKE_PATH_TESTS} \ | ||
162 | -hostbindir ${OE_QMAKE_PATH_HOST_BINS} \ | ||
163 | -hostdatadir ${OE_QMAKE_PATH_HOST_DATA} \ | ||
164 | -external-hostbindir ${OE_QMAKE_PATH_EXTERNAL_HOST_BINS} \ | ||
165 | -no-glib \ | ||
166 | -no-iconv \ | ||
167 | -silent \ | ||
168 | -nomake examples \ | ||
169 | -nomake tests \ | ||
170 | -nomake libs \ | ||
171 | -no-compile-examples \ | ||
172 | -no-rpath \ | ||
173 | -platform ${OE_QMAKESPEC} \ | ||
174 | -xplatform linux-oe-g++ \ | ||
175 | ${QT_CONFIG_FLAGS} | ||
176 | |||
177 | bin/qmake ${OE_QMAKE_DEBUG_OUTPUT} ${S} -o Makefile || die "Configuring qt with qmake failed. EXTRA_OECONF was ${EXTRA_OECONF}" | ||
178 | } | ||
179 | |||
180 | do_install() { | ||
181 | # Fix install paths for all | ||
182 | find -name "Makefile*" | xargs sed -i "s,(INSTALL_ROOT)${STAGING_DIR_NATIVE}${STAGING_DIR_NATIVE},(INSTALL_ROOT)${STAGING_DIR_NATIVE},g" | ||
183 | |||
184 | # switch back the proper qmake | ||
185 | rm ${B}/bin/qmake | ||
186 | mv ${B}/bin/qmake-real ${B}/bin/qmake | ||
187 | |||
188 | oe_runmake install INSTALL_ROOT=${D} | ||
189 | |||
190 | # for modules which are still using syncqt and call qtPrepareTool(QMAKE_SYNCQT, syncqt) | ||
191 | # e.g. qt3d, qtwayland | ||
192 | ln -sf syncqt.pl ${D}${OE_QMAKE_PATH_QT_BINS}/syncqt | ||
193 | } | ||