commit:     a8dce7e04326898caa8ed79e49516c1b9ebaac9c
Author:     Marek Szuba <marecki <AT> gentoo <DOT> org>
AuthorDate: Tue Oct 13 16:34:36 2020 +0000
Commit:     Marek Szuba <marecki <AT> gentoo <DOT> org>
CommitDate: Tue Oct 13 16:47:57 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a8dce7e0

games-engines/love: fix compilation error in 0.7 and 0.8

Closes: https://bugs.gentoo.org/672558
Signed-off-by: Marek Szuba <marecki <AT> gentoo.org>

 .../files/love-0.7.2-opengl_glext_prototypes.patch | 19 ++++++++
 .../files/love-0.8.0-opengl_glext_prototypes.patch | 54 ++++++++++++++++++++++
 games-engines/love/love-0.7.2-r2.ebuild            |  7 ++-
 games-engines/love/love-0.8.0-r2.ebuild            |  7 ++-
 4 files changed, 83 insertions(+), 4 deletions(-)

diff --git a/games-engines/love/files/love-0.7.2-opengl_glext_prototypes.patch 
b/games-engines/love/files/love-0.7.2-opengl_glext_prototypes.patch
new file mode 100644
index 00000000000..887f61ddd56
--- /dev/null
+++ b/games-engines/love/files/love-0.7.2-opengl_glext_prototypes.patch
@@ -0,0 +1,19 @@
+diff -ur love-HEAD.orig/src/modules/graphics/opengl/Framebuffer.cpp 
love-HEAD/src/modules/graphics/opengl/Framebuffer.cpp
+--- love-HEAD.orig/src/modules/graphics/opengl/Framebuffer.cpp 2019-06-03 
01:15:56.600016765 +0200
++++ love-HEAD/src/modules/graphics/opengl/Framebuffer.cpp      2019-06-03 
01:16:16.737916762 +0200
+@@ -1,3 +1,4 @@
++#define GL_GLEXT_PROTOTYPES
+ #include "Framebuffer.h"
+ #include <common/Matrix.h>
+ 
+diff -ur love-HEAD.orig/src/modules/graphics/opengl/SpriteBatch.cpp 
love-HEAD/src/modules/graphics/opengl/SpriteBatch.cpp
+--- love-HEAD.orig/src/modules/graphics/opengl/SpriteBatch.cpp 2019-06-03 
01:15:56.601016760 +0200
++++ love-HEAD/src/modules/graphics/opengl/SpriteBatch.cpp      2019-06-03 
01:16:31.007845896 +0200
+@@ -18,6 +18,7 @@
+ * 3. This notice may not be removed or altered from any source distribution.
+ **/
+ 
++#define GL_GLEXT_PROTOTYPES
+ #include "SpriteBatch.h"
+ 
+ // STD

diff --git a/games-engines/love/files/love-0.8.0-opengl_glext_prototypes.patch 
b/games-engines/love/files/love-0.8.0-opengl_glext_prototypes.patch
new file mode 100644
index 00000000000..300bc338343
--- /dev/null
+++ b/games-engines/love/files/love-0.8.0-opengl_glext_prototypes.patch
@@ -0,0 +1,54 @@
+diff -ur love-HEAD.orig/src/modules/graphics/opengl/SpriteBatch.cpp 
love-HEAD/src/modules/graphics/opengl/SpriteBatch.cpp
+--- love-HEAD.orig/src/modules/graphics/opengl/SpriteBatch.cpp
++++ love-HEAD/src/modules/graphics/opengl/SpriteBatch.cpp
+@@ -18,6 +18,7 @@
+ * 3. This notice may not be removed or altered from any source distribution.
+ **/
+ 
++#define GL_GLEXT_PROTOTYPES
+ #include "SpriteBatch.h"
+ 
+ // STD
+--- a/src/modules/graphics/opengl/VertexBuffer.cpp
++++ b/src/modules/graphics/opengl/VertexBuffer.cpp
+@@ -18,6 +18,9 @@
+ * 3. This notice may not be removed or altered from any source distribution.
+ **/
+ 
++#define GL_GLEXT_PROTOTYPES
++#include "SpriteBatch.h"
++
+ #include "VertexBuffer.h"
+ 
+ #include "common/Exception.h"
+--- a/src/modules/graphics/opengl/Graphics.cpp
++++ b/src/modules/graphics/opengl/Graphics.cpp
+@@ -18,6 +18,7 @@
+ * 3. This notice may not be removed or altered from any source distribution.
+ **/
+ 
++#define GL_GLEXT_PROTOTYPES
+ #include <common/config.h>
+ #include <common/math.h>
+ #include <common/Vector.h>
+--- a/src/modules/graphics/opengl/PixelEffect.cpp
++++ b/src/modules/graphics/opengl/PixelEffect.cpp
+@@ -18,6 +18,7 @@
+ * 3. This notice may not be removed or altered from any source distribution.
+ **/
+ 
++#define GL_GLEXT_PROTOTYPES
+ #include "PixelEffect.h"
+ #include "GLee.h"
+ 
+
+--- a/src/modules/graphics/opengl/Canvas.cpp
++++ b/src/modules/graphics/opengl/Canvas.cpp
+@@ -18,6 +18,7 @@
+ * 3. This notice may not be removed or altered from any source distribution.
+ **/
+
++#define GL_GLEXT_PROTOTYPES
+ #include "Canvas.h"
+ #include "Graphics.h"
+ #include <common/Matrix.h>

diff --git a/games-engines/love/love-0.7.2-r2.ebuild 
b/games-engines/love/love-0.7.2-r2.ebuild
index e29f78d0863..5cc2816ee04 100644
--- a/games-engines/love/love-0.7.2-r2.ebuild
+++ b/games-engines/love/love-0.7.2-r2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=6
@@ -31,7 +31,10 @@ DEPEND="${RDEPEND}
 
 S="${WORKDIR}/${PN}-HEAD"
 
-PATCHES=( "${FILESDIR}"/${PN}-0.8.0-freetype2.patch )
+PATCHES=(
+       "${FILESDIR}"/${PN}-0.7.2-opengl_glext_prototypes.patch
+       "${FILESDIR}"/${PN}-0.8.0-freetype2.patch
+)
 
 src_install() {
        DOCS="readme.txt changes.txt" \

diff --git a/games-engines/love/love-0.8.0-r2.ebuild 
b/games-engines/love/love-0.8.0-r2.ebuild
index 6349e6228b7..9d807e1333d 100644
--- a/games-engines/love/love-0.8.0-r2.ebuild
+++ b/games-engines/love/love-0.8.0-r2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=6
@@ -29,7 +29,10 @@ DEPEND="${RDEPEND}
        media-libs/tiff:0
 "
 
-PATCHES=( "${FILESDIR}"/${P}-freetype2.patch )
+PATCHES=(
+       "${FILESDIR}"/${PN}-0.8.0-freetype2.patch
+       "${FILESDIR}"/${PN}-0.8.0-opengl_glext_prototypes.patch
+)
 
 src_install() {
        DOCS="readme.md changes.txt" \

Reply via email to