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