From 38172cb4825a569b16594b7eaa71df149cb59430 Mon Sep 17 00:00:00 2001 From: Chongyun Lee <45286352+licy183@users.noreply.github.com> Date: Mon, 22 Apr 2024 16:36:50 +0800 Subject: [PATCH] webkitgtk: fix gobject introspection build --- x11-packages/webkit2gtk-4.1/build.sh | 9 +++++++++ x11-packages/webkitgtk-6.0/build.sh | 9 +++++++++ 2 files changed, 18 insertions(+) diff --git a/x11-packages/webkit2gtk-4.1/build.sh b/x11-packages/webkit2gtk-4.1/build.sh index eb63b86912..4ea90daa90 100644 --- a/x11-packages/webkit2gtk-4.1/build.sh +++ b/x11-packages/webkit2gtk-4.1/build.sh @@ -41,6 +41,15 @@ termux_step_post_get_source() { termux_step_pre_configure() { TERMUX_PKG_VERSION=. termux_setup_gir + # FIXME: `GI_VERSION` mismatched from Termux and the building machine. On April 22, + # FIXME: 2024, Termux has version 1.80.1 but Ubuntu 22.04 has version 1.72.0. + # FIXME: `cmake` will pick up `GI_VERSION` from the config files of Termux, but + # FIXME: it is intended to use the version in the building machine. + if [ "$TERMUX_ON_DEVICE_BUILD" = false ]; then + sed -i 's@if ("${GI_VERSION}" VERSION_GREATER_EQUAL 1.79.2)@if (FALSE)@g' \ + $TERMUX_PKG_SRCDIR/Source/WebKit/PlatformGTK.cmake + fi + # Workaround for https://github.com/android/ndk/issues/1973 [ "$TERMUX_ARCH" == "arm" ] && sed -i '/#define MUST_TAIL_CALL \[\[clang::musttail]]/d' Source/WTF/wtf/Compiler.h diff --git a/x11-packages/webkitgtk-6.0/build.sh b/x11-packages/webkitgtk-6.0/build.sh index 944c3e5e63..6571b2dcfc 100644 --- a/x11-packages/webkitgtk-6.0/build.sh +++ b/x11-packages/webkitgtk-6.0/build.sh @@ -35,6 +35,15 @@ termux_step_pre_configure() { -DENABLE_WEBDRIVER=OFF " + # FIXME: `GI_VERSION` mismatched from Termux and the building machine. On April 22, + # FIXME: 2024, Termux has version 1.80.1 but Ubuntu 22.04 has version 1.72.0. + # FIXME: `cmake` will pick up `GI_VERSION` from the config files of Termux, but + # FIXME: it is intended to use the version in the building machine. + if [ "$TERMUX_ON_DEVICE_BUILD" = false ]; then + sed -i 's@if ("${GI_VERSION}" VERSION_GREATER_EQUAL 1.79.2)@if (FALSE)@g' \ + $TERMUX_PKG_SRCDIR/Source/WebKit/PlatformGTK.cmake + fi + termux_setup_gir # Workaround for https://github.com/android/ndk/issues/1973