aboutsummaryrefslogtreecommitdiff
path: root/games/solarconquest/files
diff options
context:
space:
mode:
authorEmanuel Haupt <ehaupt@FreeBSD.org>2006-05-31 13:30:16 +0000
committerEmanuel Haupt <ehaupt@FreeBSD.org>2006-05-31 13:30:16 +0000
commit9715677bb7f0fbb8342ec5d19fb4b4deb670aae7 (patch)
tree2a434a570c1d171a81d4f598c79d3a2572b8cd78 /games/solarconquest/files
parent16ef18761fcebeb5b9aa52482c8ef5d603aaab53 (diff)
downloadports-9715677bb7f0fbb8342ec5d19fb4b4deb670aae7.tar.gz
ports-9715677bb7f0fbb8342ec5d19fb4b4deb670aae7.zip
Notes
Diffstat (limited to 'games/solarconquest/files')
-rw-r--r--games/solarconquest/files/patch-makefile11
-rw-r--r--games/solarconquest/files/patch-source-MenuScreen.h38
-rw-r--r--games/solarconquest/files/patch-source-main.cpp19
3 files changed, 68 insertions, 0 deletions
diff --git a/games/solarconquest/files/patch-makefile b/games/solarconquest/files/patch-makefile
new file mode 100644
index 000000000000..349e95e25db3
--- /dev/null
+++ b/games/solarconquest/files/patch-makefile
@@ -0,0 +1,11 @@
+--- makefile.orig Sun Mar 6 16:36:47 2005
++++ makefile Thu Apr 6 02:54:20 2006
+@@ -1,5 +1,5 @@
+-LIBRARIES = `sdl-config --libs` -L/usr/X11R6/lib -lSDL_mixer -lSDL_image -lGL -lGLU -lpng -ljpeg
+-CFLAGS = -w -O3 -I/usr/include/GL `sdl-config --cflags`
++LIBRARIES = `${SDL_CONFIG} --libs` -L${X11BASE}/lib -lSDL_mixer -lSDL_image -lGL -lGLU -lpng -ljpeg
++CXXFLAGS += `${SDL_CONFIG} --cflags` -I${X11BASE}/include
+
+ all:
+- g++ $(CFLAGS) -o solar ./source/main.cpp $(LIBRARIES)
++ ${CXX} ${CXXFLAGS} -o solar ./source/main.cpp ${LIBRARIES}
diff --git a/games/solarconquest/files/patch-source-MenuScreen.h b/games/solarconquest/files/patch-source-MenuScreen.h
new file mode 100644
index 000000000000..503a8b9e9e31
--- /dev/null
+++ b/games/solarconquest/files/patch-source-MenuScreen.h
@@ -0,0 +1,38 @@
+--- source/MenuScreen.h.orig Thu Apr 6 03:11:27 2006
++++ source/MenuScreen.h Thu Apr 6 03:11:27 2006
+@@ -646,10 +646,7 @@
+ if (text)
+ {
+ char txt[MAX_STRING_SIZE];
+- char num[MAX_STRING_SIZE];
+- gcvt(g_gameSpeed,2,num);
+- strcpy(txt,"Speed: ");
+- strncat(txt,num,3);
++ sprintf(txt, "Speed: %.2f", g_gameSpeed);
+ text->SetText(txt);
+ }
+ }
+@@ -751,10 +748,7 @@
+ g_gameSpeed = 0.1;
+
+ char txt[MAX_STRING_SIZE];
+- char num[MAX_STRING_SIZE];
+- gcvt(g_gameSpeed,2,num);
+- strcpy(txt,"Speed: ");
+- strncat(txt,num,3);
++ sprintf(txt, "Speed: %.2f", g_gameSpeed);
+
+ CTextItem* text = (CTextItem*)g_optionsMenuScreen->FindItem(103);
+ if (text)
+@@ -768,10 +762,7 @@
+ g_gameSpeed = 2.0;
+
+ char txt[MAX_STRING_SIZE];
+- char num[MAX_STRING_SIZE];
+- gcvt(g_gameSpeed,2,num);
+- strcpy(txt,"Speed: ");
+- strncat(txt,num,3);
++ sprintf(txt, "Speed: %.2f", g_gameSpeed);
+
+ CTextItem* text = (CTextItem*)g_optionsMenuScreen->FindItem(103);
+ if (text)
diff --git a/games/solarconquest/files/patch-source-main.cpp b/games/solarconquest/files/patch-source-main.cpp
new file mode 100644
index 000000000000..356516b876e2
--- /dev/null
+++ b/games/solarconquest/files/patch-source-main.cpp
@@ -0,0 +1,19 @@
+--- source/main.cpp.orig Thu Apr 6 04:19:16 2006
++++ source/main.cpp Thu Apr 6 04:19:38 2006
+@@ -19,6 +19,8 @@
+
+ //#include "stdafx.h"
+
++#include <unistd.h>
++#include <string.h>
+ #include <SDL.h>
+ #include <SDL_opengl.h>
+ #include <vorbis/vorbisfile.h>
+@@ -1354,6 +1356,7 @@
+
+ int main(int argc, char **argv)
+ {
++ chdir(getenv("HOME"));
+ #ifdef NO_SOUND
+ if (SDL_Init(SDL_INIT_VIDEO) < 0)
+ #else