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

193.18. glew-2.3.1

The OpenGL Extension Wrangler — libGLEW, GLX mode, with glewinfo and visualinfo

2.3.1-1 · BSD-3-Clause AND MIT · 1.7 SBU · 3.4 MiB, 15 files · 42_graphics, 115 of 189 · ports/core/gpu/glew

Homepage: https://glew.sourceforge.net/

Why it is in KDOS. The comment above glew and glfw in script/phases/42_graphics/packages.d/gpu.txt:

The GL loader and window the GL programs and games open.

GLEW, the OpenGL Extension Wrangler, finds out at run time which OpenGL version and extensions the current context offers and loads their entry points; a program calls glewInit() once and then uses the functions as if they were linked. It also installs glewinfo, which prints every extension and entry point the driver supports, and visualinfo, which lists the visuals and framebuffer configurations. Games and emulators written against GLEW link it.

Depends on: cmake, ninja, pkgconf, libglvnd, mesa, glu, libX11, libXext.

Required by (12): avogadrolibs, ddnet, endless-sky, opencolorio, opencpn, openmsx, orcaslicer, pioneer, ppsspp, prusaslicer, supertux, widelands.

Sources: glew-2.3.1.tar.gz (845.8 KiB). Every step kpkg takes applies to this port.

Install: script/chroot/exec.sh bash -c 'source script/phases/42_graphics/phase.env && kpkg install glew'

build.sh:

cd build/cmake
cmake . -G Ninja -B _build \
	-DCMAKE_BUILD_TYPE=Release \
	-DCMAKE_INSTALL_PREFIX=/usr \
	-DCMAKE_INSTALL_LIBDIR=lib \
	-DBUILD_SHARED_LIBS=ON \
	-DBUILD_UTILS=ON \
	-DGLEW_X11=ON \
	-DGLEW_EGL=OFF \
	-DGLEW_OSMESA=OFF \
	-DGLEW_REGAL=OFF \
	-DOpenGL_GL_PREFERENCE=GLVND
ninja -C _build
DESTDIR=$PKG ninja -C _build install

Programs: glewinfo, visualinfo.

Libraries: libGLEW.so.

Directories: /usr/lib/cmake/glew, /usr/share/licenses/glew.

GLEW’s CMake project is in build/cmake, not at the top of the tree, and build.sh changes into it first. It is used rather than the top-level Makefile because it installs into lib rather than lib64 and writes a glew.pc with the real library directory.

The installed glew.pc says Requires: glu, so glu is in depends although the library is compiled with GLEW_NO_GLU and links no GLU itself: without glu.pc in the root, every consumer’s pkg-config glew would fail.