r15536 - in packages/trunk/warzone2100/debian: . patches

Paul Wise pabs at moszumanska.debian.org
Thu Oct 1 10:14:06 UTC 2015


Author: pabs
Date: 2015-10-01 10:14:06 +0000 (Thu, 01 Oct 2015)
New Revision: 15536

Added:
   packages/trunk/warzone2100/debian/patches/fix-GLEW-FTBFS.patch
Modified:
   packages/trunk/warzone2100/debian/changelog
   packages/trunk/warzone2100/debian/patches/series
Log:
Fix FTBFS with GLEW 1.12 using upstream patch (Closes: #790857)

Modified: packages/trunk/warzone2100/debian/changelog
===================================================================
--- packages/trunk/warzone2100/debian/changelog	2015-09-20 08:51:08 UTC (rev 15535)
+++ packages/trunk/warzone2100/debian/changelog	2015-10-01 10:14:06 UTC (rev 15536)
@@ -1,3 +1,9 @@
+warzone2100 (3.1.1-2) UNRELEASED; urgency=medium
+
+  * Fix FTBFS with GLEW 1.12 using upstream patch (Closes: #790857)
+
+ -- Paul Wise <pabs at debian.org>  Thu, 01 Oct 2015 11:25:28 +0200
+
 warzone2100 (3.1.1-1) unstable; urgency=low
 
   [ Paul Wise ]

Added: packages/trunk/warzone2100/debian/patches/fix-GLEW-FTBFS.patch
===================================================================
--- packages/trunk/warzone2100/debian/patches/fix-GLEW-FTBFS.patch	                        (rev 0)
+++ packages/trunk/warzone2100/debian/patches/fix-GLEW-FTBFS.patch	2015-10-01 10:14:06 UTC (rev 15536)
@@ -0,0 +1,115 @@
+Origin: https://github.com/Warzone2100/warzone2100/commit/d512d1dc9857e3c2bbfa0a7b5856bdf420412b8f.patch
+Bug: http://developer.wz2100.net/ticket/4300
+Bug-Debian: https://bugs.debian.org/790857
+From d512d1dc9857e3c2bbfa0a7b5856bdf420412b8f Mon Sep 17 00:00:00 2001
+From: Per Inge Mathisen <per.mathisen at gmail.com>
+Date: Wed, 1 Jul 2015 20:30:01 +0200
+Subject: [PATCH] 3.1: Remove hack to support some pre-OpenGL-2.0 systems that
+ made assumptions about internals in GLEW that breaks with GLEW 1.12.
+
+See ticket:4300 reported by pabs
+---
+ lib/ivis_opengl/screen.cpp | 61 ----------------------------------------------
+ lib/ivis_opengl/screen.h   |  1 -
+ src/init.cpp               |  3 ---
+ 3 files changed, 65 deletions(-)
+
+--- a/lib/ivis_opengl/screen.cpp
++++ b/lib/ivis_opengl/screen.cpp
+@@ -175,7 +175,6 @@
+ 
+ 	if (canRunShaders)
+ 	{
+-		screen_EnableMissingFunctions();  // We need to do this before pie_LoadShaders(), but the effect of this call will be undone later by iV_TextInit(), so we will need to call it again.
+ 		if (pie_LoadShaders())
+ 		{
+ 			pie_SetShaderAvailability(true);
+@@ -218,66 +217,6 @@
+ 	return GLEW_VERSION_1_5 || GLEW_ARB_vertex_buffer_object;
+ }
+ 
+-// Make OpenGL's VBO functions available under the core names for drivers that support OpenGL 1.4 only but have the VBO extension
+-void screen_EnableMissingFunctions()
+-{
+-	if (!GLEW_VERSION_1_3 && GLEW_ARB_multitexture)
+-	{
+-		debug(LOG_WARNING, "Pre-OpenGL 1.3: Fixing ARB_multitexture extension function names.");
+-
+-		__glewActiveTexture = __glewActiveTextureARB;
+-		__glewMultiTexCoord2fv = __glewMultiTexCoord2fvARB;
+-	}
+-
+-	if (!GLEW_VERSION_1_5 && GLEW_ARB_vertex_buffer_object)
+-	{
+-		debug(LOG_WARNING, "Pre-OpenGL 1.5: Fixing ARB_vertex_buffer_object extension function names.");
+-
+-		__glewBindBuffer = __glewBindBufferARB;
+-		__glewBufferData = __glewBufferDataARB;
+-		__glewBufferSubData = __glewBufferSubDataARB;
+-		__glewDeleteBuffers = __glewDeleteBuffersARB;
+-		__glewGenBuffers = __glewGenBuffersARB;
+-		__glewGetBufferParameteriv = __glewGetBufferParameterivARB;
+-		__glewGetBufferPointerv = __glewGetBufferPointervARB;
+-		__glewGetBufferSubData = __glewGetBufferSubDataARB;
+-		__glewIsBuffer = __glewIsBufferARB;
+-		__glewMapBuffer = __glewMapBufferARB;
+-		__glewUnmapBuffer = __glewUnmapBufferARB;
+-	}
+-
+-	if (!GLEW_VERSION_2_0 && GLEW_ARB_shader_objects)
+-	{
+-		debug(LOG_WARNING, "Pre-OpenGL 2.0: Fixing ARB_shader_objects extension function names.");
+-
+-		__glewGetUniformLocation = __glewGetUniformLocationARB;
+-		__glewAttachShader = __glewAttachObjectARB;
+-		__glewCompileShader = __glewCompileShaderARB;
+-		__glewCreateProgram = __glewCreateProgramObjectARB;
+-		__glewCreateShader = __glewCreateShaderObjectARB;
+-		__glewGetProgramInfoLog = __glewGetInfoLogARB;
+-		__glewGetShaderInfoLog = __glewGetInfoLogARB;  // Same as previous.
+-		__glewGetProgramiv = __glewGetObjectParameterivARB;
+-		__glewUseProgram = __glewUseProgramObjectARB;
+-		__glewGetShaderiv = __glewGetObjectParameterivARB;
+-		__glewLinkProgram = __glewLinkProgramARB;
+-		__glewShaderSource = __glewShaderSourceARB;
+-		__glewUniform1f = __glewUniform1fARB;
+-		__glewUniform1i = __glewUniform1iARB;
+-		__glewUniform4fv = __glewUniform4fvARB;
+-	}
+-
+-	if ((GLEW_ARB_imaging || GLEW_EXT_blend_color) && __glewBlendColor == NULL)
+-	{
+-		__glewBlendColor = __glewBlendColorEXT;  // Shouldn't be needed if GLEW_ARB_imaging is true, but apparently is needed even in that case, with some drivers..?
+-		if (__glewBlendColor == NULL)
+-		{
+-			debug(LOG_ERROR, "Your graphics driver is broken, and claims to support ARB_imaging or EXT_blend_color without exporting glBlendColor[EXT].");
+-			__GLEW_ARB_imaging = __GLEW_EXT_blend_color = 0;
+-		}
+-	}
+-}
+-
+ void screen_SetBackDropFromFile(const char* filename)
+ {
+ 	// HACK : We should use a resource handler here!
+--- a/lib/ivis_opengl/screen.h
++++ b/lib/ivis_opengl/screen.h
+@@ -63,7 +63,6 @@
+ void screen_enableMapPreview(char *name, int width, int height, Vector2i *playerpositions);
+ void screen_disableMapPreview(void);
+ bool screen_getMapPreview(void);
+-void screen_EnableMissingFunctions();
+ 
+ bool screen_IsVBOAvailable();
+ struct OPENGL_DATA
+--- a/src/init.cpp
++++ b/src/init.cpp
+@@ -690,9 +690,6 @@
+ 	// Initialize the iVis text rendering module
+ 	iV_TextInit();
+ 
+-	// Fix badly named OpenGL functions. Must be done after iV_TextInit, to avoid the renames being clobbered by an extra glewInit() call.
+-	screen_EnableMissingFunctions();
+-
+ 	iV_Reset();								// Reset the IV library.
+ 
+ 	return true;

Modified: packages/trunk/warzone2100/debian/patches/series
===================================================================
--- packages/trunk/warzone2100/debian/patches/series	2015-09-20 08:51:08 UTC (rev 15535)
+++ packages/trunk/warzone2100/debian/patches/series	2015-10-01 10:14:06 UTC (rev 15536)
@@ -2,3 +2,4 @@
 revert-372eff6693e633e8d0d1d0b8a9ceb996a5c3f49f.patch
 revert-e397b24d4724d835d6cdc39a92800e64c0551dab.patch
 fix-yacc.diff
+fix-GLEW-FTBFS.patch




More information about the Pkg-games-commits mailing list