193.7. glu-9.0.3
The OpenGL Utility library — GL/glu.h and libGLU
| Version | 9.0.3, release 1 |
| Shelf | gpu — The GPU stack: Mesa, DRM, GL and Vulkan loaders and headers, shader compilers, VA-API, OpenCL |
| Phase | 42_graphics (Graphics Stack), 68 of 189 in build order |
| Licence | SGI-B-1.1 AND SGI-B-2.0 AND MIT |
| Homepage | https://gitlab.freedesktop.org/mesa/glu |
| Build time | 0.2 SBU |
| Installed size | 1.5 MiB in 7 files |
| Recipe | ports/core/gpu/glu/kpkgbuild |
About
GLU is the OpenGL Utility library, libGLU and GL/glu.h: a helper layer over OpenGL with mipmap building, quadrics (spheres, cylinders, disks), NURBS surfaces, polygon tessellation and the gluPerspective and gluLookAt camera calls. The Mesa project releases it as a tarball of its own, apart from Mesa. Games, emulators and other programs written against the fixed-function OpenGL API link it, and the glew.pc that glew installs requires it.
Sources
glu-9.0.3.tar.xz(213.8 KiB)
sha256bd43fe12f374b1192eb15fe20e45ff456b9bc26ab57f0eee919f96ca0f8a330f
upstream: https://archive.mesa3d.org/glu/glu-9.0.3.tar.xz
archive copy: sources-2/gpu--glu-9.0.3.tar.xz
Dependencies
Depends on: meson, ninja, pkgconf, libglvnd.
Required by (25): avidemux, coin, dsda-doom, fltk, freecad, freeglut, glew, gmsh, kicad, ksudoku, kubrick, librepcb, limesuite-gui, linuxcnc, mesa-demos, mupdf, mupen64plus, octave, opencolorio, opencpn, openscad, orcaslicer, prusaslicer, python3-opengl, wxwidgets.
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/42_graphics/phase.env && kpkg install glu'
What kpkg does
kpkg runs these steps, in this order, as root inside the chroot. The port directory is /ports/core/gpu/glu.
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/glu
echo 'bd43fe12f374b1192eb15fe20e45ff456b9bc26ab57f0eee919f96ca0f8a330f glu-9.0.3.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/glu
SRC=$SRC_ROOT/glu-9.0.3
PKG=$SRC_ROOT/pkg
rm -rf "$SRC_ROOT"
mkdir -p "$SRC" "$PKG"
tar --no-same-permissions --warning=no-unknown-keyword -xf glu-9.0.3.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:
meson setup build \
--prefix=/usr --sysconfdir=/etc --libdir=lib \
--buildtype=release \
-Dgl_provider=glvnd
meson compile -C build
DESTDIR=$PKG meson install --no-rebuild -C build
install -Dm644 "$SRC/include/GL/glu.h" "$PKG/usr/share/licenses/$name/glu.h"
The switches, and why each is set:
-Dgl_provider=glvnd— LinkslibGLUagainstlibOpenGLfrom libglvnd, the vendor-neutral library with the GL entry points and no window system, rather than againstlibGL, which pulls in GLX. This is upstream’s default, named here; it makes GLU as usable by an EGL program on Wayland as by a GLX one under Xwayland.
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/glu, 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 glu-9.0.3-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/glu, and runs the triggers its paths call for.
Contents
Installed libraries: libGLU.a, libGLU.so.
Installed directories: /usr/share/licenses/glu.
Short descriptions
glu.pc |
Mesa OpenGL Utility Library |