xref: /OK3568_Linux_fs/yocto/meta-qt5/recipes-qt/qt5/qtbase_git.bb (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1require qt5.inc
2require qt5-git.inc
3require qt5-ptest.inc
4
5LICENSE = "GFDL-1.3 & BSD-3-Clause & ( GPL-3.0-only & The-Qt-Company-GPL-Exception-1.0 | The-Qt-Company-Commercial ) & ( GPL-2.0-or-later | LGPL-3.0-only | The-Qt-Company-Commercial )"
6LIC_FILES_CHKSUM = " \
7    file://LICENSE.LGPL3;md5=e6a600fd5e1d9cbde2d983680233ad02 \
8    file://LICENSE.GPL2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
9    file://LICENSE.GPL3;md5=d32239bcb673463ab874e80d47fae504 \
10    file://LICENSE.GPL3-EXCEPT;md5=763d8c535a234d9a3fb682c7ecb6c073 \
11    file://LICENSE.FDL;md5=6d9f2a9af4c8b8c3c769f6cc1b6aaf7e \
12    file://LICENSE.QT-LICENSE-AGREEMENT;md5=c8b6dd132d52c6e5a545df07a4e3e283 \
13"
14
15# common for qtbase-native, qtbase-nativesdk and qtbase
16# Patches from https://github.com/meta-qt5/qtbase/commits/b5.15-shared
17# 5.15.meta-qt5-shared.4
18SRC_URI += "\
19    file://0001-Add-linux-oe-g-platform.patch \
20    file://0002-cmake-Use-OE_QMAKE_PATH_EXTERNAL_HOST_BINS.patch \
21    file://0003-qlibraryinfo-allow-to-set-qt.conf-from-the-outside-u.patch \
22    file://0004-configure-bump-path-length-from-256-to-512-character.patch \
23    file://0005-Disable-all-unknown-features-instead-of-erroring-out.patch \
24    file://0006-Pretend-Qt5-wasn-t-found-if-OE_QMAKE_PATH_EXTERNAL_H.patch \
25    file://0007-Delete-qlonglong-and-qulonglong.patch \
26    file://0008-Replace-pthread_yield-with-sched_yield.patch \
27    file://0009-Add-OE-specific-specs-for-clang-compiler.patch \
28    file://0010-linux-clang-Invert-conditional-for-defining-QT_SOCKL.patch \
29    file://0011-tst_qlocale-Enable-QT_USE_FENV-only-on-glibc.patch \
30    file://0012-Disable-ltcg-for-host_build.patch \
31    file://0013-Qt5GuiConfigExtras.cmake.in-cope-with-variable-path-.patch \
32    file://0014-corelib-Include-sys-types.h-for-uint32_t.patch \
33    file://0015-Define-QMAKE_CXX.COMPILER_MACROS-for-clang-on-linux.patch \
34    file://0016-tst_qpainter-FE_-macros-are-not-defined-for-every-pl.patch \
35    file://0017-Define-__NR_futex-if-it-does-not-exist.patch \
36    file://0018-Revert-Fix-workaround-in-pthread-destructor.patch \
37    file://0019-tst_QPluginLoader-Simplify-creating-a-fake-pointer-i.patch \
38    file://0021-rcc-Just-dcument-file-name-without-full-path-to-redu.patch \
39    file://0022-testlib-don-t-track-the-build-or-source-directories.patch \
40    file://0023-zlib-Do-not-undefine-_FILE_OFFSET_BITS.patch \
41"
42
43# Disable LTO for now, QT5 patches are being worked upstream, perhaps revisit with
44# next major upgrade of QT
45LTO = ""
46
47# for syncqt
48RDEPENDS:${PN}-tools += "perl"
49
50inherit pkgconfig
51
52# separate some parts of PACKAGECONFIG which are often changed
53PACKAGECONFIG_GL ?= "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'gl', 'no-opengl', d)}"
54PACKAGECONFIG_FB ?= "${@bb.utils.contains('DISTRO_FEATURES', 'directfb', 'directfb', '', d)}"
55PACKAGECONFIG_X11 ?= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xcb glib xkbcommon', '', d)}"
56PACKAGECONFIG_KDE ?= "${@bb.utils.contains('DISTRO_FEATURES', 'kde', 'sm cups fontconfig kms gbm libinput sql-sqlite openssl', '', d)}"
57PACKAGECONFIG_FONTS ?= ""
58PACKAGECONFIG_SYSTEM ?= "jpeg libpng zlib"
59PACKAGECONFIG_DISTRO ?= ""
60# Either release or debug, can be overridden in bbappends
61PACKAGECONFIG_RELEASE ?= "release"
62# This is in qt5.inc, because qtwebkit-examples are using it to enable ca-certificates dependency
63# PACKAGECONFIG_OPENSSL ?= "openssl"
64PACKAGECONFIG_DEFAULT ?= "accessibility dbus udev evdev widgets tools libs freetype pcre \
65    ${@bb.utils.contains('SELECTED_OPTIMIZATION', '-Os', 'optimize-size ltcg', '', d)} \
66    ${@bb.utils.contains('DISTRO_FEATURES', 'ptest', 'tests', '', d)} \
67    ${@bb.utils.contains('DISTRO_FEATURES', 'qt5-static', 'static', '', d)} \
68    ${@bb.utils.filter('DISTRO_FEATURES', 'vulkan', d)} \
69"
70
71PACKAGECONFIG ?= " \
72    ${PACKAGECONFIG_RELEASE} \
73    ${PACKAGECONFIG_DEFAULT} \
74    ${PACKAGECONFIG_OPENSSL} \
75    ${PACKAGECONFIG_GL} \
76    ${PACKAGECONFIG_FB} \
77    ${PACKAGECONFIG_X11} \
78    ${PACKAGECONFIG_KDE} \
79    ${PACKAGECONFIG_FONTS} \
80    ${PACKAGECONFIG_SYSTEM} \
81    ${PACKAGECONFIG_DISTRO} \
82"
83# Choose whether to link to OpenSSL library at linking time or run time
84# Leave the variable empty to let the buildsystem decide, or specify -linked or -runtime
85OPENSSL_LINKING_MODE ??= ""
86
87PACKAGECONFIG[static] = "-static,-shared"
88PACKAGECONFIG[release] = "-release,-debug"
89PACKAGECONFIG[debug] = ""
90PACKAGECONFIG[developer] = "-developer-build"
91PACKAGECONFIG[optimize-size] = "-optimize-size"
92PACKAGECONFIG[ltcg] = "-ltcg"
93PACKAGECONFIG[sm] = "-sm,-no-sm"
94PACKAGECONFIG[tests] = "-make tests,-nomake tests"
95PACKAGECONFIG[examples] = "-make examples -compile-examples,-nomake examples"
96PACKAGECONFIG[tools] = "-make tools,-nomake tools"
97# only for completeness, configure will add libs even if you try to explicitly remove it
98PACKAGECONFIG[libs] = "-make libs"
99# accessibility is required to compile qtquickcontrols
100PACKAGECONFIG[accessibility] = "-accessibility,-no-accessibility"
101PACKAGECONFIG[glib] = "-glib,-no-glib,glib-2.0"
102# use either system freetype or bundled freetype, if you disable freetype completely
103# fontdatabases/basic/qbasicfontdatabase.cpp will fail to build and system freetype
104# works only together with fontconfig
105PACKAGECONFIG[freetype] = "-system-freetype,-qt-freetype,freetype"
106PACKAGECONFIG[harfbuzz] = "-system-harfbuzz,-qt-harfbuzz,harfbuzz"
107PACKAGECONFIG[jpeg] = "-system-libjpeg,-no-libjpeg,jpeg"
108PACKAGECONFIG[libpng] = "-system-libpng,-no-libpng,libpng"
109PACKAGECONFIG[gif] = "-gif,-no-gif"
110PACKAGECONFIG[ico] = "-ico,-no-ico"
111PACKAGECONFIG[zlib] = "-system-zlib,-qt-zlib,zlib"
112PACKAGECONFIG[pcre] = "-system-pcre,-qt-pcre,pcre2"
113PACKAGECONFIG[eglfs] = "-eglfs,-no-eglfs,drm"
114PACKAGECONFIG[gl] = "-opengl desktop,,virtual/libgl"
115PACKAGECONFIG[gles2] = "-opengl es2,,virtual/libgles2 virtual/egl"
116PACKAGECONFIG[no-opengl] = "-no-opengl"
117PACKAGECONFIG[tslib] = "-tslib,-no-tslib,tslib"
118PACKAGECONFIG[cups] = "-cups,-no-cups,cups"
119PACKAGECONFIG[dbus] = "-dbus,-no-dbus,dbus"
120PACKAGECONFIG[xcb] = "-xcb -xcb-xlib -no-bundled-xcb-xinput -DUSE_X11=ON,-no-xcb,libxcb xcb-util-wm xcb-util-image xcb-util-keysyms xcb-util-renderutil libxext"
121PACKAGECONFIG[sql-ibase] = "-sql-ibase,-no-sql-ibase"
122PACKAGECONFIG[sql-mysql] = "-sql-mysql -mysql_config ${STAGING_BINDIR_CROSS}/mysql_config,-no-sql-mysql,mysql5"
123PACKAGECONFIG[sql-psql] = "-sql-psql,-no-sql-psql,postgresql"
124PACKAGECONFIG[sql-odbc] = "-sql-odbc,-no-sql-odbc"
125PACKAGECONFIG[sql-oci] = "-sql-oci,-no-sql-oci"
126PACKAGECONFIG[sql-tds] = "-sql-tds,-no-sql-tds"
127PACKAGECONFIG[sql-db2] = "-sql-db2,-no-sql-db2"
128PACKAGECONFIG[sql-sqlite2] = "-sql-sqlite2,-no-sql-sqlite2,sqlite"
129PACKAGECONFIG[sql-sqlite] = "-sql-sqlite -system-sqlite,-no-sql-sqlite,sqlite3"
130PACKAGECONFIG[iconv] = "-iconv,-no-iconv,virtual/libiconv"
131PACKAGECONFIG[xkbcommon] = "-xkbcommon,-no-xkbcommon,libxkbcommon,xkeyboard-config"
132PACKAGECONFIG[evdev] = "-evdev,-no-evdev"
133PACKAGECONFIG[mtdev] = "-mtdev,-no-mtdev,mtdev"
134PACKAGECONFIG[lttng] = "-trace lttng,-trace no,lttng-ust"
135# depends on glib
136PACKAGECONFIG[fontconfig] = "-fontconfig,-no-fontconfig,fontconfig"
137PACKAGECONFIG[gtk] = "-gtk,-no-gtk,gtk+3"
138PACKAGECONFIG[directfb] = "-directfb,-no-directfb,directfb"
139PACKAGECONFIG[linuxfb] = "-linuxfb,-no-linuxfb"
140PACKAGECONFIG[kms] = "-kms,-no-kms,drm virtual/egl"
141PACKAGECONFIG[gbm] = "-gbm,-no-gbm,virtual/libgbm"
142PACKAGECONFIG[icu] = "-icu,-no-icu,icu"
143PACKAGECONFIG[udev] = "-libudev,-no-libudev,udev"
144PACKAGECONFIG[openssl] = "-openssl${OPENSSL_LINKING_MODE},-no-openssl,openssl,libssl"
145PACKAGECONFIG[widgets] = "-widgets,-no-widgets"
146PACKAGECONFIG[libproxy] = "-libproxy,-no-libproxy,libproxy"
147PACKAGECONFIG[libinput] = "-libinput,-no-libinput,libinput"
148PACKAGECONFIG[journald] = "-journald,-no-journald,systemd"
149# needs kernel 3.17+
150PACKAGECONFIG[getentropy] = "-feature-getentropy,-no-feature-getentropy,"
151PACKAGECONFIG[vulkan] = "-vulkan,-no-vulkan,vulkan-headers"
152
153QT_CONFIG_FLAGS_GOLD = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', '-use-gold-linker', '-no-use-gold-linker', d)}"
154# workaround for gold bug:
155# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=842304
156# https://sourceware.org/bugzilla/show_bug.cgi?id=21712
157# it's triggered only in combination of gold and security_flags.inc,
158# because security_flags.inc now enable pie by default.
159# Adding -no-pie or changing -fuse-ld=gold to -fuse-ld=bfd
160# works around this issue, will use -fuse-ld=bfd as it's considered
161# binutils bug.
162# OE @ ~/build/oe-core/tmp-glibc/work/i586-oe-linux/qtbase/5.9.0+gitAUTOINC+f6b36eaafe-r0/build/tests/auto/corelib/kernel/qmetatype $ i586-oe-linux-g++  -m32 -march=i586 --sysroot=/OE/build/oe-core/tmp-glibc/work/i586-oe-linux/qtbase/5.9.0+gitAUTOINC+f6b36eaafe-r0/recipe-sysroot -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed --sysroot=/OE/build/oe-core/tmp-glibc/work/i586-oe-linux/qtbase/5.9.0+gitAUTOINC+f6b36eaafe-r0/recipe-sysroot -Wl,-O1 -fuse-ld=gold -Wl,--enable-new-dtags -o tst_qmetatype .obj/tst_qmetatype.o   -L/OE/build/oe-core/tmp-glibc/work/i586-oe-linux/qtbase/5.9.0+gitAUTOINC+f6b36eaafe-r0/build/lib -lQt5Test -lQt5Core -lpthread
163# .obj/tst_qmetatype.o(.qtversion+0x0): error: unexpected reloc 3 against global symbol qt_version_tag without base register in object file when generating a position-independent output file
164# collect2: error: ld returned 1 exit status
165#
166# with -no-pie:
167# OE @ ~/build/oe-core/tmp-glibc/work/i586-oe-linux/qtbase/5.9.0+gitAUTOINC+f6b36eaafe-r0/build/tests/auto/corelib/kernel/qmetatype $ i586-oe-linux-g++ -no-pie -m32 -march=i586 --sysroot=/OE/build/oe-core/tmp-glibc/work/i586-oe-linux/qtbase/5.9.0+gitAUTOINC+f6b36eaafe-r0/recipe-sysroot -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed --sysroot=/OE/build/oe-core/tmp-glibc/work/i586-oe-linux/qtbase/5.9.0+gitAUTOINC+f6b36eaafe-r0/recipe-sysroot -Wl,-O1 -fuse-ld=gold -Wl,--enable-new-dtags -o tst_qmetatype .obj/tst_qmetatype.o   -L/OE/build/oe-core/tmp-glibc/work/i586-oe-linux/qtbase/5.9.0+gitAUTOINC+f6b36eaafe-r0/build/lib -lQt5Test -lQt5Core -lpthread
168#
169# with -fuse-ld=gold replaced with -fuse-ld=bfd:
170# OE @ ~/build/oe-core/tmp-glibc/work/i586-oe-linux/qtbase/5.9.0+gitAUTOINC+f6b36eaafe-r0/build/tests/auto/corelib/kernel/qmetatype $ i586-oe-linux-g++  -m32 -march=i586 --sysroot=/OE/build/oe-core/tmp-glibc/work/i586-oe-linux/qtbase/5.9.0+gitAUTOINC+f6b36eaafe-r0/recipe-sysroot -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed --sysroot=/OE/build/oe-core/tmp-glibc/work/i586-oe-linux/qtbase/5.9.0+gitAUTOINC+f6b36eaafe-r0/recipe-sysroot -Wl,-O1 -fuse-ld=bfd -Wl,--enable-new-dtags -o tst_qmetatype .obj/tst_qmetatype.o   -L/OE/build/oe-core/tmp-glibc/work/i586-oe-linux/qtbase/5.9.0+gitAUTOINC+f6b36eaafe-r0/build/lib -lQt5Test -lQt5Core -lpthread
171#
172# http://errors.yoctoproject.org/Errors/Details/150329/
173# QT_CONFIG_FLAGS_GOLD:x86 = "-no-use-gold-linker"
174# LDFLAGS:append:x86 = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', ' -fuse-ld=bfd ', '', d)}"
175
176# since the upgrade to 5.12.2 this got worse, with gold enabled configure will no longer pass the test for xlib
177# because with full paths to libraries since qtbase commit 521a85395 it fails to link with
178# /OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/qtbase/5.12.3+gitAUTOINC+b527725766-r0/recipe-sysroot/usr/lib/libm.so
179# as reported in:
180# https://github.com/meta-qt5/meta-qt5/pull/181#issuecomment-484425112
181# resulting in do_configure failure:
182# http://errors.yoctoproject.org/Errors/Details/237856/
183QT_CONFIG_FLAGS_GOLD = "-no-use-gold-linker"
184LDFLAGS:append = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', ' -fuse-ld=bfd ', '', d)}"
185
186LDFLAGS:append:riscv64 = " -pthread"
187
188QT_CONFIG_FLAGS += " \
189    ${QT_CONFIG_FLAGS_GOLD} \
190    -silent \
191    -no-pch \
192    -no-rpath \
193    -pkg-config \
194    ${PACKAGECONFIG_CONFARGS} \
195"
196
197export CC_host:toolchain-clang = "clang"
198export CXX_host:toolchain-clang = "clang++"
199export LD_host:toolchain-clang = "clang++"
200export CC_host ?= "gcc"
201export CXX_host ?= "g++"
202export LD_host ?= "g++"
203
204# for qtbase configuration we need default settings
205# since we cannot set empty set filename to a not existent file
206deltask generate_qt_config_file
207
208XPLATFORM:toolchain-clang = "linux-oe-clang"
209XPLATFORM ?= "linux-oe-g++"
210
211# Causes qdrawhelper.s: Error: unaligned opcodes detected in executable segment
212# when building qtbase/5.6.3+gitAUTOINC+e6f8b072d2-r0/git/src/gui/painting/qdrawhelper.cpp
213ARM_INSTRUCTION_SET:armv4 = "arm"
214ARM_INSTRUCTION_SET:armv5 = "arm"
215
216do_configure() {
217    # Regenerate header files when they are included in source tarball
218    # Otherwise cmake files don't set PRIVATE_HEADERS correctly
219    rm -rf ${S}/include
220    mkdir -p ${S}/.git || true
221
222    # Avoid qmake error "Cannot read [...]/usr/lib/qt5/mkspecs/oe-device-extra.pri: No such file or directory" during configuration
223    touch ${S}/mkspecs/oe-device-extra.pri
224
225    ${S}/configure -v \
226        -${QT_EDITION} -confirm-license \
227        -sysroot ${STAGING_DIR_TARGET} \
228        -prefix ${OE_QMAKE_PATH_PREFIX} \
229        -bindir ${OE_QMAKE_PATH_BINS} \
230        -libdir ${OE_QMAKE_PATH_LIBS} \
231        -datadir ${OE_QMAKE_PATH_DATA} \
232        -sysconfdir ${OE_QMAKE_PATH_SETTINGS} \
233        -docdir ${OE_QMAKE_PATH_DOCS} \
234        -headerdir ${OE_QMAKE_PATH_HEADERS} \
235        -archdatadir ${OE_QMAKE_PATH_ARCHDATA} \
236        -libexecdir ${OE_QMAKE_PATH_LIBEXECS} \
237        -plugindir ${OE_QMAKE_PATH_PLUGINS} \
238        -qmldir ${OE_QMAKE_PATH_QML} \
239        -translationdir ${OE_QMAKE_PATH_TRANSLATIONS} \
240        -testsdir ${OE_QMAKE_PATH_TESTS} \
241        -examplesdir ${OE_QMAKE_PATH_EXAMPLES} \
242        -hostprefix ${OE_QMAKE_PATH_HOST_PREFIX} \
243        -hostlibdir ${OE_QMAKE_PATH_HOST_LIBS} \
244        -hostbindir ${OE_QMAKE_PATH_HOST_BINS} \
245        -external-hostbindir ${OE_QMAKE_PATH_EXTERNAL_HOST_BINS} \
246        -hostdatadir ${OE_QMAKE_PATH_HOST_DATA} \
247        -platform ${OE_QMAKE_PLATFORM_NATIVE} \
248        -xplatform ${XPLATFORM} \
249        ${QT_CONFIG_FLAGS}
250}
251
252do_install:append() {
253    # Avoid qmake error "Cannot read [...]/usr/lib/qt5/mkspecs/oe-device-extra.pri: No such file or directory"
254    touch ${D}/${OE_QMAKE_PATH_QT_ARCHDATA}/mkspecs/oe-device-extra.pri
255
256    # Update the mkspecs to include the default OE toolchain config for the target
257    conf=${D}/${OE_QMAKE_PATH_QT_ARCHDATA}/mkspecs/${XPLATFORM}/qmake.conf
258
259    # qmake already knows the sysroot, see above $$[QT_SYSROOT], so remove the hardcoded sysroot
260    OE_QMAKE_CC_NO_SYSROOT=$(echo ${OE_QMAKE_CC} | sed -e 's!--sysroot=[^ ]*!!g')
261    OE_QMAKE_CXX_NO_SYSROOT=$(echo ${OE_QMAKE_CXX} | sed -e 's!--sysroot=[^ ]*!!g')
262    OE_QMAKE_LINK_NO_SYSROOT=$(echo ${OE_QMAKE_LINK} | sed -e 's!--sysroot=[^ ]*!!g')
263
264    echo "" >> $conf
265    echo "# default compiler options which can be overwritten from the environment" >> $conf
266    echo "count(QMAKE_AR, 1): QMAKE_AR = ${OE_QMAKE_AR} cqs" >> $conf
267    echo "isEmpty(QMAKE_CC): QMAKE_CC = $OE_QMAKE_CC_NO_SYSROOT" >> $conf
268    echo "isEmpty(QMAKE_CXX): QMAKE_CXX = $OE_QMAKE_CXX_NO_SYSROOT" >> $conf
269    # OE_QMAKE_CFLAGS and OE_QMAKE_CXXFLAGS contain path of the build host, which is not useful for the target.
270    echo "isEmpty(QMAKE_CFLAGS): QMAKE_CFLAGS = ${OE_QMAKE_CFLAGS}" | sed -e 's/-fdebug-prefix-map=[^ ]*//g' | sed -e 's/-fmacro-prefix-map=[^ ]*//g' >> $conf
271    echo "isEmpty(QMAKE_CXXFLAGS): QMAKE_CXXFLAGS = ${OE_QMAKE_CXXFLAGS}" | sed -e 's/-fdebug-prefix-map=[^ ]*//g' | sed -e 's/-fmacro-prefix-map=[^ ]*//g' >> $conf
272    echo "isEmpty(QMAKE_LINK): QMAKE_LINK = $OE_QMAKE_LINK_NO_SYSROOT" >> $conf
273    echo "isEmpty(QMAKE_LINK_SHLIB): QMAKE_LINK_SHLIB = $OE_QMAKE_LINK_NO_SYSROOT" >> $conf
274    echo "isEmpty(QMAKE_LINK_C): QMAKE_LINK_C = $OE_QMAKE_LINK_NO_SYSROOT" >> $conf
275    echo "isEmpty(QMAKE_LINK_C_SHLIB): QMAKE_LINK_C_SHLIB = $OE_QMAKE_LINK_NO_SYSROOT" >> $conf
276    echo "isEmpty(QMAKE_LFLAGS): QMAKE_LFLAGS = ${OE_QMAKE_LDFLAGS}" >> $conf
277    echo "isEmpty(QMAKE_OBJCOPY): QMAKE_OBJCOPY = ${TARGET_PREFIX}objcopy" >> $conf
278    echo "isEmpty(QMAKE_STRIP): QMAKE_STRIP = ${TARGET_PREFIX}strip" >> $conf
279    echo "isEmpty(CC_host): CC_host = ${CC_host}" >> $conf
280    echo "isEmpty(CXX_host): CXX_host = ${CXX_host}" >> $conf
281    echo "isEmpty(LD_host): LD_host = ${LD_host}" >> $conf
282
283    generate_target_qt_config_file ${D}${OE_QMAKE_PATH_BINS}/qt.conf
284
285    # Fix up absolute paths in scripts and use python3 instead of python
286    sed -i -e '1s,#!/usr/bin/python$,#! ${USRBINPATH}/env python3,' \
287        ${D}${OE_QMAKE_PATH_QT_ARCHDATA}/mkspecs/features/uikit/devices.py
288}
289
290# mkspecs have mac specific scripts that depend on perl and bash
291INSANE_SKIP:${PN}-mkspecs += "file-rdeps"
292
293RRECOMMENDS:${PN}-plugins += "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'libx11-locale', '', d)}"
294
295TARGET_MKSPEC ?= "linux-g++"
296
297# use clean mkspecs on target
298pkg_postinst:${PN}-tools () {
299sed -i \
300    -e 's:HostSpec =.*:HostSpec = ${TARGET_MKSPEC}:g' \
301    -e 's:TargetSpec =.*:TargetSpec = ${TARGET_MKSPEC}:g' \
302    $D${OE_QMAKE_PATH_BINS}/qt.conf
303}
304
305pkg_postinst:${PN}-mkspecs () {
306sed -i 's: cross_compile : :g' $D${OE_QMAKE_PATH_ARCHDATA}/mkspecs/qconfig.pri
307sed -i \
308    -e 's: cross_compile : :g' \
309    -e 's:HOST_QT_TOOLS =.*::g' \
310    $D${OE_QMAKE_PATH_ARCHDATA}/mkspecs/qmodule.pri
311}
312
313SRCREV = "358aebba7280d6d2b59b1f740747a4a3d1b7a54a"
314