open-plc-utils: new package
[buildroot-gz.git] / package / mesa3d-demos / 0002-demos-optional-gl.patch
blobb1985310508ca9855059c024a39d1d46134a2297
1 This patches makes opengl an optional component.
3 Signed-off-by: Spenser Gilliland <spenser@gillilanding.com>
4 ---
5 Index: mesa3d-demos-8.1.0/configure.ac
6 ===================================================================
7 --- mesa3d-demos-8.1.0.orig/configure.ac
8 +++ mesa3d-demos-8.1.0/configure.ac
9 @@ -51,6 +51,14 @@ m4_ifndef([PKG_PROG_PKG_CONFIG],
10 ACLOCAL="aclocal -I/other/macro/dir" before running autoreconf.])])
11 PKG_PROG_PKG_CONFIG()
13 +AC_ARG_ENABLE([gl],
14 + [AS_HELP_STRING([--enable-gl],
15 + [enable GL library @<:@default=no@:>@])],
16 + [gl_enabled="$enableval"],
17 + [gl_enabled=auto])
19 +if test "x$gl_enabled" != "xno"; then
21 dnl Get the pkg-config definitions for libGL. We include a fallback
22 dnl path for GL implementation that don't provide a .pc file
23 PKG_CHECK_MODULES(GL, [gl], [], [
24 @@ -103,6 +111,8 @@ PKG_CHECK_MODULES(GLU, [glu], [],
25 DEMO_CFLAGS="$DEMO_CFLAGS $GLU_CFLAGS"
26 DEMO_LIBS="$DEMO_LIBS $GLU_LIBS"
28 +fi
30 AC_ARG_ENABLE([egl],
31 [AS_HELP_STRING([--enable-egl],
32 [enable EGL library @<:@default=no@:>@])],
33 @@ -287,7 +297,7 @@ AC_SUBST([MESA_GLAPI])
34 AC_SUBST([WAYLAND_CFLAGS])
35 AC_SUBST([WAYLAND_LIBS])
38 +AM_CONDITIONAL(HAVE_GL, test "x$gl_enabled" = "xyes")
39 AM_CONDITIONAL(HAVE_EGL, test "x$egl_enabled" = "xyes")
40 AM_CONDITIONAL(HAVE_GLESV1, test "x$glesv1_enabled" = "xyes")
41 AM_CONDITIONAL(HAVE_GLESV2, test "x$glesv2_enabled" = "xyes")
42 Index: mesa3d-demos-8.1.0/src/egl/opengl/Makefile.am
43 ===================================================================
44 --- mesa3d-demos-8.1.0.orig/src/egl/opengl/Makefile.am
45 +++ mesa3d-demos-8.1.0/src/egl/opengl/Makefile.am
46 @@ -50,6 +50,7 @@ endif
47 endif
49 if HAVE_EGL
50 +if HAVE_GL
51 noinst_PROGRAMS = \
52 demo1 \
53 demo2 \
54 @@ -61,6 +62,7 @@ noinst_PROGRAMS = \
55 $(EGL_DRM_DEMOS) \
56 $(EGL_X11_DEMOS)
57 endif
58 +endif
60 egltri_screen_SOURCES = egltri.c
61 eglgears_screen_SOURCES = eglgears.c
62 Index: mesa3d-demos-8.1.0/src/util/Makefile.am
63 ===================================================================
64 --- mesa3d-demos-8.1.0.orig/src/util/Makefile.am
65 +++ mesa3d-demos-8.1.0/src/util/Makefile.am
66 @@ -27,7 +27,9 @@ AM_CFLAGS = \
67 AM_LDFLAGS = \
68 $(DEMO_LIBS)
70 +if HAVE_GL
71 noinst_LTLIBRARIES = libutil.la
72 +endif
74 if HAVE_GLUT
75 AM_CFLAGS += \