summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorAwais Belal <awais_belal@mentor.com>2016-05-19 16:26:59 +0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-05-20 10:20:54 +0100
commit982b63129e2c3ce8cbe30c03e1d43497cb4d50bf (patch)
treef1a4edb9797ef2cf74dd08b3425456e7aa3c016f /meta
parent409c940533d532512d9c0d155b110d6c744bcacb (diff)
downloadpoky-982b63129e2c3ce8cbe30c03e1d43497cb4d50bf.tar.gz
mesa-demos: provide option for disabling GLX demos
There are platforms that default to EGL only configurations in which case the GLX applications are not required at all. Allow the user to control generation of these demos as needed through a configure switch. (From OE-Core rev: 226492af41234dec47066d576d0de78fd09a4ca8) Signed-off-by: Awais Belal <awais_belal@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-graphics/mesa/mesa-demos/0013-only-build-GLX-demos-if-needed.patch62
-rw-r--r--meta/recipes-graphics/mesa/mesa-demos_8.2.0.bb4
2 files changed, 65 insertions, 1 deletions
diff --git a/meta/recipes-graphics/mesa/mesa-demos/0013-only-build-GLX-demos-if-needed.patch b/meta/recipes-graphics/mesa/mesa-demos/0013-only-build-GLX-demos-if-needed.patch
new file mode 100644
index 0000000000..e7be4dfbe1
--- /dev/null
+++ b/meta/recipes-graphics/mesa/mesa-demos/0013-only-build-GLX-demos-if-needed.patch
@@ -0,0 +1,62 @@
1From 322af294390a7f4e1524c5a79312be6cbebce988 Mon Sep 17 00:00:00 2001
2From: Awais Belal <awais_belal@mentor.com>
3Date: Wed, 11 Nov 2015 17:22:12 +0500
4Subject: [PATCH] only build GLX demos if needed
5
6There are platforms that default to EGL only configurations
7in which case the GLX applications are not required
8at all. Allow the user to control generation of these
9demos as needed through a configure switch.
10
11Signed-off-by: Awais Belal <awais_belal@mentor.com>
12Upstream-Status: Pending
13---
14 configure.ac | 9 +++++++++
15 src/Makefile.am | 6 +++++-
16 2 files changed, 14 insertions(+), 1 deletion(-)
17
18diff --git a/configure.ac b/configure.ac
19index f8ec7e3..1a4d96d 100644
20--- a/configure.ac
21+++ b/configure.ac
22@@ -132,6 +132,11 @@ if test "x$enable_glu" = xyes; then
23 DEMO_LIBS="$DEMO_LIBS $GLU_LIBS"
24 fi
25
26+AC_ARG_ENABLE([glx-demos],
27+ [AS_HELP_STRING([--enable-glx-demos],
28+ [enable GLX demos @<:@default=auto@:>@])],
29+ [glx_demos_enabled="$enableval"],
30+ [glx_demos_enabled=yes])
31 AC_ARG_ENABLE([egl],
32 [AS_HELP_STRING([--enable-egl],
33 [enable EGL library @<:@default=auto@:>@])],
34@@ -325,6 +333,7 @@ AC_SUBST([WAYLAND_LIBS])
35
36 AM_CONDITIONAL(HAVE_GLU, test "x$glu_enabled" = "xyes")
37 AM_CONDITIONAL(HAVE_GLEW, test "x$glew_enabled" = "xyes")
38+AM_CONDITIONAL(HAVE_GLX, test "x$glx_demos_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")
42diff --git a/src/Makefile.am b/src/Makefile.am
43index 8b89dee..a4d7e8f 100644
44--- a/src/Makefile.am
45+++ b/src/Makefile.am
46@@ -44,8 +44,12 @@ SUBDIRS = \
47 slang \
48 tests \
49 tools \
50- wgl \
51+ wgl
52+
53+if HAVE_GLX
54+SUBDIRS += \
55 xdemos
56+endif
57
58 if HAVE_GLEW
59 SUBDIRS += \
60--
611.9.1
62
diff --git a/meta/recipes-graphics/mesa/mesa-demos_8.2.0.bb b/meta/recipes-graphics/mesa/mesa-demos_8.2.0.bb
index 034e01d069..53bd5e2b41 100644
--- a/meta/recipes-graphics/mesa/mesa-demos_8.2.0.bb
+++ b/meta/recipes-graphics/mesa/mesa-demos_8.2.0.bb
@@ -22,6 +22,7 @@ SRC_URI = "ftp://ftp.freedesktop.org/pub/mesa/demos/${PV}/${BPN}-${PV}.tar.bz2 \
22 file://0010-sharedtex_mt-fix-rendering-thread-hang.patch \ 22 file://0010-sharedtex_mt-fix-rendering-thread-hang.patch \
23 file://0011-drop-demos-dependant-on-obsolete-MESA_screen_surface.patch \ 23 file://0011-drop-demos-dependant-on-obsolete-MESA_screen_surface.patch \
24 file://0012-mesa-demos-OpenVG-demos-with-single-frame-need-eglSw.patch \ 24 file://0012-mesa-demos-OpenVG-demos-with-single-frame-need-eglSw.patch \
25 file://0013-only-build-GLX-demos-if-needed.patch \
25" 26"
26SRC_URI[md5sum] = "72613a2c8c013716db02e3ff59d29061" 27SRC_URI[md5sum] = "72613a2c8c013716db02e3ff59d29061"
27SRC_URI[sha256sum] = "e4bfecb5816ddd4b7b37c1bc876b63f1f7f06fda5879221a9774d0952f90ba92" 28SRC_URI[sha256sum] = "e4bfecb5816ddd4b7b37c1bc876b63f1f7f06fda5879221a9774d0952f90ba92"
@@ -31,7 +32,7 @@ inherit autotools pkgconfig distro_features_check
31REQUIRED_DISTRO_FEATURES = "opengl" 32REQUIRED_DISTRO_FEATURES = "opengl"
32 33
33PACKAGECONFIG ?= "drm osmesa freetype2 gbm egl gles1 gles2 \ 34PACKAGECONFIG ?= "drm osmesa freetype2 gbm egl gles1 gles2 \
34 ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11 glew glu', '', d)}" 35 ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11 glew glu glx', '', d)}"
35 36
36# The Wayland code doesn't work with Wayland 1.0, so disable it for now 37# The Wayland code doesn't work with Wayland 1.0, so disable it for now
37#${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', '', d)}" 38#${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', '', d)}"
@@ -51,6 +52,7 @@ PACKAGECONFIG[wayland] = "--enable-wayland,--disable-wayland,virtual/libgl wayla
51PACKAGECONFIG[x11] = "--enable-x11,--disable-x11,virtual/libx11" 52PACKAGECONFIG[x11] = "--enable-x11,--disable-x11,virtual/libx11"
52PACKAGECONFIG[glew] = "--enable-glew,--disable-glew,glew" 53PACKAGECONFIG[glew] = "--enable-glew,--disable-glew,glew"
53PACKAGECONFIG[glu] = "--enable-glu,--disable-glu,virtual/libgl" 54PACKAGECONFIG[glu] = "--enable-glu,--disable-glu,virtual/libgl"
55PACKAGECONFIG[glx] = "--enable-glx-demos,--disable-glx-demos"
54 56
55do_install_append() { 57do_install_append() {
56 # it can be completely empty when all PACKAGECONFIG options are disabled 58 # it can be completely empty when all PACKAGECONFIG options are disabled