[oe-commits] [openembedded-core] 10/12: glew: Fix build errors at recipes depending on glew

git at git.openembedded.org git at git.openembedded.org
Sun Mar 24 17:01:26 UTC 2019


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master
in repository openembedded-core.

commit fd6ca8f7453230bac4cd1145406a55549ad43e71
Author: Andreas Müller <schnitzeltony at gmail.com>
AuthorDate: Thu Mar 21 15:05:32 2019 +0100

    glew: Fix build errors at recipes depending on glew
    
    Glew headers override mesa headers by setting mesa's include guards. This
    stopped working since mesa renamed them.
    
    Fixes errors like this in depending recipes:
    
    | <...>/recipe-sysroot/usr/include/GL/glext.h:12066:105: error: conflicting declaration 'typedef void (* PFNGLFRAGMENTLIGHTFVSGIXPROC)(GLenum, GLenum, const GLfloat*)'
    |  typedef void (APIENTRYP PFNGLFRAGMENTLIGHTFVSGIXPROC) (GLenum light, GLenum pname, const GLfloat *params);
    |                                                                                                          ^
    
    Signed-off-by: Andreas Müller <schnitzeltony at gmail.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 ...ed-compilation-with-current-mesa-versions.patch | 73 ++++++++++++++++++++++
 meta/recipes-graphics/glew/glew_2.1.0.bb           |  3 +-
 2 files changed, 75 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-graphics/glew/glew/0001-Fixed-compilation-with-current-mesa-versions.patch b/meta/recipes-graphics/glew/glew/0001-Fixed-compilation-with-current-mesa-versions.patch
new file mode 100644
index 0000000..64f3e2f
--- /dev/null
+++ b/meta/recipes-graphics/glew/glew/0001-Fixed-compilation-with-current-mesa-versions.patch
@@ -0,0 +1,73 @@
+From 7f65a36866f4e24dd1446fe1c9d21424f28bcabd Mon Sep 17 00:00:00 2001
+From: Deve <deveee at gmail.com>
+Date: Wed, 14 Nov 2018 21:07:29 +0100
+Subject: [PATCH] Fixed compilation with current mesa versions.
+
+As you can see in
+https://cgit.freedesktop.org/mesa/mesa/tree/include/GL/glext.h
+now the file uses __gl_glext_h_ instead of __glext_h_
+It's precisely caused by commit f7d42ee7d319256608ad60778f6787c140badada
+
+Backoprt notes: 
+
+* The original patch adjusts auto/src/glew_head.h only
+* include/GL/glew.h is not part of git repo and gets created on tarball
+  creation
+
+=> patch include/GL/glew.h either to cause the desired fix
+
+Upstream-Status: Backport [1]
+
+[1] https://github.com/nigels-com/glew/commit/7f65a36866f4e24dd1446fe1c9d21424f28bcabd
+
+Signed-off-by: Andreas Müller <schnitzeltony at gmail.com>
+---
+ auto/src/glew_head.h | 3 ++-
+ include/GL/glew.h    | 3 ++-
+ 2 files changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/auto/src/glew_head.h b/auto/src/glew_head.h
+index c19cefb..8f313d9 100644
+--- a/auto/src/glew_head.h
++++ b/auto/src/glew_head.h
+@@ -14,7 +14,7 @@
+ #if defined(__REGAL_H__)
+ #error Regal.h included before glew.h
+ #endif
+-#if defined(__glext_h_) || defined(__GLEXT_H_)
++#if defined(__glext_h_) || defined(__GLEXT_H_) || defined(__gl_glext_h_)
+ #error glext.h included before glew.h
+ #endif
+ #if defined(__gl_ATI_h_)
+@@ -30,6 +30,7 @@
+ #define __X_GL_H
+ #define __glext_h_
+ #define __GLEXT_H_
++#define __gl_glext_h_
+ #define __gl_ATI_h_
+ 
+ #if defined(_WIN32)
+diff --git a/include/GL/glew.h b/include/GL/glew.h
+index b5b6987..a9f9e4b 100644
+--- a/include/GL/glew.h
++++ b/include/GL/glew.h
+@@ -93,7 +93,7 @@
+ #if defined(__REGAL_H__)
+ #error Regal.h included before glew.h
+ #endif
+-#if defined(__glext_h_) || defined(__GLEXT_H_)
++#if defined(__glext_h_) || defined(__GLEXT_H_) || defined(__gl_glext_h_)
+ #error glext.h included before glew.h
+ #endif
+ #if defined(__gl_ATI_h_)
+@@ -109,6 +109,7 @@
+ #define __X_GL_H
+ #define __glext_h_
+ #define __GLEXT_H_
++#define __gl_glext_h_
+ #define __gl_ATI_h_
+ 
+ #if defined(_WIN32)
+-- 
+2.20.1
+
diff --git a/meta/recipes-graphics/glew/glew_2.1.0.bb b/meta/recipes-graphics/glew/glew_2.1.0.bb
index be725e0..18e6909 100644
--- a/meta/recipes-graphics/glew/glew_2.1.0.bb
+++ b/meta/recipes-graphics/glew/glew_2.1.0.bb
@@ -6,7 +6,8 @@ LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=2ac251558de685c6b9478d89be3149c2"
 
 SRC_URI = "${SOURCEFORGE_MIRROR}/project/glew/glew/${PV}/glew-${PV}.tgz \
-           file://no-strip.patch"
+           file://no-strip.patch \
+           file://0001-Fixed-compilation-with-current-mesa-versions.patch"
 
 SRC_URI[md5sum] = "b2ab12331033ddfaa50dc39345343980"
 SRC_URI[sha256sum] = "04de91e7e6763039bc11940095cd9c7f880baba82196a7765f727ac05a993c95"

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list