xref: /OK3568_Linux_fs/yocto/meta-qt5/recipes-qt/qt5/qtwebkit_git.bb (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyunrequire qt5.inc
2*4882a593Smuzhiyunrequire qt5-git.inc
3*4882a593Smuzhiyun
4*4882a593Smuzhiyuninherit pkgconfig
5*4882a593Smuzhiyun
6*4882a593SmuzhiyunLICENSE = "BSD-3-Clause & LGPL-2.0-or-later | GPL-2.0-only"
7*4882a593SmuzhiyunLIC_FILES_CHKSUM = " \
8*4882a593Smuzhiyun    file://LICENSE.LGPLv21;md5=58a180e1cf84c756c29f782b3a485c29 \
9*4882a593Smuzhiyun    file://Source/JavaScriptCore/parser/Parser.h;endline=21;md5=bd69f72183a7af673863f057576e21ee \
10*4882a593Smuzhiyun"
11*4882a593Smuzhiyun
12*4882a593SmuzhiyunDEPENDS += "qtbase qtdeclarative icu ruby-native sqlite3 glib-2.0 libxslt gperf-native bison-native flex-native"
13*4882a593Smuzhiyun
14*4882a593Smuzhiyun# Patches from https://github.com/meta-qt5/qtwebkit/commits/b5.13
15*4882a593Smuzhiyun# 5.13.meta-qt5.1
16*4882a593SmuzhiyunSRC_URI += "\
17*4882a593Smuzhiyun    file://0001-Do-not-skip-build-for-cross-compile.patch \
18*4882a593Smuzhiyun    file://0002-Fix-build-with-non-glibc-libc-on-musl.patch \
19*4882a593Smuzhiyun    file://0003-Fix-build-bug-for-armv32-BE.patch \
20*4882a593Smuzhiyun    file://0004-PlatformQt.cmake-Do-not-generate-hardcoded-include-p.patch \
21*4882a593Smuzhiyun    file://0005-Fix-build-with-bison37.patch \
22*4882a593Smuzhiyun    file://0006-Disable-code-related-to-HTTP-2-when-Qt-is-configured.patch \
23*4882a593Smuzhiyun    file://0007-Fix-compilation-with-Python-3.9-avoid-passing-encodi.patch \
24*4882a593Smuzhiyun    file://0008-Fix-build-with-icu-68.patch \
25*4882a593Smuzhiyun    file://0009-Riscv-Add-support-for-riscv.patch \
26*4882a593Smuzhiyun    file://mips-atomic.patch \
27*4882a593Smuzhiyun    file://0001-Offlineasm-warnings-with-newer-Ruby-versions-https-b.patch \
28*4882a593Smuzhiyun"
29*4882a593Smuzhiyun
30*4882a593SmuzhiyunSRC_URI:append:riscv32 = " file://0010-webdriver-libatomic.patch "
31*4882a593SmuzhiyunSRC_URI:append:riscv64 = " file://0010-webdriver-libatomic.patch "
32*4882a593Smuzhiyun
33*4882a593Smuzhiyuninherit cmake_qt5 perlnative
34*4882a593Smuzhiyun
35*4882a593Smuzhiyuninherit python3native
36*4882a593Smuzhiyun
37*4882a593Smuzhiyun# qemuarm build fails with:
38*4882a593Smuzhiyun# | {standard input}: Assembler messages:
39*4882a593Smuzhiyun# | {standard input}:106: Error: invalid immediate: 983040 is out of range
40*4882a593Smuzhiyun# | {standard input}:106: Error: value of 983040 too large for field of 2 bytes at 146
41*4882a593SmuzhiyunARM_INSTRUCTION_SET:armv4 = "arm"
42*4882a593SmuzhiyunARM_INSTRUCTION_SET:armv5 = "arm"
43*4882a593Smuzhiyun
44*4882a593Smuzhiyun# https://bugzilla.yoctoproject.org/show_bug.cgi?id=9474
45*4882a593Smuzhiyun# https://bugs.webkit.org/show_bug.cgi?id=159880
46*4882a593Smuzhiyun# JSC JIT can build on ARMv7 with -marm, but doesn't work on runtime.
47*4882a593Smuzhiyun# Upstream only tests regularly the JSC JIT on ARMv7 with Thumb2 (-mthumb).
48*4882a593SmuzhiyunARM_INSTRUCTION_SET:armv7a = "thumb"
49*4882a593SmuzhiyunARM_INSTRUCTION_SET:armv7r = "thumb"
50*4882a593SmuzhiyunARM_INSTRUCTION_SET:armv7ve = "thumb"
51*4882a593Smuzhiyun
52*4882a593Smuzhiyun# http://errors.yoctoproject.org/Errors/Details/179245/
53*4882a593Smuzhiyun# just use -fpermissive in this case like fedora did:
54*4882a593Smuzhiyun# https://bugzilla.redhat.com/show_bug.cgi?id=1582954
55*4882a593SmuzhiyunCXXFLAGS += "-fpermissive"
56*4882a593SmuzhiyunCXXFLAGS += "${@bb.utils.contains('DISTRO_FEATURES', 'x11', '', '-DEGL_NO_X11=1', d)}"
57*4882a593Smuzhiyun
58*4882a593SmuzhiyunEXTRA_OECMAKE += " \
59*4882a593Smuzhiyun    -DPORT=Qt \
60*4882a593Smuzhiyun    -DCROSS_COMPILE=ON \
61*4882a593Smuzhiyun    -DCMAKE_BUILD_TYPE=release \
62*4882a593Smuzhiyun    -DECM_MKSPECS_INSTALL_DIR=${libdir}${QT_DIR_NAME}/mkspecs/modules \
63*4882a593Smuzhiyun    -DQML_INSTALL_DIR=${OE_QMAKE_PATH_QML} \
64*4882a593Smuzhiyun    -DPYTHON_EXECUTABLE=`which python3` \
65*4882a593Smuzhiyun"
66*4882a593Smuzhiyun
67*4882a593SmuzhiyunEXTRA_OECMAKE:append:toolchain-clang = " -DCMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES:PATH='${STAGING_INCDIR}'"
68*4882a593Smuzhiyun
69*4882a593Smuzhiyun# JIT not supported on MIPS/PPC/RISCV
70*4882a593SmuzhiyunEXTRA_OECMAKE:append:mipsarch = " -DENABLE_JIT=OFF -DUSE_SYSTEM_MALLOC=ON -DENABLE_C_LOOP=ON "
71*4882a593SmuzhiyunEXTRA_OECMAKE:append:powerpc = " -DENABLE_JIT=OFF -DUSE_SYSTEM_MALLOC=ON -DENABLE_C_LOOP=ON "
72*4882a593SmuzhiyunEXTRA_OECMAKE:append:powerpc64le = " -DENABLE_JIT=OFF -DUSE_SYSTEM_MALLOC=ON -DENABLE_C_LOOP=ON "
73*4882a593SmuzhiyunEXTRA_OECMAKE:append:riscv64 = " -DENABLE_JIT=OFF -DUSE_SYSTEM_MALLOC=ON -DENABLE_C_LOOP=ON "
74*4882a593Smuzhiyun
75*4882a593Smuzhiyun# Disable gold on mips64/clang
76*4882a593Smuzhiyun# mips64-yoe-linux-musl-ld.gold: internal error in get_got_page_offset, at ../../gold/mips.cc:6260
77*4882a593Smuzhiyun# mips-yoe-linux-musl-ld.gold: error: Can't find matching LO16 reloc
78*4882a593SmuzhiyunEXTRA_OECMAKE:append:mipsarch = " -DUSE_LD_GOLD=OFF "
79*4882a593SmuzhiyunEXTRA_OECMAKE:append:powerpc = " -DUSE_LD_GOLD=OFF "
80*4882a593SmuzhiyunEXTRA_OECMAKE:append:riscv64 = " -DUSE_LD_GOLD=OFF "
81*4882a593Smuzhiyun
82*4882a593SmuzhiyunPACKAGECONFIG ??= "qtlocation qtmultimedia qtsensors qtwebchannel \
83*4882a593Smuzhiyun    ${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)} \
84*4882a593Smuzhiyun    fontconfig \
85*4882a593Smuzhiyun"
86*4882a593Smuzhiyun
87*4882a593Smuzhiyun# gstreamer conflicts with qtmultimedia!
88*4882a593SmuzhiyunPACKAGECONFIG[gstreamer] = "-DUSE_GSTREAMER=ON,-DUSE_GSTREAMER=OFF,gstreamer1.0 gstreamer1.0-plugins-base"
89*4882a593SmuzhiyunPACKAGECONFIG[qtlocation] = "-DENABLE_GEOLOCATION=ON,-DENABLE_GEOLOCATION=OFF,qtlocation"
90*4882a593SmuzhiyunPACKAGECONFIG[qtmultimedia] = "-DUSE_QT_MULTIMEDIA=ON,-DUSE_QT_MULTIMEDIA=OFF,qtmultimedia"
91*4882a593SmuzhiyunPACKAGECONFIG[qtsensors] = "-DENABLE_DEVICE_ORIENTATION=ON,-DENABLE_DEVICE_ORIENTATION=OFF,qtsensors"
92*4882a593SmuzhiyunPACKAGECONFIG[qtwebchannel] = "-DENABLE_QT_WEBCHANNEL=ON,-DENABLE_QT_WEBCHANNEL=OFF,qtwebchannel"
93*4882a593SmuzhiyunPACKAGECONFIG[libwebp] = ",,libwebp"
94*4882a593SmuzhiyunPACKAGECONFIG[x11] = "-DENABLE_X11_TARGET=ON,-DENABLE_X11_TARGET=OFF,libxcomposite libxrender"
95*4882a593SmuzhiyunPACKAGECONFIG[fontconfig] = "-DENABLE_TEST_SUPPORT=ON,-DENABLE_TEST_SUPPORT=OFF,fontconfig"
96*4882a593Smuzhiyun# hyphen is only in meta-office currently!
97*4882a593SmuzhiyunPACKAGECONFIG[hyphen] = "-DUSE_LIBHYPHEN=ON,-DUSE_LIBHYPHEN=OFF,hyphen"
98*4882a593SmuzhiyunPACKAGECONFIG[tools] = "-DENABLE_TOOLS=ON,-DENABLE_TOOLS=OFF,"
99*4882a593Smuzhiyun
100*4882a593Smuzhiyun# remove default ${PN}-examples* set in qt5.inc, because they conflicts with ${PN} from separate webkit-examples recipe
101*4882a593SmuzhiyunPACKAGES:remove = "${PN}-examples"
102*4882a593Smuzhiyun
103*4882a593SmuzhiyunQT_MODULE_BRANCH = "5.212"
104*4882a593Smuzhiyun
105*4882a593SmuzhiyunSRCREV = "10cd6a106e1c461c774ca166a67b8c835c755ef7"
106