Complete Linux GL headers from the pinned container SDK
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
geruipu committed 2026-10-05 17:40:18 +08:00
1 parent bde7e2b1f7
commit 1f23aff5e2
1 file changed
+9
+9
View File
@@ -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')