From 7d5f5e6f1f079350f2e986b42a93a1ac060b0e3b59b7d9d8172b9229401b48f2 Mon Sep 17 00:00:00 2001 From: Egbert Eich Date: Wed, 16 Mar 2016 18:13:28 +0000 Subject: [PATCH] - n_Define-GLAPIVAR-separate-from-GLAPI.patch: Add separate definition GLAPIVAR as GLAPI doesn't have the an 'extern' for some compiler versions. This is needed for GLw (bsc#970725). OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/Mesa?expand=0&rev=506 --- Mesa.changes | 8 +++++ Mesa.spec | 3 ++ n_Define-GLAPIVAR-separate-from-GLAPI.patch | 40 +++++++++++++++++++++ 3 files changed, 51 insertions(+) create mode 100644 n_Define-GLAPIVAR-separate-from-GLAPI.patch diff --git a/Mesa.changes b/Mesa.changes index d7c3345..a8ed693 100644 --- a/Mesa.changes +++ b/Mesa.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Wed Mar 16 18:12:00 UTC 2016 - eich@suse.com + +- n_Define-GLAPIVAR-separate-from-GLAPI.patch: + Add separate definition GLAPIVAR as GLAPI + doesn't have the an 'extern' for some compiler + versions. This is needed for GLw (bsc#970725). + ------------------------------------------------------------------- Wed Mar 16 11:31:20 UTC 2016 - sndirsch@suse.com diff --git a/Mesa.spec b/Mesa.spec index 0b6ab2a..5ee6ef4 100644 --- a/Mesa.spec +++ b/Mesa.spec @@ -71,6 +71,8 @@ Patch18: n_VDPAU-XVMC-libs-Replace-hardlinks-with-copies.patch # Already upstream Patch19: U_clover-Fix-build-against-LLVM-3.8.patch Patch20: U_llvmpipe-Do-not-use-barriers-if-not-using-threads.patch +Patch21: n_Define-GLAPIVAR-separate-from-GLAPI.patch + BuildRequires: autoconf >= 2.60 BuildRequires: automake BuildRequires: bison @@ -565,6 +567,7 @@ rm -rf docs/README.{VMS,WIN32,OS2} %patch18 -p1 %patch19 -p1 %patch20 -p1 +%patch21 -p1 %build %if 0%{?suse_version} >= 1310 diff --git a/n_Define-GLAPIVAR-separate-from-GLAPI.patch b/n_Define-GLAPIVAR-separate-from-GLAPI.patch new file mode 100644 index 0000000..aadf0e8 --- /dev/null +++ b/n_Define-GLAPIVAR-separate-from-GLAPI.patch @@ -0,0 +1,40 @@ +From: Egbert Eich +Date: Fri Mar 11 13:29:43 2016 +0100 +Subject: [PATCH]Define GLAPIVAR separate from GLAPI +Patch-mainline: never +Git-commit: 88dda160564c8c23cb533b0eb258404f1687a2e8 + +References: bsc# +Signed-off-by: Egbert Eich + +GLAPI doesn't contain 'extern' in some environments. +This is needed for variables (GLw). + +Signed-off-by: Egbert Eich +--- + Mesa-10.0.3/include/GL/gl.h | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/include/GL/gl.h b/Mesa-10.0.3/include/GL/gl.h +index b484b96..5189008 100644 +--- a/include/GL/gl.h ++++ b/include/GL/gl.h +@@ -59,6 +59,7 @@ + #elif (defined(__GNUC__) && __GNUC__ >= 4) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590)) + # define GLAPI __attribute__((visibility("default"))) + # define GLAPIENTRY ++# define GLAPIVAR extern GLAPI + #endif /* WIN32 && !CYGWIN */ + + /* +@@ -80,6 +81,10 @@ + #define GLAPI extern + #endif + ++#ifndef GLAPIVAR ++#define GLAPIVAR extern ++#endif ++ + #ifndef GLAPIENTRY + #define GLAPIENTRY + #endif