From 52623b59c06bd9c15234d8c9a1e0bddac7197fd7 Mon Sep 17 00:00:00 2001 From: Alexander Kanavin Date: Thu, 30 Apr 2020 11:58:09 +0200 Subject: webkitgtk: update to 2.28.2 to fix multiple CVE's This latest stable release fixes: CVE-2020-10018, CVE-2020-11793, CVE-2020-3885, CVE-2020-3894, CVE-2020-3895, CVE-2020-3897, CVE-2020-3899, CVE-2020-3900, CVE-2020-3901, CVE-2020-3902 (From OE-Core rev: ea75624d2b36fc4c5fbbbb0b2f06ce8a5cadd214) Signed-off-by: Alexander Kanavin Signed-off-by: Richard Purdie Signed-off-by: Steve Sakoman Signed-off-by: Richard Purdie --- .../webkitgtk/0001-Fix-build-with-musl.patch | 30 ++--- ...c-settings-so-that-gtkdoc-generation-work.patch | 8 +- .../webkit/webkitgtk/x32_support.patch | 30 ----- meta/recipes-sato/webkit/webkitgtk_2.26.4.bb | 133 --------------------- meta/recipes-sato/webkit/webkitgtk_2.28.2.bb | 132 ++++++++++++++++++++ 5 files changed, 151 insertions(+), 182 deletions(-) delete mode 100644 meta/recipes-sato/webkit/webkitgtk/x32_support.patch delete mode 100644 meta/recipes-sato/webkit/webkitgtk_2.26.4.bb create mode 100644 meta/recipes-sato/webkit/webkitgtk_2.28.2.bb (limited to 'meta/recipes-sato') diff --git a/meta/recipes-sato/webkit/webkitgtk/0001-Fix-build-with-musl.patch b/meta/recipes-sato/webkit/webkitgtk/0001-Fix-build-with-musl.patch index 0c145c7ebd..6dcb52956c 100644 --- a/meta/recipes-sato/webkit/webkitgtk/0001-Fix-build-with-musl.patch +++ b/meta/recipes-sato/webkit/webkitgtk/0001-Fix-build-with-musl.patch @@ -1,4 +1,4 @@ -From c4d4d9f1aa74addefdad40294cf16d9e0b3dd6ec Mon Sep 17 00:00:00 2001 +From 828a500d5be62ba6fc94bd4fac3fe4bf1b1d4f6d Mon Sep 17 00:00:00 2001 From: Alexander Kanavin Date: Fri, 6 Oct 2017 17:00:08 +0300 Subject: [PATCH] Fix build with musl @@ -8,14 +8,14 @@ Signed-off-by: Alexander Kanavin --- Source/JavaScriptCore/runtime/MachineContext.h | 10 +++++----- - Source/WTF/wtf/Platform.h | 2 +- + Source/WTF/wtf/PlatformHave.h | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Source/JavaScriptCore/runtime/MachineContext.h b/Source/JavaScriptCore/runtime/MachineContext.h -index 823964c2..00841146 100644 +index c5052527..95ef98b5 100644 --- a/Source/JavaScriptCore/runtime/MachineContext.h +++ b/Source/JavaScriptCore/runtime/MachineContext.h -@@ -188,7 +188,7 @@ static inline void*& stackPointerImpl(mcontext_t& machineContext) +@@ -196,7 +196,7 @@ static inline void*& stackPointerImpl(mcontext_t& machineContext) #error Unknown Architecture #endif @@ -24,7 +24,7 @@ index 823964c2..00841146 100644 #if CPU(X86) return reinterpret_cast((uintptr_t&) machineContext.gregs[REG_ESP]); -@@ -335,7 +335,7 @@ static inline void*& framePointerImpl(mcontext_t& machineContext) +@@ -347,7 +347,7 @@ static inline void*& framePointerImpl(mcontext_t& machineContext) #error Unknown Architecture #endif @@ -33,7 +33,7 @@ index 823964c2..00841146 100644 // The following sequence depends on glibc's sys/ucontext.h. #if CPU(X86) -@@ -482,7 +482,7 @@ static inline void*& instructionPointerImpl(mcontext_t& machineContext) +@@ -498,7 +498,7 @@ static inline void*& instructionPointerImpl(mcontext_t& machineContext) #error Unknown Architecture #endif @@ -42,7 +42,7 @@ index 823964c2..00841146 100644 // The following sequence depends on glibc's sys/ucontext.h. #if CPU(X86) -@@ -639,7 +639,7 @@ inline void*& argumentPointer<1>(mcontext_t& machineContext) +@@ -656,7 +656,7 @@ inline void*& argumentPointer<1>(mcontext_t& machineContext) #error Unknown Architecture #endif @@ -51,7 +51,7 @@ index 823964c2..00841146 100644 // The following sequence depends on glibc's sys/ucontext.h. #if CPU(X86) -@@ -756,7 +756,7 @@ inline void*& llintInstructionPointer(mcontext_t& machineContext) +@@ -773,7 +773,7 @@ inline void*& llintInstructionPointer(mcontext_t& machineContext) #error Unknown Architecture #endif @@ -60,13 +60,13 @@ index 823964c2..00841146 100644 // The following sequence depends on glibc's sys/ucontext.h. #if CPU(X86) -diff --git a/Source/WTF/wtf/Platform.h b/Source/WTF/wtf/Platform.h -index 34f7cb14..32ad9150 100644 ---- a/Source/WTF/wtf/Platform.h -+++ b/Source/WTF/wtf/Platform.h -@@ -714,7 +714,7 @@ - - #endif /* OS(DARWIN) */ +diff --git a/Source/WTF/wtf/PlatformHave.h b/Source/WTF/wtf/PlatformHave.h +index daca20fe..53eae6ba 100644 +--- a/Source/WTF/wtf/PlatformHave.h ++++ b/Source/WTF/wtf/PlatformHave.h +@@ -222,7 +222,7 @@ + #define HAVE_HOSTED_CORE_ANIMATION 1 + #endif -#if OS(DARWIN) || OS(FUCHSIA) || ((OS(FREEBSD) || defined(__GLIBC__) || defined(__BIONIC__)) && (CPU(X86) || CPU(X86_64) || CPU(ARM) || CPU(ARM64) || CPU(MIPS))) +#if OS(DARWIN) || OS(FUCHSIA) || ((OS(FREEBSD) || defined(__linux__) || defined(__BIONIC__)) && (CPU(X86) || CPU(X86_64) || CPU(ARM) || CPU(ARM64) || CPU(MIPS))) 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 index e7c668c040..866e9d9d09 100644 --- 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 @@ -1,4 +1,4 @@ -From 4b5e02212a31b82fc9b3becad90542274816fc29 Mon Sep 17 00:00:00 2001 +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 @@ -17,15 +17,15 @@ Signed-off-by: Alexander Kanavin 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Source/cmake/GtkDoc.cmake b/Source/cmake/GtkDoc.cmake -index b0fb31ca..6cb6313d 100644 +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}" ${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" ${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" "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/meta/recipes-sato/webkit/webkitgtk/x32_support.patch b/meta/recipes-sato/webkit/webkitgtk/x32_support.patch deleted file mode 100644 index 85d281e7f4..0000000000 --- a/meta/recipes-sato/webkit/webkitgtk/x32_support.patch +++ /dev/null @@ -1,30 +0,0 @@ -Signed-off-by: Christopher Larson -Upstream-Status: Pending - -From 897563a0397266d8ceb058f172e16b06419b2593 Mon Sep 17 00:00:00 2001 -From: Daniel Schepler -Date: Mon, 26 Mar 2018 17:48:34 +0300 -Subject: [PATCH] Fix FTBFS in x32 - -=================================================================== - ---- - Source/WTF/wtf/Platform.h | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/Source/WTF/wtf/Platform.h b/Source/WTF/wtf/Platform.h -index 850e298..551c047 100644 ---- a/Source/WTF/wtf/Platform.h -+++ b/Source/WTF/wtf/Platform.h -@@ -132,7 +132,11 @@ - /* CPU(X86_64) - AMD64 / Intel64 / x86_64 64-bit */ - #if defined(__x86_64__) \ - || defined(_M_X64) -+#ifdef __ILP32__ -+#define WTF_CPU_X86_64_32 1 -+#else - #define WTF_CPU_X86_64 1 -+#endif - #define WTF_CPU_X86_SSE2 1 - #define WTF_CPU_KNOWN 1 - #endif diff --git a/meta/recipes-sato/webkit/webkitgtk_2.26.4.bb b/meta/recipes-sato/webkit/webkitgtk_2.26.4.bb deleted file mode 100644 index e4197d1a00..0000000000 --- a/meta/recipes-sato/webkit/webkitgtk_2.26.4.bb +++ /dev/null @@ -1,133 +0,0 @@ -SUMMARY = "WebKit web rendering engine for the GTK+ platform" -HOMEPAGE = "https://www.webkitgtk.org/" -BUGTRACKER = "https://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 = "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-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://0001-Enable-THREADS_PREFER_PTHREAD_FLAG.patch \ - file://x32_support.patch \ - file://cross-compile.patch \ - file://0001-Fix-build-with-musl.patch \ - file://include_array.patch \ - " -SRC_URI[md5sum] = "60f881729f3b71244b7f6e58790073e0" -SRC_URI[sha256sum] = "4386900713dfadf9741177210b32623cab22562a79ffd0d446b66569934b113f" - -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 = "zlib libsoup-2.4 curl libxml2 cairo libxslt 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 librsvg libtheora libvorbis \ - ruby-native libnotify gstreamer1.0-plugins-bad \ - gettext-native glib-2.0 glib-2.0-native libtasn1 \ - " - -PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', '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_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" -PACKAGECONFIG[woff2] = "-DUSE_WOFF2=ON,-DUSE_WOFF2=OFF,woff2" -PACKAGECONFIG[openjpeg] = "-DUSE_OPENJPEG=ON,-DUSE_OPENJPEG=OFF,openjpeg" - -# 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 \ - -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_mipsarch = " -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" - -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" diff --git a/meta/recipes-sato/webkit/webkitgtk_2.28.2.bb b/meta/recipes-sato/webkit/webkitgtk_2.28.2.bb new file mode 100644 index 0000000000..288c715cc3 --- /dev/null +++ b/meta/recipes-sato/webkit/webkitgtk_2.28.2.bb @@ -0,0 +1,132 @@ +SUMMARY = "WebKit web rendering engine for the GTK+ platform" +HOMEPAGE = "https://www.webkitgtk.org/" +BUGTRACKER = "https://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 = "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-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://0001-Enable-THREADS_PREFER_PTHREAD_FLAG.patch \ + file://cross-compile.patch \ + file://0001-Fix-build-with-musl.patch \ + file://include_array.patch \ + " +SRC_URI[md5sum] = "ec0ef870ca37e3a5ebbead2f268a28ec" +SRC_URI[sha256sum] = "b9d23525cfd8d22c37b5d964a9fe9a8ce7583042a2f8d3922e71e6bbc68c30bd" + +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 = "zlib libsoup-2.4 curl libxml2 cairo libxslt 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 librsvg libtheora libvorbis \ + ruby-native libnotify gstreamer1.0-plugins-bad \ + gettext-native glib-2.0 glib-2.0-native libtasn1 \ + " + +PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', '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_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" +PACKAGECONFIG[woff2] = "-DUSE_WOFF2=ON,-DUSE_WOFF2=OFF,woff2" +PACKAGECONFIG[openjpeg] = "-DUSE_OPENJPEG=ON,-DUSE_OPENJPEG=OFF,openjpeg" + +# 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 \ + -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_mipsarch = " -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" + +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" -- cgit v1.2.3-54-g00ecf