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
webkitgtk-2.54.0.tar.xz(47.4 MiB)
sha256846fd19ccedbae1dbfe904f26dbf2d68a800a33a50caf2ad5222c8dcb3f25682
upstream: https://webkitgtk.org/releases/webkitgtk-2.54.0.tar.xz
archive copy: sources-4/web-engines--webkitgtk-2.54.0.tar.xz
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.
-DUSE_WOFF2=OFF, line 46: woff2 (explained with the switches below)-DUSE_VULKAN=OFF, line 50: vulkan-loader (explained with the switches below)
Patches
build.sh applies these; kpkg applies nothing by itself.
x11-include-order.patch— moves#include <X11/Xlib.h>after the WebKit headers inPointerLockManagerX11.cpp. Macros fromX11/X.hcollide with definitions in WebKit’s bmalloc code, so Xlib must come after them.
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:
-DUSE_GTK4=ON— build for GTK 4, which is the 6.0 API.-DENABLE_WEBDRIVER=OFF— do not buildWebKitWebDriver. It has one installed path for both APIs, so only the GTK 3 build installs it.-DENABLE_JOURNALD_LOG=OFF— no logging to journald, which needs libsystemd or libelogind; there is no systemd.-DENABLE_GAMEPAD=OFF— with-DENABLE_SPEECH_SYNTHESIS=OFF: no Gamepad API (libmanette) and no speech synthesis (Flite or Spiel); none of the three is a port.-DUSE_WOFF2=OFF— no libwoff2; the tree’s FreeType decodes WOFF2 fonts itself.-DUSE_SYSTEM_SYSPROF_CAPTURE=OFF— use WebKit’s own copy oflibsysprof-capture; sysprof is not a port.-DUSE_LIBBACKTRACE=OFF— no libbacktrace, which is not a port.-DUSE_VULKAN=OFF— no Vulkan support, which needs the Volk loader, not a port.-DENABLE_SWIFT_DEMO_URI_SCHEME=OFF— with-DENABLE_BACK_FORWARD_LIST_SWIFT=OFF: the Swift features needswiftc, which is not a port.-DENABLE_MINIBROWSER=OFF— with-DENABLE_API_TESTS=OFFand-DENABLE_DOCUMENTATION=OFF: no MiniBrowser test program, API tests or gi-docgen reference.-fuse-ld=lld— added toLDFLAGS: link with LLVM’s lld instead of GNU ld.
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.