summaryrefslogtreecommitdiffstats
path: root/meta/recipes-graphics/mesa/mesa-demos/0003-configure-Allow-to-disable-demos-which-require-GLEW-.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-graphics/mesa/mesa-demos/0003-configure-Allow-to-disable-demos-which-require-GLEW-.patch')
-rw-r--r--meta/recipes-graphics/mesa/mesa-demos/0003-configure-Allow-to-disable-demos-which-require-GLEW-.patch424
1 files changed, 424 insertions, 0 deletions
diff --git a/meta/recipes-graphics/mesa/mesa-demos/0003-configure-Allow-to-disable-demos-which-require-GLEW-.patch b/meta/recipes-graphics/mesa/mesa-demos/0003-configure-Allow-to-disable-demos-which-require-GLEW-.patch
new file mode 100644
index 0000000000..4b07193a7f
--- /dev/null
+++ b/meta/recipes-graphics/mesa/mesa-demos/0003-configure-Allow-to-disable-demos-which-require-GLEW-.patch
@@ -0,0 +1,424 @@
1From b25e9c675cf560b8b037dc855c6b3b1d09957867 Mon Sep 17 00:00:00 2001
2From: Martin Jansa <Martin.Jansa@gmail.com>
3Date: Wed, 9 Jul 2014 14:23:41 +0200
4Subject: [PATCH 3/9] configure: Allow to disable demos which require GLEW or
5 GLU
6
7* in some systems without X11 support we don't have GLEW, but
8 mesa-demos are still useful
9
10Upstream-Status: Pending
11
12Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
13---
14 configure.ac | 49 ++++++++++++++++++++---------
15 src/Makefile.am | 14 ++++++---
16 src/demos/Makefile.am | 73 ++++++++++++++++++++++++-------------------
17 src/egl/Makefile.am | 8 +++--
18 src/egl/opengles1/Makefile.am | 44 +++++++++++++++-----------
19 src/egl/opengles2/Makefile.am | 33 ++++++++++---------
20 6 files changed, 135 insertions(+), 86 deletions(-)
21
22diff --git a/configure.ac b/configure.ac
23index 9445424..bc4c8d1 100644
24--- a/configure.ac
25+++ b/configure.ac
26@@ -93,25 +93,44 @@ AC_EGREP_HEADER([glutInitContextProfile],
27 [AC_DEFINE(HAVE_FREEGLUT)],
28 [])
29
30-dnl Check for GLEW
31-PKG_CHECK_MODULES(GLEW, [glew >= 1.5.4])
32-DEMO_CFLAGS="$DEMO_CFLAGS $GLEW_CFLAGS"
33-DEMO_LIBS="$DEMO_LIBS $GLEW_LIBS"
34+AC_ARG_ENABLE([glew],
35+ [AS_HELP_STRING([--enable-glew],
36+ [build demos which require glew @<:@default=yes@:>@])],
37+ [enable_glew="$enableval"],
38+ [enable_glew=yes]
39+)
40+
41+if test "x$enable_glew" = xyes; then
42+ dnl Check for GLEW
43+ PKG_CHECK_MODULES(GLEW, [glew >= 1.5.4], [glew_enabled=yes], [glew_enabled=no])
44+ DEMO_CFLAGS="$DEMO_CFLAGS $GLEW_CFLAGS"
45+ DEMO_LIBS="$DEMO_LIBS $GLEW_LIBS"
46+fi
47
48 # LIBS was set by AC_CHECK_LIB above
49 LIBS=""
50
51-PKG_CHECK_MODULES(GLU, [glu], [],
52- [AC_CHECK_HEADER([GL/glu.h],
53- [],
54- AC_MSG_ERROR([GLU not found]))
55- AC_CHECK_LIB([GLU],
56- [gluBeginCurve],
57- [GLU_LIBS=-lGLU],
58- AC_MSG_ERROR([GLU required])) ])
59+AC_ARG_ENABLE([glu],
60+ [AS_HELP_STRING([--enable-glu],
61+ [build demos which require glu @<:@default=yes@:>@])],
62+ [enable_glu="$enableval"],
63+ [enable_glu=yes]
64+)
65
66-DEMO_CFLAGS="$DEMO_CFLAGS $GLU_CFLAGS"
67-DEMO_LIBS="$DEMO_LIBS $GLU_LIBS"
68+if test "x$enable_glu" = xyes; then
69+ PKG_CHECK_MODULES(GLU, [glu], [],
70+ [AC_CHECK_HEADER([GL/glu.h],
71+ [],
72+ AC_MSG_ERROR([GLU not found]))
73+ AC_CHECK_LIB([GLU],
74+ [gluBeginCurve],
75+ [GLU_LIBS=-lGLU
76+ glu_enabled=yes],
77+ AC_MSG_ERROR([GLU required])) ])
78+
79+ DEMO_CFLAGS="$DEMO_CFLAGS $GLU_CFLAGS"
80+ DEMO_LIBS="$DEMO_LIBS $GLU_LIBS"
81+fi
82
83 AC_ARG_ENABLE([egl],
84 [AS_HELP_STRING([--enable-egl],
85@@ -304,6 +323,8 @@ AC_SUBST([WAYLAND_CFLAGS])
86 AC_SUBST([WAYLAND_LIBS])
87
88
89+AM_CONDITIONAL(HAVE_GLU, test "x$glu_enabled" = "xyes")
90+AM_CONDITIONAL(HAVE_GLEW, test "x$glew_enabled" = "xyes")
91 AM_CONDITIONAL(HAVE_EGL, test "x$egl_enabled" = "xyes")
92 AM_CONDITIONAL(HAVE_GLESV1, test "x$glesv1_enabled" = "xyes")
93 AM_CONDITIONAL(HAVE_GLESV2, test "x$glesv2_enabled" = "xyes")
94diff --git a/src/Makefile.am b/src/Makefile.am
95index 1647d64..754c47c 100644
96--- a/src/Makefile.am
97+++ b/src/Makefile.am
98@@ -23,14 +23,18 @@
99 # Eric Anholt <eric@anholt.net>
100
101+if HAVE_GLEW
102+UTIL = util
103+endif
104+
105 SUBDIRS = \
106- util \
107+ $(UTIL) \
108 data \
109 demos \
110 egl \
111 fp \
112 fpglsl \
113 glsl \
114- gs \
115+ gs \
116 objviewer \
117 osdemos \
118 perf \
119@@ -40,8 +39,12 @@ SUBDIRS = \
120 slang \
121 tests \
122 tools \
123- trivial \
124- vp \
125- vpglsl \
126 wgl \
127 xdemos
128+
129+if HAVE_GLEW
130+SUBDIRS += \
131+ vp \
132+ vpglsl \
133+ trivial
134+endif
135diff --git a/src/demos/Makefile.am b/src/demos/Makefile.am
136index 41603fa..ab1e3ab 100644
137--- a/src/demos/Makefile.am
138+++ b/src/demos/Makefile.am
139@@ -30,91 +30,100 @@ AM_LDFLAGS = \
140 $(DEMO_LIBS) \
141 $(GLUT_LIBS)
142
143+bin_PROGRAMS =
144+
145 if HAVE_GLUT
146-bin_PROGRAMS = \
147+if HAVE_GLEW
148+bin_PROGRAMS += \
149 arbfplight \
150 arbfslight \
151 arbocclude \
152 arbocclude2 \
153- bounce \
154- clearspd \
155 copypix \
156 cubemap \
157 cuberender \
158 dinoshade \
159- dissolve \
160- drawpix \
161 engine \
162 fbo_firecube \
163 fbotexture \
164- fire \
165 fogcoord \
166 fplight \
167 fslight \
168+ gloss \
169+ isosurf \
170+ multiarb \
171+ paltex \
172+ pointblast \
173+ projtex \
174+ shadowtex \
175+ spriteblast \
176+ stex3d \
177+ textures \
178+ vao_demo \
179+ winpos
180+
181+copypix_LDADD = ../util/libutil.la
182+cubemap_LDADD = ../util/libutil.la
183+cuberender_LDADD = ../util/libutil.la
184+engine_LDADD = ../util/libutil.la
185+fbo_firecube_LDADD = ../util/libutil.la
186+gloss_LDADD = ../util/libutil.la
187+isosurf_LDADD = ../util/libutil.la
188+multiarb_LDADD = ../util/libutil.la
189+projtex_LDADD = ../util/libutil.la
190+textures_LDADD = ../util/libutil.la
191+winpos_LDADD = ../util/libutil.la
192+endif
193+
194+if HAVE_GLU
195+bin_PROGRAMS += \
196+ bounce \
197+ clearspd \
198+ dissolve \
199+ drawpix \
200+ fire \
201 gamma \
202 gearbox \
203 gears \
204 geartrain \
205 glinfo \
206- gloss \
207 gltestperf \
208 ipers \
209- isosurf \
210 lodbias \
211 morph3d \
212- multiarb \
213- paltex \
214 pixeltest \
215- pointblast \
216- projtex \
217 ray \
218 readpix \
219 reflect \
220 renormal \
221- shadowtex \
222 singlebuffer \
223 spectex \
224- spriteblast \
225- stex3d \
226 teapot \
227 terrain \
228 tessdemo \
229 texcyl \
230 texenv \
231- textures \
232 trispd \
233 tunnel2 \
234- tunnel \
235- vao_demo \
236- winpos
237-endif
238+ tunnel
239
240 tunnel_SOURCES = \
241 tunnel.c \
242 tunneldat.h
243
244-copypix_LDADD = ../util/libutil.la
245-cubemap_LDADD = ../util/libutil.la
246-cuberender_LDADD = ../util/libutil.la
247-drawpix_LDADD = ../util/libutil.la
248 dissolve_LDADD = ../util/libutil.la
249-engine_LDADD = ../util/libutil.la
250-fbo_firecube_LDADD = ../util/libutil.la
251+drawpix_LDADD = ../util/libutil.la
252 fire_LDADD = ../util/libutil.la
253-gloss_LDADD = ../util/libutil.la
254 ipers_LDADD = ../util/libutil.la
255-isosurf_LDADD = ../util/libutil.la
256 lodbias_LDADD = ../util/libutil.la
257-multiarb_LDADD = ../util/libutil.la
258-projtex_LDADD = ../util/libutil.la
259 readpix_LDADD = ../util/libutil.la
260 reflect_LDADD = ../util/libutil.la
261 teapot_LDADD = ../util/libutil.la
262 texcyl_LDADD = ../util/libutil.la
263-textures_LDADD = ../util/libutil.la
264 tunnel_LDADD = ../util/libutil.la
265 tunnel2_LDADD = ../util/libutil.la
266-winpos_LDADD = ../util/libutil.la
267+endif
268+endif
269
270 EXTRA_DIST = \
271 README
272diff --git a/src/egl/Makefile.am b/src/egl/Makefile.am
273index d64a49e..4fe1ca8 100644
274--- a/src/egl/Makefile.am
275+++ b/src/egl/Makefile.am
276@@ -24,8 +24,12 @@
277
278 SUBDIRS = \
279 eglut \
280- opengl \
281- openvg \
282 opengles1 \
283 opengles2 \
284 oes_vg
285+
286+if HAVE_GLU
287+SUBDIRS += \
288+ opengl \
289+ openvg
290+endif
291diff --git a/src/egl/opengles1/Makefile.am b/src/egl/opengles1/Makefile.am
292index 7a9828d..3455e75 100644
293--- a/src/egl/opengles1/Makefile.am
294+++ b/src/egl/opengles1/Makefile.am
295@@ -36,28 +36,43 @@ AM_LDFLAGS = \
296 $(EGL_LIBS) \
297 -lm
298
299+noinst_PROGRAMS =
300+
301 if HAVE_EGL
302 if HAVE_GLESV1
303-noinst_PROGRAMS = \
304- bindtex \
305- clear \
306+noinst_PROGRAMS += \
307 drawtex_screen \
308+ gears_screen \
309+ torus_screen \
310+ tri_screen
311+
312+drawtex_screen_SOURCES = drawtex.c
313+gears_screen_SOURCES = gears.c
314+torus_screen_SOURCES = torus.c
315+tri_screen_SOURCES = tri.c
316+
317+drawtex_screen_LDADD = ../eglut/libeglut_screen.la
318+gears_screen_LDADD = ../eglut/libeglut_screen.la
319+torus_screen_LDADD = ../eglut/libeglut_screen.la
320+tri_screen_LDADD = ../eglut/libeglut_screen.la
321+
322+if HAVE_X11
323+noinst_PROGRAMS += \
324+ clear
325+
326+bin_PROGRAMS = \
327+ bindtex \
328 drawtex_x11 \
329 eglfbdev \
330 es1_info \
331- gears_screen \
332 gears_x11 \
333 msaa \
334 pbuffer\
335 render_tex \
336 texture_from_pixmap \
337- torus_screen \
338 torus_x11 \
339- tri_screen \
340 tri_x11 \
341 two_win
342-endif
343-endif
344
345 bindtex_LDADD = $(X11_LIBS)
346 es1_info_LDADD = $(X11_LIBS)
347@@ -71,22 +86,15 @@ two_win_LDADD = $(X11_LIBS)
348 clear_LDADD = ../eglut/libeglut_x11.la $(EGL_LIBS) $(X11_LIBS)
349 clear_LDFLAGS =
350
351-drawtex_screen_SOURCES = drawtex.c
352-gears_screen_SOURCES = gears.c
353-torus_screen_SOURCES = torus.c
354-tri_screen_SOURCES = tri.c
355-
356 drawtex_x11_SOURCES = drawtex.c
357 gears_x11_SOURCES = gears.c
358 torus_x11_SOURCES = torus.c
359 tri_x11_SOURCES = tri.c
360
361-drawtex_screen_LDADD = ../eglut/libeglut_screen.la
362-gears_screen_LDADD = ../eglut/libeglut_screen.la
363-torus_screen_LDADD = ../eglut/libeglut_screen.la
364-tri_screen_LDADD = ../eglut/libeglut_screen.la
365-
366 drawtex_x11_LDADD = ../eglut/libeglut_x11.la
367 gears_x11_LDADD = ../eglut/libeglut_x11.la
368 torus_x11_LDADD = ../eglut/libeglut_x11.la
369 tri_x11_LDADD = ../eglut/libeglut_x11.la
370+endif
371+endif
372+endif
373diff --git a/src/egl/opengles2/Makefile.am b/src/egl/opengles2/Makefile.am
374index 41c1b80..74af460 100644
375--- a/src/egl/opengles2/Makefile.am
376+++ b/src/egl/opengles2/Makefile.am
377@@ -36,26 +36,29 @@ AM_LDFLAGS = \
378 if HAVE_EGL
379 if HAVE_GLESV2
380 bin_PROGRAMS = \
381- es2_info \
382- es2gears_screen \
383- es2gears_x11 \
384- es2tri
385+ es2gears_screen
386+
387+es2gears_screen_SOURCES = es2gears.c
388+es2gears_screen_LDADD = ../eglut/libeglut_screen.la
389+
390 if HAVE_WAYLAND
391 bin_PROGRAMS += es2gears_wayland
392-endif
393-endif
394-endif
395
396-es2_info_LDADD = $(X11_LIBS)
397-es2tri_LDADD = $(X11_LIBS)
398+es2gears_wayland_SOURCES = es2gears.c
399+es2gears_wayland_LDADD = ../eglut/libeglut_wayland.la
400+endif
401
402-es2gears_screen_SOURCES = es2gears.c
403+if HAVE_X11
404+bin_PROGRAMS += \
405+ es2tri \
406+ es2_info \
407+ es2gears_x11
408
409+es2_info_LDADD = $(X11_LIBS)
410 es2gears_x11_SOURCES = es2gears.c
411-
412-es2gears_screen_LDADD = ../eglut/libeglut_screen.la
413-
414 es2gears_x11_LDADD = ../eglut/libeglut_x11.la
415+es2tri_LDADD = $(X11_LIBS)
416+endif
417+endif
418+endif
419
420-es2gears_wayland_SOURCES = es2gears.c
421-es2gears_wayland_LDADD = ../eglut/libeglut_wayland.la
422--
4232.0.0
424