aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-graphics/mesa/files/0001-mapi-Only-install-khrplatform.h-with-EGL-or-GLES.patch
blob: be61e2edfe851fed0725b01a14cca6f68134c28b (plain)
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
From 922cb47a5b950ee5545a7a3cb4cd9a88a8b15054 Mon Sep 17 00:00:00 2001
From: Jussi Kukkonen <jussi.kukkonen@intel.com>
Date: Wed, 12 Jul 2017 12:21:29 +0300
Subject: [PATCH] mapi: Only install khrplatform.h with EGL or GLES

When mesa is built with "--disable-egl --disable-gles1
--disable-gles2" the KHR platform headers are not needed.

Not installing the header when not needed allows using mesa for GL
and another implementation for GLES+EGL (as is done in practice with
userland on raspberrypi).

Upstream-Status: Pending [waiting for test results before sending]
Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
---
 src/mapi/Makefile.am | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/mapi/Makefile.am b/src/mapi/Makefile.am
index 9ff70a14fd..94c77fb82c 100644
--- a/src/mapi/Makefile.am
+++ b/src/mapi/Makefile.am
@@ -188,6 +188,8 @@ es1api_libGLESv1_CM_la_LDFLAGS = \
 	$(LD_NO_UNDEFINED)
 
 es1api_libGLESv1_CM_la_LIBADD += shared-glapi/libglapi.la
+
+khr_HEADERS = $(top_srcdir)/include/KHR/khrplatform.h
 endif
 
 es1api/glapi_mapi_tmp.h: glapi/gen/gl_and_es_API.xml $(glapi_gen_mapi_deps)
@@ -233,6 +235,12 @@ es2api_libGLESv2_la_LDFLAGS = \
 	$(LD_NO_UNDEFINED)
 
 es2api_libGLESv2_la_LIBADD += shared-glapi/libglapi.la
+
+khr_HEADERS = $(top_srcdir)/include/KHR/khrplatform.h
+endif
+
+if HAVE_EGL
+khr_HEADERS = $(top_srcdir)/include/KHR/khrplatform.h
 endif
 
 es2api/glapi_mapi_tmp.h: glapi/gen/gl_and_es_API.xml $(glapi_gen_mapi_deps)
@@ -243,4 +251,3 @@ es2api/glapi_mapi_tmp.h: glapi/gen/gl_and_es_API.xml $(glapi_gen_mapi_deps)
 include $(top_srcdir)/install-lib-links.mk
 
 khrdir = $(includedir)/KHR
-khr_HEADERS = $(top_srcdir)/include/KHR/khrplatform.h
-- 
2.13.2