aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Marakasov <amdmi3@FreeBSD.org>2011-09-27 04:36:10 +0000
committerDmitry Marakasov <amdmi3@FreeBSD.org>2011-09-27 04:36:10 +0000
commit3a872aa0bd8a29ada492cda0d059f2eebe2528cc (patch)
tree264738d3dafd36cc1525a7a316b12542cac16c6e
parent040e580ada4f08c6931a3406076595d3788b7df7 (diff)
downloadports-3a872aa0bd8a29ada492cda0d059f2eebe2528cc.tar.gz
ports-3a872aa0bd8a29ada492cda0d059f2eebe2528cc.zip
Notes
-rw-r--r--games/motogt/Makefile1
-rw-r--r--games/motogt/files/patch-src-Circuito.cpp11
-rw-r--r--games/motogt/files/patch-src-MakeData.cpp24
3 files changed, 36 insertions, 0 deletions
diff --git a/games/motogt/Makefile b/games/motogt/Makefile
index 42dc1f841fa8..480c599847c9 100644
--- a/games/motogt/Makefile
+++ b/games/motogt/Makefile
@@ -7,6 +7,7 @@
PORTNAME= motogt
PORTVERSION= 20110505
+PORTREVISION= 1
CATEGORIES= games
MASTER_SITES= SF/motogt/
DISTNAME= MotoGT-${PORTVERSION}
diff --git a/games/motogt/files/patch-src-Circuito.cpp b/games/motogt/files/patch-src-Circuito.cpp
new file mode 100644
index 000000000000..fb5ae7a7398f
--- /dev/null
+++ b/games/motogt/files/patch-src-Circuito.cpp
@@ -0,0 +1,11 @@
+--- src/Circuito.cpp.orig 2011-01-12 20:20:23.000000000 +0300
++++ src/Circuito.cpp 2011-09-26 23:13:03.000000000 +0400
+@@ -171,7 +171,7 @@
+ if (!osd) {image=NULL; sprite=NULL; return; }
+ image = new Image*[image_c];
+ sprite = new Sprite*[image_c];
+- string image_dir=data->tracks[track_index].dir+"t00.png";
++ string image_dir=home_dir + data->tracks[track_index].dir + "t00.png";
+ for (int i=0;i<image_c;i++) {
+ image[i]=new Image[image_r];
+ sprite[i]=new Sprite[image_r];
diff --git a/games/motogt/files/patch-src-MakeData.cpp b/games/motogt/files/patch-src-MakeData.cpp
new file mode 100644
index 000000000000..d9ef4fa1299d
--- /dev/null
+++ b/games/motogt/files/patch-src-MakeData.cpp
@@ -0,0 +1,24 @@
+--- src/MakeData.cpp.orig 2011-01-10 20:40:30.000000000 +0300
++++ src/MakeData.cpp 2011-09-26 23:15:04.000000000 +0400
+@@ -5,6 +5,7 @@
+ #define PNG_DEBUG 3
+ #include <png.h>
+ #include <fstream>
++#include <sys/stat.h>
+ #include "global.h"
+ #include "Config.h"
+ #include "Confirm.h"
+@@ -376,7 +377,12 @@
+ }
+ fname[2]='0'+i;
+ fname[1]='0'+j;
+- if (!f2->Save((dir+fname).c_str()))
++ size_t pos = 0;
++ do {
++ pos = dir.find('/', pos+1);
++ mkdir((home_dir+dir.substr(0, pos)).c_str(), 0755);
++ } while (pos != string::npos);
++ if (!f2->Save((home_dir+dir+fname).c_str()))
+ return false;
+ f2->width=ancho2; f2->height=ancho2;
+ }