46.4. doxygen-1.18.0
Documentation system for C++, C, Java, Objective-C, Python, IDL, PHP, C#
| Version | 1.18.0, release 1 |
| Shelf | doctools — Documentation toolchains, man pages, markup converters and TeX typesetting |
| Phase | 30_foundation (Build Foundation), 101 of 127 in build order |
| Licence | GPL-2.0-only |
| Homepage | https://www.doxygen.nl/ |
| Build time | 4.6 SBU |
| Installed size | 27.8 MiB in 3 files |
| Recipe | ports/core/doctools/doxygen/kpkgbuild |
About
Doxygen generates reference documentation from comments in C, C++ and other source code, as HTML, LaTeX, man pages or XML. It is in 30_foundation because a port of that phase needs it: libxml2 is configured --with-python, and its configure stops with “cannot find doxygen” unless doxygen is installed, because the generator of the Python bindings reads the XML description of the API that doxygen writes. Later, pipewire, notmuch, brltty and srecord depend on it for their documentation.
Only the command-line doxygen program is built.
Sources
doxygen-1.18.0.tar.gz(9.4 MiB)
sha256b32a3def78b0b75a2fd74ee6a63fb4a79cb6273fe31a570362e4e1871fa446da
upstream: https://github.com/doxygen/doxygen/archive/refs/tags/Release_1_18_0.tar.gz
archive copy: sources-1/doctools--doxygen-1.18.0.tar.gz
Dependencies
Depends on: cmake, flex, bison, python3, sqlite.
Required by (5): brltty, libxml2, notmuch, pipewire, srecord.
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/30_foundation/phase.env && kpkg install doxygen'
What kpkg does
kpkg runs these steps, in this order, as root inside the chroot. The port directory is /ports/core/doctools/doxygen.
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/doctools/doxygen
echo 'b32a3def78b0b75a2fd74ee6a63fb4a79cb6273fe31a570362e4e1871fa446da doxygen-1.18.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/doxygen
SRC=$SRC_ROOT/doxygen-1.18.0
PKG=$SRC_ROOT/pkg
rm -rf "$SRC_ROOT"
mkdir -p "$SRC" "$PKG"
tar --no-same-permissions --warning=no-unknown-keyword -xf doxygen-1.18.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 recipe’s helpers _version and the five paths PKGNAME, PORT_SRC, SRC_ROOT, SRC and PKG set as shell variables. Its body, verbatim:
mkdir -p build
cd build
cmake .. \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_BUILD_TYPE=Release \
-Dbuild_wizard=OFF \
-Dbuild_search=OFF \
-Duse_sys_sqlite3=ON
make
make DESTDIR=$PKG install
The switches, and why each is set:
-Dbuild_wizard=OFF— Build nodoxywizard, the Qt graphical front end for writing a Doxyfile. It is upstream’s default, and Qt is not installed until much later in the build.-Dbuild_search=OFF— Build nodoxysearchanddoxyindexer, the server-side search tools for generated HTML. They need Xapian, whose port is built in41_system. Off is upstream’s default.-Duse_sys_sqlite3=ON— Link the sqlite port’slibsqlite3instead of compiling the copy of SQLite bundled in doxygen’s source, which is whysqliteis independs.
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/doxygen, 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 doxygen-1.18.0-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/doxygen, and runs the triggers its paths call for.
Contents
Installed programs: doxygen.
Installed directories: /usr/share/licenses/doxygen.
Short descriptions
doxygen |
documentation system for various programming languages |