From f2629e86566c69850dad1e8633019e42045c34bf Mon Sep 17 00:00:00 2001 From: Alexander Kanavin Date: Fri, 11 Oct 2019 13:47:44 +0200 Subject: webkitgtk: update 2.24.4 -> 2.26.1 Drop patches: - 0001-WebKitMacros-Append-to-I-and-not-to-isystem.patch - this has been a pain to rebase for a while as upstream keeps shifting and changing the code that needs to be modified. If the issue the patch is addressing is still relevant, please work with upstream to fix it at the source - 0001-gstreamer-add-a-missing-format-string.patch, narrowing.patch are integrated upstream - detect-gstreamer-gl.patch is adjusting something that is better done from the yocto package configuration Add an option to disable an enabled-by-default sandbox that requires a component that oe-core does not have. (From OE-Core rev: d9e3ff36af9e06c1bc94c7a4c37ae87afceea5ca) Signed-off-by: Alexander Kanavin Signed-off-by: Richard Purdie --- ...bKitMacros-Append-to-I-and-not-to-isystem.patch | 125 -------------------- ...001-gstreamer-add-a-missing-format-string.patch | 24 ---- .../webkit/webkitgtk/detect-gstreamer-gl.patch | 20 ---- meta/recipes-sato/webkit/webkitgtk/narrowing.patch | 31 ----- meta/recipes-sato/webkit/webkitgtk_2.24.4.bb | 130 --------------------- meta/recipes-sato/webkit/webkitgtk_2.26.1.bb | 127 ++++++++++++++++++++ 6 files changed, 127 insertions(+), 330 deletions(-) delete mode 100644 meta/recipes-sato/webkit/webkitgtk/0001-WebKitMacros-Append-to-I-and-not-to-isystem.patch delete mode 100644 meta/recipes-sato/webkit/webkitgtk/0001-gstreamer-add-a-missing-format-string.patch delete mode 100644 meta/recipes-sato/webkit/webkitgtk/detect-gstreamer-gl.patch delete mode 100644 meta/recipes-sato/webkit/webkitgtk/narrowing.patch delete mode 100644 meta/recipes-sato/webkit/webkitgtk_2.24.4.bb create mode 100644 meta/recipes-sato/webkit/webkitgtk_2.26.1.bb (limited to 'meta') diff --git a/meta/recipes-sato/webkit/webkitgtk/0001-WebKitMacros-Append-to-I-and-not-to-isystem.patch b/meta/recipes-sato/webkit/webkitgtk/0001-WebKitMacros-Append-to-I-and-not-to-isystem.patch deleted file mode 100644 index e71905d26a..0000000000 --- a/meta/recipes-sato/webkit/webkitgtk/0001-WebKitMacros-Append-to-I-and-not-to-isystem.patch +++ /dev/null @@ -1,125 +0,0 @@ -From d1634e56a2589ec62325011bf77d480a67123b52 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Sun, 17 Apr 2016 12:35:41 -0700 -Subject: [PATCH] WebKitMacros: Append to -I and not to -isystem - -gcc-6 has now introduced stdlib.h in libstdc++ for better -compliance and its including the C library stdlib.h using -include_next which is sensitive to order of system header -include paths. Its infact better to not tinker with the -system header include paths at all. Since adding /usr/include -to -system is redundant and compiler knows about it moreover -now with gcc6 it interferes with compiler's functioning -and ends up with compile errors e.g. - -/usr/include/c++/6.0.0/cstdlib:75:25: fatal error: stdlib.h: No such file or directory - -Signed-off-by: Khem Raj - -Upstream-Status: Pending - ---- - Source/JavaScriptCore/shell/CMakeLists.txt | 2 +- - Source/WebCore/PlatformGTK.cmake | 6 +++--- - Source/WebKit/PlatformGTK.cmake | 2 +- - Source/cmake/WebKitMacros.cmake | 2 +- - Tools/MiniBrowser/gtk/CMakeLists.txt | 2 +- - Tools/TestWebKitAPI/PlatformGTK.cmake | 2 +- - 6 files changed, 8 insertions(+), 8 deletions(-) - -diff --git a/Source/JavaScriptCore/shell/CMakeLists.txt b/Source/JavaScriptCore/shell/CMakeLists.txt -index 87153e35..cd0beed4 100644 ---- a/Source/JavaScriptCore/shell/CMakeLists.txt -+++ b/Source/JavaScriptCore/shell/CMakeLists.txt -@@ -36,7 +36,7 @@ WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS() - WEBKIT_WRAP_SOURCELIST(${JSC_SOURCES}) - WEBKIT_WRAP_SOURCELIST(${TESTAPI_SOURCES}) - include_directories(./ ${JavaScriptCore_INCLUDE_DIRECTORIES} ${JavaScriptCore_PRIVATE_INCLUDE_DIRECTORIES}) --include_directories(SYSTEM ${JavaScriptCore_SYSTEM_INCLUDE_DIRECTORIES}) -+include_directories(${JavaScriptCore_SYSTEM_INCLUDE_DIRECTORIES}) - add_executable(jsc ${JSC_SOURCES}) - target_link_libraries(jsc ${JSC_LIBRARIES}) - -diff --git a/Source/WebCore/PlatformGTK.cmake b/Source/WebCore/PlatformGTK.cmake -index e0dd9cd9..a2997f3e 100644 ---- a/Source/WebCore/PlatformGTK.cmake -+++ b/Source/WebCore/PlatformGTK.cmake -@@ -164,7 +164,7 @@ if (ENABLE_PLUGIN_PROCESS_GTK2) - target_include_directories(WebCorePlatformGTK2 PRIVATE - ${WebCore_INCLUDE_DIRECTORIES} - ) -- target_include_directories(WebCorePlatformGTK2 SYSTEM PRIVATE -+ target_include_directories(WebCorePlatformGTK2 PRIVATE - ${WebCore_SYSTEM_INCLUDE_DIRECTORIES} - ${GTK2_INCLUDE_DIRS} - ${GDK2_INCLUDE_DIRS} -@@ -190,7 +190,7 @@ add_dependencies(WebCorePlatformGTK WebCore) - target_include_directories(WebCorePlatformGTK PRIVATE - ${WebCore_INCLUDE_DIRECTORIES} - ) --target_include_directories(WebCorePlatformGTK SYSTEM PRIVATE -+target_include_directories(WebCorePlatformGTK PRIVATE - ${WebCore_SYSTEM_INCLUDE_DIRECTORIES} - ${GTK_INCLUDE_DIRS} - ${GDK_INCLUDE_DIRS} -@@ -206,7 +206,7 @@ include_directories( - "${WEBCORE_DIR}/bindings/gobject/" - ) - --include_directories(SYSTEM -+include_directories( - ${WebCore_SYSTEM_INCLUDE_DIRECTORIES} - ) - -diff --git a/Source/WebKit/PlatformGTK.cmake b/Source/WebKit/PlatformGTK.cmake -index 693bbdfe..20e3802f 100644 ---- a/Source/WebKit/PlatformGTK.cmake -+++ b/Source/WebKit/PlatformGTK.cmake -@@ -664,7 +664,7 @@ if (ENABLE_PLUGIN_PROCESS_GTK2) - target_include_directories(WebKitPluginProcess2 PRIVATE - ${WebKitCommonIncludeDirectories} - ) -- target_include_directories(WebKitPluginProcess2 SYSTEM PRIVATE -+ target_include_directories(WebKitPluginProcess2 PRIVATE - ${WebKitCommonSystemIncludeDirectories} - ${GTK2_INCLUDE_DIRS} - ${GDK2_INCLUDE_DIRS} -diff --git a/Source/cmake/WebKitMacros.cmake b/Source/cmake/WebKitMacros.cmake -index 6d58d57e..976e2362 100644 ---- a/Source/cmake/WebKitMacros.cmake -+++ b/Source/cmake/WebKitMacros.cmake -@@ -152,7 +152,7 @@ macro(WEBKIT_FRAMEWORK _target) - ${${_target}_SOURCES} - ) - target_include_directories(${_target} PUBLIC "$") -- target_include_directories(${_target} SYSTEM PRIVATE "$") -+ target_include_directories(${_target} PRIVATE "$") - target_include_directories(${_target} PRIVATE "$") - target_link_libraries(${_target} ${${_target}_LIBRARIES}) - set_target_properties(${_target} PROPERTIES COMPILE_DEFINITIONS "BUILDING_${_target}") -diff --git a/Tools/MiniBrowser/gtk/CMakeLists.txt b/Tools/MiniBrowser/gtk/CMakeLists.txt -index a0d32059..f259ade2 100644 ---- a/Tools/MiniBrowser/gtk/CMakeLists.txt -+++ b/Tools/MiniBrowser/gtk/CMakeLists.txt -@@ -59,7 +59,7 @@ endif () - add_definitions(-DGDK_VERSION_MIN_REQUIRED=GDK_VERSION_3_6) - - include_directories(${MiniBrowser_INCLUDE_DIRECTORIES}) --include_directories(SYSTEM ${MiniBrowser_SYSTEM_INCLUDE_DIRECTORIES}) -+include_directories(${MiniBrowser_SYSTEM_INCLUDE_DIRECTORIES}) - add_executable(MiniBrowser ${MiniBrowser_SOURCES}) - target_link_libraries(MiniBrowser ${MiniBrowser_LIBRARIES}) - -diff --git a/Tools/TestWebKitAPI/PlatformGTK.cmake b/Tools/TestWebKitAPI/PlatformGTK.cmake -index 8dd0e146..d037fc35 100644 ---- a/Tools/TestWebKitAPI/PlatformGTK.cmake -+++ b/Tools/TestWebKitAPI/PlatformGTK.cmake -@@ -22,7 +22,7 @@ include_directories( - ${WEBKIT_DIR}/UIProcess/API/gtk - ) - --include_directories(SYSTEM -+include_directories( - ${GDK3_INCLUDE_DIRS} - ${GLIB_INCLUDE_DIRS} - ${GSTREAMER_INCLUDE_DIRS} diff --git a/meta/recipes-sato/webkit/webkitgtk/0001-gstreamer-add-a-missing-format-string.patch b/meta/recipes-sato/webkit/webkitgtk/0001-gstreamer-add-a-missing-format-string.patch deleted file mode 100644 index bd4ac1e353..0000000000 --- a/meta/recipes-sato/webkit/webkitgtk/0001-gstreamer-add-a-missing-format-string.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 2d9687840b97186b80053dd262209e39455ac876 Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin -Date: Wed, 8 May 2019 15:31:23 +0200 -Subject: [PATCH] gstreamer: add a missing format string - -Upstream-Status: Pending -Signed-off-by: Alexander Kanavin ---- - .../platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/Source/WebCore/platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp b/Source/WebCore/platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp -index e1e497ee..483fd65c 100644 ---- a/Source/WebCore/platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp -+++ b/Source/WebCore/platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp -@@ -738,7 +738,7 @@ static GstStateChangeReturn webKitWebSrcChangeState(GstElement* element, GstStat - WebKitWebSrc* src = WEBKIT_WEB_SRC(element); - - #if GST_CHECK_VERSION(1, 14, 0) -- GST_DEBUG_OBJECT(src, gst_state_change_get_name(transition)); -+ GST_DEBUG_OBJECT(src, "%s", gst_state_change_get_name(transition)); - #endif - switch (transition) { - case GST_STATE_CHANGE_READY_TO_NULL: diff --git a/meta/recipes-sato/webkit/webkitgtk/detect-gstreamer-gl.patch b/meta/recipes-sato/webkit/webkitgtk/detect-gstreamer-gl.patch deleted file mode 100644 index 57ae48c141..0000000000 --- a/meta/recipes-sato/webkit/webkitgtk/detect-gstreamer-gl.patch +++ /dev/null @@ -1,20 +0,0 @@ -From: Alberto Garcia -Subject: Disable USE_GSTREAMER_GL is the package is not found -Forwarded: no -Upstream-Status: Pending -Signed-off-by: Khem Raj - -Index: webkitgtk/Source/cmake/GStreamerChecks.cmake -=================================================================== ---- webkitgtk.orig/Source/cmake/GStreamerChecks.cmake -+++ webkitgtk/Source/cmake/GStreamerChecks.cmake -@@ -43,7 +43,8 @@ if (ENABLE_VIDEO OR ENABLE_WEB_AUDIO) - message(FATAL_ERROR "GStreamer 1.10 is needed for USE_GSTREAMER_GL.") - else () - if (NOT PC_GSTREAMER_GL_FOUND) -- message(FATAL_ERROR "GStreamerGL is needed for USE_GSTREAMER_GL.") -+ set(USE_GSTREAMER_GL OFF) -+ message(STATUS "GStreamerGL is needed for USE_GSTREAMER_GL.") - endif () - endif () - endif () diff --git a/meta/recipes-sato/webkit/webkitgtk/narrowing.patch b/meta/recipes-sato/webkit/webkitgtk/narrowing.patch deleted file mode 100644 index 598b6b5df5..0000000000 --- a/meta/recipes-sato/webkit/webkitgtk/narrowing.patch +++ /dev/null @@ -1,31 +0,0 @@ -Fix build with clang on arm where char is unsigned - -Upstream-Status: Submitted [https://bugs.webkit.org/show_bug.cgi?id=197087] -Signed-off-by: Khem Raj - ---- a/Source/WebCore/contentextensions/DFACombiner.cpp -+++ b/Source/WebCore/contentextensions/DFACombiner.cpp -@@ -37,7 +37,7 @@ namespace WebCore { - namespace ContentExtensions { - - class DFAMerger { -- typedef MutableRangeList CombinedTransitionsMutableRangeList; -+ typedef MutableRangeList CombinedTransitionsMutableRangeList; - - enum class WhichDFA { - A, ---- a/Source/WebCore/contentextensions/NFAToDFA.cpp -+++ b/Source/WebCore/contentextensions/NFAToDFA.cpp -@@ -41,9 +41,9 @@ namespace WebCore { - - namespace ContentExtensions { - --typedef MutableRange NFANodeRange; --typedef MutableRangeList NFANodeRangeList; --typedef MutableRangeList PreallocatedNFANodeRangeList; -+typedef MutableRange NFANodeRange; -+typedef MutableRangeList NFANodeRangeList; -+typedef MutableRangeList PreallocatedNFANodeRangeList; - typedef Vector UniqueNodeList; - typedef Vector NFANodeClosures; - diff --git a/meta/recipes-sato/webkit/webkitgtk_2.24.4.bb b/meta/recipes-sato/webkit/webkitgtk_2.24.4.bb deleted file mode 100644 index 8c695ce9e7..0000000000 --- a/meta/recipes-sato/webkit/webkitgtk_2.24.4.bb +++ /dev/null @@ -1,130 +0,0 @@ -SUMMARY = "WebKit web rendering engine for the GTK+ platform" -HOMEPAGE = "http://www.webkitgtk.org/" -BUGTRACKER = "http://bugs.webkit.org/" - -LICENSE = "BSD & 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 = "http://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-OptionsGTK.cmake-drop-the-hardcoded-introspection-gt.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://x32_support.patch \ - file://cross-compile.patch \ - file://0001-WebKitMacros-Append-to-I-and-not-to-isystem.patch \ - file://0001-Fix-build-with-musl.patch \ - file://detect-gstreamer-gl.patch \ - file://include_array.patch \ - file://narrowing.patch \ - file://0001-gstreamer-add-a-missing-format-string.patch \ - " - -SRC_URI[md5sum] = "c214963d8c0e7d83460da04a0d8dda87" -SRC_URI[sha256sum] = "8668b129c026624ec226a4cccf4995f9d26f3e88fc28ab75b0e965f3c32b7dd8" - -inherit cmake pkgconfig gobject-introspection perlnative distro_features_check upstream-version-is-even gtk-doc - -REQUIRED_DISTRO_FEATURES = "x11 opengl" - -CVE_PRODUCT = "webkitgtk webkitgtk\+" - -DEPENDS = "zlib libsoup-2.4 curl libxml2 cairo libxslt libxt libidn libgcrypt \ - gtk+3 gstreamer1.0 gstreamer1.0-plugins-base flex-native gperf-native sqlite3 \ - pango icu bison-native gawk intltool-native libwebp \ - atk udev harfbuzz jpeg libpng pulseaudio librsvg libtheora libvorbis libxcomposite libxtst \ - ruby-native libnotify gstreamer1.0-plugins-bad \ - gettext-native glib-2.0 glib-2.0-native libtasn1 \ - " - -PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', 'wayland' ,d)} \ - ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'webgl opengl', '' ,d)} \ - enchant \ - libsecret \ - " - -PACKAGECONFIG[wayland] = "-DENABLE_WAYLAND_TARGET=ON,-DENABLE_WAYLAND_TARGET=OFF,wayland" -PACKAGECONFIG[x11] = "-DENABLE_X11_TARGET=ON,-DENABLE_X11_TARGET=OFF,virtual/libx11" -PACKAGECONFIG[geoclue] = "-DENABLE_GEOLOCATION=ON,-DENABLE_GEOLOCATION=OFF,geoclue" -PACKAGECONFIG[enchant] = "-DENABLE_SPELLCHECK=ON,-DENABLE_SPELLCHECK=OFF,enchant" -PACKAGECONFIG[gtk2] = "-DENABLE_PLUGIN_PROCESS_GTK2=ON,-DENABLE_PLUGIN_PROCESS_GTK2=OFF,gtk+" -PACKAGECONFIG[gles2] = "-DENABLE_GLES2=ON,-DENABLE_GLES2=OFF,virtual/libgles2" -PACKAGECONFIG[webgl] = "-DENABLE_WEBGL=ON,-DENABLE_WEBGL=OFF,virtual/libgl" -PACKAGECONFIG[opengl] = "-DENABLE_OPENGL=ON,-DENABLE_OPENGL=OFF,virtual/libgl" -PACKAGECONFIG[libsecret] = "-DUSE_LIBSECRET=ON,-DUSE_LIBSECRET=OFF,libsecret" -PACKAGECONFIG[libhyphen] = "-DUSE_LIBHYPHEN=ON,-DUSE_LIBHYPHEN=OFF,libhyphen" -# Source is at https://github.com/google/woff2 -PACKAGECONFIG[woff2] = "-DUSE_WOFF2=ON,-DUSE_WOFF2=OFF,woff2" -PACKAGECONFIG[openjpeg] = "-DUSE_OPENJPEG=ON,-DUSE_OPENJPEG=OFF,openjpeg" - -EXTRA_OECMAKE = " \ - -DPORT=GTK \ - -DCMAKE_BUILD_TYPE=Release \ - ${@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` \ - " - -# 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_mipsarchn32 = " -DUSE_LD_GOLD=OFF " -EXTRA_OECMAKE_append_powerpc = " -DUSE_LD_GOLD=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" - -LDFLAGS_append_toolchain-clang = " -rtlib=compiler-rt" - -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" - -# qemu: uncaught target signal 11 (Segmentation fault) - core dumped -# Segmentation fault -GI_DATA_ENABLED_armv7a = "False" -GI_DATA_ENABLED_armv7ve = "False" - -# Can't be built with ccache -CCACHE_DISABLE = "1" diff --git a/meta/recipes-sato/webkit/webkitgtk_2.26.1.bb b/meta/recipes-sato/webkit/webkitgtk_2.26.1.bb new file mode 100644 index 0000000000..77e51e7d29 --- /dev/null +++ b/meta/recipes-sato/webkit/webkitgtk_2.26.1.bb @@ -0,0 +1,127 @@ +SUMMARY = "WebKit web rendering engine for the GTK+ platform" +HOMEPAGE = "http://www.webkitgtk.org/" +BUGTRACKER = "http://bugs.webkit.org/" + +LICENSE = "BSD & 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 = "http://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-OptionsGTK.cmake-drop-the-hardcoded-introspection-gt.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://x32_support.patch \ + file://cross-compile.patch \ + file://0001-Fix-build-with-musl.patch \ + file://include_array.patch \ + " + +SRC_URI[md5sum] = "08145bd6c1587230f135921c142bc150" +SRC_URI[sha256sum] = "6b4b21801d2b1008422a1075dbd6fb4ae8b5127503faf657cf9671289d9cd155" + +inherit cmake pkgconfig gobject-introspection perlnative distro_features_check upstream-version-is-even gtk-doc + +REQUIRED_DISTRO_FEATURES = "x11 opengl" + +CVE_PRODUCT = "webkitgtk webkitgtk\+" + +DEPENDS = "zlib libsoup-2.4 curl libxml2 cairo libxslt libxt libidn libgcrypt \ + gtk+3 gstreamer1.0 gstreamer1.0-plugins-base flex-native gperf-native sqlite3 \ + pango icu bison-native gawk intltool-native libwebp \ + atk udev harfbuzz jpeg libpng pulseaudio librsvg libtheora libvorbis libxcomposite libxtst \ + ruby-native libnotify gstreamer1.0-plugins-bad \ + gettext-native glib-2.0 glib-2.0-native libtasn1 \ + " + +PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', 'wayland' ,d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'webgl opengl', '' ,d)} \ + enchant \ + libsecret \ + " + +PACKAGECONFIG[wayland] = "-DENABLE_WAYLAND_TARGET=ON,-DENABLE_WAYLAND_TARGET=OFF,wayland" +PACKAGECONFIG[x11] = "-DENABLE_X11_TARGET=ON,-DENABLE_X11_TARGET=OFF,virtual/libx11" +PACKAGECONFIG[geoclue] = "-DENABLE_GEOLOCATION=ON,-DENABLE_GEOLOCATION=OFF,geoclue" +PACKAGECONFIG[enchant] = "-DENABLE_SPELLCHECK=ON,-DENABLE_SPELLCHECK=OFF,enchant" +PACKAGECONFIG[gtk2] = "-DENABLE_PLUGIN_PROCESS_GTK2=ON,-DENABLE_PLUGIN_PROCESS_GTK2=OFF,gtk+" +PACKAGECONFIG[gles2] = "-DENABLE_GLES2=ON,-DENABLE_GLES2=OFF,virtual/libgles2" +PACKAGECONFIG[webgl] = "-DENABLE_WEBGL=ON,-DENABLE_WEBGL=OFF,virtual/libgl" +PACKAGECONFIG[opengl] = "-DENABLE_OPENGL=ON,-DENABLE_OPENGL=OFF,virtual/libgl" +PACKAGECONFIG[libsecret] = "-DUSE_LIBSECRET=ON,-DUSE_LIBSECRET=OFF,libsecret" +PACKAGECONFIG[libhyphen] = "-DUSE_LIBHYPHEN=ON,-DUSE_LIBHYPHEN=OFF,libhyphen" +# Source is at https://github.com/google/woff2 +PACKAGECONFIG[woff2] = "-DUSE_WOFF2=ON,-DUSE_WOFF2=OFF,woff2" +PACKAGECONFIG[openjpeg] = "-DUSE_OPENJPEG=ON,-DUSE_OPENJPEG=OFF,openjpeg" + +EXTRA_OECMAKE = " \ + -DPORT=GTK \ + -DCMAKE_BUILD_TYPE=Release \ + ${@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 \ + " + +# 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_mipsarchn32 = " -DUSE_LD_GOLD=OFF " +EXTRA_OECMAKE_append_powerpc = " -DUSE_LD_GOLD=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" + +LDFLAGS_append_toolchain-clang = " -rtlib=compiler-rt" + +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" + +# qemu: uncaught target signal 11 (Segmentation fault) - core dumped +# Segmentation fault +GI_DATA_ENABLED_armv7a = "False" +GI_DATA_ENABLED_armv7ve = "False" + +# Can't be built with ccache +CCACHE_DISABLE = "1" -- cgit v1.2.3-54-g00ecf