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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
|
From 0dfaea2bcb7cdcc785f95e244223bd004a2d7fba Mon Sep 17 00:00:00 2001
From: Kyle Brenneman <kbrenneman@nvidia.com>
Date: Tue, 3 Sep 2019 08:13:34 -0600
Subject: [PATCH] Add pkg-config files for EGL, GL, GLES, and GLX.
This preserves the names from Mesa's gl, glesv1_cm, glesv2, and egl pkgconfig
data, and for compatibility with that, gl.pc gives you libGL.
Also added glx.pc and opengl.pc for libglvnd's libGLX and libOpenGL libraries.
If newer applications want to explicitly depend on libGLX and the appropriate
rendering API they can ask for the new pkgconfig names.
Note that the version numbers in each file are the API versions that each
library exposes, not the libglvnd package version.
---
configure.ac | 6 ++++++
src/EGL/Makefile.am | 3 +++
src/EGL/egl.pc.in | 10 ++++++++++
src/GL/Makefile.am | 3 +++
src/GL/gl.pc.in | 10 ++++++++++
src/GLESv1/Makefile.am | 2 ++
src/GLESv1/glesv1_cm.pc.in | 10 ++++++++++
src/GLESv2/Makefile.am | 2 ++
src/GLESv2/glesv2.pc.in | 10 ++++++++++
src/GLX/Makefile.am | 2 ++
src/GLX/glx.pc.in | 10 ++++++++++
src/OpenGL/Makefile.am | 2 ++
src/OpenGL/opengl.pc.in | 10 ++++++++++
13 files changed, 80 insertions(+)
create mode 100644 src/EGL/egl.pc.in
create mode 100644 src/GL/gl.pc.in
create mode 100644 src/GLESv1/glesv1_cm.pc.in
create mode 100644 src/GLESv2/glesv2.pc.in
create mode 100644 src/GLX/glx.pc.in
create mode 100644 src/OpenGL/opengl.pc.in
diff --git a/configure.ac b/configure.ac
index cdbb138..7feec30 100644
--- a/configure.ac
+++ b/configure.ac
@@ -324,11 +324,17 @@ AC_CONFIG_FILES([Makefile
include/Makefile
src/Makefile
src/GL/Makefile
+ src/GL/gl.pc
+ src/OpenGL/opengl.pc
src/OpenGL/Makefile
+ src/GLESv1/glesv1_cm.pc
src/GLESv1/Makefile
+ src/GLESv2/glesv2.pc
src/GLESv2/Makefile
+ src/GLX/glx.pc
src/GLX/Makefile
src/EGL/Makefile
+ src/EGL/egl.pc
src/GLdispatch/Makefile
src/GLdispatch/vnd-glapi/Makefile
src/util/Makefile
diff --git a/src/EGL/Makefile.am b/src/EGL/Makefile.am
index 5c036dc..c55c83e 100644
--- a/src/EGL/Makefile.am
+++ b/src/EGL/Makefile.am
@@ -106,3 +106,6 @@ g_egldispatchstubs.c : $(GENERATE_DEPS)
g_egldispatchstubs.h : $(GENERATE_DEPS)
$(AM_V_GEN)$(PYTHON) $(GENERATE_DISPATCH_SCRIPT) header $(GENERATE_LIST_FILES) > $@
endif
+
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = egl.pc
diff --git a/src/EGL/egl.pc.in b/src/EGL/egl.pc.in
new file mode 100644
index 0000000..ffae9e2
--- /dev/null
+++ b/src/EGL/egl.pc.in
@@ -0,0 +1,10 @@
+prefix=@prefix@
+exec_prefix=${prefix}
+libdir=@libdir@
+includedir=@includedir@
+
+Name: egl
+Description: EGL library and headers
+Version: 1.5
+Libs: -L${libdir} -lEGL
+Cflags: -I${includedir}
diff --git a/src/GL/Makefile.am b/src/GL/Makefile.am
index ecdcbd0..225fdcb 100644
--- a/src/GL/Makefile.am
+++ b/src/GL/Makefile.am
@@ -70,3 +70,6 @@ libGL_la_LIBADD += ../GLdispatch/libGLdispatch.la
libGL_la_LIBADD += ../GLdispatch/vnd-glapi/libglapi_gl.la
libGL_la_LIBADD += ../util/libutils_misc.la
libGL_la_LIBADD += @LIB_DL@
+
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = gl.pc
diff --git a/src/GL/gl.pc.in b/src/GL/gl.pc.in
new file mode 100644
index 0000000..0eaa149
--- /dev/null
+++ b/src/GL/gl.pc.in
@@ -0,0 +1,10 @@
+prefix=@prefix@
+exec_prefix=${prefix}
+libdir=@libdir@
+includedir=@includedir@
+
+Name: gl
+Description: Legacy OpenGL and GLX library and headers
+Version: 1.2
+Libs: -L${libdir} -lGL
+Cflags: -I${includedir}
diff --git a/src/GLESv1/Makefile.am b/src/GLESv1/Makefile.am
index d20017d..88e07bc 100644
--- a/src/GLESv1/Makefile.am
+++ b/src/GLESv1/Makefile.am
@@ -38,3 +38,5 @@ libGLESv1_CM_la_LIBADD = \
../GLdispatch/vnd-glapi/libglapi_glesv1.la \
../util/libutils_misc.la
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = glesv1_cm.pc
diff --git a/src/GLESv1/glesv1_cm.pc.in b/src/GLESv1/glesv1_cm.pc.in
new file mode 100644
index 0000000..daa247f
--- /dev/null
+++ b/src/GLESv1/glesv1_cm.pc.in
@@ -0,0 +1,10 @@
+prefix=@prefix@
+exec_prefix=${prefix}
+libdir=@libdir@
+includedir=@includedir@
+
+Name: glesv1_cm
+Description: OpenGL ES-CM v1 library and headers
+Version: 1.0
+Libs: -L${libdir} -lGLESv1_CM
+Cflags: -I${includedir}
diff --git a/src/GLESv2/Makefile.am b/src/GLESv2/Makefile.am
index a9c2351..f40e06f 100644
--- a/src/GLESv2/Makefile.am
+++ b/src/GLESv2/Makefile.am
@@ -38,3 +38,5 @@ libGLESv2_la_LIBADD = \
../GLdispatch/vnd-glapi/libglapi_glesv2.la \
../util/libutils_misc.la
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = glesv2.pc
diff --git a/src/GLESv2/glesv2.pc.in b/src/GLESv2/glesv2.pc.in
new file mode 100644
index 0000000..a9fe839
--- /dev/null
+++ b/src/GLESv2/glesv2.pc.in
@@ -0,0 +1,10 @@
+prefix=@prefix@
+exec_prefix=${prefix}
+libdir=@libdir@
+includedir=@includedir@
+
+Name: gles2
+Description: OpenGL ES v2/v3 library and headers
+Version: 3.2
+Libs: -L${libdir} -lGLESv2
+Cflags: -I${includedir}
diff --git a/src/GLX/Makefile.am b/src/GLX/Makefile.am
index 030836b..0d19674 100644
--- a/src/GLX/Makefile.am
+++ b/src/GLX/Makefile.am
@@ -69,3 +69,5 @@ libGLX_la_SOURCES = \
libglxmapping.c \
libglxproto.c
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = glx.pc
diff --git a/src/GLX/glx.pc.in b/src/GLX/glx.pc.in
new file mode 100644
index 0000000..1561181
--- /dev/null
+++ b/src/GLX/glx.pc.in
@@ -0,0 +1,10 @@
+prefix=@prefix@
+exec_prefix=${prefix}
+libdir=@libdir@
+includedir=@includedir@
+
+Name: glx
+Description: GLX library and headers
+Version: 1.4
+Libs: -L${libdir} -lGLX
+Cflags: -I${includedir}
diff --git a/src/OpenGL/Makefile.am b/src/OpenGL/Makefile.am
index 647d9e4..4b34dd5 100644
--- a/src/OpenGL/Makefile.am
+++ b/src/OpenGL/Makefile.am
@@ -47,3 +47,5 @@ libOpenGL_la_LIBADD = \
../GLdispatch/vnd-glapi/libglapi_opengl.la \
../util/libutils_misc.la
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = opengl.pc
diff --git a/src/OpenGL/opengl.pc.in b/src/OpenGL/opengl.pc.in
new file mode 100644
index 0000000..d560c06
--- /dev/null
+++ b/src/OpenGL/opengl.pc.in
@@ -0,0 +1,10 @@
+prefix=@prefix@
+exec_prefix=${prefix}
+libdir=@libdir@
+includedir=@includedir@
+
+Name: opengl
+Description: OpenGL (without GLX) headers and interface
+Version: 4.5
+Libs: -L${libdir} -lOpenGL
+Cflags: -I${includedir}
--
2.21.0
|