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

337.3. organicmaps-2025.09.05.1

Organic Maps: offline maps with search and turn-by-turn routing for walking, cycling and driving, from OpenStreetMap data

Version 2025.09.05.1, release 2
Shelf gis — GIS, maps, projections, GPS, navigation and location
Phase 44_apps (Applications), 213 of 422 in build order
Licence Apache-2.0
Homepage https://organicmaps.app/
Build time 64.5 SBU
Installed size 408.2 MiB in 3116 files
Recipe ports/core/gis/organicmaps/kpkgbuild

About

Organic Maps is an offline map application built on OpenStreetMap data, with search and turn-by-turn routing for walking, cycling and driving. The port builds its Qt 6 desktop program, OMaps, and installs it with the data directory it reads, which carries the whole world at low zoom (World.mwm and WorldCoasts.mwm). Detailed regions are .mwm files of the same data version: the program’s own downloader fetches them over the network, or they are placed by hand in its writable data directory under ~/.local/share for a machine that stays offline.

Sources

Dependencies

Depends on: cmake, ninja, python3, pkgconf, boost, expat, fast-double-parser, gflags, jansson, pugixml, utfcpp, glm, icu, freetype2, harfbuzz, zlib, vulkan-headers, qt6-qtbase, qt6-qtpositioning, qt6-qtsvg, hicolor-icon-theme.

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

What kpkg does

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

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/organicmaps
echo '4fab0f3e1c9aa3e1a5174d9af47cc974e820b22e0dc2dec844f5b3d2eeca9caf  organicmaps-2025.09.05.1.tar.gz' | sha256sum -c -
echo '7017a708f3bfba534bc9eabe8d9c641f595d32d91d7b4c4ead8bb65514fda594  organicmaps-just_gtfs-7516753825500f90ac2de6f18c256d5abec1ff33.tar.gz' | sha256sum -c -
echo '9903264b35493ec519c4d45ecc2043356450935e56939ef6ec0fe982320f4784  organicmaps-protobuf-9442c12e866b56369f1c53abea1261259c924a19.tar.gz' | sha256sum -c -
echo '14ad8a0db71464e90144ae8ceac65c1b672a630cf0884e451c8cf346fd1022de  fast_obj-42629f744269e004907a6fb4f16c6c7f69acc586.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/organicmaps
SRC=$SRC_ROOT/organicmaps-2025.09.05.1
PKG=$SRC_ROOT/pkg
rm -rf "$SRC_ROOT"
mkdir -p "$SRC" "$PKG"
tar --no-same-permissions --warning=no-unknown-keyword -xf organicmaps-2025.09.05.1.tar.gz -C "$SRC" --strip-components=1
tar --no-same-permissions --warning=no-unknown-keyword -xf organicmaps-just_gtfs-7516753825500f90ac2de6f18c256d5abec1ff33.tar.gz -C "$SRC_ROOT"
tar --no-same-permissions --warning=no-unknown-keyword -xf organicmaps-protobuf-9442c12e866b56369f1c53abea1261259c924a19.tar.gz -C "$SRC_ROOT"
tar --no-same-permissions --warning=no-unknown-keyword -xf fast_obj-42629f744269e004907a6fb4f16c6c7f69acc586.tar.gz -C "$SRC_ROOT"

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 _tag, _gtfs, _protobuf, _fastobj and the five paths PKGNAME, PORT_SRC, SRC_ROOT, SRC and PKG set as shell variables. Its body, verbatim:

for p in use-external-jansson libs-hack use-internal-protobuf \
	no-dev-sandbox no-macdeployqt version-from-environment \
	skip-search-test-support; do
	patch -p1 -i "$PORT_SRC/$p.patch"
done
_om=${_tag%-linux}
export OM_VERSION_DATE=${_om%-*} OM_VERSION_COUNT=${_om##*-}
cp -a "$SRC_ROOT/just_gtfs-$_gtfs/." 3party/just_gtfs/
cp -a "$SRC_ROOT/protobuf-$_protobuf/." 3party/protobuf/protobuf/
cp -a "$SRC_ROOT/fast_obj-$_fastobj/." 3party/fast_obj/

cmake -S . -B build -G Ninja \
	-DCMAKE_POLICY_VERSION_MINIMUM=3.5 \
	-DCMAKE_BUILD_TYPE=Release \
	-DCMAKE_INSTALL_PREFIX=/usr \
	-DCMAKE_INSTALL_LIBDIR=lib \
	-DBUILD_SHARED_LIBS=OFF \
	-DWITH_SYSTEM_PROVIDED_3PARTY=ON \
	-DBUILD_DESIGNER=OFF \
	-DBUILD_STANDALONE=ON \
	-DSKIP_TESTS=ON \
	-DSKIP_TOOLS=ON \
	-DSKIP_QT_GUI=OFF \
	-DPYBINDINGS=OFF \
	-DUSE_CCACHE=OFF \
	-DUSE_PCH=OFF \
	-DCMAKE_EXE_LINKER_FLAGS_RELEASE="$LDFLAGS"
cmake --build build
DESTDIR=$PKG cmake --install build
rm -rf "$PKG/usr/share/organicmaps/data/test_data"
rm -f "$PKG/usr/share/organicmaps/data/minsk-pass.mwm" \
	"$PKG/usr/share/organicmaps/data/minsk-pass.osm.bz2"
[ -f "$PKG/usr/share/icons/hicolor/512x512/apps/organicmaps.png" ] ||
	{ echo "organicmaps: the hicolor PNG icon was not installed" >&2; exit 1; }

cat > "$PKG/usr/share/applications/app.organicmaps.desktop.desktop" <<'DESKTOP'
[Desktop Entry]
Type=Application
Name=Organic Maps
GenericName=Offline Maps
Comment=Offline maps with search and routing, from OpenStreetMap
Exec=OMaps %f
TryExec=OMaps
Icon=organicmaps
Terminal=false
StartupWMClass=app.organicmaps.desktop
Categories=Qt;Education;Geography;Maps;
Keywords=map;maps;offline;navigation;route;osm;openstreetmap;organic;
MimeType=application/x-organicmaps-mwm;
DESKTOP
chmod 644 "$PKG/usr/share/applications/app.organicmaps.desktop.desktop"

install -Dm644 /dev/stdin \
	"$PKG/usr/share/mime/packages/kdos-organicmaps.xml" <<'MIMEXML'
<?xml version="1.0" encoding="UTF-8"?>
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
  <mime-type type="application/x-organicmaps-mwm">
    <comment>Organic Maps map</comment>
    <generic-icon name="organicmaps"/>
    <glob pattern="*.mwm"/>
  </mime-type>
</mime-info>
MIMEXML

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

Contents

Installed programs: OMaps.

Installed directories: /usr/share/licenses/organicmaps, /usr/share/organicmaps.

Notes

The release archive carries its git submodules as empty directories. Three of them have no system form in the tree and are sources of the recipe at the commits the tag pins: the project’s own protobuf fork, just_gtfs and fast_obj. build.sh copies each into its place under 3party/ before configure (see An empty submodule in a release archive). A version bump has to take the new commit ids from the tag’s submodule references into _protobuf, _gtfs and _fastobj.

The install copies the whole data/ directory, test data included. The package drops data/test_data and minsk-pass.mwm with its source minsk-pass.osm.bz2, the small map the routing and map tests load: no countries.txt names it, and the offline library lists every .mwm in the data directory as a map. The [ -f … ] check after it fails the build if the 512-pixel hicolor icon the desktop entry names is not installed.

shared-mime-info has no type for a .mwm map, which would make one application/octet-stream and leave a file manager asking what opens it. build.sh installs kdos-organicmaps.xml, which defines application/x-organicmaps-mwm for *.mwm, and the desktop entry claims it, with Exec=OMaps %f. The program reads every map in its data directories and has no way to be handed one: outside the map-style designer build main() takes no file argument, and gflags leaves a path that is not a flag in argv unread, so opening a map starts Organic Maps on the world view.

The program calls setDesktopFileName("app.organicmaps.desktop"), which makes that its Wayland app_id. Upstream’s entry is replaced by one carrying the same name as StartupWMClass, so the panel ties the window to its launcher.