From 1f23aff5e256350fdca58781b983fbd7aa0e9fed Mon Sep 17 00:00:00 2001 From: geruipu Date: Mon, 5 Oct 2026 17:40:18 +0800 Subject: [PATCH] Complete Linux GL headers from the pinned container SDK --- build/linux-toolchain/zig-cross.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/build/linux-toolchain/zig-cross.py b/build/linux-toolchain/zig-cross.py index 93a8d1e..a7ad23a 100644 --- a/build/linux-toolchain/zig-cross.py +++ b/build/linux-toolchain/zig-cross.py @@ -259,6 +259,15 @@ def prepare(args): (abi / name).write_bytes(src.read_bytes()) break config['linux_abi_headers'] = str(abi) + gl_headers = abi / 'GL' + gl_headers.mkdir(exist_ok=True) + for prefix in (root / 'usr/include/GL', Path('/usr/include/GL')): + for header in prefix.glob('*.h'): + destination = gl_headers / header.name + if not destination.exists(): + destination.write_bytes(header.read_bytes()) + if not (gl_headers / 'glx.h').is_file(): + raise SystemExit('The pinned Linux SDK/image lacks GL/glx.h') pc = output / 'pkg-config' dirs = [root / 'usr/lib' / (cpu + '-linux-gnu') / 'pkgconfig', root / 'usr/lib/pkgconfig', root / 'usr/share/pkgconfig'] pc.write_text('#!/bin/sh\nexport PKG_CONFIG_SYSROOT_DIR=' + shlex.quote(str(root)) + '\nexport PKG_CONFIG_LIBDIR=' + shlex.quote(':'.join(map(str, dirs))) + '\nexec /usr/bin/pkg-config "$@"\n')