Patchwork mesa-demos: fix --with-glut check

login
register
mail settings
Submitter Ross Burton
Date Nov. 12, 2012, 3:03 p.m.
Message ID <1352732608-9517-1-git-send-email-ross.burton@intel.com>
Download mbox | patch
Permalink /patch/38873/
State Accepted
Commit fa7fb44d1ca2b8a57509806bde19672c68ef157d
Headers show

Comments

Ross Burton - Nov. 12, 2012, 3:03 p.m.
The GLUT check was automatic and couldn't be disabled, so mesa-demos would gain
a GLUT dependency if it was present when built.

So, fix configure.ac so that --without-glut works as expected.

Signed-off-by: Ross Burton <ross.burton@intel.com>
---
 meta/recipes-graphics/mesa/mesa-demos/glut.patch |   46 ++++++++++++++++++++++
 meta/recipes-graphics/mesa/mesa-demos_8.0.1.bb   |   10 +++--
 2 files changed, 52 insertions(+), 4 deletions(-)
 create mode 100644 meta/recipes-graphics/mesa/mesa-demos/glut.patch
Daniel Stone - Nov. 13, 2012, 12:25 a.m.
Hi,

On 13 November 2012 02:03, Ross Burton <ross.burton@intel.com> wrote:

> The GLUT check was automatic and couldn't be disabled, so mesa-demos would
> gain
> a GLUT dependency if it was present when built.
>
> So, fix configure.ac so that --without-glut works as expected.
>

Has this been sent upstream?

Cheers,
Daniel
Martin Jansa - Nov. 13, 2012, 7:46 a.m.
On Tue, Nov 13, 2012 at 11:25:21AM +1100, Daniel Stone wrote:
> Hi,
> 
> On 13 November 2012 02:03, Ross Burton <ross.burton@intel.com> wrote:
> 
> > The GLUT check was automatic and couldn't be disabled, so mesa-demos would
> > gain
> > a GLUT dependency if it was present when built.
> >
> > So, fix configure.ac so that --without-glut works as expected.
> >
> 
> Has this been sent upstream?

See Upstream-Status header in patch

Upstream-Status: Submitted [https://bugs.freedesktop.org/show_bug.cgi?id=57013]

Cheers,

Patch

diff --git a/meta/recipes-graphics/mesa/mesa-demos/glut.patch b/meta/recipes-graphics/mesa/mesa-demos/glut.patch
new file mode 100644
index 0000000..84b6d4f
--- /dev/null
+++ b/meta/recipes-graphics/mesa/mesa-demos/glut.patch
@@ -0,0 +1,46 @@ 
+Correctly implement with AC_WITH(glut) so that --without-glut works.
+
+Upstream-Status: Submitted [https://bugs.freedesktop.org/show_bug.cgi?id=57013]
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+Index: mesa-demos-8.0.1/configure.ac
+===================================================================
+--- mesa-demos-8.0.1.orig/configure.ac	2010-07-13 19:52:41.000000000 +0100
++++ mesa-demos-8.0.1/configure.ac	2012-11-12 12:49:54.940054571 +0000
+@@ -65,21 +65,25 @@
+ DEMO_LIBS="$DEMO_LIBS $GL_LIBS"
+ 
+ dnl Check for GLUT
+-GLUT_CFLAGS=""
+-GLUT_LIBS=-lglut
+-glut_enabled=yes
++glut_enabled=no
+ AC_ARG_WITH([glut],
+ 	[AS_HELP_STRING([--with-glut=DIR],
+ 			[glut install directory])],
+ 	[GLUT_CFLAGS="-I$withval/include"
+-	 GLUT_LIBS="-L$withval/lib -lglut"])
+-AC_CHECK_HEADER([GL/glut.h],
+-		[],
+-		[glut_enabled=no])
+-AC_CHECK_LIB([glut],
+-		[glutInit],
+-		[],
+-		[glut_enabled=no])
++	 GLUT_LIBS="-L$withval/lib -lglut"],
++	[GLUT_CFLAGS=""
++	 GLUT_LIBS="-lglut"]
++        )
++AS_IF([test "x$with_glut" != xno],
++      [AC_CHECK_HEADER([GL/glut.h],
++                       [],
++                       [glut_enabled=no])
++       AC_CHECK_LIB([glut],
++                    [glutInit],
++                    [],
++                    [glut_enabled=no])
++       glut_enabled=yes
++])
+ 
+ GLEW_CFLAGS=""
+ GLEW_LIBS="-lGLEW"
diff --git a/meta/recipes-graphics/mesa/mesa-demos_8.0.1.bb b/meta/recipes-graphics/mesa/mesa-demos_8.0.1.bb
index 1d16bfc..0511734 100644
--- a/meta/recipes-graphics/mesa/mesa-demos_8.0.1.bb
+++ b/meta/recipes-graphics/mesa/mesa-demos_8.0.1.bb
@@ -11,13 +11,15 @@  LIC_FILES_CHKSUM = "file://src/xdemos/glxgears.c;beginline=1;endline=20;md5=9142
 
 DEPENDS = "virtual/libx11 virtual/libgl glew"
 
-PR = "r3"
+PR = "r4"
 
 SRC_URI = "ftp://ftp.freedesktop.org/pub/mesa/demos/${PV}/${BPN}-${PV}.tar.bz2 \
 	file://dso_linking_change_build_fix.patch \
-	file://gles2-info.patch"
+	file://gles2-info.patch \
+        file://glut.patch"
+SRC_URI[md5sum] = "320c2a4b6edc6faba35d9cb1e2a30bf4"
+SRC_URI[sha256sum] = "4bc7f2b20d17e3eebfec288f2367a435cd2db71fc5ac9ece2c14827e290d77d1"
 
 inherit autotools pkgconfig
 
-SRC_URI[md5sum] = "320c2a4b6edc6faba35d9cb1e2a30bf4"
-SRC_URI[sha256sum] = "4bc7f2b20d17e3eebfec288f2367a435cd2db71fc5ac9ece2c14827e290d77d1"
+EXTRA_OECONF = "--without-glut"