forked from wolfi-dev/os
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlibglvnd.yaml
121 lines (104 loc) · 3.25 KB
/
libglvnd.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
package:
name: libglvnd
version: 1.7.0
epoch: 1
description: The GL Vendor-Neutral Dispatch library
copyright:
- license: GPL-2.0-or-later AND BSD-2-Clause AND BSD-3-Clause AND MIT AND Apache-2.0
environment:
contents:
packages:
- autoconf
- automake
- build-base
- busybox
- ca-certificates-bundle
- gtk-doc
- intltool
- libtool
- libx11-dev
- libxext-dev
- libxml2-py3
- m4
- meson
- openssf-compiler-options
- pkgconf
- pkgconf-dev
- python3
- xorgproto
pipeline:
- uses: fetch
with:
expected-sha256: 2b6e15b06aafb4c0b6e2348124808cbd9b291c647299eaaba2e3202f51ff2f3d
uri: https://gitlab.freedesktop.org/glvnd/libglvnd/-/archive/v${{package.version}}/libglvnd-v${{package.version}}.tar.gz
- runs: |
./autogen.sh
- uses: autoconf/configure
- uses: autoconf/make
- uses: autoconf/make-install
- uses: strip
subpackages:
- name: ${{package.name}}-dev
description: ${{package.name}} dev
pipeline:
- uses: split/dev
dependencies:
runtime:
- libglvnd
update:
enabled: true
release-monitor:
identifier: 12098
test:
environment:
contents:
packages:
- build-base
- gcc
- libglvnd-dev
pipeline:
- runs: |
cat <<EOF > check_egl_gl_functions.c
#include <stdio.h>
#include <dlfcn.h>
int main() {
// Open the EGL library
void *eglHandle = dlopen("libEGL.so", RTLD_LAZY);
if (!eglHandle) {
fprintf(stderr, "Failed to open libEGL.so: %s\n", dlerror());
return -1;
}
// Check for the presence of key EGL functions
void (*eglInitialize)(void) = dlsym(eglHandle, "eglInitialize");
void (*eglGetDisplay)(void) = dlsym(eglHandle, "eglGetDisplay");
if (!eglInitialize || !eglGetDisplay) {
fprintf(stderr, "Failed to find necessary EGL functions: %s\n", dlerror());
dlclose(eglHandle);
return -1;
}
printf("EGL functions are available.\n");
// Open the OpenGL library
void *glHandle = dlopen("libGL.so", RTLD_LAZY);
if (!glHandle) {
fprintf(stderr, "Failed to open libGL.so: %s\n", dlerror());
dlclose(eglHandle);
return -1;
}
// Check for the presence of key OpenGL functions
const char* (*glGetString)(unsigned int) = dlsym(glHandle, "glGetString");
void (*glClear)(unsigned int) = dlsym(glHandle, "glClear");
if (!glGetString || !glClear) {
fprintf(stderr, "Failed to find necessary OpenGL functions: %s\n", dlerror());
dlclose(glHandle);
dlclose(eglHandle);
return -1;
}
printf("OpenGL functions are available.\n");
// Clean up
dlclose(glHandle);
dlclose(eglHandle);
return 0;
}
EOF
gcc check_egl_gl_functions.c -o check_egl_gl_functions -ldl
./check_egl_gl_functions | grep -E "EGL functions are available.|OpenGL functions are available."