43.2. pkgconf-3.0.9
Package compiler and linker metadata toolkit
| Version | 3.0.9, release 1 |
| Shelf | buildtools — Build systems and build helpers |
| Phase | 30_foundation (Build Foundation), 11 of 127 in build order |
| Licence | ISC |
| Homepage | https://github.com/pkgconf/pkgconf |
| Build time | 0.1 SBU |
| Installed size | 637.9 KiB in 28 files |
| Recipe | ports/core/buildtools/pkgconf/kpkgbuild |
About
pkgconf is the tree’s pkg-config: it reads the .pc files libraries install and prints the compiler and linker flags a program needs to use them. A configure script reaches it through PKG_CHECK_MODULES, and Meson and CMake call it to find dependencies, so most ports that link a library run it, whether or not the recipe names pkgconf in depends; that is why it is in the opening run of 30_foundation. The package lint runs it too, resolving every .pc file a package ships (see The package lint). It is built with muon.
Why it is in KDOS
The comment above the 24 ports from fortify-headers to musl-utils in script/phases/30_foundation/packages.txt is quoted in The build foundation.
Sources
pkgconf-3.0.9.tar.xz(419.2 KiB)
sha2566ab2d3b8087dcf500e34003a6a8934dca55d0a3d6066aeafb03c352db3e68bfd
upstream: https://distfiles.ariadne.space/pkgconf/pkgconf-3.0.9.tar.xz
archive copy: sources-1/buildtools--pkgconf-3.0.9.tar.xz
Dependencies
Depends on: muon.
Required by (658): abiword, accountsservice, adplug, afflib, aircrack-ng, airspy, airspyhf, amiberry, android-file-transfer, android-tools, appstream, ardour, assimp, astropy, audacious, audacious-plugins, audacity, audiofile, avahi, avidemux, avrdude, ayatana-ido, babl, baresip, batctl, bcc, bcftools, bdwgc, binutils-arm-none-eabi, binutils-avr, binutils-riscv64-unknown-elf, bitwise, bladerf, blender, bpftool, bpftrace, brasero, brltty, brogue-ce, cabal-install, cabextract, calcurse, calibre, capstone, cataclysm-dda, ccid, cdrdao, celestia, celluloid, chemical-mime-data, chess-tui, chmlib, chocolate-doom, chromium, clamav, cm256cc, coeurl, converseen, cpp-utilities, cppzmq, crawl-tiles, crispy-doom, cubicsdr, cups-browsed, cups-filters, curaengine, darktable, dasher, ddnet, deja-dup, deutex, devilutionx, dfu-util, digikam, dino, discover, dnsmasq, dosbox-staging, dosbox-x, dragon, dsda-doom, dsdcc, dwarves, efibootmgr, efivar, elogind, endless-sky, enet, erofs-utils, espeak-ng, ethtool, exfatprogs, exiv2, exo, f2fs-tools, f3, fheroes2, filezilla, firefox-esr, flamp, flashrom, fldigi, flmsg, flrig, fltk, fluidsynth, flxmlrpc, font-manager, freeciv, freedv-gui, freeglut, freeipmi, freerdp, frei0r-plugins, frotz, ft2-clone, furnace, fuse-emulator, fwupd, fwupd-efi, fzssh, gavl, geany, gegl, gexiv2, gimagereader, gimp, glabels, glew, glfw, glmark2, glu, gmime, gmsh, gnome-disk-utility, gnucash, gnumeric, gnuplot, gnuradio, gobject-introspection, goffice, goldendict-ng, goocanvas, goxel, gparted, gpgmepp, gphoto2, gpredict, gpsd, gqrx, gr-funcube, gr-iqbal, gr-osmosdr, grafx2, graphviz, gthumb, gtk-vnc, guile, gutenprint, gvfs, hackrf, hamlib, handbrake, hatari, homebank, horizon-eda, hostapd, htslib, hurl, hwloc, hydrogen, icestorm, ifuse, iio-sensor-proxy, imhex, impression, imv, inkscape, inlyne, intel-media-driver, ioquake3, iptables, ironwail, isync, iw, john, js8call, jsoncpp, k3b, kalk, kamoso, karchive, kasts, kcm-kdos-firewall, kde-gtk-config, kdeconnect, kdeplasma-addons, keepsecret, kicad, kimageformats, kinfocenter, kio-fuse, kiwix-desktop, klog, kodi, konversation, koreader, kpipewire, kpmcore, krdc, krdp, krfb, krita, ksystemstats, kwallet, kwallet-pam, kwin, kwindowsystem, lagrange, layer-shell-qt, ledger, lensfun, leptonica, lhasa, lib2geom, lib3mf, libaccounts-glib, libaccounts-qt, libad9361, libavif, libayatana-appindicator, libayatana-indicator, libbfio, libbluray, libbpf, libbs2b, libcacard, libcanberra, libcap-ng, libcdio, libcdio-paranoia, libcdr, libcec, libcupsfilters, libdatrie, libdbusmenu, libdecor, libdiscid, libdvbpsi, libdvdcss, libdvdnav, libdvdread, libei, libetonyek, libetpan, libewf, libfilezilla, libfobos, libftdi, libfyaml, libgd, libgig, libgit2, libgphoto2, libgpiod, libgpod, libgsf, libgusb, libical, libiio, libimobiledevice, libimobiledevice-glue, libiscsi, libjaylink, libjxl, liblangtag, liblo, liblouis, liblxi, libmad, libmaxminddb, libmbim, libmediainfo, libmirisdr, libmodplug, libmtp, libmypaint, libnbd, libnfs, libnice, libodfgen, libofx, libomemo-c, libopenmpt, libopusenc, libosinfo, libosmo-dsp, libpeas, libperseus-sdr, libplacebo, libplist, libppd, libproxy, libpst, libpulse, libqalculate, libqmi, libqrtr-glib, libraw, libre, librepcb, libretro-mupen64plus-next, librevenge, librewolf, librist, libserialport, libsidplayfp, libsigrok, libsigrokdecode, libsmi, libsodium, libspatialaudio, libspectrum, libsrt, libsrtp, libssh, libstoragemgmt, libstrophe, libtatsu, libthai, libtheora, libtommath, libtpms, libudfread, libunibreak, libusb-compat, libusbmuxd, libva-intel-driver, libvhdi, libvirt, libvirt-glib, libvisio, libvmdk, libvncserver, libvslvm, libwacom, libwpd, libwpg, libwps, libxfce4ui, libxfce4util, libxlsxwriter, lilv, limesuite, limesuite-gui, linuxcnc, lirc, lite-xl, lmms, lnav, love, lrdf, luanti, lxi-tools, mbpoll, mednafen, mesa-demos, mgba, milkytracker, minizip, minuet, mkvtoolnix, mlt, mobile-broadband-provider-info, modemmanager, modemmanager-qt, motif, movit, mpd, mpg123, mpv, mpv-mpris, msmtp, mtxclient, mumble, mupen64plus, musescore, musl-fts, musl-obstack, mythes, nbdkit, ndctl, neon, net-snmp, netpbm, netsurf, networkmanager-qt, neverball, nextpnr, nfs-utils, ngtcp2, nheko, notmuch, noto-emoji, nut, nvme-cli, nvtop, obs-studio, onetbb, openal-soft, openbabel, opencolorio, opencpn, opencv, openfpgaloader, openh264, openimageio, openmsx, openocd, openrct2, opensc, openscad, openttd, opus-tools, opusfile, orca, orcaslicer, organicmaps, osinfo-db-tools, osm-gps-map, pam, partclone, pcaudiolib, pciutils, pcsc-lite, pdal, pdfio, pdfium, phodav, phonon, phonon-backend-vlc, picotool, pioneer, plasma-camera, plasma-desktop, plasma-keyboard, plasma-nm, plasma-pa, plasma-setup, plasma-workspace, plasma5support, polkit-qt6, poppler, portaudio, postgresql, powder-toy, powerdevil, powerman, ppsspp, prjtrellis, probe-rs, profanity, protobuf-c, prusaslicer, pt2-clone, pulseaudio-qt, python3-cairo, python3-dbus, python3-gobject, python3-kivy, python3-libvirt, python3-pillow-heif, python3-pkgconfig, python3-pyarcus, python3-pyicu, python3-pypdfium2, python3-pyqt5, python3-pyqt6, python3-pyside6, python3-pyuvula, python3-tkinter, python3-uharfbuzz, qalculate-qt, qbittorrent, qca, qca-qt5, qemu, qgpgme, qpdf, qqwing, qrencode, qsstv, qt5-qtbase, qt6-qt5compat, qt6-qtbase, qt6-qtconnectivity, qt6-qtdeclarative, qt6-qtimageformats, qt6-qtlanguageserver, qt6-qtmultimedia, qt6-qtserialport, qt6-qtshadertools, qt6-qtspeech, qt6-qtsvg, qt6-qttools, qt6-qtvirtualkeyboard, qt6-qtwayland, qt6-qtwebengine, qtforkawesome, qtkeychain, qtutilities, quassel, qv4l2, raptor2, rawtherapee, re2, recoll, remmina, resources, retroarch, rhythmbox, rizin, rnnoise, rtaudio, samba, samtools, satdump, sauerbraten, sc-im, schismtracker, scipy, scummvm, sdcv, sdl2-gfx, sdl2-image, sdl2-mixer, sdl2-net, sdl2-pango, sdl2-ttf, sdl3, sdl3-image, sdl3-mixer, sdl3-ttf, sdrangel, sdrpp, shaderc, shairplay, shotcut, signon-kwallet-extension, signon-plugin-oauth2, signon-ui, signond, sigrok-cli, sleuthkit, slirp4netns, smartmontools, sniffnet, solvespace, sord, spectacle, speex, speexdsp, spice, spice-gtk, splix, sratom, srb2, stella, stellarium, step-ca, stlink, stlink-gui, strawberry, suil, supertux, supertuxkart, surfer, swayimg, switcheroo-control, swtpm, syncthingtray, system-config-printer, taskwarrior, tdb, tenacity, termusic, tesseract, testdisk, tevent, texlive, thermald, thin-provisioning-tools, thrift, thunderbird, timg, tio, tlf, tomlplusplus, totem-pl-parser, transmission, turnstile, tuxpaint, typst, ubdsrv, udftools, uhd, universal-ctags, usbmuxd, usbredir, v4l-utils, vala, vamp-sdk, veracrypt, vice, viking, vlc, vorbis-tools, vte3, vulkan-loader, vulkan-tools, w3m, warzone2100, wayland-utils, waylandpp, waypipe, webkitgtk, webkitgtk6, webrtc-audio-processing, weechat, wesnoth, wev, whois, widelands, wimlib, wine, wireshark, wlvncc, wpa_supplicant, wsjtx, wv, wxwidgets, xastir, xauth, xbitmaps, xdg-desktop-portal-kde, xfburn, xfconf, xh, xhost, xnec2c, xonotic, yara, yazi, yosys, zbar, zenity, zeromq, zziplib.
Patches
build.sh applies these; kpkg applies nothing by itself.
meson-version.patch— Sets the project version inmeson.buildto the release’s own. The released source declares the version before it, and pkgconf reportsmeson.project_version()as its own, inpkgconf --versionand to every configure script that checks for a minimum pkg-config version.
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 pkgconf'
What kpkg does
kpkg runs these steps, in this order, as root inside the chroot. The port directory is /ports/core/buildtools/pkgconf.
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/buildtools/pkgconf
echo '6ab2d3b8087dcf500e34003a6a8934dca55d0a3d6066aeafb03c352db3e68bfd pkgconf-3.0.9.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/pkgconf
SRC=$SRC_ROOT/pkgconf-3.0.9
PKG=$SRC_ROOT/pkg
rm -rf "$SRC_ROOT"
mkdir -p "$SRC" "$PKG"
tar --no-same-permissions --warning=no-unknown-keyword -xf pkgconf-3.0.9.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/meson-version.patch"
muon setup \
-Dprefix=/usr \
-Dbuildtype=release \
-Ddefault_library=both \
-Dwith-pkg-config-dir=/usr/lib/pkgconfig:/usr/share/pkgconfig \
-Dwith-system-libdir=/lib:/usr/lib \
-Dwith-system-includedir=/usr/include \
build
muon -C build samu
DESTDIR=$PKG muon -C build install
ln -sf pkgconf "$PKG"/usr/bin/pkg-config
ln -sf pkgconf.1 "$PKG"/usr/share/man/man1/pkg-config.1
The switches, and why each is set:
-Ddefault_library=both— Buildlibpkgconfas a static archive as well as a shared library; Meson’s default is shared only.-Dwith-pkg-config-dir— The search path compiled in for.pcfiles whenPKG_CONFIG_LIBDIRis unset:/usr/lib/pkgconfigand/usr/share/pkgconfig. Upstream derives the same two from the prefix,libdiranddatadir; naming them keeps the path independent of thelibdirmuon picks. The compiled-in path names nothing under/usr/local.-Dwith-system-libdir— The library directories whose-Lpkgconf leaves out of--libsoutput, because the linker searches them anyway:/liband/usr/lib, the two names of the one directory on KDOS’s merged layout. Upstream’s default is{prefix}/{libdir}alone.-Dwith-system-includedir— The header directory whose-Ipkgconf leaves out of--cflagsoutput,/usr/include.
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/pkgconf, 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 pkgconf-3.0.9-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/pkgconf, and runs the triggers its paths call for.
Contents
Installed programs: bomtool, pccritic, pkg-config, pkgconf, spdxtool.
Installed libraries: libpkgconf.a, libpkgconf.so.
Installed directories: /usr/include/pkgconf, /usr/share/doc/pkgconf, /usr/share/licenses/pkgconf.
Short descriptions
bomtool |
a tool for generating SPDX-based software bills of material |
pccritic |
a quality scorer for pkg-config files |
pkgconf |
a system for configuring build dependency information |
spdxtool |
a tool for generating SPDX Lite 3.0.1 profile software bills of material document |
libpkgconf.pc |
a library for accessing and manipulating development framework configuration |
Notes
Upstream installs no program named pkg-config; the two ln lines add /usr/bin/pkg-config, a link to pkgconf, and its manual page, because configure scripts and build systems run pkg-config by that name.