186.2. freerdp-3.32.0
Remote Desktop Protocol libraries, client and server, and the SDL3 client sdl-freerdp; the RDP engine of Remmina and krdp
| Version | 3.32.0, release 2 |
| Shelf | virt — Virtual machines, their tooling, and remote-desktop and VNC protocols |
| Phase | 42_graphics (Graphics Stack), 173 of 189 in build order |
| Licence | Apache-2.0 |
| Homepage | https://www.freerdp.com |
| Build time | 2.0 SBU |
| Installed size | 9.7 MiB in 314 files |
| Recipe | ports/core/virt/freerdp/kpkgbuild |
About
FreeRDP is an implementation of Microsoft’s Remote Desktop Protocol. The port builds its libraries (libfreerdp3, libwinpr3 and the client library with its virtual-channel plugins) and one client, sdl-freerdp, which runs on SDL 3 and so opens as a Wayland window, and the server library libfreerdp-server3. The client libraries are the RDP engine of remmina; the server library is the one krdp shares a Plasma desktop through. No server program is built.
Sources
freerdp-3.32.0.tar.gz(10.7 MiB)
sha256855645e886f9749a485cb6630ffe934aa717d7b18cf716699ab1fc8864633210
upstream: https://github.com/FreeRDP/FreeRDP/releases/download/3.32.0/freerdp-3.32.0.tar.gz
archive copy: sources-4/virt--freerdp-3.32.0.tar.gz
Dependencies
Depends on: cmake, ninja, pkgconf, openssl, zlib, libjpeg-turbo, libpng, libwebp, ffmpeg, sdl3, sdl3-ttf, sdl3-image, wayland, wayland-protocols, alsa-lib, libpulse, cups, krb5, icu, json-c, uriparser, fuse, opus, fdk-aac, soxr, libusb, pcsc-lite.
Required by (3): krdc, krdp, remmina.
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.
-DWITH_SHADOW=OFF, line 20: shadow (explained with the switches below)-DWITH_PROXY=OFF, line 21: libproxy (explained with the switches below)-DWITH_X11=OFF, line 28: libX11 (explained with the switches below)-DWITH_WAYLAND=OFF, line 29: wayland (explained with the switches below)-DCMAKE_DISABLE_FIND_PACKAGE_X11=ON, line 30: libX11-DWITH_CAIRO=OFF, line 38: cairo-DWITH_OPENH264=OFF, line 43: openh264 (explained with the switches below)-DWITH_GSM=OFF, line 44: gsm (explained with the switches below)-DWITH_LAME=OFF, line 45: lame-DWITH_FAAD2=OFF, line 46: faad2-DWITH_DAV1D=OFF, line 49: dav1d-DWITH_YUV=OFF, line 50: libyuv
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/42_graphics/phase.env && kpkg install freerdp'
What kpkg does
kpkg runs these steps, in this order, as root inside the chroot. The port directory is /ports/core/virt/freerdp.
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/virt/freerdp
echo '855645e886f9749a485cb6630ffe934aa717d7b18cf716699ab1fc8864633210 freerdp-3.32.0.tar.gz' | 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/freerdp
SRC=$SRC_ROOT/freerdp-3.32.0
PKG=$SRC_ROOT/pkg
rm -rf "$SRC_ROOT"
mkdir -p "$SRC" "$PKG"
tar --no-same-permissions --warning=no-unknown-keyword -xf freerdp-3.32.0.tar.gz -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 five paths PKGNAME, PORT_SRC, SRC_ROOT, SRC and PKG set as shell variables. Its body, verbatim:
cmake -B build -G Ninja -DCMAKE_POLICY_VERSION_MINIMUM=3.5 \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=lib \
-DCMAKE_SKIP_INSTALL_RPATH=ON \
-DBUILD_TESTING=OFF \
-DWITH_SAMPLE=OFF \
-DWITH_SERVER=ON \
-DWITH_SHADOW=OFF \
-DWITH_PROXY=OFF \
-DWITH_PLATFORM_SERVER=OFF \
-DWITH_CLIENT=ON \
-DWITH_CLIENT_SDL=ON \
-DWITH_CLIENT_SDL2=OFF \
-DWITH_CLIENT_SDL3=ON \
-DWITH_SDL_IMAGE_DIALOGS=ON \
-DWITH_X11=OFF \
-DWITH_WAYLAND=OFF \
-DCMAKE_DISABLE_FIND_PACKAGE_X11=ON \
-DWITH_CHANNELS=ON \
-DWITH_MANPAGES=ON \
-DWITH_OPENSSL=ON \
-DWITH_FFMPEG=ON \
-DWITH_VIDEO_FFMPEG=ON \
-DWITH_DSP_FFMPEG=OFF \
-DWITH_SWSCALE=ON \
-DWITH_CAIRO=OFF \
-DWITH_JPEG=ON \
-DWINPR_UTILS_IMAGE_JPEG=ON \
-DWINPR_UTILS_IMAGE_PNG=ON \
-DWINPR_UTILS_IMAGE_WEBP=ON \
-DWITH_OPENH264=OFF \
-DWITH_GSM=OFF \
-DWITH_LAME=OFF \
-DWITH_FAAD2=OFF \
-DWITH_FAAC=OFF \
-DWITH_AOM=OFF \
-DWITH_DAV1D=OFF \
-DWITH_YUV=OFF \
-DWITH_FDK_AAC=ON \
-DWITH_OPUS=ON \
-DWITH_SOXR=ON \
-DWITH_ALSA=ON \
-DWITH_PULSE=ON \
-DWITH_OSS=OFF \
-DWITH_SNDIO=OFF \
-DWITH_CUPS=ON \
-DWITH_PCSC=ON \
-DWITH_PKCS11=ON \
-DWITH_KRB5=ON \
-DWITH_FUSE=ON \
-DWITH_JSONC_REQUIRED=ON \
-DWITH_TIMEZONE_ICU=ON \
-DWITH_URIPARSER=ON \
-DWITH_SYSTEMD=OFF \
-DWITH_INSTALL_CLIENT_DESKTOP_FILES=OFF \
-DWITH_BINARY_VERSIONING=OFF \
-DWITH_CCACHE=OFF \
-DWITH_CLANG_FORMAT=OFF \
-DUSE_VERSION_FROM_GIT_TAG=OFF
cmake --build build
DESTDIR=$PKG cmake --install build
The switches, and why each is set:
-DCMAKE_SKIP_INSTALL_RPATH=ON— Install the binaries without the$ORIGIN/../lib:$ORIGIN/..run path FreeRDP’scmake/ConfigureRPATH.cmakesets; the libraries are in/usr/lib, where the loader looks anyway.-DWITH_SAMPLE=OFF— No sample client or sample server.-DWITH_SERVER=ON— Buildlibfreerdp-server3, its headers andfreerdp-server3.pc, and the server side of the channels: the protocol half of an RDP server, which krdp links and feeds with KWin’s screencast. It is upstream’s default, stated beside the three switches below that leave out the server programs it would otherwise bring.-DWITH_SHADOW=OFF— Nofreerdp-shadow-cli. The shadow server mirrors a desktop through its X11 subsystem, which a build with no X11 cannot have; krdp is the server that shares a Plasma session.-DWITH_PROXY=OFF— Nofreerdp-proxy, the RDP proxy server with its module plugins; nothing in KDOS relays RDP connections.-DWITH_PLATFORM_SERVER=OFF— No platform server.server/CMakeLists.txtbuilds one only for Windows, and reports the macOS one as broken, so on Linux the option adds nothing; upstream’s default is on, and it is stated off so the configure says what is built.-DWITH_CLIENT=ON,-DWITH_CLIENT_SDL=ON,-DWITH_CLIENT_SDL3=ON— Build the SDL client, on sdl3.-DWITH_CLIENT_SDL2=OFF— The SDL 2 client, which upstream marks deprecated and experimental; it would otherwise be built whenever SDL 2 is found (sdl2-compat provides it).-DWITH_SDL_IMAGE_DIALOGS=ON— Show images in the client’s dialogs through sdl3-image; upstream calls it recommended and leaves it off by default.-DWITH_X11=OFF,-DCMAKE_DISABLE_FIND_PACKAGE_X11=ON— No X11 client, and no search for the X libraries at all, so nothing in the build links them even where a component would take them when found.-DWITH_WAYLAND=OFF— Skipsuwacandwlfreerdp, the native Wayland client, which upstream builds only while its deprecated 3.x interfaces are built (WITHOUT_FREERDP_3x_DEPRECATEDoff). The SDL client is the Wayland client here.-DWITH_CHANNELS=ON— Build the virtual-channel plugins: clipboard, sound, drive, printer, smart-card and USB redirection, and the graphics pipeline.-DWITH_MANPAGES=ON— Generate the manual pages.-DWITH_FFMPEG=ON,-DWITH_VIDEO_FFMPEG=ON— H.264 decoding for the graphics pipeline through ffmpeg.-DWITH_DSP_FFMPEG=OFF— Keep FFmpeg out of the audio path; sound is encoded and decoded by FreeRDP’s own DSP code with the codec libraries named below.-DWITH_SWSCALE=ON,-DWITH_CAIRO=OFF— Scale the remote screen with FFmpeg’s libswscale rather than cairo.-DWITH_JPEG=ON— JPEG decoding through libjpeg-turbo.-DWINPR_UTILS_IMAGE_JPEG=ON,-DWINPR_UTILS_IMAGE_PNG=ON,-DWINPR_UTILS_IMAGE_WEBP=ON— Convert clipboard images between Windows bitmaps and JPEG, PNG and WebP, so a picture copied on either side pastes on the other. Upstream leaves all three off.-DWITH_OPENH264=OFF— Cisco’s OpenH264 decoder, a second H.264 path beside FFmpeg’s.-DWITH_GSM=OFF,-DWITH_LAME=OFF,-DWITH_FAAD2=OFF,-DWITH_FAAC=OFF— The GSM, MP3 and two further AAC codecs for audio redirection; AAC is covered by FDK-AAC below.-DWITH_AOM=OFF,-DWITH_DAV1D=OFF,-DWITH_YUV=OFF— AV1 decoding through libaom or dav1d, and libyuv’s colour conversion.-DWITH_FDK_AAC=ON,-DWITH_OPUS=ON,-DWITH_SOXR=ON— AAC through fdk-aac, Opus, and resampling through soxr for audio redirection.-DWITH_ALSA=ON,-DWITH_PULSE=ON— The ALSA and PulseAudio sound backends; the PulseAudio one is built against libpulse and reaches PipeWire’s PulseAudio server.-DWITH_OSS=OFF,-DWITH_SNDIO=OFF— The OSS and sndio sound backends, which upstream builds when it finds them. sndio is not a port.-DWITH_CUPS=ON— Printer redirection through cups.-DWITH_PCSC=ON— Smart-card redirection through pcsc-lite.-DWITH_PKCS11=ON— WinPR’s NCrypt layer over PKCS #11 modules, which smart-card logon in NLA uses to reach the keys and certificates on a card.-DWITH_KRB5=ON— Kerberos authentication through krb5, for NLA against a domain.-DWITH_FUSE=ON— Copy files through the clipboard, exposed as a fuse file system.-DWITH_JSONC_REQUIRED=ON— Use json-c for JSON and fail if it is not found; without it the build takes the first it finds of Jansson, json-c and cJSON, in that order.-DWITH_TIMEZONE_ICU=ON— Map time zones between their Windows and IANA names through icu.-DWITH_URIPARSER=ON— Validate, escape and unescape URLs in WinPR’s string helpers with uriparser rather than WinPR’s own fallback code.-DWITH_SYSTEMD=OFF— No export of FreeRDP’s log to the systemd journal; KDOS has no systemd (principles).-DWITH_INSTALL_CLIENT_DESKTOP_FILES=OFF— Install no.desktopfile forsdl-freerdp, which takes the server and its options on the command line; it gets no menu entry. This is upstream’s default.-DWITH_BINARY_VERSIONING=OFF— Install the programs (sdl-freerdp,winpr-hash,winpr-makecert), the manual pages and the SDL client’s resource directory without the major version in the name (sdl-freerdp, notsdl-freerdp3); the library names do not depend on it. This is upstream’s default.-DWITH_CCACHE=OFF,-DWITH_CLANG_FORMAT=OFF— Do not use ccache, and do not probe forclang-format, both of which upstream turns on when found.-DUSE_VERSION_FROM_GIT_TAG=OFF— Take the version from the release’s ownCMakeLists.txt, not fromgit describe; the source is a tarball with no repository.
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/freerdp, 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 freerdp-3.32.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/freerdp, and runs the triggers its paths call for.
Contents
Installed programs: sdl-freerdp, winpr-hash, winpr-makecert.
Installed libraries: libfreerdp-client3.so, libfreerdp-server3.so, libfreerdp3.so, libwinpr-tools3.so, libwinpr3.so.
Installed directories: /usr/include/freerdp3, /usr/include/winpr3, /usr/lib/cmake/FreeRDP-Client3, /usr/lib/cmake/FreeRDP-Server3, /usr/lib/cmake/FreeRDP3, /usr/lib/cmake/WinPR-tools3, /usr/lib/cmake/WinPR3, /usr/share/licenses/freerdp.
Short descriptions
sdl-freerdp |
FreeRDP SDL client |
winpr-hash |
NTLM hashing tool |
winpr-makecert |
A tool to create X.509 certificates. |
freerdp-client3.pc |
FreeRDP: A Remote Desktop Protocol Implementation |
freerdp-server3.pc |
FreeRDP: A Remote Desktop Protocol Implementation |
freerdp3.pc |
FreeRDP: A Remote Desktop Protocol Implementation |
winpr-tools3.pc |
WinPR: Windows Portable Runtime |
winpr3.pc |
WinPR: Windows Portable Runtime |