From ae0f6203538eedae12f1d0d5fcf67796d32e6487 Mon Sep 17 00:00:00 2001 From: Bill Kirkpatrick Date: Mon, 10 Sep 2012 12:01:35 +0200 Subject: games/xye: Added a patch for gcc. Signed-off-by: Matteo Bernardini --- games/xye/gcc-4.7.patch | 35 +++++++++++++++++++++++++++++++++++ games/xye/xye.SlackBuild | 5 ++++- 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 games/xye/gcc-4.7.patch (limited to 'games/xye') diff --git a/games/xye/gcc-4.7.patch b/games/xye/gcc-4.7.patch new file mode 100644 index 0000000000000..d976601cff49a --- /dev/null +++ b/games/xye/gcc-4.7.patch @@ -0,0 +1,35 @@ +diff -Naur xye-0.12.0.orig/src/editorsave.cpp xye-0.12.0/src/editorsave.cpp +--- xye-0.12.0.orig/src/editorsave.cpp 2011-10-29 21:57:28.000000000 +0000 ++++ xye-0.12.0/src/editorsave.cpp 2012-08-05 10:34:00.131028629 +0000 +@@ -662,16 +662,16 @@ + } + saveColorStuff(file, board); + +- int i,j; ++ int j,k; + file << "\t\n"; + resetSavedPosition(); +- for (i=0;iobjects[i][j],i,XYE_VERT-j-1); ++ for (j=0;jobjects[j][k],j,XYE_VERT-k-1); + file << "\t\n"; + file << "\t\n"; + resetSavedPosition(); +- for (i=0;iobjects[i][j],i,XYE_VERT-j-1); ++ saveNormalObject(file,editor::board->objects[j][k],j,XYE_VERT-k-1); + } + savePortals( file, editor::board); + +diff -Naur xye-0.12.0.orig/src/gen.cpp xye-0.12.0/src/gen.cpp +--- xye-0.12.0.orig/src/gen.cpp 2011-10-07 19:00:29.000000000 +0000 ++++ xye-0.12.0/src/gen.cpp 2012-08-05 10:20:47.652013747 +0000 +@@ -21,6 +21,7 @@ + #include + #include + #include ++#include + + const float F_RAND_MAX = (float)(RAND_MAX); + diff --git a/games/xye/xye.SlackBuild b/games/xye/xye.SlackBuild index cb6928f92c0c2..95f57f9ae8ca6 100644 --- a/games/xye/xye.SlackBuild +++ b/games/xye/xye.SlackBuild @@ -8,7 +8,7 @@ PRGNAM=xye VERSION=${VERSION:-0.12.0} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} if [ -z "$ARCH" ]; then @@ -52,6 +52,9 @@ find . \ -exec chmod 755 {} \; -o \ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ -exec chmod 644 {} \; + +# add gcc-4.7 patch +patch -p1 -i $CWD/gcc-4.7.patch CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ -- cgit v1.2.3