284.3. kompare-26.08.2
Diff and patch viewer — side-by-side differences, applying hunks, and a part other programs embed
| Version | 26.08.2, release 1 |
| Shelf | vcs — Version control and diff/merge tools |
| Phase | 44_apps (Applications), 399 of 422 in build order |
| Licence | GPL-2.0-or-later AND (GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL) AND GFDL-1.2-or-later AND CC0-1.0 |
| Homepage | https://apps.kde.org/kompare/ |
| Build time | 2.0 SBU |
| Installed size | 1.1 MiB in 32 files |
| Recipe | ports/core/vcs/kompare/kpkgbuild |
About
Kompare compares two files or folders, or reads a diff or patch, and shows the differences side by side, with each change linked between the panes. Hunks can be applied to or removed from the destination one at a time, and a patch can be saved. Its comparison view is also a KParts component other programs embed.
Sources
kompare-26.08.2.tar.xz(943.2 KiB)
sha256b1bee9df5873ef81746d8069255c286c00cae179bb8ab38870f616806f61b776
upstream: https://download.kde.org/stable/release-service/26.08.2/src/kompare-26.08.2.tar.xz
archive copy: sources-4/vcs--kompare-26.08.2.tar.xz
Dependencies
Depends on: cmake, ninja, extra-cmake-modules, qt6-qtbase, kcodecs, kconfig, kcoreaddons, kdoctools, ki18n, kiconthemes, kjobwidgets, kparts, ktexteditor, kwidgetsaddons, libkomparediff2.
Required by (1): kde-gear-devtools.
Patches
build.sh applies these; kpkg applies nothing by itself.
The desktop entry’s StartupWMClass is upstream’s kompare, but the window’s Wayland app_id is org.kde.kompare, the desktop file name that KAboutData derives from the apps.kde.org home page and the component name; app-id.patch sets the class to the app_id so the task manager matches the window to its entry.
app-id.patch— set the desktop entry's StartupWMClass to the Wayland app_id, org.kde.kompare
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/44_apps/phase.env && kpkg install kompare'
What kpkg does
kpkg runs these steps, in this order, as root inside the chroot. The port directory is /ports/core/vcs/kompare.
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/vcs/kompare
echo 'b1bee9df5873ef81746d8069255c286c00cae179bb8ab38870f616806f61b776 kompare-26.08.2.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/kompare
SRC=$SRC_ROOT/kompare-26.08.2
PKG=$SRC_ROOT/pkg
rm -rf "$SRC_ROOT"
mkdir -p "$SRC" "$PKG"
tar --no-same-permissions --warning=no-unknown-keyword -xf kompare-26.08.2.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 five paths PKGNAME, PORT_SRC, SRC_ROOT, SRC and PKG set as shell variables. Its body, verbatim:
patch -p1 -i "$PORT_SRC/app-id.patch"
cmake -S . -B build -G Ninja \
-D CMAKE_INSTALL_PREFIX=/usr \
-D KDE_INSTALL_LIBDIR=lib \
-D CMAKE_BUILD_TYPE=Release \
-D KDE_INSTALL_USE_QT_SYS_PATHS=ON \
-D BUILD_TESTING=OFF \
-D KF_SKIP_PO_PROCESSING=ON \
-Wno-dev
cmake --build build
DESTDIR=$PKG cmake --install build
The switches, and why each is set:
-D KF_SKIP_PO_PROCESSING=ON— Builds none of the interface translations inpo/, which kpkg’s English-only rule would remove from the package anyway (see Size and language policy).-Wno-dev— Silences CMake’s warnings meant for the project’s own developers.
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/kompare, 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 kompare-26.08.2-1.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/kompare, and runs the triggers its paths call for.
Contents
Installed programs: kompare.
Installed libraries: libkomparedialogpages.so, libkompareinterface.so.
Installed directories: /usr/include/kompare, /usr/share/doc/HTML/en/kompare, /usr/share/licenses/kompare.
Notes
Parsing diffs and comparing files is libkomparediff2, required at 6.0 or later; the two move to a new release together. Kompare installs two shared libraries of its own, libkomparedialogpages and libkompareinterface, which its part and its application share.
kdoctools_install(po) still builds the handbook in every translated language; kpkg’s language rule removes /usr/share/doc/HTML/<lang>/ from the package.