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-.patch420
1 files changed, 420 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..e02f1ab4ec
--- /dev/null
+++ b/meta/recipes-graphics/mesa/mesa-demos/0003-configure-Allow-to-disable-demos-which-require-GLEW-.patch
@@ -0,0 +1,420 @@
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,13 @@
99 # Eric Anholt <eric@anholt.net>
100
101 SUBDIRS = \
102- util \
103 data \
104 demos \
105 egl \
106 fp \
107 fpglsl \
108 glsl \
109- gs \
110+ gs \
111 objviewer \
112 osdemos \
113 perf \
114@@ -40,8 +39,13 @@ SUBDIRS = \
115 slang \
116 tests \
117 tools \
118- trivial \
119- vp \
120- vpglsl \
121 wgl \
122 xdemos
123+
124+if HAVE_GLEW
125+SUBDIRS += \
126+ vp \
127+ vpglsl \
128+ util \
129+ trivial
130+endif
131diff --git a/src/demos/Makefile.am b/src/demos/Makefile.am
132index 41603fa..ab1e3ab 100644
133--- a/src/demos/Makefile.am
134+++ b/src/demos/Makefile.am
135@@ -30,91 +30,100 @@ AM_LDFLAGS = \
136 $(DEMO_LIBS) \
137 $(GLUT_LIBS)
138
139+bin_PROGRAMS =
140+
141 if HAVE_GLUT
142-bin_PROGRAMS = \
143+if HAVE_GLEW
144+bin_PROGRAMS += \
145 arbfplight \
146 arbfslight \
147 arbocclude \
148 arbocclude2 \
149- bounce \
150- clearspd \
151 copypix \
152 cubemap \
153 cuberender \
154 dinoshade \
155- dissolve \
156- drawpix \
157 engine \
158 fbo_firecube \
159 fbotexture \
160- fire \
161 fogcoord \
162 fplight \
163 fslight \
164+ gloss \
165+ isosurf \
166+ multiarb \
167+ paltex \
168+ pointblast \
169+ projtex \
170+ shadowtex \
171+ spriteblast \
172+ stex3d \
173+ textures \
174+ vao_demo \
175+ winpos
176+
177+copypix_LDADD = ../util/libutil.la
178+cubemap_LDADD = ../util/libutil.la
179+cuberender_LDADD = ../util/libutil.la
180+engine_LDADD = ../util/libutil.la
181+fbo_firecube_LDADD = ../util/libutil.la
182+gloss_LDADD = ../util/libutil.la
183+isosurf_LDADD = ../util/libutil.la
184+multiarb_LDADD = ../util/libutil.la
185+projtex_LDADD = ../util/libutil.la
186+textures_LDADD = ../util/libutil.la
187+winpos_LDADD = ../util/libutil.la
188+endif
189+
190+if HAVE_GLU
191+bin_PROGRAMS += \
192+ bounce \
193+ clearspd \
194+ dissolve \
195+ drawpix \
196+ fire \
197 gamma \
198 gearbox \
199 gears \
200 geartrain \
201 glinfo \
202- gloss \
203 gltestperf \
204 ipers \
205- isosurf \
206 lodbias \
207 morph3d \
208- multiarb \
209- paltex \
210 pixeltest \
211- pointblast \
212- projtex \
213 ray \
214 readpix \
215 reflect \
216 renormal \
217- shadowtex \
218 singlebuffer \
219 spectex \
220- spriteblast \
221- stex3d \
222 teapot \
223 terrain \
224 tessdemo \
225 texcyl \
226 texenv \
227- textures \
228 trispd \
229 tunnel2 \
230- tunnel \
231- vao_demo \
232- winpos
233-endif
234+ tunnel
235
236 tunnel_SOURCES = \
237 tunnel.c \
238 tunneldat.h
239
240-copypix_LDADD = ../util/libutil.la
241-cubemap_LDADD = ../util/libutil.la
242-cuberender_LDADD = ../util/libutil.la
243-drawpix_LDADD = ../util/libutil.la
244 dissolve_LDADD = ../util/libutil.la
245-engine_LDADD = ../util/libutil.la
246-fbo_firecube_LDADD = ../util/libutil.la
247+drawpix_LDADD = ../util/libutil.la
248 fire_LDADD = ../util/libutil.la
249-gloss_LDADD = ../util/libutil.la
250 ipers_LDADD = ../util/libutil.la
251-isosurf_LDADD = ../util/libutil.la
252 lodbias_LDADD = ../util/libutil.la
253-multiarb_LDADD = ../util/libutil.la
254-projtex_LDADD = ../util/libutil.la
255 readpix_LDADD = ../util/libutil.la
256 reflect_LDADD = ../util/libutil.la
257 teapot_LDADD = ../util/libutil.la
258 texcyl_LDADD = ../util/libutil.la
259-textures_LDADD = ../util/libutil.la
260 tunnel_LDADD = ../util/libutil.la
261 tunnel2_LDADD = ../util/libutil.la
262-winpos_LDADD = ../util/libutil.la
263+endif
264+endif
265
266 EXTRA_DIST = \
267 README
268diff --git a/src/egl/Makefile.am b/src/egl/Makefile.am
269index d64a49e..4fe1ca8 100644
270--- a/src/egl/Makefile.am
271+++ b/src/egl/Makefile.am
272@@ -24,8 +24,12 @@
273
274 SUBDIRS = \
275 eglut \
276- opengl \
277- openvg \
278 opengles1 \
279 opengles2 \
280 oes_vg
281+
282+if HAVE_GLU
283+SUBDIRS += \
284+ opengl \
285+ openvg
286+endif
287diff --git a/src/egl/opengles1/Makefile.am b/src/egl/opengles1/Makefile.am
288index 7a9828d..3455e75 100644
289--- a/src/egl/opengles1/Makefile.am
290+++ b/src/egl/opengles1/Makefile.am
291@@ -36,28 +36,43 @@ AM_LDFLAGS = \
292 $(EGL_LIBS) \
293 -lm
294
295+noinst_PROGRAMS =
296+
297 if HAVE_EGL
298 if HAVE_GLESV1
299-noinst_PROGRAMS = \
300- bindtex \
301- clear \
302+noinst_PROGRAMS += \
303 drawtex_screen \
304+ gears_screen \
305+ torus_screen \
306+ tri_screen
307+
308+drawtex_screen_SOURCES = drawtex.c
309+gears_screen_SOURCES = gears.c
310+torus_screen_SOURCES = torus.c
311+tri_screen_SOURCES = tri.c
312+
313+drawtex_screen_LDADD = ../eglut/libeglut_screen.la
314+gears_screen_LDADD = ../eglut/libeglut_screen.la
315+torus_screen_LDADD = ../eglut/libeglut_screen.la
316+tri_screen_LDADD = ../eglut/libeglut_screen.la
317+
318+if HAVE_X11
319+noinst_PROGRAMS += \
320+ clear
321+
322+bin_PROGRAMS = \
323+ bindtex \
324 drawtex_x11 \
325 eglfbdev \
326 es1_info \
327- gears_screen \
328 gears_x11 \
329 msaa \
330 pbuffer\
331 render_tex \
332 texture_from_pixmap \
333- torus_screen \
334 torus_x11 \
335- tri_screen \
336 tri_x11 \
337 two_win
338-endif
339-endif
340
341 bindtex_LDADD = $(X11_LIBS)
342 es1_info_LDADD = $(X11_LIBS)
343@@ -71,22 +86,15 @@ two_win_LDADD = $(X11_LIBS)
344 clear_LDADD = ../eglut/libeglut_x11.la $(EGL_LIBS) $(X11_LIBS)
345 clear_LDFLAGS =
346
347-drawtex_screen_SOURCES = drawtex.c
348-gears_screen_SOURCES = gears.c
349-torus_screen_SOURCES = torus.c
350-tri_screen_SOURCES = tri.c
351-
352 drawtex_x11_SOURCES = drawtex.c
353 gears_x11_SOURCES = gears.c
354 torus_x11_SOURCES = torus.c
355 tri_x11_SOURCES = tri.c
356
357-drawtex_screen_LDADD = ../eglut/libeglut_screen.la
358-gears_screen_LDADD = ../eglut/libeglut_screen.la
359-torus_screen_LDADD = ../eglut/libeglut_screen.la
360-tri_screen_LDADD = ../eglut/libeglut_screen.la
361-
362 drawtex_x11_LDADD = ../eglut/libeglut_x11.la
363 gears_x11_LDADD = ../eglut/libeglut_x11.la
364 torus_x11_LDADD = ../eglut/libeglut_x11.la
365 tri_x11_LDADD = ../eglut/libeglut_x11.la
366+endif
367+endif
368+endif
369diff --git a/src/egl/opengles2/Makefile.am b/src/egl/opengles2/Makefile.am
370index 41c1b80..74af460 100644
371--- a/src/egl/opengles2/Makefile.am
372+++ b/src/egl/opengles2/Makefile.am
373@@ -36,26 +36,29 @@ AM_LDFLAGS = \
374 if HAVE_EGL
375 if HAVE_GLESV2
376 bin_PROGRAMS = \
377- es2_info \
378- es2gears_screen \
379- es2gears_x11 \
380- es2tri
381+ es2gears_screen
382+
383+es2gears_screen_SOURCES = es2gears.c
384+es2gears_screen_LDADD = ../eglut/libeglut_screen.la
385+
386 if HAVE_WAYLAND
387 bin_PROGRAMS += es2gears_wayland
388-endif
389-endif
390-endif
391
392-es2_info_LDADD = $(X11_LIBS)
393-es2tri_LDADD = $(X11_LIBS)
394+es2gears_wayland_SOURCES = es2gears.c
395+es2gears_wayland_LDADD = ../eglut/libeglut_wayland.la
396+endif
397
398-es2gears_screen_SOURCES = es2gears.c
399+if HAVE_X11
400+bin_PROGRAMS += \
401+ es2tri \
402+ es2_info \
403+ es2gears_x11
404
405+es2_info_LDADD = $(X11_LIBS)
406 es2gears_x11_SOURCES = es2gears.c
407-
408-es2gears_screen_LDADD = ../eglut/libeglut_screen.la
409-
410 es2gears_x11_LDADD = ../eglut/libeglut_x11.la
411+es2tri_LDADD = $(X11_LIBS)
412+endif
413+endif
414+endif
415
416-es2gears_wayland_SOURCES = es2gears.c
417-es2gears_wayland_LDADD = ../eglut/libeglut_wayland.la
418--
4192.0.0
420