diff options
Diffstat (limited to 'games-board/pouetchess/files')
6 files changed, 137 insertions, 0 deletions
diff --git a/games-board/pouetchess/files/pouetchess-0.2.0-fix-sdl-version-list.patch b/games-board/pouetchess/files/pouetchess-0.2.0-fix-sdl-version-list.patch new file mode 100644 index 000000000000..06b9aff2c2d8 --- /dev/null +++ b/games-board/pouetchess/files/pouetchess-0.2.0-fix-sdl-version-list.patch @@ -0,0 +1,11 @@ +--- a/pouetChess.py ++++ b/pouetChess.py +@@ -228,7 +228,7 @@ + sdlver = sdlobj.read() + sdlerr = sdlobj.close() + print sdlver, +- if sdlver.split('.') >= ['1','2','8']: ++ if sdlver.split('.') >= [1,2,8]: + env.ParseConfig(sdlcfg+" --cflags --libs") + else: + print "You need LibSDL version 1.2.8 or greater for this program" diff --git a/games-board/pouetchess/files/pouetchess-0.2.0-gcc43.patch b/games-board/pouetchess/files/pouetchess-0.2.0-gcc43.patch new file mode 100644 index 000000000000..ef2ba1575825 --- /dev/null +++ b/games-board/pouetchess/files/pouetchess-0.2.0-gcc43.patch @@ -0,0 +1,12 @@ +--- a/src/sxmlgui/XMLUtils.h.orig 2008-06-14 14:50:16.000000000 +0000 ++++ b/src/sxmlgui/XMLUtils.h 2008-06-14 14:50:33.000000000 +0000 +@@ -38,6 +38,8 @@ + #include <stdio.h>
+ #include <assert.h>
+ #include <fstream>
++#include <cstring>
++
+
+ // Help out windows:
+ #if defined( _DEBUG ) && !defined( DEBUG )
+ diff --git a/games-board/pouetchess/files/pouetchess-0.2.0-gcc6-cmath.patch b/games-board/pouetchess/files/pouetchess-0.2.0-gcc6-cmath.patch new file mode 100644 index 000000000000..4853eee81e1d --- /dev/null +++ b/games-board/pouetchess/files/pouetchess-0.2.0-gcc6-cmath.patch @@ -0,0 +1,16 @@ +--- pouetchess_src_0.2.0/src/sxmlgui/MathUtils.h.old 2006-05-26 21:22:57.000000000 -0400 ++++ pouetchess_src_0.2.0/src/sxmlgui/MathUtils.h 2017-03-21 18:01:15.569181229 -0400 +@@ -27,10 +27,13 @@ + return (x < min) ? min : (x > max) ? max : x;
+ }
+
++// Not used anywhere and conflicts with C++11 std::round(float)
++#if __cplusplus < 201103L
+ inline int round(float f)
+ {
+ return int(f + 0.5f);
+ }
++#endif
+
+ inline float getNextRandom(){
+ return (float)rand()/(RAND_MAX + 1);
diff --git a/games-board/pouetchess/files/pouetchess-0.2.0-nvidia_glext.patch b/games-board/pouetchess/files/pouetchess-0.2.0-nvidia_glext.patch new file mode 100644 index 000000000000..b7077feb6a38 --- /dev/null +++ b/games-board/pouetchess/files/pouetchess-0.2.0-nvidia_glext.patch @@ -0,0 +1,12 @@ +--- a/src/sxmlgui/GenUtils.h 2006-05-27 03:22:57.000000000 +0200 ++++ b/src/sxmlgui/GenUtils.h.new 2006-06-12 20:35:32.000000000 +0200 +@@ -5,6 +5,9 @@ + #include <iostream>
+ #include <fstream>
+ #include <vector>
++#ifndef GL_GLEXT_PROTOTYPES
++#define GL_GLEXT_PROTOTYPES 1
++#endif
+ #include <SDL/SDL_opengl.h>
+
+ #define deleteObject(A){ if(A){ delete A; A = NULL; } }
diff --git a/games-board/pouetchess/files/pouetchess-0.2.0-sconstruct-sandbox.patch b/games-board/pouetchess/files/pouetchess-0.2.0-sconstruct-sandbox.patch new file mode 100644 index 000000000000..8378a1d7223d --- /dev/null +++ b/games-board/pouetchess/files/pouetchess-0.2.0-sconstruct-sandbox.patch @@ -0,0 +1,29 @@ +--- a/SConstruct ++++ b/SConstruct +@@ -22,14 +22,24 @@ + + + +-import os,glob ++import os,glob,SCons.Util + + ++# https://dev.gentoo.org/~vapier/scons-blows.txt + + # create build environment + ++env = Environment() ++env.SConsignFile() + env = Environment(tools = ['default', 'pouetChess'], toolpath = ['.']) +-env.AppendUnique(CXXFLAGS = ['-Wall']) ++env['CC'] = os.environ['CC'] ++env['CXX'] = os.environ['CXX'] ++if os.environ.has_key('CFLAGS'): ++ env['CCFLAGS'] = SCons.Util.CLVar(os.environ['CFLAGS']) ++if os.environ.has_key('CXXFLAGS'): ++ env['CXXFLAGS'] = SCons.Util.CLVar(os.environ['CXXFLAGS']) ++if os.environ.has_key('LDFLAGS'): ++ env['LINKFLAGS'] = SCons.Util.CLVar(os.environ['LDFLAGS']) + + # gather a list of source files + SOURCES = glob.glob('src/*.cpp') diff --git a/games-board/pouetchess/files/pouetchess-0.2.0-segfaults.patch b/games-board/pouetchess/files/pouetchess-0.2.0-segfaults.patch new file mode 100644 index 000000000000..346ee1248ab3 --- /dev/null +++ b/games-board/pouetchess/files/pouetchess-0.2.0-segfaults.patch @@ -0,0 +1,57 @@ +--- a/src/faile/search.c ++++ b/src/faile/search.c +@@ -805,6 +805,7 @@ + for (j = 0; j < indent; j++) { + fputc (' ', output); + } ++ void print_move (move_s moves[], int m, FILE *stream); + print_move (&moves[0], i, output); + fprintf (output, "\n"); + +--- a/src/faile/utils.c ++++ b/src/faile/utils.c +@@ -125,7 +125,7 @@ + rank (target) < 1 || rank (target) > 8 || + file (target) < 1 || file (target) > 8) + { +- sprintf (str, "*** FAILE INTERNAL ERROR ***"); ++ sprintf (str, "xxxx"); + return; + } + +--- a/src/main.cpp ++++ b/src/main.cpp +@@ -184,6 +184,9 @@ + // first scene is SCENE_INIT. + pGlobalInfos->SetCurrentScene(GAME_SCENE_INIT); + ++ /* @FB 02/08/06 */ ++ pGlobalInfos->ReleaseKeys(); ++ + // main game loop + while( pGlobalInfos->IsGameRunning() ) + { +--- a/src/scene_main_game.cpp ++++ b/src/scene_main_game.cpp +@@ -245,7 +245,7 @@ + + if (pGlobalInfos->OnLeftMouseButtonDown()) + { +- if (chessboard->clickOnChessBoard(mouseX,mouseY,&sqX,&sqY)); ++ if (chessboard->clickOnChessBoard(mouseX,mouseY,&sqX,&sqY)) + { + // if a piece was already selected, this means the player want to move this piece + if (SquareXSelected>-1 && SquareZSelected>-1) +--- a/src/graphic_chessboard.cpp ++++ b/src/graphic_chessboard.cpp +@@ -122,8 +122,8 @@ + + for(int i=0;i<6;i++) + { +- char texture_filename[50]; +- sprintf(texture_filename,PC_DATA_TEXTURE_SKYBOX,i), ++ char texture_filename[256]; ++ snprintf(texture_filename,sizeof(texture_filename),PC_DATA_TEXTURE_SKYBOX,i), + texture_skybox[i] = new CBasicTexture; + if (false==texture_skybox[i]->load(texture_filename,false)) + { |