Patchwork mesa-demos: Specify the lib dir properly.

login
register
mail settings
Submitter Drew Moseley
Date May 12, 2014, 8:10 p.m.
Message ID <1399925446-28631-1-git-send-email-drew@moseleynet.net>
Download mbox | patch
Permalink /patch/72037/
State New
Headers show

Comments

Drew Moseley - May 12, 2014, 8:10 p.m.
From: Drew Moseley <drew_moseley@mentor.com>

Use STAGING_EXECPREFIXDIR to specify the location of glut
header files and libs rather than STAGING_LIBDIR.

Also revert the previous unneeded change to glut.patch.

Signed-off-by: Drew Moseley <drew_moseley@mentor.com>
---
 meta/recipes-graphics/mesa/mesa-demos/glut.patch |    2 +-
 meta/recipes-graphics/mesa/mesa-demos_8.1.0.bb   |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
Richard Purdie - May 12, 2014, 9:42 p.m.
On Mon, 2014-05-12 at 16:10 -0400, \Drew Moseley wrote:
> From: Drew Moseley <drew_moseley@mentor.com>
> 
> Use STAGING_EXECPREFIXDIR to specify the location of glut
> header files and libs rather than STAGING_LIBDIR.
> 
> Also revert the previous unneeded change to glut.patch.
> 
> Signed-off-by: Drew Moseley <drew_moseley@mentor.com>
> ---
>  meta/recipes-graphics/mesa/mesa-demos/glut.patch |    2 +-
>  meta/recipes-graphics/mesa/mesa-demos_8.1.0.bb   |    2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)

Is this change multilib safe?

It looks to me like this hardcodes "lib" and things like "lib64" or
"lib32" would be an issue since it wouldn't honour $libdir?

Cheers,

Richard
Drew Moseley - May 12, 2014, 10:26 p.m.
On May 12, 2014, at 5:42 PM, Richard Purdie <richard.purdie@linuxfoundation.org> wrote:
> On Mon, 2014-05-12 at 16:10 -0400, \Drew Moseley wrote:
>> From: Drew Moseley <drew_moseley@mentor.com>
>> 
>> Use STAGING_EXECPREFIXDIR to specify the location of glut
>> header files and libs rather than STAGING_LIBDIR.
>> 
>> Also revert the previous unneeded change to glut.patch.
>> 
>> Signed-off-by: Drew Moseley <drew_moseley@mentor.com>
>> ---
>> meta/recipes-graphics/mesa/mesa-demos/glut.patch |    2 +-
>> meta/recipes-graphics/mesa/mesa-demos_8.1.0.bb   |    2 +-
>> 2 files changed, 2 insertions(+), 2 deletions(-)
> 
> Is this change multilib safe?
> 
> It looks to me like this hardcodes "lib" and things like "lib64" or
> "lib32" would be an issue since it wouldn't honour $libdir?
> 
> Cheers,
> 
> Richard

Sort of.  This is essentially putting the code back to what it was yesterday
which was hardcoded to /lib.  It doesn't affect Yocto builds since the
"--sysroot" option makes the directories specified here redundant.  I have
verified the libraries are properly located even when installed in usr/lib64.

Ultimately this should probably be cleaned up in the upstream mesa-demos
by adding a "--with-glut-includes" and "--with-glut-libs" or some such but
this is at least less broken than it was before   Previously setting "glut"
in the packageconfig would pass "--with-glut" to configure resulting in
the build failure:

> ../../x86_64-mel-linux-libtool: line 6012: cd: yes/lib: No such file or directory
> x86_64-mel-linux-libtool: link: cannot determine absolute directory name of `yes/lib'
> make[2]: *** [libutil.la] Error 1

Drew

Patch

diff --git a/meta/recipes-graphics/mesa/mesa-demos/glut.patch b/meta/recipes-graphics/mesa/mesa-demos/glut.patch
index 2ca5a93..84b6d4f 100644
--- a/meta/recipes-graphics/mesa/mesa-demos/glut.patch
+++ b/meta/recipes-graphics/mesa/mesa-demos/glut.patch
@@ -27,7 +27,7 @@  Index: mesa-demos-8.0.1/configure.ac
 -		[glutInit],
 -		[],
 -		[glut_enabled=no])
-+	 GLUT_LIBS="-L$withval -lglut"],
++	 GLUT_LIBS="-L$withval/lib -lglut"],
 +	[GLUT_CFLAGS=""
 +	 GLUT_LIBS="-lglut"]
 +        )
diff --git a/meta/recipes-graphics/mesa/mesa-demos_8.1.0.bb b/meta/recipes-graphics/mesa/mesa-demos_8.1.0.bb
index 211df3b..7cda19e 100644
--- a/meta/recipes-graphics/mesa/mesa-demos_8.1.0.bb
+++ b/meta/recipes-graphics/mesa/mesa-demos_8.1.0.bb
@@ -33,7 +33,7 @@  PACKAGECONFIG[freetype2] = "--enable-freetype2,--disable-freetype2,freetype"
 PACKAGECONFIG[gbm] = "--enable-gbm,--disable-gbm,virtual/libgl"
 PACKAGECONFIG[gles1] = "--enable-gles1,--disable-gles1,virtual/libgles1"
 PACKAGECONFIG[gles2] = "--enable-gles2,--disable-gles2,virtual/libgles2"
-PACKAGECONFIG[glut] = "--with-glut=${STAGING_LIBDIR},--without-glut,"
+PACKAGECONFIG[glut] = "--with-glut=${STAGING_EXECPREFIXDIR},--without-glut,"
 PACKAGECONFIG[osmesa] = "--enable-osmesa,--disable-osmesa,"
 PACKAGECONFIG[vg] = "--enable-vg,--disable-vg,virtual/libvg"
 PACKAGECONFIG[wayland] = "--enable-wayland,--disable-wayland,virtual/libgl wayland"