diff options
author | Martin Wilke <miwi@FreeBSD.org> | 2008-04-28 08:46:59 +0000 |
---|---|---|
committer | Martin Wilke <miwi@FreeBSD.org> | 2008-04-28 08:46:59 +0000 |
commit | 129c27a433516da2b9288daa34398abdd5fa7616 (patch) | |
tree | 87512141908db28fb3788156cfefc0c5c7407445 /games/stransball2/files | |
parent | 3700954081f46feb738b016e1e4a344f54d6c2d1 (diff) | |
download | ports-129c27a433516da2b9288daa34398abdd5fa7616.tar.gz ports-129c27a433516da2b9288daa34398abdd5fa7616.zip |
Notes
Diffstat (limited to 'games/stransball2/files')
-rw-r--r-- | games/stransball2/files/patch-sources-Makefile | 17 | ||||
-rw-r--r-- | games/stransball2/files/patch-sources-main.cpp | 31 |
2 files changed, 48 insertions, 0 deletions
diff --git a/games/stransball2/files/patch-sources-Makefile b/games/stransball2/files/patch-sources-Makefile new file mode 100644 index 000000000000..e31bbf573f47 --- /dev/null +++ b/games/stransball2/files/patch-sources-Makefile @@ -0,0 +1,17 @@ +--- sources/Makefile.orig 2005-04-16 21:16:54.000000000 +0400 ++++ sources/Makefile 2008-04-07 01:10:16.000000000 +0400 +@@ -12,12 +12,11 @@ + all: stransball2 + + %.o: %.cpp +- c++ -c -g3 -O3 $< -o $@ `sdl-config --cflags` -I/usr/local/include/SDL ++ ${CXX} ${CXXFLAGS} -c $< -o $@ `${SDL_CONFIG} --cflags` + + # dynamically linked binary: + stransball2: $(OBJS) +- c++ $^ -o $@ `sdl-config --libs` -lSDL_image -lSDL_mixer -lSDL_sound -lSDL_sound -lSGE -I/usr/local/include/SDL +- mv ./stransball2 .. ++ ${CXX} $^ -o $@ `${SDL_CONFIG} --libs` -lSDL_image -lSDL_mixer -lSDL_sound -lSGE + + clean: + rm -f stransball2 diff --git a/games/stransball2/files/patch-sources-main.cpp b/games/stransball2/files/patch-sources-main.cpp new file mode 100644 index 000000000000..1152ae654b70 --- /dev/null +++ b/games/stransball2/files/patch-sources-main.cpp @@ -0,0 +1,31 @@ +--- sources/main.cpp.orig 2005-04-16 21:16:54.000000000 +0400 ++++ sources/main.cpp 2008-04-07 01:37:52.000000000 +0400 +@@ -6,6 +6,8 @@ + #include <time.h>
+ #endif
+
++#include <sys/types.h>
++#include <sys/stat.h>
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include "SDL/SDL.h"
+@@ -126,6 +128,19 @@ + setupTickCount();
+ #endif
+
++ if (chdir(getenv("HOME")) != 0)
++ return 0;
++
++ struct stat sb;
++ if (stat(".stransball2", &sb) != 0 &&
++ (mkdir(".stransball2", 0755) != 0 ||
++ mkdir(".stransball2/high", 0755) != 0 ||
++ mkdir(".stransball2/replays", 0755) != 0))
++ return 0;
++
++ if (chdir(".stransball2") != 0)
++ return 0;
++
+ int time,act_time;
+ SDL_Event event;
+ bool quit = false;
|