Files
buildroot/package/wpewebkit/wpewebkit.mk
Thomas Devoogdt 934d1d7259 package/wpewebkit: also disable internal ccache in the build step
WK_USE_CCACHE=NO is only passed to the configure step
(WPEWEBKIT_CONF_ENV). During the build step, ninja can run cmake again
(e.g. when a cmake input such as toolchainfile.cmake changed), and that
run does not have WK_USE_CCACHE set. WebKit's WebKitCCache.cmake then
sets ccache as compiler launcher again.

That outer ccache runs without the CCACHE_BASEDIR that the toolchain
wrapper sets for its own ccache call, so the cache keys and manifests
contain absolute paths, and the entries only match in the same checkout
directory.

Pass WK_USE_CCACHE=NO to the build step too.

Signed-off-by: Thomas Devoogdt <thomas.devoogdt@barco.com>
Acked-by: Adrian Perez de Castro <aperez@igalia.com>
Signed-off-by: Arnout Vandecappelle <arnout@rnout.be>
(cherry picked from commit 4422d99a4e)
Signed-off-by: Raphaël Mélotte <raphael.melotte@mind.be>
2026-10-15 15:54:55 +02:00

178 lines
4.8 KiB
Makefile

################################################################################
#
# wpewebkit
#
################################################################################
# The middle number is even for stable releases, odd for development ones.
WPEWEBKIT_VERSION = 2.50.5
WPEWEBKIT_SITE = https://wpewebkit.org/releases
WPEWEBKIT_SOURCE = wpewebkit-$(WPEWEBKIT_VERSION).tar.xz
WPEWEBKIT_INSTALL_STAGING = YES
WPEWEBKIT_LICENSE = LGPL-2.1+, BSD-2-Clause
WPEWEBKIT_LICENSE_FILES = \
Source/WebCore/LICENSE-APPLE \
Source/WebCore/LICENSE-LGPL-2.1
WPEWEBKIT_CPE_ID_VENDOR = wpewebkit
WPEWEBKIT_CPE_ID_PRODUCT = wpe_webkit
WPEWEBKIT_DEPENDENCIES = host-gperf host-python3 host-ruby host-unifdef \
harfbuzz icu jpeg libepoxy libgcrypt libgles libsoup3 libtasn1 \
libpng libxslt wayland-protocols webp wpebackend-fdo
WPEWEBKIT_CMAKE_BACKEND = ninja
# Buildroot adds support for ccache through its
# toolchain-wrapper, so tell wpewebkit not to mess with it.
WPEWEBKIT_CONF_ENV = WK_USE_CCACHE=NO
WPEWEBKIT_BUILD_ENV = WK_USE_CCACHE=NO
WPEWEBKIT_CONF_OPTS = \
-DPORT=WPE \
-DENABLE_API_TESTS=OFF \
-DENABLE_DOCUMENTATION=OFF \
-DENABLE_INTROSPECTION=OFF \
-DENABLE_MINIBROWSER=OFF \
-DENABLE_WEB_RTC=OFF \
-DUSE_ATK=OFF
# WPE WebKit uses a bundled copy of Skia since 2.46.0 for
# little-endian targets, and Cairo for big-endian ones.
ifeq ($(BR2_ENDIAN),"BIG")
WPEWEBKIT_DEPENDENCIES += cairo
WPEWEBKIT_CONF_OPTS += -DUSE_SKIA=OFF
else
WPEWEBKIT_DEPENDENCIES += fontconfig freetype
WPEWEBKIT_CONF_OPTS += -DUSE_SKIA=ON
endif
ifeq ($(BR2_PACKAGE_WPEWEBKIT_SANDBOX),y)
WPEWEBKIT_CONF_OPTS += \
-DENABLE_BUBBLEWRAP_SANDBOX=ON \
-DBWRAP_EXECUTABLE=/usr/bin/bwrap \
-DDBUS_PROXY_EXECUTABLE=/usr/bin/xdg-dbus-proxy
WPEWEBKIT_DEPENDENCIES += libseccomp
else
WPEWEBKIT_CONF_OPTS += -DENABLE_BUBBLEWRAP_SANDBOX=OFF
endif
ifeq ($(BR2_PACKAGE_WPEWEBKIT_MULTIMEDIA),y)
WPEWEBKIT_CONF_OPTS += \
-DENABLE_VIDEO=ON \
-DENABLE_WEB_AUDIO=ON \
-DENABLE_WEB_CODECS=ON
WPEWEBKIT_DEPENDENCIES += gstreamer1 gst1-libav gst1-plugins-base
else
WPEWEBKIT_CONF_OPTS += \
-DENABLE_VIDEO=OFF \
-DENABLE_WEB_AUDIO=OFF \
-DENABLE_WEB_CODECS=OFF
endif
ifeq ($(BR2_PACKAGE_WPEWEBKIT_MEDIA_STREAM),y)
WPEWEBKIT_CONF_OPTS += -DENABLE_MEDIA_STREAM=ON
WPEWEBKIT_DEPENDENCIES += gst1-plugins-bad
else
WPEWEBKIT_CONF_OPTS += -DENABLE_MEDIA_STREAM=OFF
endif
ifeq ($(BR2_PACKAGE_LIBAVIF),y)
WPEWEBKIT_CONF_OPTS += -DUSE_AVIF=ON
WPEWEBKIT_DEPENDENCIES += libavif
else
WPEWEBKIT_CONF_OPTS += -DUSE_AVIF=OFF
endif
ifeq ($(BR2_PACKAGE_WPEWEBKIT_USE_GSTREAMER_GL),y)
WPEWEBKIT_CONF_OPTS += -DUSE_GSTREAMER_GL=ON
else
WPEWEBKIT_CONF_OPTS += -DUSE_GSTREAMER_GL=OFF
endif
ifeq ($(BR2_PACKAGE_WPEWEBKIT_WEBDRIVER),y)
WPEWEBKIT_CONF_OPTS += -DENABLE_WEBDRIVER=ON
else
WPEWEBKIT_CONF_OPTS += -DENABLE_WEBDRIVER=OFF
endif
ifeq ($(BR2_PACKAGE_FLITE),y)
WPEWEBKIT_CONF_OPTS += -DENABLE_SPEECH_SYNTHESIS=ON
WPEWEBKIT_DEPENDENCIES += flite
else
WPEWEBKIT_CONF_OPTS += -DENABLE_SPEECH_SYNTHESIS=OFF
endif
ifeq ($(BR2_PACKAGE_LCMS2),y)
WPEWEBKIT_CONF_OPTS += -DUSE_LCMS=ON
WPEWEBKIT_DEPENDENCIES += lcms2
else
WPEWEBKIT_CONF_OPTS += -DUSE_LCMS=OFF
endif
ifeq ($(BR2_PACKAGE_LIBBACKTRACE),y)
WPEWEBKIT_CONF_OPTS += -DUSE_LIBBACKTRACE=ON
WPEWEBKIT_DEPENDENCIES += libbacktrace
else
WPEWEBKIT_CONF_OPTS += -DUSE_LIBBACKTRACE=OFF
endif
ifeq ($(BR2_PACKAGE_LIBDRM),y)
WPEWEBKIT_CONF_OPTS += -DUSE_LIBDRM=ON
WPEWEBKIT_DEPENDENCIES += libdrm
else
WPEWEBKIT_CONF_OPTS += -DUSE_LIBDRM=OFF
endif
ifeq ($(BR2_PACKAGE_WOFF2),y)
WPEWEBKIT_CONF_OPTS += -DUSE_WOFF2=ON
WPEWEBKIT_DEPENDENCIES += woff2
else
WPEWEBKIT_CONF_OPTS += -DUSE_WOFF2=OFF
endif
ifeq ($(BR2_PACKAGE_LIBJXL),y)
WPEWEBKIT_CONF_OPTS += -DUSE_JPEGXL=ON
WPEWEBKIT_DEPENDENCIES += libjxl
else
WPEWEBKIT_CONF_OPTS += -DUSE_JPEGXL=OFF
endif
ifeq ($(BR2_PACKAGE_SYSPROF),y)
WPEWEBKIT_CONF_OPTS += -DUSE_SYSPROF_CAPTURE=ON
WPEWEBKIT_DEPENDENCIES += sysprof
else
WPEWEBKIT_CONF_OPTS += -DUSE_SYSPROF_CAPTURE=OFF
endif
ifeq ($(BR2_INIT_SYSTEMD),y)
WPEWEBKIT_CONF_OPTS += -DENABLE_JOURNALD_LOG=ON
WPEWEBKIT_DEPENDENCIES += systemd
else
WPEWEBKIT_CONF_OPTS += -DENABLE_JOURNALD_LOG=OFF
endif
ifeq ($(BR2_PACKAGE_HAS_LIBGBM),y)
WPEWEBKIT_CONF_OPTS += -DUSE_GBM=ON
WPEWEBKIT_DEPENDENCIES += libgbm
else
WPEWEBKIT_CONF_OPTS += -DUSE_GBM=OFF
endif
# JIT is not supported for MIPS, ARMv5, and ARMv6, but the WebKit build
# system does not have a check for some of these target processors.
#
# Disable JIT forcibly here and use the CLoop interpreter instead.
# Also, we have to disable the sampling profiler and WebAssembly, which
# do NOT work with ENABLE_C_LOOP.
#
# Upstream bug: https://bugs.webkit.org/show_bug.cgi?id=278559
#
ifeq ($(BR2_ARM_CPU_ARMV5)$(BR2_ARM_CPU_ARMV6)$(BR2_mips)$(BR2_mipsel),y)
WPEWEBKIT_CONF_OPTS += \
-DENABLE_JIT=OFF \
-DENABLE_C_LOOP=ON \
-DENABLE_SAMPLING_PROFILER=OFF \
-DENABLE_WEBASSEMBLY=OFF
endif
$(eval $(cmake-package))