forked from pool/freeglut
- Add patch to fix build with GCC 10 bsc#1160391:
* gcc10.patch OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/freeglut?expand=0&rev=26
This commit is contained in:
parent
6b67e5fe90
commit
99f9bdda7b
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Mar 2 12:40:01 UTC 2020 - Tomáš Chvátal <tchvatal@suse.com>
|
||||||
|
|
||||||
|
- Add patch to fix build with GCC 10 bsc#1160391:
|
||||||
|
* gcc10.patch
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Jan 9 08:04:16 UTC 2020 - Tomáš Chvátal <tchvatal@suse.com>
|
Thu Jan 9 08:04:16 UTC 2020 - Tomáš Chvátal <tchvatal@suse.com>
|
||||||
|
|
||||||
|
@ -26,6 +26,7 @@ URL: http://freeglut.sourceforge.net/
|
|||||||
Source: https://downloads.sourceforge.net/project/freeglut/%{name}/%{version}/%{name}-%{version}.tar.gz
|
Source: https://downloads.sourceforge.net/project/freeglut/%{name}/%{version}/%{name}-%{version}.tar.gz
|
||||||
Source1: https://downloads.sourceforge.net/openglut/openglut-0.6.3-doc.tar.gz
|
Source1: https://downloads.sourceforge.net/openglut/openglut-0.6.3-doc.tar.gz
|
||||||
Source2: baselibs.conf
|
Source2: baselibs.conf
|
||||||
|
Patch0: gcc10.patch
|
||||||
BuildRequires: cmake
|
BuildRequires: cmake
|
||||||
BuildRequires: gcc-c++
|
BuildRequires: gcc-c++
|
||||||
BuildRequires: pkgconfig
|
BuildRequires: pkgconfig
|
||||||
@ -107,6 +108,7 @@ joystick functions on a wide range of platforms.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -a1
|
%setup -q -a1
|
||||||
|
%patch0 -p3
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%cmake \
|
%cmake \
|
||||||
|
66
gcc10.patch
Normal file
66
gcc10.patch
Normal file
@ -0,0 +1,66 @@
|
|||||||
|
From b9998bbc1e1c329f6bf69c24606a2be7a4973b8c Mon Sep 17 00:00:00 2001
|
||||||
|
From: jtsiomb <jtsiomb@7f0cb862-5218-0410-a997-914c9d46530a>
|
||||||
|
Date: Fri, 21 Feb 2020 22:25:31 +0000
|
||||||
|
Subject: [PATCH] Work-around for an issue which cropped up with the release of
|
||||||
|
gcc-10. In their infinite wisdom, they decided to build with -fno-common as
|
||||||
|
default from now on, breaking every piece of C code which used to declare
|
||||||
|
common symbols in header files, as was the convention since the dawn of time.
|
||||||
|
We now have to duplicate all declarations to an arbitrary source file, and
|
||||||
|
change the header-file ones to prefix them with extern.
|
||||||
|
|
||||||
|
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1863 7f0cb862-5218-0410-a997-914c9d46530a
|
||||||
|
---
|
||||||
|
freeglut/freeglut/src/fg_gl2.c | 14 ++++++++++++++
|
||||||
|
freeglut/freeglut/src/fg_gl2.h | 14 +++++++-------
|
||||||
|
2 files changed, 21 insertions(+), 7 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/freeglut/freeglut/src/fg_gl2.c b/freeglut/freeglut/src/fg_gl2.c
|
||||||
|
index 38b0acbb..54b4285b 100644
|
||||||
|
--- a/freeglut/freeglut/src/fg_gl2.c
|
||||||
|
+++ b/freeglut/freeglut/src/fg_gl2.c
|
||||||
|
@@ -27,6 +27,20 @@
|
||||||
|
#include "fg_internal.h"
|
||||||
|
#include "fg_gl2.h"
|
||||||
|
|
||||||
|
+#ifndef GL_ES_VERSION_2_0
|
||||||
|
+/* GLES2 has the corresponding entry points built-in, and these fgh-prefixed
|
||||||
|
+ * names are defined in fg_gl2.h header to reference them, for any other case,
|
||||||
|
+ * define them as function pointers here.
|
||||||
|
+ */
|
||||||
|
+FGH_PFNGLGENBUFFERSPROC fghGenBuffers;
|
||||||
|
+FGH_PFNGLDELETEBUFFERSPROC fghDeleteBuffers;
|
||||||
|
+FGH_PFNGLBINDBUFFERPROC fghBindBuffer;
|
||||||
|
+FGH_PFNGLBUFFERDATAPROC fghBufferData;
|
||||||
|
+FGH_PFNGLENABLEVERTEXATTRIBARRAYPROC fghEnableVertexAttribArray;
|
||||||
|
+FGH_PFNGLDISABLEVERTEXATTRIBARRAYPROC fghDisableVertexAttribArray;
|
||||||
|
+FGH_PFNGLVERTEXATTRIBPOINTERPROC fghVertexAttribPointer;
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
void FGAPIENTRY glutSetVertexAttribCoord3(GLint attrib) {
|
||||||
|
if (fgStructure.CurrentWindow != NULL)
|
||||||
|
fgStructure.CurrentWindow->Window.attribute_v_coord = attrib;
|
||||||
|
diff --git a/freeglut/freeglut/src/fg_gl2.h b/freeglut/freeglut/src/fg_gl2.h
|
||||||
|
index ab8ba5c7..fb3d4676 100644
|
||||||
|
--- a/freeglut/freeglut/src/fg_gl2.h
|
||||||
|
+++ b/freeglut/freeglut/src/fg_gl2.h
|
||||||
|
@@ -67,13 +67,13 @@ typedef void (APIENTRY *FGH_PFNGLENABLEVERTEXATTRIBARRAYPROC) (GLuint index);
|
||||||
|
typedef void (APIENTRY *FGH_PFNGLDISABLEVERTEXATTRIBARRAYPROC) (GLuint);
|
||||||
|
typedef void (APIENTRY *FGH_PFNGLVERTEXATTRIBPOINTERPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer);
|
||||||
|
|
||||||
|
-FGH_PFNGLGENBUFFERSPROC fghGenBuffers;
|
||||||
|
-FGH_PFNGLDELETEBUFFERSPROC fghDeleteBuffers;
|
||||||
|
-FGH_PFNGLBINDBUFFERPROC fghBindBuffer;
|
||||||
|
-FGH_PFNGLBUFFERDATAPROC fghBufferData;
|
||||||
|
-FGH_PFNGLENABLEVERTEXATTRIBARRAYPROC fghEnableVertexAttribArray;
|
||||||
|
-FGH_PFNGLDISABLEVERTEXATTRIBARRAYPROC fghDisableVertexAttribArray;
|
||||||
|
-FGH_PFNGLVERTEXATTRIBPOINTERPROC fghVertexAttribPointer;
|
||||||
|
+extern FGH_PFNGLGENBUFFERSPROC fghGenBuffers;
|
||||||
|
+extern FGH_PFNGLDELETEBUFFERSPROC fghDeleteBuffers;
|
||||||
|
+extern FGH_PFNGLBINDBUFFERPROC fghBindBuffer;
|
||||||
|
+extern FGH_PFNGLBUFFERDATAPROC fghBufferData;
|
||||||
|
+extern FGH_PFNGLENABLEVERTEXATTRIBARRAYPROC fghEnableVertexAttribArray;
|
||||||
|
+extern FGH_PFNGLDISABLEVERTEXATTRIBARRAYPROC fghDisableVertexAttribArray;
|
||||||
|
+extern FGH_PFNGLVERTEXATTRIBPOINTERPROC fghVertexAttribPointer;
|
||||||
|
|
||||||
|
# endif
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user