diff options
Diffstat (limited to 'meta-oe/recipes-support/webkitgtk/webkitgtk3_2.48.1.bb')
-rw-r--r-- | meta-oe/recipes-support/webkitgtk/webkitgtk3_2.48.1.bb | 193 |
1 files changed, 193 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/webkitgtk/webkitgtk3_2.48.1.bb b/meta-oe/recipes-support/webkitgtk/webkitgtk3_2.48.1.bb new file mode 100644 index 0000000000..d11d4808fd --- /dev/null +++ b/meta-oe/recipes-support/webkitgtk/webkitgtk3_2.48.1.bb | |||
@@ -0,0 +1,193 @@ | |||
1 | SUMMARY = "WebKit web rendering engine for the GTK+ platform" | ||
2 | DESCRIPTION = "\ | ||
3 | This recipe builds with Gtk3 (instead of Gtk4) which results in API version 4.1 \ | ||
4 | (having javascriptcoregtk-4.1.pc instead of 6.0). \ | ||
5 | " | ||
6 | HOMEPAGE = "https://www.webkitgtk.org/" | ||
7 | BUGTRACKER = "https://bugs.webkit.org/" | ||
8 | |||
9 | LICENSE = "BSD-2-Clause & LGPL-2.0-or-later" | ||
10 | LIC_FILES_CHKSUM = "file://Source/JavaScriptCore/COPYING.LIB;md5=d0c6d6397a5d84286dda758da57bd691 \ | ||
11 | file://Source/WebCore/LICENSE-APPLE;md5=4646f90082c40bcf298c285f8bab0b12 \ | ||
12 | file://Source/WebCore/LICENSE-LGPL-2;md5=36357ffde2b64ae177b2494445b79d21 \ | ||
13 | file://Source/WebCore/LICENSE-LGPL-2.1;md5=a778a33ef338abbaf8b8a7c36b6eec80 \ | ||
14 | " | ||
15 | |||
16 | SRC_URI = "https://www.webkitgtk.org/releases/webkitgtk-${PV}.tar.xz \ | ||
17 | file://0001-FindGObjectIntrospection.cmake-prefix-variables-obta.patch \ | ||
18 | file://reproducibility.patch \ | ||
19 | file://no-musttail-arm.patch \ | ||
20 | file://sys_futex.patch \ | ||
21 | file://0001-Fix-build-errors-on-RISCV-https-bugs.webkit.org-show.patch \ | ||
22 | file://fix-typo-denormaldisabler.patch \ | ||
23 | file://fix-ftbfs-riscv64.patch \ | ||
24 | " | ||
25 | SRC_URI[sha256sum] = "98efdf21c4cdca0fe0b73ab5a8cb52093b5aa52d9b1b016a93f71dbfa1eb258f" | ||
26 | |||
27 | inherit cmake pkgconfig gobject-introspection perlnative features_check upstream-version-is-even gi-docgen | ||
28 | |||
29 | S = "${UNPACKDIR}/webkitgtk-${PV}" | ||
30 | |||
31 | ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}" | ||
32 | REQUIRED_DISTRO_FEATURES = "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'opengl', '', d)}" | ||
33 | |||
34 | CVE_PRODUCT = "webkitgtk webkitgtk\+" | ||
35 | |||
36 | DEPENDS += " \ | ||
37 | ruby-native \ | ||
38 | gperf-native \ | ||
39 | unifdef-native \ | ||
40 | cairo \ | ||
41 | harfbuzz \ | ||
42 | jpeg \ | ||
43 | atk \ | ||
44 | libwebp \ | ||
45 | gtk+3 \ | ||
46 | libxslt \ | ||
47 | libtasn1 \ | ||
48 | libnotify \ | ||
49 | gstreamer1.0 \ | ||
50 | gstreamer1.0-plugins-base \ | ||
51 | glib-2.0-native \ | ||
52 | gettext-native \ | ||
53 | " | ||
54 | |||
55 | # using soup2 builds (JavaScript) API version 4.0 | ||
56 | # using soup3 builds (JavaScript) API version 4.1 | ||
57 | PACKAGECONFIG_SOUP ?= "soup3" | ||
58 | PACKAGECONFIG ??= " \ | ||
59 | ${@bb.utils.filter('DISTRO_FEATURES', 'systemd wayland x11', d)} \ | ||
60 | ${@bb.utils.contains('DISTRO_FEATURES', 'x11 opengl', 'webgl opengl', '', d)} \ | ||
61 | ${@bb.utils.contains('DISTRO_FEATURES', 'x11', '', 'webgl gles2', d)} \ | ||
62 | ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'opengl-or-es', '', d)} \ | ||
63 | enchant \ | ||
64 | libsecret \ | ||
65 | ${PACKAGECONFIG_SOUP} \ | ||
66 | " | ||
67 | |||
68 | PACKAGECONFIG[wayland] = "-DENABLE_WAYLAND_TARGET=ON,-DENABLE_WAYLAND_TARGET=OFF,wayland libwpe wpebackend-fdo wayland-native" | ||
69 | PACKAGECONFIG[angle] = "-DUSE_ANGLE_WEBGL=ON,-DUSE_ANGLE_WEBGL=OFF" | ||
70 | PACKAGECONFIG[x11] = "-DENABLE_X11_TARGET=ON,-DENABLE_X11_TARGET=OFF,virtual/libx11 libxcomposite libxdamage libxrender libxt" | ||
71 | PACKAGECONFIG[geoclue] = "-DENABLE_GEOLOCATION=ON,-DENABLE_GEOLOCATION=OFF,geoclue" | ||
72 | PACKAGECONFIG[enchant] = "-DENABLE_SPELLCHECK=ON,-DENABLE_SPELLCHECK=OFF,enchant2" | ||
73 | PACKAGECONFIG[gles2] = "-DENABLE_GLES2=ON,-DENABLE_GLES2=OFF,virtual/libgles2" | ||
74 | PACKAGECONFIG[jpegxl] = " -DUSE_JPEGXL=ON,-DUSE_JPEGXL=OFF,libjxl" | ||
75 | PACKAGECONFIG[webgl] = "-DENABLE_WEBGL=ON,-DENABLE_WEBGL=OFF,virtual/egl" | ||
76 | PACKAGECONFIG[opengl] = "-DENABLE_GRAPHICS_CONTEXT_GL=ON,-DENABLE_GRAPHICS_CONTEXT_GL=OFF,virtual/egl" | ||
77 | PACKAGECONFIG[opengl-or-es] = "-DUSE_OPENGL_OR_ES=ON,-DUSE_OPENGL_OR_ES=OFF" | ||
78 | PACKAGECONFIG[libsecret] = "-DUSE_LIBSECRET=ON,-DUSE_LIBSECRET=OFF,libsecret" | ||
79 | PACKAGECONFIG[libhyphen] = "-DUSE_LIBHYPHEN=ON,-DUSE_LIBHYPHEN=OFF,libhyphen" | ||
80 | PACKAGECONFIG[woff2] = "-DUSE_WOFF2=ON,-DUSE_WOFF2=OFF,woff2" | ||
81 | PACKAGECONFIG[openjpeg] = "-DUSE_OPENJPEG=ON,-DUSE_OPENJPEG=OFF,openjpeg" | ||
82 | PACKAGECONFIG[systemd] = "-DUSE_SYSTEMD=ON,-DUSE_SYSTEMD=off,systemd" | ||
83 | PACKAGECONFIG[reduce-size] = "-DCMAKE_BUILD_TYPE=MinSizeRel,-DCMAKE_BUILD_TYPE=Release,," | ||
84 | PACKAGECONFIG[lcms] = "-DUSE_LCMS=ON,-DUSE_LCMS=OFF,lcms" | ||
85 | PACKAGECONFIG[soup2] = "-DUSE_SOUP2=ON,-DUSE_SOUP2=OFF,libsoup-2.4,,,soup3" | ||
86 | PACKAGECONFIG[soup3] = ",,libsoup,,,soup2" | ||
87 | PACKAGECONFIG[journald] = "-DENABLE_JOURNALD_LOG=ON,-DENABLE_JOURNALD_LOG=OFF,systemd" | ||
88 | PACKAGECONFIG[avif] = "-DUSE_AVIF_LOG=ON,-DUSE_AVIF=OFF,libavif" | ||
89 | PACKAGECONFIG[media-recorder] = "-DENABLE_MEDIA_RECORDER=ON,-DENABLE_MEDIA_RECORDER=OFF,gstreamer1.0-plugins-bad" | ||
90 | PACKAGECONFIG[gamepad] = "-DENABLE_GAMEPAD=ON,-DENABLE_GAMEPAD=OFF,libmanette" | ||
91 | PACKAGECONFIG[webrtc] = "-DENABLE_WEB_RTC=ON,-DENABLE_WEB_RTC=OFF" | ||
92 | PACKAGECONFIG[bubblewrap] = "-DENABLE_BUBBLEWRAP_SANDBOX=ON -DBWRAP_EXECUTABLE=${bindir}/bwrap -DDBUS_PROXY_EXECUTABLE=${bindir}/xdg-dbus-proxy,-DENABLE_BUBBLEWRAP_SANDBOX=OFF,,bubblewrap xdg-dbus-proxy" | ||
93 | PACKAGECONFIG[backtrace] = "-DUSE_LIBBACKTRACE=ON,-DUSE_LIBBACKTRACE=OFF,libbacktrace" | ||
94 | PACKAGECONFIG[sysprof-capture] = "-DUSE_SYSTEM_SYSPROF_CAPTURE=YES,-DUSE_SYSTEM_SYSPROF_CAPTURE=NO,sysprof" | ||
95 | PACKAGECONFIG[speech] = "-DENABLE_SPEECH_SYNTHESIS=ON,-DENABLE_SPEECH_SYNTHESIS=OFF,flite" | ||
96 | |||
97 | EXTRA_OECMAKE = " \ | ||
98 | -DPORT=GTK \ | ||
99 | -DUSE_GTK4=OFF \ | ||
100 | ${@bb.utils.contains('GI_DATA_ENABLED', 'True', '-DENABLE_INTROSPECTION=ON', '-DENABLE_INTROSPECTION=OFF', d)} \ | ||
101 | ${@bb.utils.contains('GIDOCGEN_ENABLED', 'True', '-DENABLE_DOCUMENTATION=ON', '-DENABLE_DOCUMENTATION=OFF', d)} \ | ||
102 | -DENABLE_MINIBROWSER=ON \ | ||
103 | -DCMAKE_EXPORT_COMPILE_COMMANDS=OFF \ | ||
104 | " | ||
105 | # pass -g1 to massively reduce the size of the debug symbols (4.3GB to 700M at time of writing) | ||
106 | DEBUG_LEVELFLAG = "-g1" | ||
107 | |||
108 | # Javascript JIT is not supported on ARC | ||
109 | EXTRA_OECMAKE:append:arc = " -DENABLE_JIT=OFF " | ||
110 | # By default 25-bit "medium" calls are used on ARC | ||
111 | # which is not enough for binaries larger than 32 MiB | ||
112 | CFLAGS:append:arc = " -mlong-calls" | ||
113 | CXXFLAGS:append:arc = " -mlong-calls" | ||
114 | |||
115 | # Needed for non-mesa graphics stacks when x11 is disabled | ||
116 | CXXFLAGS += "${@bb.utils.contains('DISTRO_FEATURES', 'x11', '', '-DEGL_NO_X11=1', d)}" | ||
117 | |||
118 | # Javascript JIT is not supported on powerpc | ||
119 | EXTRA_OECMAKE:append:powerpc = " -DENABLE_JIT=OFF " | ||
120 | EXTRA_OECMAKE:append:powerpc64 = " -DENABLE_JIT=OFF " | ||
121 | |||
122 | # ARM JIT code does not build on ARMv4/5/6 anymore | ||
123 | EXTRA_OECMAKE:append:armv4 = " -DENABLE_JIT=OFF " | ||
124 | EXTRA_OECMAKE:append:armv5 = " -DENABLE_JIT=OFF " | ||
125 | EXTRA_OECMAKE:append:armv6 = " -DENABLE_JIT=OFF " | ||
126 | |||
127 | # And for armv7* don't enable it for softfp, because after: | ||
128 | # https://github.com/WebKit/WebKit/commit/a2ec4ef1997d6fafa6ffc607bffb54e76168a918 | ||
129 | # https://bugs.webkit.org/show_bug.cgi?id=242172 | ||
130 | # softfp armv7* fails because WEBASSEMBLY is left enabled by default and JIT gets | ||
131 | # explicitly disabled causing: | ||
132 | # http://errors.yoctoproject.org/Errors/Details/734587/ | ||
133 | # PR was sent upstream, but the end result is the same both JIT and WEBASSEMBLY disabled | ||
134 | # https://github.com/WebKit/WebKit/pull/17447 | ||
135 | EXTRA_OECMAKE:append:armv7a = " -DENABLE_JIT=${@bb.utils.contains('TUNE_FEATURES', 'callconvention-hard', 'ON', 'OFF', d)}" | ||
136 | EXTRA_OECMAKE:append:armv7r = " -DENABLE_JIT=${@bb.utils.contains('TUNE_FEATURES', 'callconvention-hard', 'ON', 'OFF', d)}" | ||
137 | EXTRA_OECMAKE:append:armv7ve = " -DENABLE_JIT=${@bb.utils.contains('TUNE_FEATURES', 'callconvention-hard', 'ON', 'OFF', d)}" | ||
138 | |||
139 | # JIT does not work on RISCV | ||
140 | EXTRA_OECMAKE:append:riscv32 = " -DENABLE_JIT=OFF" | ||
141 | |||
142 | # JIT not supported on MIPS either | ||
143 | EXTRA_OECMAKE:append:mipsarch = " -DENABLE_JIT=OFF -DENABLE_C_LOOP=ON " | ||
144 | |||
145 | # JIT not supported on X32 | ||
146 | # An attempt was made to upstream JIT support for x32 in | ||
147 | # https://bugs.webkit.org/show_bug.cgi?id=100450, but this was closed as | ||
148 | # unresolved due to limited X32 adoption. | ||
149 | EXTRA_OECMAKE:append:x86-x32 = " -DENABLE_JIT=OFF " | ||
150 | |||
151 | SECURITY_CFLAGS:remove:aarch64 = "-fpie" | ||
152 | SECURITY_CFLAGS:append:aarch64 = " -fPIE" | ||
153 | |||
154 | FILES:${PN} += "${libdir}/webkit2gtk-4.*/injected-bundle/libwebkit2gtkinjectedbundle.so" | ||
155 | |||
156 | RRECOMMENDS:${PN} += "ca-certificates shared-mime-info" | ||
157 | |||
158 | # http://errors.yoctoproject.org/Errors/Details/20370/ | ||
159 | ARM_INSTRUCTION_SET:armv4 = "arm" | ||
160 | ARM_INSTRUCTION_SET:armv5 = "arm" | ||
161 | ARM_INSTRUCTION_SET:armv6 = "arm" | ||
162 | |||
163 | # https://bugzilla.yoctoproject.org/show_bug.cgi?id=9474 | ||
164 | # https://bugs.webkit.org/show_bug.cgi?id=159880 | ||
165 | # JSC JIT can build on ARMv7 with -marm, but doesn't work on runtime. | ||
166 | # Upstream only tests regularly the JSC JIT on ARMv7 with Thumb2 (-mthumb). | ||
167 | ARM_INSTRUCTION_SET:armv7a = "thumb" | ||
168 | ARM_INSTRUCTION_SET:armv7r = "thumb" | ||
169 | ARM_INSTRUCTION_SET:armv7ve = "thumb" | ||
170 | |||
171 | # ANGLE requires SSE support as of webkit 2.40.x on 32 bit x86 | ||
172 | COMPATIBLE_HOST:x86 = "${@bb.utils.contains_any('TUNE_FEATURES', 'core2 corei7', '.*', 'null', d)}" | ||
173 | |||
174 | # introspection inside qemu-arm hangs forever on musl/arm builds | ||
175 | # therefore disable GI_DATA | ||
176 | GI_DATA_ENABLED:libc-musl:armv7a = "False" | ||
177 | GI_DATA_ENABLED:libc-musl:armv7ve = "False" | ||
178 | |||
179 | do_install:append() { | ||
180 | mv ${D}${bindir}/WebKitWebDriver ${D}${bindir}/WebKitWebDriver3 | ||
181 | } | ||
182 | |||
183 | PACKAGE_PREPROCESS_FUNCS += "src_package_preprocess" | ||
184 | src_package_preprocess () { | ||
185 | # Trim build paths from comments in generated sources to ensure reproducibility | ||
186 | sed -i -e "s,${WORKDIR},,g" \ | ||
187 | ${B}/JavaScriptCore/DerivedSources/*.h \ | ||
188 | ${B}/JavaScriptCore/DerivedSources/yarr/*.h \ | ||
189 | ${B}/JavaScriptCore/PrivateHeaders/JavaScriptCore/*.h \ | ||
190 | ${B}/WebCore/DerivedSources/*.cpp \ | ||
191 | ${B}/WebKitGTK/DerivedSources/webkit/*.cpp | ||
192 | } | ||
193 | |||