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

337.7. viking-1.11

GPS track, waypoint and route manager on maps, with MBTiles and gpsd (GTK 3)

Version 1.11, release 2
Shelf gis — GIS, maps, projections, GPS, navigation and location
Phase 44_apps (Applications), 217 of 422 in build order
Licence GPL-2.0-or-later
Homepage https://sourceforge.net/projects/viking/
Build time 1.0 SBU
Installed size 5.6 MiB in 74 files
Recipe ports/core/gis/viking/kpkgbuild

About

Viking manages GPS data on maps: it reads, edits and writes tracks, waypoints and routes in GPX and KML itself, draws them over OpenStreetMap and other tile layers, and follows a live position from gpsd. GeoJSON and the formats GPSBabel converts go through external programs it runs from the path, togeojson, togpx and gpsbabel, and none of the three is a port. The port builds its GTK 3 interface. Maps work offline from MBTiles files and from the tile cache it keeps of what it has downloaded.

Sources

Dependencies

Depends on: pkgconf, intltool, itstool, gettext, libintl, gtk3, glib, gdk-pixbuf, json-glib, curl, expat, zlib, bzip2, xz, libzip, sqlite, nettle, file, gexiv2, geoclue, gpsd, libnova, libX11, libxslt, docbook-xsl.

Required by: no port names it.

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/44_apps/phase.env && kpkg install viking'

What kpkg does

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

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

patch -p1 -i "$PORT_SRC/nettle4.patch"

export CFLAGS="$CFLAGS -g0"

./configure \
	--prefix=/usr \
	--sysconfdir=/etc \
	--libdir=/usr/lib \
	--disable-gtk2 \
	--disable-deprecations \
	--disable-bing \
	--disable-google \
	--disable-terraserver \
	--disable-expedia \
	--enable-openstreetmap \
	--disable-osm-auth \
	--disable-oauth \
	--disable-bluemarble \
	--disable-geonames \
	--disable-geocaches \
	--disable-dem24k \
	--enable-geoclue \
	--enable-geotag \
	--enable-realtime-gps-tracking \
	--enable-bzip2 \
	--enable-magic \
	--enable-mbtiles \
	--enable-zip \
	--enable-xz \
	--enable-nettle \
	--disable-mapnik \
	--enable-nova
make
make DESTDIR=$PKG install

install -Dm644 viking-128.png "$PKG/usr/share/icons/hicolor/128x128/apps/viking.png"
install -Dm644 org.viking.Viking.appdata.xml "$PKG/usr/share/metainfo/org.viking.Viking.appdata.xml"

cat > "$PKG/usr/share/applications/viking.desktop" <<'DESKTOP'
[Desktop Entry]
Type=Application
Name=Viking
GenericName=GPS Data Manager
Comment=Manage GPS tracks, waypoints and routes on maps
Exec=viking %F
Icon=viking
Terminal=false
StartupWMClass=viking
Categories=GTK;Science;Geography;Maps;Education;
Keywords=gps;gpx;kml;track;waypoint;route;map;mbtiles;
DESKTOP
chmod 644 "$PKG/usr/share/applications/viking.desktop"

The switches, and why each is set:

Each --enable- above is also upstream’s default, named. Each that needs a library stops configure with an error when the library is missing, except zip support, which configure turns off with only a warning when pkg-config finds no libzip of the version it asks for.

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/viking, 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 viking-1.11-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/viking, and runs the triggers its paths call for.

Contents

Installed programs: viking.

Installed directories: /usr/share/help/C/viking, /usr/share/licenses/viking, /usr/share/viking.

Short descriptions

viking program to manage GPS data

Notes

The manual page, viking.1, is generated from the DocBook help with xsltproc --nonet and the DocBook stylesheets’ http://docbook.sourceforge.net/… URL, which resolves offline through the XML catalog of docbook-xsl. Both that and libxslt are in depends for the page.

Upstream’s install does not put viking-128.png or org.viking.Viking.appdata.xml in place; they are only in its distribution archive, and build.sh installs them. The desktop entry is written in build.sh with StartupWMClass=viking, the Wayland app_id GTK 3 takes from the program’s name.