Accepting request 252572 from home:sfalken:branches:games

- Added:
  * 0001-fix_opengl_driver.patch
    + Please see: 244d00280c   Allows for building against Mesa >10.0
  * 0002-fix_implicit_definitions.patch
    + Fixes implicit definition warning from rpmlint
- Added CFLAGS and CXXFLAGS to clear warnings about not using RPM_OPT_FLAGS, and gcc compatibility, using -fno-strict-aliasing going forward

OBS-URL: https://build.opensuse.org/request/show/252572
OBS-URL: https://build.opensuse.org/package/show/games/supertuxkart?expand=0&rev=56
This commit is contained in:
Matthias Mailänder 2014-09-27 18:45:18 +00:00 committed by Git OBS Bridge
parent cf60de2c00
commit ee7ddf6d38
4 changed files with 100 additions and 0 deletions

View File

@ -0,0 +1,36 @@
Index: SuperTuxKart-0.8.1/lib/irrlicht/source/Irrlicht/COpenGLExtensionHandler.h
===================================================================
--- SuperTuxKart-0.8.1.orig/lib/irrlicht/source/Irrlicht/COpenGLExtensionHandler.h
+++ SuperTuxKart-0.8.1/lib/irrlicht/source/Irrlicht/COpenGLExtensionHandler.h
@@ -21,6 +21,7 @@
#endif
#include <GL/gl.h>
#if defined(_IRR_OPENGL_USE_EXTPOINTER_)
+ typedef void (APIENTRYP PFNGLBLENDEQUATIONPROC) (GLenum mode);
#include "glext.h"
#endif
#include "wglext.h"
@@ -36,6 +37,7 @@
#endif
#include <OpenGL/gl.h>
#if defined(_IRR_OPENGL_USE_EXTPOINTER_)
+ typedef void (APIENTRYP PFNGLBLENDEQUATIONPROC) (GLenum mode);
#include "glext.h"
#endif
#elif defined(_IRR_COMPILE_WITH_SDL_DEVICE_) && !defined(_IRR_COMPILE_WITH_X11_DEVICE_)
@@ -49,6 +51,7 @@
#define NO_SDL_GLEXT
#include <SDL/SDL_video.h>
#include <SDL/SDL_opengl.h>
+ typedef void (APIENTRYP PFNGLBLENDEQUATIONPROC) (GLenum mode);
#include "glext.h"
#else
#if defined(_IRR_OPENGL_USE_EXTPOINTER_)
@@ -61,6 +64,7 @@
#include <GL/gl.h>
#include <GL/glx.h>
#if defined(_IRR_OPENGL_USE_EXTPOINTER_)
+ typedef void (APIENTRYP PFNGLBLENDEQUATIONPROC) (GLenum mode);
#include "glext.h"
#undef GLX_ARB_get_proc_address // avoid problems with local glxext.h
#include "glxext.h"

View File

@ -0,0 +1,46 @@
Index: SuperTuxKart-0.8.1/lib/irrlicht/source/Irrlicht/zlib/gzlib.c
===================================================================
--- SuperTuxKart-0.8.1.orig/lib/irrlicht/source/Irrlicht/zlib/gzlib.c
+++ SuperTuxKart-0.8.1/lib/irrlicht/source/Irrlicht/zlib/gzlib.c
@@ -4,6 +4,10 @@
*/
#include "gzguts.h"
+#include <string.h>
+#include <stdio.h>
+#include <unistd.h>
+#include <sys/socket.h>
#if defined(_WIN32) && !defined(__BORLANDC__)
# define LSEEK _lseeki64
Index: SuperTuxKart-0.8.1/lib/irrlicht/source/Irrlicht/zlib/gzread.c
===================================================================
--- SuperTuxKart-0.8.1.orig/lib/irrlicht/source/Irrlicht/zlib/gzread.c
+++ SuperTuxKart-0.8.1/lib/irrlicht/source/Irrlicht/zlib/gzread.c
@@ -4,6 +4,10 @@
*/
#include "gzguts.h"
+#include <string.h>
+#include <stdio.h>
+#include <unistd.h>
+#include <sys/socket.h>
/* Local functions */
local int gz_load OF((gz_statep, unsigned char *, unsigned, unsigned *));
Index: SuperTuxKart-0.8.1/lib/irrlicht/source/Irrlicht/zlib/gzwrite.c
===================================================================
--- SuperTuxKart-0.8.1.orig/lib/irrlicht/source/Irrlicht/zlib/gzwrite.c
+++ SuperTuxKart-0.8.1/lib/irrlicht/source/Irrlicht/zlib/gzwrite.c
@@ -5,6 +5,11 @@
#include "gzguts.h"
+#include <string.h>
+#include <stdio.h>
+#include <unistd.h>
+#include <sys/socket.h>
+
/* Local functions */
local int gz_init OF((gz_statep));
local int gz_comp OF((gz_statep, int));

View File

@ -1,3 +1,13 @@
-------------------------------------------------------------------
Sat Sep 27 00:58:07 UTC 2014 - sfalken@opensuse.org
- Added:
* 0001-fix_opengl_driver.patch
+ Please see: https://github.com/supertuxkart/stk-code/commit/244d00280c1b082ca164f92337773e9e4e1a3898 Allows for building against Mesa >10.0
* 0002-fix_implicit_definitions.patch
+ Fixes implicit definition warning from rpmlint
- Added CFLAGS and CXXFLAGS to clear warnings about not using RPM_OPT_FLAGS, and gcc compatibility, using -fno-strict-aliasing going forward
-------------------------------------------------------------------
Sat Mar 8 11:37:10 UTC 2014 - dimstar@opensuse.org

View File

@ -28,6 +28,10 @@ Source: http://sourceforge.net/projects/supertuxkart/files/SuperTuxKart/
Source1: http://stkaddons.net/dl/14e6ba25b17f0d.zip
# appdata file, to show in gnome-software
Source2: supertuxkart.appdata.xml
# PATCH-FIX-UPSTREAM 0001-fix_opengl_driver.patch sfalken@opensuse.org -- Patch to fix building against Mesa >10.0
Patch0: 0001-fix_opengl_driver.patch
# PATCH-FIX-OPENSUSE 0002-fix_implicit_definitions.patch sfalken@opensuse.org -- Patch fixes implicit definitions warning from rpmlint
Patch1: 0002-fix_implicit_definitions.patch
BuildRequires: bluez-devel
BuildRequires: cmake
BuildRequires: curl-devel
@ -70,12 +74,16 @@ Data files for SuperTuxKart a Free 3d kart racing game.
%prep
%setup -q -n SuperTuxKart-%{version}
%patch0 -p1
%patch1 -p1
# If we're building against Mesa 10.0 (gl), then we want to use system glext.h and glxext.h
if pkg-config --atleast-version 10.0 gl; then
cp /usr/include/GL/{glext,glxext}.h lib/irrlicht/source/Irrlicht/
fi
%build
export CFLAGS="%{optflags} -fno-strict-aliasing"
export CXXFLAGS="$CFLAGS"
# We need an internal version of Irrlicht...
pushd lib/irrlicht/source/Irrlicht
NDEBUG=1 make %{?_smp_mflags}