Patchwork mesa: Build separate GLU library

login
register
mail settings
Submitter Ross Burton
Date Oct. 22, 2012, 9:31 a.m.
Message ID <1350898286-14049-1-git-send-email-ross.burton@intel.com>
Download mbox | patch
Permalink /patch/38389/
State New
Headers show

Comments

Ross Burton - Oct. 22, 2012, 9:31 a.m.
From: Daniel Stone <daniel@fooishbar.org>

Mesa has removed GLU from the core tree upstream, so remove it from the
Mesa build, add support for the new GLU tree, and introduce a new
virtual/libglu package.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Signed-off-by: Ross Burton <ross.burton@intel.com>
---
 meta/recipes-graphics/glew/glew_1.9.0.bb     |    4 ++--
 meta/recipes-graphics/mesa/mesa-common.inc   |    7 ++----
 meta/recipes-graphics/mesa/mesa-glu_9.0.0.bb |   31 ++++++++++++++++++++++++++
 3 files changed, 35 insertions(+), 7 deletions(-)
 create mode 100644 meta/recipes-graphics/mesa/mesa-glu_9.0.0.bb
Richard Purdie - Oct. 22, 2012, 12:05 p.m.
On Mon, 2012-10-22 at 10:31 +0100, Ross Burton wrote:
> From: Daniel Stone <daniel@fooishbar.org>
> 
> Mesa has removed GLU from the core tree upstream, so remove it from the
> Mesa build, add support for the new GLU tree, and introduce a new
> virtual/libglu package.
> 
> Signed-off-by: Daniel Stone <daniel@fooishbar.org>
> Signed-off-by: Ross Burton <ross.burton@intel.com>
> ---
>  meta/recipes-graphics/glew/glew_1.9.0.bb     |    4 ++--
>  meta/recipes-graphics/mesa/mesa-common.inc   |    7 ++----
>  meta/recipes-graphics/mesa/mesa-glu_9.0.0.bb |   31 ++++++++++++++++++++++++++
>  3 files changed, 35 insertions(+), 7 deletions(-)
>  create mode 100644 meta/recipes-graphics/mesa/mesa-glu_9.0.0.bb

Both the package names and provider names change here leading to errors
like:

http://autobuilder.yoctoproject.org:8010/builders/nightly-arm-lsb/builds/100/steps/shell_27/logs/stdio

so this is going to need some further tweaks.

Cheers,

Richard


> diff --git a/meta/recipes-graphics/glew/glew_1.9.0.bb b/meta/recipes-graphics/glew/glew_1.9.0.bb
> index 00fff11..3b466d3 100644
> --- a/meta/recipes-graphics/glew/glew_1.9.0.bb
> +++ b/meta/recipes-graphics/glew/glew_1.9.0.bb
> @@ -5,9 +5,9 @@ SECTION = "x11"
>  LICENSE = "MIT"
>  LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=2ac251558de685c6b9478d89be3149c2"
>  
> -DEPENDS = "virtual/libx11 virtual/libgl libxext libxi libxmu"
> +DEPENDS = "virtual/libx11 virtual/libgl virtual/libglu libxext libxi libxmu"
>  
> -PR = "r0"
> +PR = "r1"
>  
>  SRC_URI = "${SOURCEFORGE_MIRROR}/project/glew/glew/${PV}/glew-${PV}.tgz \
>             file://autotools.patch \
> diff --git a/meta/recipes-graphics/mesa/mesa-common.inc b/meta/recipes-graphics/mesa/mesa-common.inc
> index faa8183..1ad8ff3 100644
> --- a/meta/recipes-graphics/mesa/mesa-common.inc
> +++ b/meta/recipes-graphics/mesa/mesa-common.inc
> @@ -12,7 +12,7 @@ SECTION = "x11"
>  LICENSE = "MIT"
>  LIC_FILES_CHKSUM = "file://docs/license.html;md5=03ccdc4c379c4289aecfb8892c546f67"
>  
> -INC_PR = "r3"
> +INC_PR = "r4"
>  PE = "2"
>  
>  DEPENDS = "libxml2-native makedepend-native flex-native bison-native"
> @@ -24,7 +24,7 @@ FILESEXTRAPATHS_append := "${THISDIR}/mesa:"
>  
>  inherit autotools pkgconfig pythonnative
>  
> -EXTRA_OECONF = "--enable-glu \
> +EXTRA_OECONF = "--disable-glu \
>                  --disable-glw \
>                  --disable-glut \
>                  --enable-shared-glapi"
> @@ -42,7 +42,6 @@ EXCLUDE_FROM_WORLD = "1"
>  RDEPENDS_${PN}-dev = ""
>  
>  PACKAGES =+ "libegl libegl-dev \
> -             libglu libglu-dev \
>               libosmesa libosmesa-dev \
>               libgl libgl-dev \
>               libglapi libglapi-dev \
> @@ -57,7 +56,6 @@ FILES_libgles1 = "${libdir}/libGLESv1*.so.*"
>  FILES_libgles2 = "${libdir}/libGLESv2.so.*"
>  FILES_libgl = "${libdir}/libGL.so.*"
>  FILES_libglapi = "${libdir}/libglapi.so.*"
> -FILES_libglu = "${libdir}/libGLU.so.*"
>  FILES_libosmesa = "${libdir}/libOSMesa.so.*"
>  
>  FILES_libegl-dev = "${libdir}/libEGL.* ${includedir}/EGL ${includedir}/KHR ${libdir}/pkgconfig/egl.pc"
> @@ -66,7 +64,6 @@ FILES_libgl-dev = "${libdir}/libGL.* ${includedir}/GL ${libdir}/pkgconfig/gl.pc"
>  FILES_libglapi-dev = "${libdir}/libglapi.*"
>  FILES_libgles1-dev = "${libdir}/libGLESv1*.* ${includedir}/GLES ${libdir}/pkgconfig/glesv1*.pc"
>  FILES_libgles2-dev = "${libdir}/libGLESv2.* ${includedir}/GLES2 ${libdir}/pkgconfig/glesv2.pc"
> -FILES_libglu-dev = "${libdir}/libGLU.* ${includedir}/GL/glu*.h ${libdir}/pkgconfig/glu.pc"
>  FILES_libosmesa-dev = "${libdir}/libOSMesa.* ${includedir}/osmesa.h"
>  
>  FILES_${PN}-dbg += "${libdir}/dri/.debug/* ${libdir}/egl/.debug/*"
> diff --git a/meta/recipes-graphics/mesa/mesa-glu_9.0.0.bb b/meta/recipes-graphics/mesa/mesa-glu_9.0.0.bb
> new file mode 100644
> index 0000000..d3fffe7
> --- /dev/null
> +++ b/meta/recipes-graphics/mesa/mesa-glu_9.0.0.bb
> @@ -0,0 +1,31 @@
> +SUMMARY = "The OpenGL utility toolkit"
> +DESCRIPTION = "GLU is a utility toolkit used with OpenGL implementations"
> +
> +HOMEPAGE = "http://mesa3d.org"
> +BUGTRACKER = "https://bugs.freedesktop.org"
> +SECTION = "x11"
> +LICENSE = "MIT"
> +LIC_FILES_CHKSUM = "file://include/GL/glu.h;endline=29;md5=6b79c570f644363b356456e7d44471d9 \
> +                    file://src/libtess/tess.c;endline=29;md5=6b79c570f644363b356456e7d44471d9"
> +
> +# Epoch as this used to be part of mesa-dri
> +PE = "2"
> +PR = "0"
> +
> +SRC_URI = "ftp://ftp.freedesktop.org/pub/mesa/glu/glu-${PV}.tar.bz2"
> +
> +SRC_URI[md5sum] = "be9249132ff49275461cf92039083030"
> +SRC_URI[sha256sum] = "1f7ad0d379a722fcbd303aa5650c6d7d5544fde83196b42a73d1193568a4df12"
> +
> +S = "${WORKDIR}/glu-${PV}"
> +
> +DEPENDS = "virtual/libgl"
> +
> +inherit autotools pkgconfig
> +
> +# ie mesa-glu could be empty and mesa-glu-dev RDEPENDS on it
> +ALLOW_EMPTY_${PN} = "1"
> +
> +PROVIDES = "virtual/libglu"
> +
> +FILES_mesa-glu-dev = "${libdir}/pkgconfig/glu.pc"
Ross Burton - Oct. 22, 2012, 4:24 p.m.
That's a good point well made.

V2, remove the virtual/libglu name and admit that Mesa's GLU is probably the
only GLU that people are going to use, so just package that up as libglu.  If
suddenly people have a burning need to package alternative implementations of
GLU then we can revisit this.

Ross

Patch

diff --git a/meta/recipes-graphics/glew/glew_1.9.0.bb b/meta/recipes-graphics/glew/glew_1.9.0.bb
index 00fff11..3b466d3 100644
--- a/meta/recipes-graphics/glew/glew_1.9.0.bb
+++ b/meta/recipes-graphics/glew/glew_1.9.0.bb
@@ -5,9 +5,9 @@  SECTION = "x11"
 LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=2ac251558de685c6b9478d89be3149c2"
 
-DEPENDS = "virtual/libx11 virtual/libgl libxext libxi libxmu"
+DEPENDS = "virtual/libx11 virtual/libgl virtual/libglu libxext libxi libxmu"
 
-PR = "r0"
+PR = "r1"
 
 SRC_URI = "${SOURCEFORGE_MIRROR}/project/glew/glew/${PV}/glew-${PV}.tgz \
            file://autotools.patch \
diff --git a/meta/recipes-graphics/mesa/mesa-common.inc b/meta/recipes-graphics/mesa/mesa-common.inc
index faa8183..1ad8ff3 100644
--- a/meta/recipes-graphics/mesa/mesa-common.inc
+++ b/meta/recipes-graphics/mesa/mesa-common.inc
@@ -12,7 +12,7 @@  SECTION = "x11"
 LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://docs/license.html;md5=03ccdc4c379c4289aecfb8892c546f67"
 
-INC_PR = "r3"
+INC_PR = "r4"
 PE = "2"
 
 DEPENDS = "libxml2-native makedepend-native flex-native bison-native"
@@ -24,7 +24,7 @@  FILESEXTRAPATHS_append := "${THISDIR}/mesa:"
 
 inherit autotools pkgconfig pythonnative
 
-EXTRA_OECONF = "--enable-glu \
+EXTRA_OECONF = "--disable-glu \
                 --disable-glw \
                 --disable-glut \
                 --enable-shared-glapi"
@@ -42,7 +42,6 @@  EXCLUDE_FROM_WORLD = "1"
 RDEPENDS_${PN}-dev = ""
 
 PACKAGES =+ "libegl libegl-dev \
-             libglu libglu-dev \
              libosmesa libosmesa-dev \
              libgl libgl-dev \
              libglapi libglapi-dev \
@@ -57,7 +56,6 @@  FILES_libgles1 = "${libdir}/libGLESv1*.so.*"
 FILES_libgles2 = "${libdir}/libGLESv2.so.*"
 FILES_libgl = "${libdir}/libGL.so.*"
 FILES_libglapi = "${libdir}/libglapi.so.*"
-FILES_libglu = "${libdir}/libGLU.so.*"
 FILES_libosmesa = "${libdir}/libOSMesa.so.*"
 
 FILES_libegl-dev = "${libdir}/libEGL.* ${includedir}/EGL ${includedir}/KHR ${libdir}/pkgconfig/egl.pc"
@@ -66,7 +64,6 @@  FILES_libgl-dev = "${libdir}/libGL.* ${includedir}/GL ${libdir}/pkgconfig/gl.pc"
 FILES_libglapi-dev = "${libdir}/libglapi.*"
 FILES_libgles1-dev = "${libdir}/libGLESv1*.* ${includedir}/GLES ${libdir}/pkgconfig/glesv1*.pc"
 FILES_libgles2-dev = "${libdir}/libGLESv2.* ${includedir}/GLES2 ${libdir}/pkgconfig/glesv2.pc"
-FILES_libglu-dev = "${libdir}/libGLU.* ${includedir}/GL/glu*.h ${libdir}/pkgconfig/glu.pc"
 FILES_libosmesa-dev = "${libdir}/libOSMesa.* ${includedir}/osmesa.h"
 
 FILES_${PN}-dbg += "${libdir}/dri/.debug/* ${libdir}/egl/.debug/*"
diff --git a/meta/recipes-graphics/mesa/mesa-glu_9.0.0.bb b/meta/recipes-graphics/mesa/mesa-glu_9.0.0.bb
new file mode 100644
index 0000000..d3fffe7
--- /dev/null
+++ b/meta/recipes-graphics/mesa/mesa-glu_9.0.0.bb
@@ -0,0 +1,31 @@ 
+SUMMARY = "The OpenGL utility toolkit"
+DESCRIPTION = "GLU is a utility toolkit used with OpenGL implementations"
+
+HOMEPAGE = "http://mesa3d.org"
+BUGTRACKER = "https://bugs.freedesktop.org"
+SECTION = "x11"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://include/GL/glu.h;endline=29;md5=6b79c570f644363b356456e7d44471d9 \
+                    file://src/libtess/tess.c;endline=29;md5=6b79c570f644363b356456e7d44471d9"
+
+# Epoch as this used to be part of mesa-dri
+PE = "2"
+PR = "0"
+
+SRC_URI = "ftp://ftp.freedesktop.org/pub/mesa/glu/glu-${PV}.tar.bz2"
+
+SRC_URI[md5sum] = "be9249132ff49275461cf92039083030"
+SRC_URI[sha256sum] = "1f7ad0d379a722fcbd303aa5650c6d7d5544fde83196b42a73d1193568a4df12"
+
+S = "${WORKDIR}/glu-${PV}"
+
+DEPENDS = "virtual/libgl"
+
+inherit autotools pkgconfig
+
+# ie mesa-glu could be empty and mesa-glu-dev RDEPENDS on it
+ALLOW_EMPTY_${PN} = "1"
+
+PROVIDES = "virtual/libglu"
+
+FILES_mesa-glu-dev = "${libdir}/pkgconfig/glu.pc"