diff options
author | Bill Kirkpatrick <bkirkp@gmail.com> | 2012-09-10 12:01:35 +0200 |
---|---|---|
committer | Robby Workman <rworkman@slackbuilds.org> | 2012-09-10 16:35:37 -0500 |
commit | ae0f6203538eedae12f1d0d5fcf67796d32e6487 (patch) | |
tree | 67c876dc90173cc1aa645477fee4db336431a279 | |
parent | a0be866b32deecae829dd65067e02fad25e68f13 (diff) | |
download | slackbuilds-ae0f6203538eedae12f1d0d5fcf67796d32e6487.tar.gz |
games/xye: Added a patch for gcc.
Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
-rw-r--r-- | games/xye/gcc-4.7.patch | 35 | ||||
-rw-r--r-- | games/xye/xye.SlackBuild | 5 |
2 files changed, 39 insertions, 1 deletions
diff --git a/games/xye/gcc-4.7.patch b/games/xye/gcc-4.7.patch new file mode 100644 index 0000000000..d976601cff --- /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<ground>\n"; + resetSavedPosition(); +- for (i=0;i<XYE_HORZ;i++) for (j=0;j<XYE_VERT;j++) saveGroundObject(file,editor::board->objects[i][j],i,XYE_VERT-j-1); ++ for (j=0;j<XYE_HORZ;j++) for (k=0;k<XYE_VERT;k++) saveGroundObject(file,editor::board->objects[j][k],j,XYE_VERT-k-1); + file << "\t</ground>\n"; + file << "\t<objects>\n"; + resetSavedPosition(); +- for (i=0;i<XYE_HORZ;i++) for (j=0;j<XYE_VERT;j++) ++ for (j=0;j<XYE_HORZ;j++) for (k=0;k<XYE_VERT;k++) + { +- saveNormalObject(file,editor::board->objects[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<cstdio>
+ #include<iostream>
+ #include<fstream>
++#include <unistd.h>
+
+ const float F_RAND_MAX = (float)(RAND_MAX);
+
diff --git a/games/xye/xye.SlackBuild b/games/xye/xye.SlackBuild index cb6928f92c..95f57f9ae8 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" \ |