116.1. vulkan-headers-1.4.363
Vulkan API headers, with the registry XML and its generator scripts
| Version | 1.4.363, release 1 |
| Shelf | gpu — The GPU stack: Mesa, DRM, GL and Vulkan loaders and headers, shader compilers, VA-API, OpenCL |
| Phase | 41_system (System), 594 of 1047 in build order |
| Licence | Apache-2.0 OR MIT |
| Homepage | https://www.khronos.org/vulkan/ |
| Build time | 0.3 SBU |
| Installed size | 40.8 MiB in 81 files |
| Recipe | ports/core/gpu/vulkan-headers/kpkgbuild |
About
Vulkan-Headers is Khronos’s official set of Vulkan API headers: vulkan/vulkan.h and the rest for C, the Vulkan-Hpp headers for C++, the vk_video codec headers, and the machine-readable API registry (vk.xml, video.xml and the Python generator scripts that read them), installed under /usr/share/vulkan/registry. Nothing in it is compiled: it is an interface package with a CMake config file, VulkanHeadersConfig.cmake, and many ports build against it, among them vulkan-loader, KWin, gtk4, ffmpeg, mpv and blender.
Sources
vulkan-headers-1.4.363.tar.gz(3.3 MiB)
sha256cbaf687d3c59b9666fe080e7f8396b6b4f4d344a768ee6b337c59852f4526b68
upstream: https://github.com/KhronosGroup/Vulkan-Headers/archive/v1.4.363/vulkan-headers-1.4.363.tar.gz
archive copy: sources-2/gpu--vulkan-headers-1.4.363.tar.gz
Dependencies
Depends on: cmake.
Required by (26): blender, ddnet, fastfetch, ffmpeg, gst-plugins-bad, gtk4, gtkmm4, kwin, libggml, libplacebo, libretro-beetle-psx, mpv, mupen64plus, organicmaps, qt5-qtbase, qt5-qtdeclarative, qt5-qtwayland, qt6-qt3d, qt6-qtbase, qt6-qtwebengine, retroarch, vulkan-loader, vulkan-tools, warzone2100, waypipe, wine.
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 vulkan-headers'
What kpkg does
kpkg runs these steps, in this order, as root inside the chroot. The port directory is /ports/core/gpu/vulkan-headers.
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/gpu/vulkan-headers
echo 'cbaf687d3c59b9666fe080e7f8396b6b4f4d344a768ee6b337c59852f4526b68 vulkan-headers-1.4.363.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/vulkan-headers
SRC=$SRC_ROOT/vulkan-headers-1.4.363
PKG=$SRC_ROOT/pkg
rm -rf "$SRC_ROOT"
mkdir -p "$SRC" "$PKG"
tar --no-same-permissions --warning=no-unknown-keyword -xf vulkan-headers-1.4.363.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 five paths PKGNAME, PORT_SRC, SRC_ROOT, SRC and PKG set as shell variables. Its body, verbatim:
rm -rf build ; mkdir build ; cd build
cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release \
-DVULKAN_HEADERS_ENABLE_TESTS=OFF \
-DVULKAN_HEADERS_ENABLE_MODULE=OFF \
..
make
make DESTDIR=$PKG install
The switches, and why each is set:
-DVULKAN_HEADERS_ENABLE_TESTS=OFF— Build none of the project’s own tests, which compile small C and C++ programs against the headers. The option defaults to on when Vulkan-Headers is the top-level CMake project, as it is here.-DVULKAN_HEADERS_ENABLE_MODULE=OFF— Build and install no Vulkan-Hpp C++ named modules (vulkan.cppm,vulkan_video.cppm), theVulkan::HppModuleobject target a consumer imports instead of including the C++ headers. Upstream turns the option on only when the compiler can import the standard library as a module. Off, the headers install the same, and the.cppmfiles are copied into/usr/include/vulkanas plain files.
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/vulkan-headers, 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 vulkan-headers-1.4.363-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/vulkan-headers, and runs the triggers its paths call for.
Contents
Installed directories: /usr/include/vk_video, /usr/include/vulkan, /usr/share/cmake/VulkanHeaders, /usr/share/licenses/vulkan-headers, /usr/share/vulkan/registry.