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

135.1. libogg-1.3.6

Ogg container library

Version 1.3.6, release 1
Shelf audio-codecs — Audio codecs, containers and tagging, including the Bluetooth audio codecs
Phase 41_system (System), 18 of 1047 in build order
Licence BSD-3-Clause
Homepage https://xiph.org/ogg/
Build time 0.1 SBU
Installed size 244.5 KiB in 20 files
Recipe ports/core/audio-codecs/libogg/kpkgbuild

About

libogg reads and writes the Ogg container, the bitstream that carries Vorbis, Opus, FLAC and Theora streams in .ogg, .oga, .opus and .ogv files. It is the bottom of the audio codec stack: libvorbis, flac (for Ogg FLAC), opusfile, libsndfile, ffmpeg and the GStreamer plugin packages build on it, and with them most of the players, editors and games of the tree.

Its build is the plain autotools shape, with nothing of its own to explain.

Why it is in KDOS

The comment above the 5 ports from libogg to lame in script/phases/41_system/packages.d/audio-codecs.txt:

ffmpeg, libsndfile and the gst plugin packages are configured against these and are only as capable as what is installed: each of those build systems answers a missing library by disabling the feature rather than failing. One encoder per format — adding a second earns nothing.

Sources

Dependencies

Depends on: nothing a recipe names.

Required by (41): ardour, audacious-plugins, audacity, audiocd-kio, cdrdao, ddnet, ffmpeg, flac, gst-plugins-base, handbrake, ioquake3, ironwail, k3b, kwave, libcanberra, libopenmpt, libsndfile, libtheora, libvorbis, lmms, luanti, minidlna, mkvtoolnix, openmsx, openrct2, opus-tools, opusfile, scummvm, sdl2-mixer, sdl3-mixer, sox, speex, supertux, supertuxkart, tenacity, vice, vlc, vorbis-tools, vtk, warzone2100, xonotic.

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/41_system/phase.env && kpkg install libogg'

What kpkg does

kpkg runs these steps, in this order, as root inside the chroot. The port directory is /ports/core/audio-codecs/libogg.

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/audio-codecs/libogg
echo '5c8253428e181840cd20d41f3ca16557a9cc04bad4a3d04cce84808677fa1061  libogg-1.3.6.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/libogg
SRC=$SRC_ROOT/libogg-1.3.6
PKG=$SRC_ROOT/pkg
rm -rf "$SRC_ROOT"
mkdir -p "$SRC" "$PKG"
tar --no-same-permissions --warning=no-unknown-keyword -xf libogg-1.3.6.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:

./configure --prefix=/usr --libdir=/usr/lib --disable-static
make
make DESTDIR=$PKG install

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

Contents

Installed libraries: libogg.so.

Installed directories: /usr/include/ogg, /usr/share/doc/libogg, /usr/share/licenses/libogg.

Short descriptions

ogg.pc ogg is a library for manipulating ogg bitstreams