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

259.1. wxwidgets-3.2.9

wxWidgets on GTK 3 — the native-widget C++ toolkit under KiCad, PrusaSlicer, FileZilla, VeraCrypt and wxPython

Version 3.2.9, release 3
Shelf toolkits — Other GUI and TUI toolkits for applications
Phase 43_toolkits (Toolkits), 263 of 344 in build order
Licence LGPL-2.0-or-later WITH WxWindows-exception-3.1
Homepage https://www.wxwidgets.org/
Build time 0.8 SBU
Installed size 31.8 MiB in 795 files
Recipe ports/core/toolkits/wxwidgets/kpkgbuild

About

wxWidgets is a C++ toolkit that draws each widget with the platform’s own: on Linux, GTK. This port builds it on GTK 3 as shared libraries, with the wx-config script, wxwin.m4 for autoconf projects and the CMake package. KiCad, PrusaSlicer, Audacity, Tenacity, FileZilla, VeraCrypt, OpenCPN and FreeDV are wx applications; it is for applications, and no part of the KDOS desktop links it (see Applications bring their own toolkit).

Why it is in KDOS

The comment above it in script/phases/43_toolkits/packages.d/toolkits.txt:

wxWidgets on GTK 3. KiCad, PrusaSlicer, Audacity, Tenacity, FileZilla, VeraCrypt, OpenCPN and FreeDV are wx applications.

Sources

Dependencies

Depends on: cmake, ninja, pkgconf, gtk3, glib, pango, cairo, gdk-pixbuf, harfbuzz, fontconfig, freetype2, libX11, libXext, libXtst, libxkbcommon, wayland, mesa, libglvnd, glu, webkitgtk, libsoup3, gstreamer, gst-plugins-base, gst-plugins-bad, libnotify, gspell, libsecret, sdl2-compat, curl, expat, libjpeg-turbo, libpng, libtiff, zlib, pcre2, xz, libmspack.

Required by (11): audacity, cubicsdr, filezilla, freedv-gui, kicad, limesuite-gui, opencpn, prusaslicer, python3-wxpython, tenacity, veracrypt.

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 wxwidgets'

What kpkg does

kpkg runs these steps, in this order, as root inside the chroot. The port directory is /ports/core/toolkits/wxwidgets.

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/toolkits/wxwidgets
echo 'fb90f9538bffd6a02edbf80037a0c14c2baf9f509feac8f76ab2a5e4321f112b  wxwidgets-3.2.9.tar.bz2' | 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/wxwidgets
SRC=$SRC_ROOT/wxwidgets-3.2.9
PKG=$SRC_ROOT/pkg
rm -rf "$SRC_ROOT"
mkdir -p "$SRC" "$PKG"
tar --no-same-permissions --warning=no-unknown-keyword -xf wxwidgets-3.2.9.tar.bz2 -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 series and the five paths PKGNAME, PORT_SRC, SRC_ROOT, SRC and PKG set as shell variables. Its body, verbatim:

patch -p1 -i "$PORT_SRC/largefile.patch"
patch -p1 -i "$PORT_SRC/musl-locale-l.patch"
patch -p1 -i "$PORT_SRC/no-langinfo-h.patch"

cmake -S . -B _build -G Ninja \
	-DCMAKE_POLICY_VERSION_MINIMUM=3.5 \
	-DCMAKE_BUILD_TYPE=Release \
	-DCMAKE_INSTALL_PREFIX=/usr \
	-DCMAKE_INSTALL_LIBDIR=lib \
	-DwxBUILD_TOOLKIT=gtk3 \
	-DwxBUILD_SHARED=ON \
	-DwxBUILD_PRECOMP=OFF \
	-DwxBUILD_TESTS=OFF \
	-DwxBUILD_SAMPLES=OFF \
	-DwxBUILD_DEMOS=OFF \
	-DwxUSE_SYS_LIBS=ON \
	-DwxUSE_REGEX=sys \
	-DwxUSE_ZLIB=sys \
	-DwxUSE_EXPAT=sys \
	-DwxUSE_LIBJPEG=sys \
	-DwxUSE_LIBPNG=sys \
	-DwxUSE_LIBTIFF=sys \
	-DwxUSE_LIBLZMA=ON \
	-DwxUSE_OPENGL=ON \
	-DwxUSE_GLCANVAS_EGL=ON \
	-DwxUSE_GTKPRINT=ON \
	-DwxUSE_PRIVATE_FONTS=ON \
	-DwxUSE_WEBVIEW=ON \
	-DwxUSE_WEBVIEW_WEBKIT=ON \
	-DwxUSE_MEDIACTRL=ON \
	-DwxUSE_SOUND=ON \
	-DwxUSE_LIBSDL=ON \
	-DwxUSE_LIBNOTIFY=ON \
	-DwxUSE_SECRETSTORE=ON \
	-DwxUSE_SPELLCHECK=ON \
	-DwxUSE_LIBMSPACK=ON \
	-DwxUSE_XTEST=ON \
	-DwxUSE_WEBREQUEST_CURL=ON \
	-DwxUSE_DETECT_SM=OFF \
	-DwxUSE_LIBGNOMEVFS=OFF
ninja -C _build
DESTDIR=$PKG ninja -C _build install

install -Dm644 wxwin.m4 "$PKG/usr/share/aclocal/wxwin.m4"
for f in licence.txt lgpl.txt preamble.txt; do
	install -Dm644 "docs/$f" "$PKG/usr/share/licenses/$name/$f"
done

for lib in webview gl media; do
	test -e "$PKG/usr/lib/libwx_gtk3u_$lib-3.2.so"
done
test -e "$PKG/usr/lib/wx/3.2/web-extensions/webkit2_extu-3.2.so"
for sym in wxUSE_GLCANVAS_EGL wxUSE_LIBSDL wxUSE_LIBNOTIFY wxUSE_SECRETSTORE wxUSE_SPELLCHECK wxUSE_LIBMSPACK wxUSE_WEBREQUEST_CURL; do
	grep -q "^#define $sym 1" "$PKG"/usr/lib/wx/include/gtk3-unicode-*/wx/setup.h
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/wxwidgets, 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 wxwidgets-3.2.9-3.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/wxwidgets, and runs the triggers its paths call for.

Contents

Installed programs: wx-config, wxrc, wxrc-3.2.

Installed libraries: libwx_baseu-3.2.so, libwx_baseu_net-3.2.so, libwx_baseu_xml-3.2.so, libwx_gtk3u_adv-3.2.so, libwx_gtk3u_aui-3.2.so, libwx_gtk3u_core-3.2.so, libwx_gtk3u_gl-3.2.so, libwx_gtk3u_html-3.2.so, libwx_gtk3u_media-3.2.so, libwx_gtk3u_propgrid-3.2.so, libwx_gtk3u_qa-3.2.so, libwx_gtk3u_ribbon-3.2.so, libwx_gtk3u_richtext-3.2.so, libwx_gtk3u_stc-3.2.so, libwx_gtk3u_webview-3.2.so, libwx_gtk3u_xrc-3.2.so.

Installed directories: /usr/include/wx-3.2, /usr/lib/cmake/wxWidgets-3.2, /usr/lib/wx, /usr/share/licenses/wxwidgets.

Notes

Naming an optional backend ON does not make configure require it. When a probe fails, configure turns the feature off and carries on, with a warning, a status line or no message at all; wxSecretStore is the one exception, and stops configure when libsecret is missing. The checks at the end of build.sh turn a lost backend into a failed build: the webview, GL and media libraries and the WebKit web extension must be installed, and setup.h must define each of wxUSE_GLCANVAS_EGL, wxUSE_LIBSDL, wxUSE_LIBNOTIFY, wxUSE_SECRETSTORE, wxUSE_SPELLCHECK, wxUSE_LIBMSPACK and wxUSE_WEBREQUEST_CURL as 1.

The source tree already has a build/ directory, holding wx’s own build systems, so the CMake build directory is _build.