Skip to the text
KDOS
Menu
kdos.dev KDOS from Scratch KDOS 0.2 · 4dd4a10 · 2026-11-30 Contents Index

243.2. webkitgtk6-2.54.0

WebKitGTK web engine for GTK 4: the webkitgtk-6.0 and javascriptcoregtk-6.0 APIs

Version 2.54.0, release 2
Shelf web-engines — Browser engines and the libraries that make them up
Phase 43_toolkits (Toolkits), 335 of 344 in build order
Licence LGPL-2.0-or-later AND BSD-2-Clause
Homepage https://webkitgtk.org/
Build time 59.8 SBU
Installed size 141.8 MiB in 122 files
Recipe ports/core/web-engines/webkitgtk6/kpkgbuild

About

This is WebKitGTK built for GTK 4: the webkitgtk-6.0 and javascriptcoregtk-6.0 APIs, for GTK 4 programs with a web view. It is built from the same source tarball as webkitgtk, the GTK 3 build, with the same switches apart from -DUSE_GTK4 and -DENABLE_WEBDRIVER; that port’s page explains every switch, the switches that turn a feature off are repeated below, and the two ports install side by side.

Why it is in KDOS

The comment above webkitgtk and webkitgtk6 in script/phases/43_toolkits/packages.d/web-engines.txt:

Both APIs: webkitgtk is 4.1, for GTK 3, and webkitgtk6 is 6.0, for GTK 4.

Sources

Dependencies

Depends on: lld, gtk4, cmake, ninja, perl, python3, ruby, gperf, bison, flex, unifdef, pkgconf, gettext, glib, gobject-introspection, glib-introspection, libsoup3, glib-networking, cairo, harfbuzz, icu, freetype2, brotli, fontconfig, libjpeg-turbo, libpng, libwebp, libavif, libjxl, lcms2, openjpeg, libxml2, libxslt, sqlite, zlib, libgcrypt, libtasn1, libepoxy, libdrm, mesa, wayland, wayland-protocols, libxkbcommon, libX11, at-spi2-core, gstreamer, gst-plugins-base, gst-plugins-good, gst-plugins-bad, gst-libav, enchant, hyphen, libsecret, libseccomp, bubblewrap, xdg-dbus-proxy.

Required by: no port names it.

Optional, off in KDOS

These switches in build.sh turn off a feature whose library is a port here. The recipe may turn each off on purpose, or because the library was not yet a port when the recipe was written; this list cannot tell which.

Patches

build.sh applies these; kpkg applies nothing by itself.

Installation

From the repository root, inside the build container, this is the line kdosbuild runs for the port:

script/chroot/exec.sh bash -c 'source script/phases/43_toolkits/phase.env && kpkg install webkitgtk6'

What kpkg does

kpkg runs these steps, in this order, as root inside the chroot. The port directory is /ports/core/web-engines/webkitgtk6.

1. Verify every declared source. Each file a sha256 = line names, found in the port directory or in /var/cache/kpkg/sources, must hash to its line; a mismatch stops the build before anything is unpacked.

cd /ports/core/web-engines/webkitgtk6
echo '846fd19ccedbae1dbfe904f26dbf2d68a800a33a50caf2ad5222c8dcb3f25682  webkitgtk-2.54.0.tar.xz' | sha256sum -c -

2. Unpack. The work directory is emptied and the first source is unpacked into $SRC with its top directory stripped; any later tarball lands unstripped beside it in $SRC_ROOT, and a file that is not a tarball is copied into $SRC.

SRC_ROOT=/var/cache/kpkg/work/webkitgtk6
SRC=$SRC_ROOT/webkitgtk6-2.54.0
PKG=$SRC_ROOT/pkg
rm -rf "$SRC_ROOT"
mkdir -p "$SRC" "$PKG"
tar --no-same-permissions --warning=no-unknown-keyword -xf webkitgtk-2.54.0.tar.xz -C "$SRC" --strip-components=1

Every config.guess and config.sub older than automake’s is then replaced with automake’s, so a configure script recognises the musl target.

3. Build. build.sh is sourced in a subshell under set -e, from $SRC, with name, version, release and the recipe’s helpers devseries, group and the five paths PKGNAME, PORT_SRC, SRC_ROOT, SRC and PKG set as shell variables. Its body, verbatim:

patch -p1 -i "$PORT_SRC/x11-include-order.patch"

export LDFLAGS="$LDFLAGS -fuse-ld=lld"
cmake -S . -B build -G Ninja \
	-DPORT=GTK \
	-DCMAKE_BUILD_TYPE=Release \
	-DCMAKE_INSTALL_PREFIX=/usr \
	-DCMAKE_INSTALL_LIBDIR=lib \
	-DCMAKE_SKIP_RPATH=ON \
	-DUSE_GTK4=ON \
	-DENABLE_WAYLAND_TARGET=ON \
	-DENABLE_X11_TARGET=ON \
	-DENABLE_INTROSPECTION=ON \
	-DENABLE_DOCUMENTATION=OFF \
	-DENABLE_JOURNALD_LOG=OFF \
	-DENABLE_BUBBLEWRAP_SANDBOX=ON \
	-DBWRAP_EXECUTABLE=/usr/bin/bwrap \
	-DDBUS_PROXY_EXECUTABLE=/usr/bin/xdg-dbus-proxy \
	-DENABLE_MINIBROWSER=OFF \
	-DENABLE_WEBDRIVER=OFF \
	-DENABLE_API_TESTS=OFF \
	-DENABLE_GAMEPAD=OFF \
	-DENABLE_SPEECH_SYNTHESIS=OFF \
	-DENABLE_SPELLCHECK=ON \
	-DENABLE_VIDEO=ON \
	-DENABLE_WEB_AUDIO=ON \
	-DUSE_GSTREAMER=ON \
	-DUSE_GBM=ON \
	-DUSE_LIBDRM=ON \
	-DUSE_LIBHYPHEN=ON \
	-DUSE_LIBSECRET=ON \
	-DUSE_AVIF=ON \
	-DUSE_JPEGXL=ON \
	-DUSE_LCMS=ON \
	-DUSE_WOFF2=OFF \
	-DUSE_LIBBACKTRACE=OFF \
	-DUSE_SYSTEM_SYSPROF_CAPTURE=OFF \
	-DUSE_SYSTEM_UNIFDEF=ON \
	-DUSE_VULKAN=OFF \
	-DENABLE_SWIFT_DEMO_URI_SCHEME=OFF \
	-DENABLE_BACK_FORWARD_LIST_SWIFT=OFF
cmake --build build
DESTDIR=$PKG cmake --install build
for f in LICENSE-LGPL-2 LICENSE-LGPL-2.1 LICENSE-APPLE; do
	install -Dm644 "Source/WebCore/$f" "$PKG/usr/share/licenses/$name/$f"
done

The switches, and why each is set:

The common switches of each build system are explained in the Flag glossary.

4. Package. kpkg removes libtool archives, the info directory index, mimeinfo.cache and every fonts.dir from $PKG, copies the source’s licence files into /usr/share/licenses/webkitgtk6, prunes what the image does not ship, lints the tree and rolls it reproducibly:

tar --sort=name --format=gnu --numeric-owner --owner=0 --group=0 \
    --mtime=@$SOURCE_DATE_EPOCH \
    --use-compress-program='xz -9 -T0 --block-size=32MiB --no-adjust' \
    -cf webkitgtk6-2.54.0-2.tar.xz -C "$PKG" .

5. Adopt. kpkgadd installs the package’s files over the root, refusing a path another package owns, records the file list in /var/lib/kpkg/db/webkitgtk6, and runs the triggers its paths call for.

Contents

Installed libraries: libjavascriptcoregtk-6.0.so, libwebkitgtk-6.0.so.

Installed directories: /usr/include/webkitgtk-6.0, /usr/lib/webkitgtk-6.0, /usr/libexec/webkitgtk-6.0, /usr/share/licenses/webkitgtk6.

Short descriptions

javascriptcoregtk-6.0.pc GTK+ version of the JavaScriptCore engine
webkitgtk-6.0.pc Web content engine for GTK
webkitgtk-web-process-extension-6.0.pc Web content engine for GTK - web process extensions

Notes

With WebDriver off, the WebDriver source is not compiled, so this port does not carry the GTK 3 build’s webdriver-release-log.patch.