From bd370c38e204a457508ab8e5742808af41ad903a Mon Sep 17 00:00:00 2001 From: Alexander Kanavin Date: Mon, 11 Oct 2021 11:40:58 +0200 Subject: webkitgtk: update 2.32.3 -> 2.34.0 (From OE-Core rev: 69208e6e5572858954a995cfdcb4c4404a22013c) Signed-off-by: Alexander Kanavin Signed-off-by: Alexandre Belloni Signed-off-by: Richard Purdie --- .../0001-ANGLE-do-not-enable-SSE-on-x86.patch | 26 ++++ .../0001-Enable-THREADS_PREFER_PTHREAD_FLAG.patch | 10 +- .../0001-MiniBrowser-Fix-reproduciblity.patch | 31 ---- .../webkit/webkitgtk/include_xutil.patch | 8 +- .../webkit/webkitgtk/musl-lower-stack-usage.patch | 14 +- meta/recipes-sato/webkit/webkitgtk_2.32.3.bb | 158 -------------------- meta/recipes-sato/webkit/webkitgtk_2.34.0.bb | 161 +++++++++++++++++++++ 7 files changed, 203 insertions(+), 205 deletions(-) create mode 100644 meta/recipes-sato/webkit/webkitgtk/0001-ANGLE-do-not-enable-SSE-on-x86.patch delete mode 100644 meta/recipes-sato/webkit/webkitgtk/0001-MiniBrowser-Fix-reproduciblity.patch delete mode 100644 meta/recipes-sato/webkit/webkitgtk_2.32.3.bb create mode 100644 meta/recipes-sato/webkit/webkitgtk_2.34.0.bb (limited to 'meta/recipes-sato') diff --git a/meta/recipes-sato/webkit/webkitgtk/0001-ANGLE-do-not-enable-SSE-on-x86.patch b/meta/recipes-sato/webkit/webkitgtk/0001-ANGLE-do-not-enable-SSE-on-x86.patch new file mode 100644 index 0000000000..1c6ba97037 --- /dev/null +++ b/meta/recipes-sato/webkit/webkitgtk/0001-ANGLE-do-not-enable-SSE-on-x86.patch @@ -0,0 +1,26 @@ +From c71a4e18afb4869a0fbb0efd59c4860b72f493f7 Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin +Date: Tue, 5 Oct 2021 13:32:28 +0200 +Subject: [PATCH] ANGLE: do not enable SSE on x86 + +The code does not actually build there. + +Upstream-Status: Pending +Signed-off-by: Alexander Kanavin +--- + Source/ThirdParty/ANGLE/src/common/platform.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Source/ThirdParty/ANGLE/src/common/platform.h b/Source/ThirdParty/ANGLE/src/common/platform.h +index 41f3cf4f..cab85a82 100644 +--- a/Source/ThirdParty/ANGLE/src/common/platform.h ++++ b/Source/ThirdParty/ANGLE/src/common/platform.h +@@ -89,7 +89,7 @@ + #if defined(_MSC_VER) && !defined(_M_ARM) && !defined(_M_ARM64) + # include + # define ANGLE_USE_SSE +-#elif defined(__GNUC__) && (defined(__x86_64__) || defined(__i386__)) ++#elif defined(__GNUC__) && (defined(__x86_64__)) + # include + # define ANGLE_USE_SSE + #endif diff --git a/meta/recipes-sato/webkit/webkitgtk/0001-Enable-THREADS_PREFER_PTHREAD_FLAG.patch b/meta/recipes-sato/webkit/webkitgtk/0001-Enable-THREADS_PREFER_PTHREAD_FLAG.patch index 6d7d7067e4..a65cfc8b5a 100644 --- a/meta/recipes-sato/webkit/webkitgtk/0001-Enable-THREADS_PREFER_PTHREAD_FLAG.patch +++ b/meta/recipes-sato/webkit/webkitgtk/0001-Enable-THREADS_PREFER_PTHREAD_FLAG.patch @@ -1,4 +1,4 @@ -From acf26a385d17a59ccd4b767d6303ec3dbf78e788 Mon Sep 17 00:00:00 2001 +From b055bd199f9c40148334725a227796c0d7d14788 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Mon, 3 Feb 2020 17:06:27 -0800 Subject: [PATCH] Enable THREADS_PREFER_PTHREAD_FLAG @@ -20,11 +20,11 @@ Signed-off-by: Khem Raj 2 files changed, 2 insertions(+) diff --git a/Source/cmake/OptionsGTK.cmake b/Source/cmake/OptionsGTK.cmake -index f316f49..de81ce0 100644 +index 3cb5a495..dfba9900 100644 --- a/Source/cmake/OptionsGTK.cmake +++ b/Source/cmake/OptionsGTK.cmake -@@ -6,6 +6,7 @@ WEBKIT_OPTION_BEGIN() - SET_PROJECT_VERSION(2 32 3) +@@ -7,6 +7,7 @@ SET_PROJECT_VERSION(2 34 0) + set(USER_AGENT_BRANDING "" CACHE STRING "Branding to add to user agent string") +set(THREADS_PREFER_PTHREAD_FLAG ON) @@ -32,7 +32,7 @@ index f316f49..de81ce0 100644 find_package(Cairo 1.14.0 REQUIRED) find_package(Fontconfig 2.8.0 REQUIRED) diff --git a/Source/cmake/OptionsJSCOnly.cmake b/Source/cmake/OptionsJSCOnly.cmake -index 1066440..d9aca95 100644 +index e892b427..73bf9e4d 100644 --- a/Source/cmake/OptionsJSCOnly.cmake +++ b/Source/cmake/OptionsJSCOnly.cmake @@ -1,3 +1,4 @@ diff --git a/meta/recipes-sato/webkit/webkitgtk/0001-MiniBrowser-Fix-reproduciblity.patch b/meta/recipes-sato/webkit/webkitgtk/0001-MiniBrowser-Fix-reproduciblity.patch deleted file mode 100644 index 98d2d1ded9..0000000000 --- a/meta/recipes-sato/webkit/webkitgtk/0001-MiniBrowser-Fix-reproduciblity.patch +++ /dev/null @@ -1,31 +0,0 @@ -From dcf9ae0dc0b4510eddbeeea09e11edfb123f95af Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Sun, 2 May 2021 13:10:49 -0700 -Subject: [PATCH] MiniBrowser: Fix reproduciblity - -Do not emit references to source dir in generated sourcecode - -Upstream-Status: Submitted [https://bugs.webkit.org/show_bug.cgi?id=225283] -Signed-off-by: Khem Raj ---- - Tools/MiniBrowser/gtk/CMakeLists.txt | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/Tools/MiniBrowser/gtk/CMakeLists.txt b/Tools/MiniBrowser/gtk/CMakeLists.txt -index 93b62521..482d3b00 100644 ---- a/Tools/MiniBrowser/gtk/CMakeLists.txt -+++ b/Tools/MiniBrowser/gtk/CMakeLists.txt -@@ -51,8 +51,8 @@ add_custom_command( - OUTPUT ${MiniBrowser_DERIVED_SOURCES_DIR}/BrowserMarshal.c - ${MiniBrowser_DERIVED_SOURCES_DIR}/BrowserMarshal.h - MAIN_DEPENDENCY ${MiniBrowser_DIR}/browser-marshal.list -- COMMAND glib-genmarshal --prefix=browser_marshal ${MiniBrowser_DIR}/browser-marshal.list --body > ${MiniBrowser_DERIVED_SOURCES_DIR}/BrowserMarshal.c -- COMMAND glib-genmarshal --prefix=browser_marshal ${MiniBrowser_DIR}/browser-marshal.list --header > ${MiniBrowser_DERIVED_SOURCES_DIR}/BrowserMarshal.h -+ COMMAND glib-genmarshal --prefix=browser_marshal ${MiniBrowser_DIR}/browser-marshal.list --body --skip-source > ${MiniBrowser_DERIVED_SOURCES_DIR}/BrowserMarshal.c -+ COMMAND glib-genmarshal --prefix=browser_marshal ${MiniBrowser_DIR}/browser-marshal.list --header --skip-source > ${MiniBrowser_DERIVED_SOURCES_DIR}/BrowserMarshal.h - VERBATIM) - - if (USE_GTK4) --- -2.31.1 - diff --git a/meta/recipes-sato/webkit/webkitgtk/include_xutil.patch b/meta/recipes-sato/webkit/webkitgtk/include_xutil.patch index ffe1b74be3..e7a4cc25ad 100644 --- a/meta/recipes-sato/webkit/webkitgtk/include_xutil.patch +++ b/meta/recipes-sato/webkit/webkitgtk/include_xutil.patch @@ -1,4 +1,4 @@ -From d95f46e149226f634830e76cc1f4f8e3ee04ff5a Mon Sep 17 00:00:00 2001 +From 2cc9d445b4c8eb70c2ab6c1723dfd208218f103e Mon Sep 17 00:00:00 2001 From: Martin Jansa Date: Fri, 6 Nov 2020 04:38:13 +0100 Subject: [PATCH] webkitgtk: fix build with x11 enabled @@ -21,12 +21,12 @@ Signed-off-by: Martin Jansa 1 file changed, 1 insertion(+) diff --git a/Source/WebCore/platform/graphics/x11/PlatformDisplayX11.cpp b/Source/WebCore/platform/graphics/x11/PlatformDisplayX11.cpp -index 2d66b9cd..424fb5a1 100644 +index bad56eba..fc141f98 100644 --- a/Source/WebCore/platform/graphics/x11/PlatformDisplayX11.cpp +++ b/Source/WebCore/platform/graphics/x11/PlatformDisplayX11.cpp -@@ -30,6 +30,7 @@ - +@@ -31,6 +31,7 @@ #if PLATFORM(X11) + #include #include +#include #include diff --git a/meta/recipes-sato/webkit/webkitgtk/musl-lower-stack-usage.patch b/meta/recipes-sato/webkit/webkitgtk/musl-lower-stack-usage.patch index f71f8452fd..d8d36fad6b 100644 --- a/meta/recipes-sato/webkit/webkitgtk/musl-lower-stack-usage.patch +++ b/meta/recipes-sato/webkit/webkitgtk/musl-lower-stack-usage.patch @@ -1,4 +1,4 @@ -From 04e4999c6fa2e9810634745a07f1e380f27b8e61 Mon Sep 17 00:00:00 2001 +From 358a8f053c367aab7fba8ab059244e0530c7ff82 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Wed, 17 Mar 2021 13:24:57 -0700 Subject: [PATCH] reduce thread stack and heap usage for javascriptcore on musl @@ -25,10 +25,10 @@ Signed-off-by: Khem Raj 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/Source/JavaScriptCore/runtime/OptionsList.h b/Source/JavaScriptCore/runtime/OptionsList.h -index bb6d2f1d..a6209742 100644 +index a0c2170e..9e107af7 100644 --- a/Source/JavaScriptCore/runtime/OptionsList.h +++ b/Source/JavaScriptCore/runtime/OptionsList.h -@@ -71,6 +71,18 @@ JS_EXPORT_PRIVATE bool canUseJITCage(); +@@ -77,6 +77,18 @@ bool canUseWebAssemblyFastMemory(); // On instantiation of the first VM instance, the Options will be write protected // and cannot be modified thereafter. @@ -47,7 +47,7 @@ index bb6d2f1d..a6209742 100644 #define FOR_EACH_JSC_OPTION(v) \ v(Bool, useKernTCSM, defaultTCSMValue(), Normal, "Note: this needs to go before other options since they depend on this value.") \ v(Bool, validateOptions, false, Normal, "crashes if mis-typed JSC options were passed to the VM") \ -@@ -86,9 +98,9 @@ JS_EXPORT_PRIVATE bool canUseJITCage(); +@@ -92,9 +104,9 @@ bool canUseWebAssemblyFastMemory(); \ v(Bool, reportMustSucceedExecutableAllocations, false, Normal, nullptr) \ \ @@ -61,11 +61,11 @@ index bb6d2f1d..a6209742 100644 v(Bool, crashOnDisallowedVMEntry, ASSERT_ENABLED, Normal, "Forces a crash if we attempt to enter the VM when disallowed") \ v(Bool, crashIfCantAllocateJITMemory, false, Normal, nullptr) \ diff --git a/Source/WTF/wtf/Threading.h b/Source/WTF/wtf/Threading.h -index 9495d6c1..190b3811 100644 +index 178f9808..95ec5a85 100644 --- a/Source/WTF/wtf/Threading.h +++ b/Source/WTF/wtf/Threading.h -@@ -60,6 +60,10 @@ - #include +@@ -67,6 +67,10 @@ + #undef None #endif +#if OS(LINUX) && !defined(__GLIBC__) diff --git a/meta/recipes-sato/webkit/webkitgtk_2.32.3.bb b/meta/recipes-sato/webkit/webkitgtk_2.32.3.bb deleted file mode 100644 index db2357002c..0000000000 --- a/meta/recipes-sato/webkit/webkitgtk_2.32.3.bb +++ /dev/null @@ -1,158 +0,0 @@ -SUMMARY = "WebKit web rendering engine for the GTK+ platform" -HOMEPAGE = "https://www.webkitgtk.org/" -BUGTRACKER = "https://bugs.webkit.org/" - -LICENSE = "BSD-2-Clause & LGPLv2+" -LIC_FILES_CHKSUM = "file://Source/JavaScriptCore/COPYING.LIB;md5=d0c6d6397a5d84286dda758da57bd691 \ - file://Source/WebCore/LICENSE-APPLE;md5=4646f90082c40bcf298c285f8bab0b12 \ - file://Source/WebCore/LICENSE-LGPL-2;md5=36357ffde2b64ae177b2494445b79d21 \ - file://Source/WebCore/LICENSE-LGPL-2.1;md5=a778a33ef338abbaf8b8a7c36b6eec80 \ - " - -SRC_URI = "https://www.webkitgtk.org/releases/${BPN}-${PV}.tar.xz \ - file://0001-FindGObjectIntrospection.cmake-prefix-variables-obta.patch \ - file://0001-When-building-introspection-files-add-CMAKE_C_FLAGS-.patch \ - file://0001-Fix-racy-parallel-build-of-WebKit2-4.0.gir.patch \ - file://0001-Tweak-gtkdoc-settings-so-that-gtkdoc-generation-work.patch \ - file://0001-Enable-THREADS_PREFER_PTHREAD_FLAG.patch \ - file://include_xutil.patch \ - file://reduce-memory-overheads.patch \ - file://musl-lower-stack-usage.patch \ - file://0001-MiniBrowser-Fix-reproduciblity.patch \ - " - -SRC_URI[sha256sum] = "c1f496f5ac654efe4cef62fbd4f2fbeeef265a07c5e7419e5d2900bfeea52cbc" - -inherit cmake pkgconfig gobject-introspection perlnative features_check upstream-version-is-even gtk-doc - -ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}" -REQUIRED_DISTRO_FEATURES = "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'opengl', '', d)}" - -CVE_PRODUCT = "webkitgtk webkitgtk\+" - -DEPENDS = " \ - ruby-native \ - cairo \ - harfbuzz \ - jpeg \ - atk \ - libwebp \ - gtk+3 \ - libsoup-2.4 \ - libxslt \ - libtasn1 \ - libnotify \ - gstreamer1.0 \ - gstreamer1.0-plugins-base \ - " - -PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd wayland x11', d)} \ - ${@bb.utils.contains('DISTRO_FEATURES', 'x11 opengl', 'webgl opengl', '', d)} \ - ${@bb.utils.contains('DISTRO_FEATURES', 'x11', '', 'webgl gles2', d)} \ - enchant \ - libsecret \ - " - -PACKAGECONFIG[wayland] = "-DENABLE_WAYLAND_TARGET=ON,-DENABLE_WAYLAND_TARGET=OFF,wayland libwpe wpebackend-fdo wayland-native" -PACKAGECONFIG[x11] = "-DENABLE_X11_TARGET=ON,-DENABLE_X11_TARGET=OFF,virtual/libx11 libxcomposite libxdamage libxrender libxt" -PACKAGECONFIG[geoclue] = "-DENABLE_GEOLOCATION=ON,-DENABLE_GEOLOCATION=OFF,geoclue" -PACKAGECONFIG[enchant] = "-DENABLE_SPELLCHECK=ON,-DENABLE_SPELLCHECK=OFF,enchant2" -PACKAGECONFIG[gles2] = "-DENABLE_GLES2=ON,-DENABLE_GLES2=OFF,virtual/libgles2" -PACKAGECONFIG[webgl] = "-DENABLE_WEBGL=ON,-DENABLE_WEBGL=OFF,virtual/libgl" -PACKAGECONFIG[opengl] = "-DENABLE_GRAPHICS_CONTEXT_GL=ON,-DENABLE_GRAPHICS_CONTEXT_GL=OFF,virtual/libgl" -PACKAGECONFIG[libsecret] = "-DUSE_LIBSECRET=ON,-DUSE_LIBSECRET=OFF,libsecret" -PACKAGECONFIG[libhyphen] = "-DUSE_LIBHYPHEN=ON,-DUSE_LIBHYPHEN=OFF,libhyphen" -PACKAGECONFIG[woff2] = "-DUSE_WOFF2=ON,-DUSE_WOFF2=OFF,woff2" -PACKAGECONFIG[openjpeg] = "-DUSE_OPENJPEG=ON,-DUSE_OPENJPEG=OFF,openjpeg" -PACKAGECONFIG[systemd] = "-DUSE_SYSTEMD=ON,-DUSE_SYSTEMD=off,systemd" -PACKAGECONFIG[reduce-size] = "-DCMAKE_BUILD_TYPE=MinSizeRel,-DCMAKE_BUILD_TYPE=Release,," - -# webkitgtk is full of /usr/bin/env python, particular for generating docs -do_configure[postfuncs] += "setup_python_link" -setup_python_link() { - if [ ! -e ${STAGING_BINDIR_NATIVE}/python ]; then - ln -s `which python3` ${STAGING_BINDIR_NATIVE}/python - fi -} - -EXTRA_OECMAKE = " \ - -DPORT=GTK \ - ${@bb.utils.contains('GI_DATA_ENABLED', 'True', '-DENABLE_INTROSPECTION=ON', '-DENABLE_INTROSPECTION=OFF', d)} \ - ${@bb.utils.contains('GTKDOC_ENABLED', 'True', '-DENABLE_GTKDOC=ON', '-DENABLE_GTKDOC=OFF', d)} \ - -DENABLE_MINIBROWSER=ON \ - -DPYTHON_EXECUTABLE=`which python3` \ - -DENABLE_BUBBLEWRAP_SANDBOX=OFF \ - -DENABLE_GAMEPAD=OFF \ - " - -# Javascript JIT is not supported on ARC -EXTRA_OECMAKE:append:arc = " -DENABLE_JIT=OFF " -# By default 25-bit "medium" calls are used on ARC -# which is not enough for binaries larger than 32 MiB -CFLAGS:append:arc = " -mlong-calls" -CXXFLAGS:append:arc = " -mlong-calls" - -# Javascript JIT is not supported on powerpc -EXTRA_OECMAKE:append:powerpc = " -DENABLE_JIT=OFF " -EXTRA_OECMAKE:append:powerpc64 = " -DENABLE_JIT=OFF " - -# ARM JIT code does not build on ARMv4/5/6 anymore -EXTRA_OECMAKE:append:armv5 = " -DENABLE_JIT=OFF " -EXTRA_OECMAKE:append:armv6 = " -DENABLE_JIT=OFF " -EXTRA_OECMAKE:append:armv4 = " -DENABLE_JIT=OFF " - -EXTRA_OECMAKE:append:mipsarch = " -DUSE_LD_GOLD=OFF " -EXTRA_OECMAKE:append:powerpc = " -DUSE_LD_GOLD=OFF " - -# JIT and gold linker does not work on RISCV -EXTRA_OECMAKE:append:riscv32 = " -DUSE_LD_GOLD=OFF -DENABLE_JIT=OFF" -EXTRA_OECMAKE:append:riscv64 = " -DUSE_LD_GOLD=OFF -DENABLE_JIT=OFF" - -# JIT not supported on MIPS either -EXTRA_OECMAKE:append:mipsarch = " -DENABLE_JIT=OFF -DENABLE_C_LOOP=ON " - -# JIT not supported on X32 -# An attempt was made to upstream JIT support for x32 in -# https://bugs.webkit.org/show_bug.cgi?id=100450, but this was closed as -# unresolved due to limited X32 adoption. -EXTRA_OECMAKE:append:x86-x32 = " -DENABLE_JIT=OFF " - -SECURITY_CFLAGS:remove:aarch64 = "-fpie" -SECURITY_CFLAGS:append:aarch64 = " -fPIE" - -FILES:${PN} += "${libdir}/webkit2gtk-4.0/injected-bundle/libwebkit2gtkinjectedbundle.so" - -RRECOMMENDS:${PN} += "ca-certificates shared-mime-info" - -# http://errors.yoctoproject.org/Errors/Details/20370/ -ARM_INSTRUCTION_SET:armv4 = "arm" -ARM_INSTRUCTION_SET:armv5 = "arm" -ARM_INSTRUCTION_SET:armv6 = "arm" - -# https://bugzilla.yoctoproject.org/show_bug.cgi?id=9474 -# https://bugs.webkit.org/show_bug.cgi?id=159880 -# JSC JIT can build on ARMv7 with -marm, but doesn't work on runtime. -# Upstream only tests regularly the JSC JIT on ARMv7 with Thumb2 (-mthumb). -ARM_INSTRUCTION_SET:armv7a = "thumb" -ARM_INSTRUCTION_SET:armv7r = "thumb" -ARM_INSTRUCTION_SET:armv7ve = "thumb" - -# introspection inside qemu-arm hangs forever on musl/arm builds -# therefore disable GI_DATA -GI_DATA_ENABLED:libc-musl:armv7a = "False" -GI_DATA_ENABLED:libc-musl:armv7ve = "False" - -# Can't be built with ccache -CCACHE_DISABLE = "1" - -PACKAGE_PREPROCESS_FUNCS += "src_package_preprocess" -src_package_preprocess () { - # Trim build paths from comments in generated sources to ensure reproducibility - sed -i -e "s,${WORKDIR},,g" \ - ${B}/DerivedSources/webkit2gtk/webkit2/*.cpp \ - ${B}/DerivedSources/ForwardingHeaders/JavaScriptCore/*.h \ - ${B}/DerivedSources/JavaScriptCore/*.h \ - ${B}/DerivedSources/JavaScriptCore/yarr/*.h \ - ${B}/DerivedSources/MiniBrowser/*.c -} - diff --git a/meta/recipes-sato/webkit/webkitgtk_2.34.0.bb b/meta/recipes-sato/webkit/webkitgtk_2.34.0.bb new file mode 100644 index 0000000000..25e1d422cc --- /dev/null +++ b/meta/recipes-sato/webkit/webkitgtk_2.34.0.bb @@ -0,0 +1,161 @@ +SUMMARY = "WebKit web rendering engine for the GTK+ platform" +HOMEPAGE = "https://www.webkitgtk.org/" +BUGTRACKER = "https://bugs.webkit.org/" + +LICENSE = "BSD-2-Clause & LGPLv2+" +LIC_FILES_CHKSUM = "file://Source/JavaScriptCore/COPYING.LIB;md5=d0c6d6397a5d84286dda758da57bd691 \ + file://Source/WebCore/LICENSE-APPLE;md5=4646f90082c40bcf298c285f8bab0b12 \ + file://Source/WebCore/LICENSE-LGPL-2;md5=36357ffde2b64ae177b2494445b79d21 \ + file://Source/WebCore/LICENSE-LGPL-2.1;md5=a778a33ef338abbaf8b8a7c36b6eec80 \ + " + +SRC_URI = "https://www.webkitgtk.org/releases/${BPN}-${PV}.tar.xz \ + file://0001-FindGObjectIntrospection.cmake-prefix-variables-obta.patch \ + file://0001-When-building-introspection-files-add-CMAKE_C_FLAGS-.patch \ + file://0001-Fix-racy-parallel-build-of-WebKit2-4.0.gir.patch \ + file://0001-Tweak-gtkdoc-settings-so-that-gtkdoc-generation-work.patch \ + file://0001-Enable-THREADS_PREFER_PTHREAD_FLAG.patch \ + file://include_xutil.patch \ + file://reduce-memory-overheads.patch \ + file://musl-lower-stack-usage.patch \ + file://0001-ANGLE-do-not-enable-SSE-on-x86.patch \ + " + +SRC_URI[sha256sum] = "880c8ee626f67019f67557ca09e59a23ecf245e60f6173215f1a8823cb09af34" + +inherit cmake pkgconfig gobject-introspection perlnative features_check upstream-version-is-even gtk-doc + +ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}" +REQUIRED_DISTRO_FEATURES = "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'opengl', '', d)}" + +CVE_PRODUCT = "webkitgtk webkitgtk\+" + +DEPENDS = " \ + ruby-native \ + cairo \ + harfbuzz \ + jpeg \ + atk \ + libwebp \ + gtk+3 \ + libsoup \ + libxslt \ + libtasn1 \ + libnotify \ + gstreamer1.0 \ + gstreamer1.0-plugins-base \ + " + +PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd wayland x11', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'x11 opengl', 'webgl opengl', '', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'x11', '', 'webgl gles2 angle', d)} \ + enchant \ + libsecret \ + " + +PACKAGECONFIG[wayland] = "-DENABLE_WAYLAND_TARGET=ON,-DENABLE_WAYLAND_TARGET=OFF,wayland libwpe wpebackend-fdo wayland-native" +PACKAGECONFIG[angle] = "-DUSE_ANGLE_WEBGL=ON,-DUSE_ANGLE_WEBGL=OFF" +PACKAGECONFIG[x11] = "-DENABLE_X11_TARGET=ON,-DENABLE_X11_TARGET=OFF,virtual/libx11 libxcomposite libxdamage libxrender libxt" +PACKAGECONFIG[geoclue] = "-DENABLE_GEOLOCATION=ON,-DENABLE_GEOLOCATION=OFF,geoclue" +PACKAGECONFIG[enchant] = "-DENABLE_SPELLCHECK=ON,-DENABLE_SPELLCHECK=OFF,enchant2" +PACKAGECONFIG[gles2] = "-DENABLE_GLES2=ON,-DENABLE_GLES2=OFF,virtual/libgles2" +PACKAGECONFIG[webgl] = "-DENABLE_WEBGL=ON,-DENABLE_WEBGL=OFF,virtual/libgl" +PACKAGECONFIG[opengl] = "-DENABLE_GRAPHICS_CONTEXT_GL=ON,-DENABLE_GRAPHICS_CONTEXT_GL=OFF,virtual/libgl" +PACKAGECONFIG[libsecret] = "-DUSE_LIBSECRET=ON,-DUSE_LIBSECRET=OFF,libsecret" +PACKAGECONFIG[libhyphen] = "-DUSE_LIBHYPHEN=ON,-DUSE_LIBHYPHEN=OFF,libhyphen" +PACKAGECONFIG[woff2] = "-DUSE_WOFF2=ON,-DUSE_WOFF2=OFF,woff2" +PACKAGECONFIG[openjpeg] = "-DUSE_OPENJPEG=ON,-DUSE_OPENJPEG=OFF,openjpeg" +PACKAGECONFIG[systemd] = "-DUSE_SYSTEMD=ON,-DUSE_SYSTEMD=off,systemd" +PACKAGECONFIG[reduce-size] = "-DCMAKE_BUILD_TYPE=MinSizeRel,-DCMAKE_BUILD_TYPE=Release,," +PACKAGECONFIG[lcms] = "-DUSE_LCMS=ON,-DUSE_LCMS=OFF,lcms" + +# webkitgtk is full of /usr/bin/env python, particular for generating docs +do_configure[postfuncs] += "setup_python_link" +setup_python_link() { + if [ ! -e ${STAGING_BINDIR_NATIVE}/python ]; then + ln -s `which python3` ${STAGING_BINDIR_NATIVE}/python + fi +} + +EXTRA_OECMAKE = " \ + -DPORT=GTK \ + ${@bb.utils.contains('GI_DATA_ENABLED', 'True', '-DENABLE_INTROSPECTION=ON', '-DENABLE_INTROSPECTION=OFF', d)} \ + ${@bb.utils.contains('GTKDOC_ENABLED', 'True', '-DENABLE_GTKDOC=ON', '-DENABLE_GTKDOC=OFF', d)} \ + -DENABLE_MINIBROWSER=ON \ + -DPYTHON_EXECUTABLE=`which python3` \ + -DENABLE_BUBBLEWRAP_SANDBOX=OFF \ + -DENABLE_GAMEPAD=OFF \ + " + +# Javascript JIT is not supported on ARC +EXTRA_OECMAKE:append:arc = " -DENABLE_JIT=OFF " +# By default 25-bit "medium" calls are used on ARC +# which is not enough for binaries larger than 32 MiB +CFLAGS:append:arc = " -mlong-calls" +CXXFLAGS:append:arc = " -mlong-calls" + +# Javascript JIT is not supported on powerpc +EXTRA_OECMAKE:append:powerpc = " -DENABLE_JIT=OFF " +EXTRA_OECMAKE:append:powerpc64 = " -DENABLE_JIT=OFF " + +# ARM JIT code does not build on ARMv4/5/6 anymore +EXTRA_OECMAKE:append:armv5 = " -DENABLE_JIT=OFF " +EXTRA_OECMAKE:append:armv6 = " -DENABLE_JIT=OFF " +EXTRA_OECMAKE:append:armv4 = " -DENABLE_JIT=OFF " + +EXTRA_OECMAKE:append:mipsarch = " -DUSE_LD_GOLD=OFF " +EXTRA_OECMAKE:append:powerpc = " -DUSE_LD_GOLD=OFF " + +# JIT and gold linker does not work on RISCV +EXTRA_OECMAKE:append:riscv32 = " -DUSE_LD_GOLD=OFF -DENABLE_JIT=OFF" +EXTRA_OECMAKE:append:riscv64 = " -DUSE_LD_GOLD=OFF -DENABLE_JIT=OFF" + +# JIT not supported on MIPS either +EXTRA_OECMAKE:append:mipsarch = " -DENABLE_JIT=OFF -DENABLE_C_LOOP=ON " + +# JIT not supported on X32 +# An attempt was made to upstream JIT support for x32 in +# https://bugs.webkit.org/show_bug.cgi?id=100450, but this was closed as +# unresolved due to limited X32 adoption. +EXTRA_OECMAKE:append:x86-x32 = " -DENABLE_JIT=OFF " + +SECURITY_CFLAGS:remove:aarch64 = "-fpie" +SECURITY_CFLAGS:append:aarch64 = " -fPIE" + +FILES:${PN} += "${libdir}/webkit2gtk-4.1/injected-bundle/libwebkit2gtkinjectedbundle.so" + +RRECOMMENDS:${PN} += "ca-certificates shared-mime-info" + +# http://errors.yoctoproject.org/Errors/Details/20370/ +ARM_INSTRUCTION_SET:armv4 = "arm" +ARM_INSTRUCTION_SET:armv5 = "arm" +ARM_INSTRUCTION_SET:armv6 = "arm" + +# https://bugzilla.yoctoproject.org/show_bug.cgi?id=9474 +# https://bugs.webkit.org/show_bug.cgi?id=159880 +# JSC JIT can build on ARMv7 with -marm, but doesn't work on runtime. +# Upstream only tests regularly the JSC JIT on ARMv7 with Thumb2 (-mthumb). +ARM_INSTRUCTION_SET:armv7a = "thumb" +ARM_INSTRUCTION_SET:armv7r = "thumb" +ARM_INSTRUCTION_SET:armv7ve = "thumb" + +# introspection inside qemu-arm hangs forever on musl/arm builds +# therefore disable GI_DATA +GI_DATA_ENABLED:libc-musl:armv7a = "False" +GI_DATA_ENABLED:libc-musl:armv7ve = "False" + +# Can't be built with ccache +CCACHE_DISABLE = "1" + +PACKAGE_PREPROCESS_FUNCS += "src_package_preprocess" +src_package_preprocess () { + # Trim build paths from comments in generated sources to ensure reproducibility + sed -i -e "s,${WORKDIR},,g" \ + ${B}/JavaScriptCore/DerivedSources/*.h \ + ${B}/JavaScriptCore/DerivedSources/yarr/*.h \ + ${B}/JavaScriptCore/PrivateHeaders/JavaScriptCore/*.h \ + ${B}/WebKit2Gtk/DerivedSources/webkit2/*.cpp \ + ${B}/WebKit2Gtk/DerivedSources/webkit2/*.h + +} + -- cgit v1.2.3-54-g00ecf