diff options
author | Martin Jansa <Martin.Jansa@gmail.com> | 2015-05-28 14:58:06 +0200 |
---|---|---|
committer | Martin Jansa <Martin.Jansa@gmail.com> | 2015-05-28 21:16:50 +0200 |
commit | 48ee17af942ac9860e834c8dec049370e7802a56 (patch) | |
tree | 004e47c94682eaa418c9e718c3264ca121732102 /recipes-qt/qt5/qtbase_git.bb | |
parent | 3208763b8b3f65b17825ded4b2c9b9166d78f2b2 (diff) | |
download | meta-qt5-48ee17af942ac9860e834c8dec049370e7802a56.tar.gz |
qt5: merge .inc and _git.bb files
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'recipes-qt/qt5/qtbase_git.bb')
-rw-r--r-- | recipes-qt/qt5/qtbase_git.bb | 255 |
1 files changed, 247 insertions, 8 deletions
diff --git a/recipes-qt/qt5/qtbase_git.bb b/recipes-qt/qt5/qtbase_git.bb index ed6878c3..44295a03 100644 --- a/recipes-qt/qt5/qtbase_git.bb +++ b/recipes-qt/qt5/qtbase_git.bb | |||
@@ -1,8 +1,12 @@ | |||
1 | require qt5.inc | ||
1 | require qt5-git.inc | 2 | require qt5-git.inc |
2 | require ${PN}.inc | ||
3 | 3 | ||
4 | SRC_URI = "\ | 4 | LICENSE = "GFDL-1.3 & BSD & (LGPL-2.1 & Digia-Qt-LGPL-Exception-1.1 | LGPL-3.0)" |
5 | ${QT_GIT}/qt/${QT_MODULE}.git;branch=${QT_MODULE_BRANCH} \ | 5 | LIC_FILES_CHKSUM = " \ |
6 | file://LICENSE.LGPLv21;md5=d87ae0d200af76dca730d911474cbe5b \ | ||
7 | file://LICENSE.LGPLv3;md5=ffcfac38a32c9ebdb8ff768fa1702478 \ | ||
8 | file://LGPL_EXCEPTION.txt;md5=0145c4d1b6f96a661c2c139dfb268fb6 \ | ||
9 | file://LICENSE.FDL;md5=6d9f2a9af4c8b8c3c769f6cc1b6aaf7e \ | ||
6 | " | 10 | " |
7 | 11 | ||
8 | # common for qtbase-native, qtbase-nativesdk and qtbase | 12 | # common for qtbase-native, qtbase-nativesdk and qtbase |
@@ -25,9 +29,244 @@ SRC_URI += "\ | |||
25 | file://0012-Set-paths-for-target-properly.patch \ | 29 | file://0012-Set-paths-for-target-properly.patch \ |
26 | " | 30 | " |
27 | 31 | ||
28 | SRCREV = "f58e882b7594c59b6050d3c87562fcf836d10f60" | 32 | DEPENDS += "qtbase-native" |
33 | |||
34 | # LGPL-3.0 is used only in src/plugins/platforms/android/extract.cpp | ||
35 | |||
36 | # for syncqt | ||
37 | RDEPENDS_${PN}-tools += "perl" | ||
38 | |||
39 | # separate some parts of PACKAGECONFIG which are often changed | ||
40 | # be aware that you need to add icu to build qtwebkit, default | ||
41 | # PACKAGECONFIG is kept rather minimal for people who don't need | ||
42 | # stuff like webkit (and it's easier to add options than remove) | ||
43 | |||
44 | PACKAGECONFIG_GL ?= "${@base_contains('DISTRO_FEATURES', 'opengl', 'gl', '', d)}" | ||
45 | PACKAGECONFIG_FB ?= "${@base_contains('DISTRO_FEATURES', 'directfb', 'directfb', '', d)}" | ||
46 | PACKAGECONFIG_X11 ?= "${@base_contains('DISTRO_FEATURES', 'x11', 'xcb xvideo xsync xshape xrender xrandr xfixes xinput2 xinput xinerama xcursor gtkstyle xkb', '', d)}" | ||
47 | PACKAGECONFIG_FONTS ?= "" | ||
48 | PACKAGECONFIG_SYSTEM ?= "jpeg libpng zlib" | ||
49 | PACKAGECONFIG_MULTIMEDIA ?= "${@base_contains('DISTRO_FEATURES', 'pulseaudio', 'pulseaudio', '', d)}" | ||
50 | PACKAGECONFIG_DISTRO ?= "" | ||
51 | # Either release or debug, can be overridden in bbappends | ||
52 | PACKAGECONFIG_RELEASE ?= "release" | ||
53 | # This is in qt5.inc, because qtwebkit-examples are using it to enable ca-certificates dependency | ||
54 | # PACKAGECONFIG_OPENSSL ?= "openssl" | ||
55 | PACKAGECONFIG_DEFAULT ?= "dbus udev evdev widgets tools libs" | ||
56 | |||
57 | PACKAGECONFIG ?= " \ | ||
58 | ${PACKAGECONFIG_RELEASE} \ | ||
59 | ${PACKAGECONFIG_DEFAULT} \ | ||
60 | ${PACKAGECONFIG_OPENSSL} \ | ||
61 | ${PACKAGECONFIG_GL} \ | ||
62 | ${PACKAGECONFIG_FB} \ | ||
63 | ${PACKAGECONFIG_X11} \ | ||
64 | ${PACKAGECONFIG_FONTS} \ | ||
65 | ${PACKAGECONFIG_SYSTEM} \ | ||
66 | ${PACKAGECONFIG_MULTIMEDIA} \ | ||
67 | ${PACKAGECONFIG_DISTRO} \ | ||
68 | " | ||
69 | |||
70 | PACKAGECONFIG[release] = "-release,-debug" | ||
71 | PACKAGECONFIG[developer] = "-developer-build" | ||
72 | PACKAGECONFIG[sm] = "-sm,-no-sm" | ||
73 | PACKAGECONFIG[tests] = "-make tests,-nomake tests" | ||
74 | PACKAGECONFIG[examples] = "-make examples -compile-examples,-nomake examples" | ||
75 | PACKAGECONFIG[tools] = "-make tools,-nomake tools" | ||
76 | # only for completeness, configure will add libs even if you try to explicitly remove it | ||
77 | PACKAGECONFIG[libs] = "-make libs,-nomake libs" | ||
78 | # accessibility is required to compile qtquickcontrols | ||
79 | PACKAGECONFIG[accessibility] = "-accessibility,-no-accessibility" | ||
80 | PACKAGECONFIG[glib] = "-glib,-no-glib,glib-2.0" | ||
81 | # use either system freetype or bundled freetype, if you disable freetype completely | ||
82 | # fontdatabases/basic/qbasicfontdatabase.cpp will fail to build and system freetype | ||
83 | # works only together with fontconfig | ||
84 | PACKAGECONFIG[freetype] = "-system-freetype,-freetype,freetype" | ||
85 | PACKAGECONFIG[jpeg] = "-system-libjpeg,-no-libjpeg,jpeg" | ||
86 | PACKAGECONFIG[libpng] = "-system-libpng,-no-libpng,libpng" | ||
87 | PACKAGECONFIG[zlib] = "-system-zlib,-qt-zlib,zlib" | ||
88 | PACKAGECONFIG[pcre] = "-system-pcre,-qt-pcre,pcre" | ||
89 | PACKAGECONFIG[gl] = "-opengl desktop -no-eglfs,,virtual/libgl" | ||
90 | PACKAGECONFIG[gles2] = "-opengl es2 -eglfs,,virtual/libgles2 virtual/egl" | ||
91 | PACKAGECONFIG[tslib] = "-tslib,-no-tslib,tslib" | ||
92 | PACKAGECONFIG[cups] = "-cups,-no-cups,cups" | ||
93 | PACKAGECONFIG[dbus] = "-dbus,-no-dbus,dbus" | ||
94 | PACKAGECONFIG[xcb] = "-xcb -xcb-xlib -system-xcb,-no-xcb,libxcb xcb-util-wm xcb-util-image xcb-util-keysyms xcb-util-renderutil" | ||
95 | PACKAGECONFIG[sql-ibase] = "-sql-ibase,-no-sql-ibase" | ||
96 | PACKAGECONFIG[sql-mysql] = "-sql-mysql,-no-sql-mysql,mysql5" | ||
97 | PACKAGECONFIG[sql-psql] = "-sql-psql,-no-sql-psql,postgresql" | ||
98 | PACKAGECONFIG[sql-odbc] = "-sql-odbc,-no-sql-odbc" | ||
99 | PACKAGECONFIG[sql-oci] = "-sql-oci,-no-sql-oci" | ||
100 | PACKAGECONFIG[sql-tds] = "-sql-tds,-no-sql-tds" | ||
101 | PACKAGECONFIG[sql-db2] = "-sql-db2,-no-sql-db2" | ||
102 | PACKAGECONFIG[sql-sqlite2] = "-sql-sqlite2,-no-sql-sqlite2,sqlite" | ||
103 | PACKAGECONFIG[sql-sqlite] = "-sql-sqlite,-no-sql-sqlite,sqlite3" | ||
104 | PACKAGECONFIG[xcursor] = "-xcursor,-no-xcursor,libxcursor" | ||
105 | PACKAGECONFIG[xinerama] = "-xinerama,-no-xinerama,libxinerama" | ||
106 | PACKAGECONFIG[xinput] = "-xinput,-no-xinput" | ||
107 | PACKAGECONFIG[xinput2] = "-xinput2,-no-xinput2,libxi" | ||
108 | PACKAGECONFIG[xfixes] = "-xfixes,-no-xfixes,libxfixes" | ||
109 | PACKAGECONFIG[xrandr] = "-xrandr,-no-xrandr,libxrandr" | ||
110 | PACKAGECONFIG[xrender] = "-xrender,-no-xrender,libxrender" | ||
111 | PACKAGECONFIG[xshape] = "-xshape,-no-xshape" | ||
112 | PACKAGECONFIG[xsync] = "-xsync,-no-xsync" | ||
113 | PACKAGECONFIG[xvideo] = "-xvideo,-no-xvideo" | ||
114 | PACKAGECONFIG[openvg] = "-openvg,-no-openvg" | ||
115 | PACKAGECONFIG[iconv] = "-iconv,-no-iconv,virtual/libiconv" | ||
116 | PACKAGECONFIG[xkb] = "-xkb,-no-xkb -no-xkbcommon,libxkbcommon" | ||
117 | PACKAGECONFIG[evdev] = "-evdev,-no-evdev" | ||
118 | PACKAGECONFIG[mtdev] = "-mtdev,-no-mtdev,mtdev" | ||
119 | # depends on glib | ||
120 | PACKAGECONFIG[fontconfig] = "-fontconfig,-no-fontconfig,fontconfig" | ||
121 | PACKAGECONFIG[gtkstyle] = "-gtkstyle,-no-gtkstyle,gtk+" | ||
122 | PACKAGECONFIG[directfb] = "-directfb,-no-directfb,directfb" | ||
123 | PACKAGECONFIG[linuxfb] = "-linuxfb,-no-linuxfb" | ||
124 | PACKAGECONFIG[mitshm] = "-mitshm,-no-mitshm,mitshm" | ||
125 | PACKAGECONFIG[kms] = "-kms,-no-kms,virtual/mesa virtual/egl" | ||
126 | # needed for qtwebkit | ||
127 | PACKAGECONFIG[icu] = "-icu,-no-icu,icu" | ||
128 | PACKAGECONFIG[udev] = "-libudev,-no-libudev,udev" | ||
129 | # use -openssl-linked here to ensure that RDEPENDS for libcrypto and libssl are detected | ||
130 | PACKAGECONFIG[openssl] = "-openssl-linked,-no-openssl,openssl" | ||
131 | PACKAGECONFIG[alsa] = "-alsa,-no-alsa,alsa-lib" | ||
132 | PACKAGECONFIG[pulseaudio] = "-pulseaudio,-no-pulseaudio,pulseaudio" | ||
133 | PACKAGECONFIG[nis] = "-nis,-no-nis" | ||
134 | PACKAGECONFIG[widgets] = "-widgets,-no-widgets" | ||
135 | |||
136 | QT_CONFIG_FLAGS += " \ | ||
137 | -shared \ | ||
138 | -silent \ | ||
139 | -no-pch \ | ||
140 | -no-rpath \ | ||
141 | -pkg-config \ | ||
142 | ${EXTRA_OECONF} \ | ||
143 | " | ||
144 | |||
145 | do_generate_qt_config_file_append() { | ||
146 | cat >> ${QT_CONF_PATH} <<EOF | ||
147 | |||
148 | [EffectivePaths] | ||
149 | Prefix=.. | ||
150 | EOF | ||
151 | } | ||
152 | |||
153 | # qtbase is exception, we need to use mkspecs from ${S} | ||
154 | QMAKE_MKSPEC_PATH = "${B}" | ||
155 | |||
156 | # another exception is that we need to run bin/qmake, because EffectivePaths are relative to qmake location | ||
157 | OE_QMAKE_QMAKE_ORIG = "${STAGING_BINDIR_NATIVE}/${QT_DIR_NAME}/qmake" | ||
158 | OE_QMAKE_QMAKE = "bin/qmake" | ||
159 | |||
160 | # qtbase is exception, configure script is using our get(X)QEvalMakeConf and setBootstrapEvalVariable functions to read it from shell | ||
161 | export OE_QMAKE_COMPILER | ||
162 | export OE_QMAKE_CC | ||
163 | export OE_QMAKE_CFLAGS | ||
164 | export OE_QMAKE_CXX | ||
165 | export OE_QMAKE_CXXFLAGS | ||
166 | export OE_QMAKE_LINK | ||
167 | export OE_QMAKE_LDFLAGS | ||
168 | export OE_QMAKE_AR | ||
169 | export OE_QMAKE_STRIP | ||
170 | |||
171 | do_configure() { | ||
172 | # we need symlink in path relative to source, because | ||
173 | # EffectivePaths:Prefix is relative to qmake location | ||
174 | if [ ! -e ${B}/bin/qmake ]; then | ||
175 | mkdir ${B}/bin | ||
176 | ln -sf ${OE_QMAKE_QMAKE_ORIG} ${B}/bin/qmake | ||
177 | fi | ||
29 | 178 | ||
30 | LIC_FILES_CHKSUM = "file://LICENSE.LGPLv21;md5=d87ae0d200af76dca730d911474cbe5b \ | 179 | ${S}/configure -v \ |
31 | file://LICENSE.LGPLv3;md5=ffcfac38a32c9ebdb8ff768fa1702478 \ | 180 | -opensource -confirm-license \ |
32 | file://LGPL_EXCEPTION.txt;md5=0145c4d1b6f96a661c2c139dfb268fb6 \ | 181 | -sysroot ${STAGING_DIR_TARGET} \ |
33 | file://LICENSE.FDL;md5=6d9f2a9af4c8b8c3c769f6cc1b6aaf7e" | 182 | -no-gcc-sysroot \ |
183 | -prefix ${OE_QMAKE_PATH_PREFIX} \ | ||
184 | -bindir ${OE_QMAKE_PATH_BINS} \ | ||
185 | -libdir ${OE_QMAKE_PATH_LIBS} \ | ||
186 | -datadir ${OE_QMAKE_PATH_DATA} \ | ||
187 | -sysconfdir ${OE_QMAKE_PATH_SETTINGS} \ | ||
188 | -docdir ${OE_QMAKE_PATH_DOCS} \ | ||
189 | -headerdir ${OE_QMAKE_PATH_HEADERS} \ | ||
190 | -archdatadir ${OE_QMAKE_PATH_ARCHDATA} \ | ||
191 | -libexecdir ${OE_QMAKE_PATH_LIBEXECS} \ | ||
192 | -plugindir ${OE_QMAKE_PATH_PLUGINS} \ | ||
193 | -importdir ${OE_QMAKE_PATH_IMPORTS} \ | ||
194 | -qmldir ${OE_QMAKE_PATH_QML} \ | ||
195 | -translationdir ${OE_QMAKE_PATH_TRANSLATIONS} \ | ||
196 | -testsdir ${OE_QMAKE_PATH_TESTS} \ | ||
197 | -examplesdir ${OE_QMAKE_PATH_EXAMPLES} \ | ||
198 | -hostbindir ${OE_QMAKE_PATH_HOST_BINS} \ | ||
199 | -hostdatadir ${OE_QMAKE_PATH_HOST_DATA} \ | ||
200 | -external-hostbindir ${OE_QMAKE_PATH_EXTERNAL_HOST_BINS} \ | ||
201 | -platform ${OE_QMAKESPEC} \ | ||
202 | -xplatform linux-oe-g++ \ | ||
203 | ${QT_CONFIG_FLAGS} | ||
204 | |||
205 | qmake5_base_do_configure | ||
206 | } | ||
207 | |||
208 | do_compile_append() { | ||
209 | # copy corelib/3rdparty/qmake sources required by qmake -> ${B} | ||
210 | cp -ra ${S}/src/corelib ${B}/src | ||
211 | cp -ra ${S}/src/3rdparty ${B}/src | ||
212 | cp -ra ${S}/qmake ${B} | ||
213 | cp ${S}/.qmake.conf ${B}/qmake | ||
214 | cd ${B}/qmake | ||
215 | # align qt5 tools source path to ${S} | ||
216 | sed -i 's:\.\./tools:${S}/tools:g' qmake.pro | ||
217 | ../${OE_QMAKE_QMAKE} | ||
218 | oe_runmake CC="${CC}" CXX="${CXX}" | ||
219 | } | ||
220 | |||
221 | do_install_append() { | ||
222 | install -m 0755 ${B}/qmake/bin/qmake ${D}/${bindir}/${QT_DIR_NAME} | ||
223 | |||
224 | ### Fix up the binaries to the right location | ||
225 | ### TODO: FIX | ||
226 | # install fonts manually if they are missing | ||
227 | if [ ! -d ${D}/${OE_QMAKE_PATH_LIBS}/fonts ]; then | ||
228 | cp -a ${S}/lib/fonts ${D}/${OE_QMAKE_PATH_LIBS} | ||
229 | chown -R root:root ${D}/${OE_QMAKE_PATH_LIBS}/fonts | ||
230 | fi | ||
231 | |||
232 | # Remove example.pro file as it is useless | ||
233 | rm -f ${D}${OE_QMAKE_PATH_EXAMPLES}/examples.pro | ||
234 | |||
235 | # Remove macx-ios-clang directory because /usr/lib/qt5/mkspecs/macx-ios-clang/rename_main.sh:#!/bin/bash | ||
236 | # triggers QA Issue: qtbase-mkspecs requires /bin/bash, but no providers in its RDEPENDS [file-rdeps] | ||
237 | rm -rf ${D}/${OE_QMAKE_PATH_QT_ARCHDATA}/mkspecs/macx-ios-clang | ||
238 | } | ||
239 | |||
240 | PACKAGES =. " \ | ||
241 | ${PN}-fonts \ | ||
242 | ${PN}-fonts-ttf-vera \ | ||
243 | ${PN}-fonts-ttf-dejavu \ | ||
244 | ${PN}-fonts-pfa \ | ||
245 | ${PN}-fonts-pfb \ | ||
246 | ${PN}-fonts-qpf \ | ||
247 | " | ||
248 | |||
249 | RRECOMMENDS_${PN}-fonts = " \ | ||
250 | ${PN}-fonts-ttf-vera \ | ||
251 | ${PN}-fonts-ttf-dejavu \ | ||
252 | ${PN}-fonts-pfa \ | ||
253 | ${PN}-fonts-pfb \ | ||
254 | ${PN}-fonts-qpf \ | ||
255 | " | ||
256 | |||
257 | ALLOW_EMPTY_${PN}-fonts = "1" | ||
258 | |||
259 | FILES_${PN}-fonts-ttf-vera = "${OE_QMAKE_PATH_LIBS}/fonts/Vera*.ttf" | ||
260 | FILES_${PN}-fonts-ttf-dejavu = "${OE_QMAKE_PATH_LIBS}/fonts/DejaVu*.ttf" | ||
261 | FILES_${PN}-fonts-pfa = "${OE_QMAKE_PATH_LIBS}/fonts/*.pfa" | ||
262 | FILES_${PN}-fonts-pfb = "${OE_QMAKE_PATH_LIBS}/fonts/*.pfb" | ||
263 | FILES_${PN}-fonts-qpf = "${OE_QMAKE_PATH_LIBS}/fonts/*.qpf*" | ||
264 | FILES_${PN}-fonts = "${OE_QMAKE_PATH_LIBS}/fonts/README \ | ||
265 | ${OE_QMAKE_PATH_LIBS}/fonts/fontdir" | ||
266 | |||
267 | sysroot_stage_dirs_append() { | ||
268 | # $to is 2nd parameter passed to sysroot_stage_dir, e.g. ${SYSROOT_DESTDIR} passed from sysroot_stage_all | ||
269 | rm -rf $to${OE_QMAKE_PATH_LIBS}/fonts | ||
270 | } | ||
271 | |||
272 | SRCREV = "f58e882b7594c59b6050d3c87562fcf836d10f60" | ||