From 80dc1462079ced1e34d039a7c4c8a9cf0e40e9e7 Mon Sep 17 00:00:00 2001 From: Alexander Kanavin Date: Sun, 20 Nov 2022 14:31:18 +0100 Subject: webkitgtk: update 2.36.7 -> 2.38.2 Upstream has rewritten gobject introspection support, so the two related patches are ported to that: 0001-FindGObjectIntrospection.cmake-prefix-variables-obta.patch 0001-When-building-introspection-files-do-not-quote-CFLAG.patch The latter patch is also promoted from Inappropriate to Pending gtk-doc has been replaced with gi-docgen, accordingly 0001-Tweak-gtkdoc-settings-so-that-gtkdoc-generation-work.patch is removed. Drop fix-gstreamer-include-paths.patch (backport) 0001-Fix-build-without-opengl-or-es.patch (upstream fixed the issue; follow the link in the patch for details) (From OE-Core rev: ac06af29503d2d3e0e43ef69d1d1580ce301bdfb) Signed-off-by: Alexander Kanavin Signed-off-by: Alexandre Belloni Signed-off-by: Richard Purdie --- ...Introspection.cmake-prefix-variables-obta.patch | 39 ++--- .../0001-Fix-build-without-opengl-or-es.patch | 133 ---------------- ...c-settings-so-that-gtkdoc-generation-work.patch | 47 ------ ...ng-introspection-files-do-not-quote-CFLAG.patch | 67 +++----- .../webkitgtk/fix-gstreamer-include-paths.patch | 51 ------- meta/recipes-sato/webkit/webkitgtk_2.36.7.bb | 168 --------------------- meta/recipes-sato/webkit/webkitgtk_2.38.2.bb | 165 ++++++++++++++++++++ 7 files changed, 202 insertions(+), 468 deletions(-) delete mode 100644 meta/recipes-sato/webkit/webkitgtk/0001-Fix-build-without-opengl-or-es.patch delete mode 100644 meta/recipes-sato/webkit/webkitgtk/0001-Tweak-gtkdoc-settings-so-that-gtkdoc-generation-work.patch delete mode 100644 meta/recipes-sato/webkit/webkitgtk/fix-gstreamer-include-paths.patch delete mode 100644 meta/recipes-sato/webkit/webkitgtk_2.36.7.bb create mode 100644 meta/recipes-sato/webkit/webkitgtk_2.38.2.bb diff --git a/meta/recipes-sato/webkit/webkitgtk/0001-FindGObjectIntrospection.cmake-prefix-variables-obta.patch b/meta/recipes-sato/webkit/webkitgtk/0001-FindGObjectIntrospection.cmake-prefix-variables-obta.patch index 2379924cc9..8ae39f14e1 100644 --- a/meta/recipes-sato/webkit/webkitgtk/0001-FindGObjectIntrospection.cmake-prefix-variables-obta.patch +++ b/meta/recipes-sato/webkit/webkitgtk/0001-FindGObjectIntrospection.cmake-prefix-variables-obta.patch @@ -1,4 +1,4 @@ -From e0bf97eecfa601e08b9578f00b1000890284241a Mon Sep 17 00:00:00 2001 +From 10cfdcc905915d8814c609008a069102f2bc7e39 Mon Sep 17 00:00:00 2001 From: Alexander Kanavin Date: Tue, 27 Oct 2015 16:02:19 +0200 Subject: [PATCH] FindGObjectIntrospection.cmake: prefix variables obtained @@ -9,30 +9,21 @@ reasons why this is not approproiate for upstream submission. Upstream-Status: Inappropriate [oe-core specific] Signed-off-by: Alexander Kanavin - --- - Source/cmake/FindGObjectIntrospection.cmake | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) + Source/cmake/FindGI.cmake | 3 +++ + 1 file changed, 3 insertions(+) -diff --git a/Source/cmake/FindGObjectIntrospection.cmake b/Source/cmake/FindGObjectIntrospection.cmake -index be96814a..ae67b593 100644 ---- a/Source/cmake/FindGObjectIntrospection.cmake -+++ b/Source/cmake/FindGObjectIntrospection.cmake -@@ -16,7 +16,6 @@ - # Redistribution and use is allowed according to the terms of the BSD license. +diff --git a/Source/cmake/FindGI.cmake b/Source/cmake/FindGI.cmake +index af039cbb..b3e810cd 100644 +--- a/Source/cmake/FindGI.cmake ++++ b/Source/cmake/FindGI.cmake +@@ -72,6 +72,9 @@ if (PKG_CONFIG_FOUND) + endif () + endif () ++set(_GI_SCANNER_EXE "$ENV{PKG_CONFIG_SYSROOT_DIR}${_GI_SCANNER_EXE}") ++set(_GI_COMPILER_EXE "$ENV{PKG_CONFIG_SYSROOT_DIR}${_GI_COMPILER_EXE}") ++ + find_program(GI_SCANNER_EXE NAMES ${_GI_SCANNER_EXE} g-ir-scanner) + find_program(GI_COMPILER_EXE NAMES ${_GI_COMPILER_EXE} g-ir-compiler) -- - find_package(PkgConfig QUIET) - if (PKG_CONFIG_FOUND) - if (PACKAGE_FIND_VERSION_COUNT GREATER 0) -@@ -30,6 +29,9 @@ if (PKG_CONFIG_FOUND) - pkg_get_variable(INTROSPECTION_GENERATE gobject-introspection-1.0 g_ir_generate) - pkg_get_variable(INTROSPECTION_GIRDIR gobject-introspection-1.0 girdir) - pkg_get_variable(INTROSPECTION_TYPELIBDIR gobject-introspection-1.0 typelibdir) -+ set(INTROSPECTION_SCANNER "$ENV{PKG_CONFIG_SYSROOT_DIR}${INTROSPECTION_SCANNER}") -+ set(INTROSPECTION_COMPILER "$ENV{PKG_CONFIG_SYSROOT_DIR}${INTROSPECTION_COMPILER}") -+ set(INTROSPECTION_GENERATE "$ENV{PKG_CONFIG_SYSROOT_DIR}${INTROSPECTION_GENERATE}") - set(INTROSPECTION_VERSION "${_pc_gir_VERSION}") - if (${INTROSPECTION_VERSION} VERSION_GREATER_EQUAL "1.59.1") - set(INTROSPECTION_HAVE_SOURCES_TOP_DIRS YES) diff --git a/meta/recipes-sato/webkit/webkitgtk/0001-Fix-build-without-opengl-or-es.patch b/meta/recipes-sato/webkit/webkitgtk/0001-Fix-build-without-opengl-or-es.patch deleted file mode 100644 index 09256951f4..0000000000 --- a/meta/recipes-sato/webkit/webkitgtk/0001-Fix-build-without-opengl-or-es.patch +++ /dev/null @@ -1,133 +0,0 @@ -From 646e347c173dbb9782492ac7cb4f54b65533ba90 Mon Sep 17 00:00:00 2001 -From: Martin Jansa -Date: Sun, 17 Oct 2021 20:49:21 +0000 -Subject: [PATCH] Fix build without opengl-or-es - -* fix build failure when opengl-or-es is disabled: - In file included from /OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/webkitgtk/2.34.0-r0/webkitgtk-2.34.0/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.cpp:30, - from /OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/webkitgtk/2.34.0-r0/build/DerivedSources/WebKit/unified-sources/UnifiedSource-54928a2b-36.cpp:1: - /OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/webkitgtk/2.34.0-r0/webkitgtk-2.34.0/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.h:41:10: fatal error: WebCore/CoordinatedGraphicsLayer.h: No such file or directory - 41 | #include - | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - compilation terminated. - -* the CoordinatedGraphicsLayer.h header installation is controled by - USE_COORDINATED_GRAPHICS in webkitgtk-2.34.0/Source/WebCore/platform/TextureMapper.cmake - but in Source/cmake/OptionsGTK.cmake USE_COORDINATED_GRAPHICS was enabled only inside - if (USE_OPENGL_OR_ES) - -Upstream-Status: Submitted [https://bugs.webkit.org/show_bug.cgi?id=232934] ---- - .../DrawingAreaProxyCoordinatedGraphics.cpp | 2 +- - .../DrawingAreaProxyCoordinatedGraphics.h | 2 +- - .../CoordinatedGraphics/DrawingAreaCoordinatedGraphics.cpp | 2 +- - .../CoordinatedGraphics/DrawingAreaCoordinatedGraphics.h | 2 +- - .../WebPage/CoordinatedGraphics/LayerTreeHost.cpp | 4 ++-- - .../WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.h | 6 +++--- - 6 files changed, 9 insertions(+), 9 deletions(-) - -diff --git a/Source/WebKit/UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.cpp b/Source/WebKit/UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.cpp -index 038d9ee2..5e828a10 100644 ---- a/Source/WebKit/UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.cpp -+++ b/Source/WebKit/UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.cpp -@@ -152,7 +152,7 @@ void DrawingAreaProxyCoordinatedGraphics::setBackingStoreIsDiscardable(bool isBa - #endif - } - --#if PLATFORM(GTK) -+#if PLATFORM(GTK) && USE(COORDINATED_GRAPHICS) - void DrawingAreaProxyCoordinatedGraphics::adjustTransientZoom(double scale, FloatPoint origin) - { - send(Messages::DrawingArea::AdjustTransientZoom(scale, origin)); -diff --git a/Source/WebKit/UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.h b/Source/WebKit/UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.h -index b23a45ff..cd263402 100644 ---- a/Source/WebKit/UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.h -+++ b/Source/WebKit/UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.h -@@ -57,7 +57,7 @@ private: - void waitForBackingStoreUpdateOnNextPaint() override; - void setBackingStoreIsDiscardable(bool) override; - --#if PLATFORM(GTK) -+#if PLATFORM(GTK) && USE(COORDINATED_GRAPHICS) - void adjustTransientZoom(double scale, WebCore::FloatPoint origin) override; - void commitTransientZoom(double scale, WebCore::FloatPoint origin) override; - #endif -diff --git a/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/DrawingAreaCoordinatedGraphics.cpp b/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/DrawingAreaCoordinatedGraphics.cpp -index 33ac2e1d..42375784 100644 ---- a/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/DrawingAreaCoordinatedGraphics.cpp -+++ b/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/DrawingAreaCoordinatedGraphics.cpp -@@ -486,7 +486,7 @@ void DrawingAreaCoordinatedGraphics::didUpdate() - displayTimerFired(); - } - --#if PLATFORM(GTK) -+#if PLATFORM(GTK) && USE(COORDINATED_GRAPHICS) - void DrawingAreaCoordinatedGraphics::adjustTransientZoom(double scale, FloatPoint origin) - { - if (!m_transientZoom) { -diff --git a/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/DrawingAreaCoordinatedGraphics.h b/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/DrawingAreaCoordinatedGraphics.h -index d8dc6df7..c8322364 100644 ---- a/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/DrawingAreaCoordinatedGraphics.h -+++ b/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/DrawingAreaCoordinatedGraphics.h -@@ -84,7 +84,7 @@ private: - void updateBackingStoreState(uint64_t backingStoreStateID, bool respondImmediately, float deviceScaleFactor, const WebCore::IntSize&, const WebCore::IntSize& scrollOffset) override; - void didUpdate() override; - --#if PLATFORM(GTK) -+#if PLATFORM(GTK) && USE(COORDINATED_GRAPHICS) - void adjustTransientZoom(double scale, WebCore::FloatPoint origin) override; - void commitTransientZoom(double scale, WebCore::FloatPoint origin) override; - #endif -diff --git a/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.cpp b/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.cpp -index f3304d10..ca0476ff 100644 ---- a/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.cpp -+++ b/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.cpp -@@ -156,7 +156,7 @@ void LayerTreeHost::layerFlushTimerFired() - - bool didSync = m_coordinator.flushPendingLayerChanges(flags); - --#if PLATFORM(GTK) -+#if PLATFORM(GTK) && USE(COORDINATED_GRAPHICS) - // If we have an active transient zoom, we want the zoom to win over any changes - // that WebCore makes to the relevant layers, so re-apply our changes after flushing. - if (m_transientZoom) -@@ -453,7 +453,7 @@ void LayerTreeHost::renderNextFrame(bool forceRepaint) - } - } - --#if PLATFORM(GTK) -+#if PLATFORM(GTK) && USE(COORDINATED_GRAPHICS) - FloatPoint LayerTreeHost::constrainTransientZoomOrigin(double scale, FloatPoint origin) const - { - FrameView& frameView = *m_webPage.mainFrameView(); -diff --git a/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.h b/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.h -index 4f727e41..b070266e 100644 ---- a/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.h -+++ b/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.h -@@ -37,7 +37,7 @@ - #include - #include - #include --#if PLATFORM(GTK) -+#if PLATFORM(GTK) && USE(COORDINATED_GRAPHICS) - #include - #endif - -@@ -100,7 +100,7 @@ public: - - WebCore::PlatformDisplayID displayID() const { return m_displayID; } - --#if PLATFORM(GTK) -+#if PLATFORM(GTK) && USE(COORDINATED_GRAPHICS) - void adjustTransientZoom(double, WebCore::FloatPoint); - void commitTransientZoom(double, WebCore::FloatPoint); - #endif -@@ -213,7 +213,7 @@ private: - #endif // USE(COORDINATED_GRAPHICS) - WebCore::PlatformDisplayID m_displayID; - --#if PLATFORM(GTK) -+#if PLATFORM(GTK) && USE(COORDINATED_GRAPHICS) - bool m_transientZoom { false }; - double m_transientZoomScale { 1 }; - WebCore::FloatPoint m_transientZoomOrigin; diff --git a/meta/recipes-sato/webkit/webkitgtk/0001-Tweak-gtkdoc-settings-so-that-gtkdoc-generation-work.patch b/meta/recipes-sato/webkit/webkitgtk/0001-Tweak-gtkdoc-settings-so-that-gtkdoc-generation-work.patch deleted file mode 100644 index 866e9d9d09..0000000000 --- a/meta/recipes-sato/webkit/webkitgtk/0001-Tweak-gtkdoc-settings-so-that-gtkdoc-generation-work.patch +++ /dev/null @@ -1,47 +0,0 @@ -From 1c7e7a385387d7febf633bbb6d2b99ece523e719 Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin -Date: Thu, 11 Aug 2016 17:13:51 +0300 -Subject: [PATCH] Tweak gtkdoc settings so that gtkdoc generation works under - OpenEmbedded build system - -This requires setting a few environment variables so that the transient -binary is build and linked correctly, and disabling the tweaks to RUN -variable from gtkdoc.py script so that our qemu wrapper is taken into use. - -Upstream-Status: Inappropriate [oe-specific] -Signed-off-by: Alexander Kanavin - ---- - Source/cmake/GtkDoc.cmake | 2 +- - Tools/gtkdoc/gtkdoc.py | 4 ++-- - 2 files changed, 3 insertions(+), 3 deletions(-) - -diff --git a/Source/cmake/GtkDoc.cmake b/Source/cmake/GtkDoc.cmake -index 18e86448..102c873a 100644 ---- a/Source/cmake/GtkDoc.cmake -+++ b/Source/cmake/GtkDoc.cmake -@@ -4,7 +4,7 @@ macro(ADD_GTKDOC_GENERATOR _stamp_name _extra_args) - add_custom_command( - OUTPUT "${CMAKE_BINARY_DIR}/${_stamp_name}" - DEPENDS ${DocumentationDependencies} -- COMMAND ${CMAKE_COMMAND} -E env "CC=${CMAKE_C_COMPILER}" "CFLAGS=${CMAKE_C_FLAGS} -Wno-unused-parameter" "LDFLAGS=${CMAKE_EXE_LINKER_FLAGS}" ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/Tools/gtkdoc/generate-gtkdoc ${_extra_args} -+ COMMAND ${CMAKE_COMMAND} -E env "CC=${CMAKE_C_COMPILER}" "CFLAGS=${CMAKE_C_FLAGS} -Wno-unused-parameter" "LD=${CMAKE_C_COMPILER}" "LDFLAGS=${CMAKE_C_LINK_FLAGS}" "RUN=${CMAKE_BINARY_DIR}/gtkdoc-qemuwrapper" ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/Tools/gtkdoc/generate-gtkdoc ${_extra_args} - COMMAND touch ${_stamp_name} - WORKING_DIRECTORY "${CMAKE_BINARY_DIR}" - VERBATIM -diff --git a/Tools/gtkdoc/gtkdoc.py b/Tools/gtkdoc/gtkdoc.py -index 054cafa1..416de7d1 100644 ---- a/Tools/gtkdoc/gtkdoc.py -+++ b/Tools/gtkdoc/gtkdoc.py -@@ -320,9 +320,9 @@ class GTKDoc(object): - additional_ldflags = '%s %s' % (additional_ldflags, arg) - ldflags = ' "-L%s" %s ' % (self.library_path, additional_ldflags) + ldflags - current_ld_library_path = env.get('LD_LIBRARY_PATH') -- if current_ld_library_path: -+ if current_ld_library_path and 'RUN' not in env: - env['LD_LIBRARY_PATH'] = '%s:%s' % (self.library_path, current_ld_library_path) -- else: -+ elif 'RUN' not in env: - env['LD_LIBRARY_PATH'] = self.library_path - - if ldflags: diff --git a/meta/recipes-sato/webkit/webkitgtk/0001-When-building-introspection-files-do-not-quote-CFLAG.patch b/meta/recipes-sato/webkit/webkitgtk/0001-When-building-introspection-files-do-not-quote-CFLAG.patch index 3d02be9894..4ef0dbfe2f 100644 --- a/meta/recipes-sato/webkit/webkitgtk/0001-When-building-introspection-files-do-not-quote-CFLAG.patch +++ b/meta/recipes-sato/webkit/webkitgtk/0001-When-building-introspection-files-do-not-quote-CFLAG.patch @@ -1,9 +1,9 @@ -From 01f5ab0edf3dd8f76d37fd36c2dcd3108be33a7b Mon Sep 17 00:00:00 2001 +From 89ac299e0d9436f1effaa07711458d616574cc8f Mon Sep 17 00:00:00 2001 From: Alexander Kanavin Date: Mon, 4 Apr 2022 21:20:05 +0200 -Subject: [PATCH] When building introspection files, do not quote CFLAGS. +Subject: [PATCH] Propagate CFLAGS to introspection targets -This does not seem to be propagated to the compiler correctly: +Otherwise, important things do not get passed to the compiler in cross compiling with a sysroot scenario: In file included from /srv/work/alex/poky/build-64-alt/tmp/work/core2-64-poky-linux/webkitgtk/2.36.0-r0/recipe-sysroot-native/usr/lib/x86_64-poky-linux/gcc/x86_64-poky-linux/11.2.0/include-fixed/syslimits.h:7, from /srv/work/alex/poky/build-64-alt/tmp/work/core2-64-poky-linux/webkitgtk/2.36.0-r0/recipe-sysroot-native/usr/lib/x86_64-poky-linux/gcc/x86_64-poky-linux/11.2.0/include-fixed/limits.h:34, @@ -31,48 +31,25 @@ Traceback (most recent call last): raise DistutilsExecError( distutils.errors.DistutilsExecError: command '/srv/work/alex/poky/build-64-alt/tmp/work/core2-64-poky-linux/webkitgtk/2.36.0-r0/recipe-sysroot-native/usr/bin/x86_64-poky-linux/x86_64-poky-linux-gcc' failed with exit code 1 -Upstream-Status: Inappropriate [upstream has rewritten the whole thing as of https://github.com/WebKit/WebKit/commit/b0ae032850bb6b2672051bab8032fc9f9ef5eb97] +Upstream-Status: Pending Signed-off-by: Alexander Kanavin ---- - Source/JavaScriptCore/PlatformGTK.cmake | 2 +- - Source/WebKit/PlatformGTK.cmake | 4 ++-- - 2 files changed, 3 insertions(+), 3 deletions(-) -diff --git a/Source/JavaScriptCore/PlatformGTK.cmake b/Source/JavaScriptCore/PlatformGTK.cmake -index 1c3c8fb7..efd18807 100644 ---- a/Source/JavaScriptCore/PlatformGTK.cmake -+++ b/Source/JavaScriptCore/PlatformGTK.cmake -@@ -71,7 +71,7 @@ if (ENABLE_INTROSPECTION) - add_custom_command( - OUTPUT ${CMAKE_BINARY_DIR}/JavaScriptCore-${WEBKITGTK_API_VERSION}.gir - DEPENDS JavaScriptCore -- COMMAND CC=${CMAKE_C_COMPILER} CFLAGS="-Wno-deprecated-declarations ${CMAKE_C_FLAGS}" LDFLAGS= -+ COMMAND CC=${CMAKE_C_COMPILER} CFLAGS=-Wno-deprecated-declarations\ ${CMAKE_C_FLAGS} LDFLAGS= - ${LOADER_LIBRARY_PATH_VAR}="${INTROSPECTION_ADDITIONAL_LIBRARY_PATH}" - ${INTROSPECTION_SCANNER} - --quiet -diff --git a/Source/WebKit/PlatformGTK.cmake b/Source/WebKit/PlatformGTK.cmake -index 48d1820d..ded05035 100644 ---- a/Source/WebKit/PlatformGTK.cmake -+++ b/Source/WebKit/PlatformGTK.cmake -@@ -675,7 +675,7 @@ if (ENABLE_INTROSPECTION) - add_custom_target(WebKit2-${WEBKITGTK_API_VERSION}-gir - DEPENDS WebKit - DEPENDS ${CMAKE_BINARY_DIR}/JavaScriptCore-${WEBKITGTK_API_VERSION}.gir -- COMMAND CC=${CMAKE_C_COMPILER} CFLAGS="-Wno-deprecated-declarations ${CMAKE_C_FLAGS}" LDFLAGS= -+ COMMAND CC=${CMAKE_C_COMPILER} CFLAGS=-Wno-deprecated-declarations\ ${CMAKE_C_FLAGS} LDFLAGS= - ${LOADER_LIBRARY_PATH_VAR}="${INTROSPECTION_ADDITIONAL_LIBRARY_PATH}" - ${INTROSPECTION_SCANNER} - --quiet -@@ -721,7 +721,7 @@ if (ENABLE_INTROSPECTION) - OUTPUT ${CMAKE_BINARY_DIR}/WebKit2WebExtension-${WEBKITGTK_API_VERSION}.gir - DEPENDS ${CMAKE_BINARY_DIR}/JavaScriptCore-${WEBKITGTK_API_VERSION}.gir - DEPENDS WebKit2-${WEBKITGTK_API_VERSION}-gir -- COMMAND CC=${CMAKE_C_COMPILER} CFLAGS="-Wno-deprecated-declarations ${CMAKE_C_FLAGS}" -+ COMMAND CC=${CMAKE_C_COMPILER} CFLAGS=-Wno-deprecated-declarations\ ${CMAKE_C_FLAGS} - LDFLAGS="${INTROSPECTION_ADDITIONAL_LDFLAGS}" - ${LOADER_LIBRARY_PATH_VAR}="${INTROSPECTION_ADDITIONAL_LIBRARY_PATH}" - ${INTROSPECTION_SCANNER} --- -2.30.2 +Signed-off-by: Alexander Kanavin +--- + Source/cmake/FindGI.cmake | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Source/cmake/FindGI.cmake b/Source/cmake/FindGI.cmake +index b3e810cd..e22a75f7 100644 +--- a/Source/cmake/FindGI.cmake ++++ b/Source/cmake/FindGI.cmake +@@ -340,7 +340,7 @@ function(GI_INTROSPECT namespace nsversion header) + DEPENDS ${gir_deps} ${gir_srcs} + VERBATIM + COMMAND_EXPAND_LISTS +- COMMAND ${CMAKE_COMMAND} -E env "CC=${CMAKE_C_COMPILER}" ++ COMMAND ${CMAKE_COMMAND} -E env "CC=${CMAKE_C_COMPILER}" "CFLAGS=${CMAKE_C_FLAGS}" + "${GI_SCANNER_EXE}" --quiet --warn-all --warn-error --no-libtool + "--output=${gir_path}" + "--library=$" diff --git a/meta/recipes-sato/webkit/webkitgtk/fix-gstreamer-include-paths.patch b/meta/recipes-sato/webkit/webkitgtk/fix-gstreamer-include-paths.patch deleted file mode 100644 index 2c6be87902..0000000000 --- a/meta/recipes-sato/webkit/webkitgtk/fix-gstreamer-include-paths.patch +++ /dev/null @@ -1,51 +0,0 @@ -From 25efd1478b48b5406fdab3b7b9c1f7e0ef95a7ed Mon Sep 17 00:00:00 2001 -From: Pablo Saavedra -Date: Mon, 27 Jun 2022 16:56:04 -0700 -Subject: [PATCH] Fix include gstreamer path on cross compiler toolchains - https://bugs.webkit.org/show_bug.cgi?id=241483 - -Reviewed by Adrian Perez de Castro. - -Set the include paths for the gstreamer components to the full path -using the find_path(). This function relies in CMAKE_FIND_ROOT_PATH to -find the right place where the includes they are. This fixes possible -warnings/errors on cross toolchains using -Wpoison-system-directories -and -Werror=poison-system-directories. - -* Source/cmake/FindGStreamer.cmake: - -Canonical link: https://commits.webkit.org/251895@main - -Upstream-Status: Backport [2.37.1 https://github.com/WebKit/WebKit/commit/25efd1478b48b5406fdab3b7b9c1f7e0ef95a7ed] ---- - Source/cmake/FindGStreamer.cmake | 14 +++++++++++--- - 1 file changed, 11 insertions(+), 3 deletions(-) - -diff --git a/Source/cmake/FindGStreamer.cmake b/Source/cmake/FindGStreamer.cmake -index 3216f6974b53..b65a11f30871 100644 ---- a/Source/cmake/FindGStreamer.cmake -+++ b/Source/cmake/FindGStreamer.cmake -@@ -75,12 +75,20 @@ macro(FIND_GSTREAMER_COMPONENT _component_prefix _pkgconfig_name _library) - # ${includedir}/gstreamer-1.0 which remains correct. The issue here is that - # we don't rely on the `Cflags`, cmake fails to generate a proper - # `.._INCLUDE_DIRS` variable in this case. So we need to do it here... -+ -+ # Populate the list initially from the _INCLUDE_DIRS result variable. -+ set(${_component_prefix}_INCLUDE_DIRS ${PC_${_component_prefix}_INCLUDE_DIRS}) -+ - set(_include_dir "${PC_${_component_prefix}_INCLUDEDIR}") - string(REGEX MATCH "(.*)/gstreamer-1.0" _dummy "${_include_dir}") -+ - if ("${CMAKE_MATCH_1}" STREQUAL "") -- set(${_component_prefix}_INCLUDE_DIRS "${_include_dir}/gstreamer-1.0;${PC_${_component_prefix}_INCLUDE_DIRS}") -- else () -- set(${_component_prefix}_INCLUDE_DIRS "${PC_${_component_prefix}_INCLUDE_DIRS}") -+ find_path(${_component_prefix}_RESOLVED_INCLUDEDIR NAMES "${_include_dir}/gstreamer-1.0") -+ # Only add the resolved path from `_INCLUDEDIR` if found. -+ if (${_component_prefix}_RESOLVED_INCLUDEDIR) -+ list(APPEND ${_component_prefix}_INCLUDE_DIRS -+ "${${_component_prefix}_RESOLVED_INCLUDEDIR}") -+ endif () - endif () - - find_library(${_component_prefix}_LIBRARIES diff --git a/meta/recipes-sato/webkit/webkitgtk_2.36.7.bb b/meta/recipes-sato/webkit/webkitgtk_2.36.7.bb deleted file mode 100644 index f3e1adee70..0000000000 --- a/meta/recipes-sato/webkit/webkitgtk_2.36.7.bb +++ /dev/null @@ -1,168 +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 & LGPL-2.0-or-later" -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-Tweak-gtkdoc-settings-so-that-gtkdoc-generation-work.patch \ - file://0001-Fix-build-without-opengl-or-es.patch \ - file://reproducibility.patch \ - file://0001-When-building-introspection-files-do-not-quote-CFLAG.patch \ - file://fix-gstreamer-include-paths.patch \ - file://0d3344e17d258106617b0e6d783d073b188a2548.patch \ - " -SRC_URI[sha256sum] = "0c260cf2b32f0481d017670dfed1b61e554967cd067195606c9f9eb5fe731743" - -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 \ - gperf-native \ - cairo \ - harfbuzz \ - jpeg \ - atk \ - libwebp \ - gtk+3 \ - libxslt \ - libtasn1 \ - libnotify \ - gstreamer1.0 \ - gstreamer1.0-plugins-base \ - " - -PACKAGECONFIG_SOUP ?= "soup3" -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)} \ - ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'opengl-or-es', '', d)} \ - enchant \ - libsecret \ - ${PACKAGECONFIG_SOUP} \ - " - -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/egl" -PACKAGECONFIG[opengl] = "-DENABLE_GRAPHICS_CONTEXT_GL=ON,-DENABLE_GRAPHICS_CONTEXT_GL=OFF,virtual/egl" -PACKAGECONFIG[opengl-or-es] = "-DUSE_OPENGL_OR_ES=ON,-DUSE_OPENGL_OR_ES=OFF" -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" -PACKAGECONFIG[soup2] = "-DUSE_SOUP2=ON,-DUSE_SOUP2=OFF,libsoup-2.4,,,soup3" -PACKAGECONFIG[soup3] = ",,libsoup,,,soup2" -PACKAGECONFIG[journald] = "-DENABLE_JOURNALD_LOG=ON,-DENABLE_JOURNALD_LOG=OFF,systemd" - -# 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" - -# Needed for non-mesa graphics stacks when x11 is disabled -CXXFLAGS += "${@bb.utils.contains('DISTRO_FEATURES', 'x11', '', '-DEGL_NO_X11=1', d)}" - -# 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.*/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 - -} - diff --git a/meta/recipes-sato/webkit/webkitgtk_2.38.2.bb b/meta/recipes-sato/webkit/webkitgtk_2.38.2.bb new file mode 100644 index 0000000000..616416f6dc --- /dev/null +++ b/meta/recipes-sato/webkit/webkitgtk_2.38.2.bb @@ -0,0 +1,165 @@ +SUMMARY = "WebKit web rendering engine for the GTK+ platform" +HOMEPAGE = "https://www.webkitgtk.org/" +BUGTRACKER = "https://bugs.webkit.org/" + +LICENSE = "BSD-2-Clause & LGPL-2.0-or-later" +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://reproducibility.patch \ + file://0001-When-building-introspection-files-do-not-quote-CFLAG.patch \ + file://0d3344e17d258106617b0e6d783d073b188a2548.patch \ + " +SRC_URI[sha256sum] = "f3eb82899651f583b4d99cacd16af784a1a7710fce9e7b6807bd6ccde909fe3e" + +inherit cmake pkgconfig gobject-introspection perlnative features_check upstream-version-is-even gi-docgen + +ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}" +REQUIRED_DISTRO_FEATURES = "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'opengl', '', d)}" + +CVE_PRODUCT = "webkitgtk webkitgtk\+" + +DEPENDS = " \ + ruby-native \ + gperf-native \ + cairo \ + harfbuzz \ + jpeg \ + atk \ + libwebp \ + gtk+3 \ + libxslt \ + libtasn1 \ + libnotify \ + gstreamer1.0 \ + gstreamer1.0-plugins-base \ + " + +PACKAGECONFIG_SOUP ?= "soup3" +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)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'opengl-or-es', '', d)} \ + enchant \ + libsecret \ + ${PACKAGECONFIG_SOUP} \ + " + +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/egl" +PACKAGECONFIG[opengl] = "-DENABLE_GRAPHICS_CONTEXT_GL=ON,-DENABLE_GRAPHICS_CONTEXT_GL=OFF,virtual/egl" +PACKAGECONFIG[opengl-or-es] = "-DUSE_OPENGL_OR_ES=ON,-DUSE_OPENGL_OR_ES=OFF" +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" +PACKAGECONFIG[soup2] = "-DUSE_SOUP2=ON,-DUSE_SOUP2=OFF,libsoup-2.4,,,soup3" +PACKAGECONFIG[soup3] = ",,libsoup,,,soup2" +PACKAGECONFIG[journald] = "-DENABLE_JOURNALD_LOG=ON,-DENABLE_JOURNALD_LOG=OFF,systemd" + +# 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('GIDOCGEN_ENABLED', 'True', '-DENABLE_DOCUMENTATION=ON', '-DENABLE_DOCUMENTATION=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" + +# Needed for non-mesa graphics stacks when x11 is disabled +CXXFLAGS += "${@bb.utils.contains('DISTRO_FEATURES', 'x11', '', '-DEGL_NO_X11=1', d)}" + +# 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.*/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