diff options
author | Edwin Groothuis <edwin@FreeBSD.org> | 2005-11-25 03:56:42 +0000 |
---|---|---|
committer | Edwin Groothuis <edwin@FreeBSD.org> | 2005-11-25 03:56:42 +0000 |
commit | 4988f2169df0de293b14313610de3c2edabba313 (patch) | |
tree | 026bdbf8a04adcb533c27daaccb4394bef339f31 /games/formido/files | |
parent | f5f70372a9ae2532e3b680098080e553b114ed96 (diff) |
Notes
Diffstat (limited to 'games/formido/files')
-rw-r--r-- | games/formido/files/patch-Makefile | 31 | ||||
-rw-r--r-- | games/formido/files/patch-include--init.h | 11 | ||||
-rw-r--r-- | games/formido/files/patch-src--config.cpp | 14 |
3 files changed, 56 insertions, 0 deletions
diff --git a/games/formido/files/patch-Makefile b/games/formido/files/patch-Makefile new file mode 100644 index 000000000000..2c634a9a758a --- /dev/null +++ b/games/formido/files/patch-Makefile @@ -0,0 +1,31 @@ +--- Makefile.orig Fri Nov 7 21:58:35 2003 ++++ Makefile Sat Nov 19 19:58:06 2005 +@@ -7,23 +7,23 @@ + #(just don't include the ending slash) + + #Data directory (default: ./data) +-DATDIR = ./data ++DATDIR ?= ./data + + #High score directory (default: ./data) +-HISCOREDIR = ./data ++HISCOREDIR ?= ./data + + #Config file directory (default: .) + CONFIGDIR = . + +-CC=g++ ++CC?=g++ + FLAGS=`sdl-config --cflags` -Wall -I./include +-LINKFLAGS=-O2 -ffast-math -fomit-frame-pointer ++LINKFLAGS?=-O2 -ffast-math -fomit-frame-pointer + LIBS=`sdl-config --libs` -lm -lSDL_mixer -lSDL_image + CPPFILES=blend.cpp credits.cpp explo.cpp hof.cpp menu.cpp player.cpp \ + bomb.cpp critter.cpp font.cpp init.cpp mymath.cpp powerup.cpp \ + config.cpp effect.cpp game.cpp main.cpp particle.cpp timer.cpp + +-DEFINES=-DDATA_DIR=\"${DATDIR}\" -DHISCORE_DIR=\"${HISCOREDIR}\" -DCONFIG_DIR=\"${CONFIGDIR}\" ++DEFINES=-DDATA_DIR=\"${DATDIR}\" -DHISCORE_DIR=\"${HISCOREDIR}\" -DDEFAULT_CONFIG_FILE=\"${DEFAULT_CONFIG_FILE}\" + + SOURCES=$(addprefix src/, $(CPPFILES)) + OBJECTS=$(addprefix obj/, $(CPPFILES:.cpp=.o)) diff --git a/games/formido/files/patch-include--init.h b/games/formido/files/patch-include--init.h new file mode 100644 index 000000000000..6b26155e0cca --- /dev/null +++ b/games/formido/files/patch-include--init.h @@ -0,0 +1,11 @@ +--- include/init.h.orig Fri Nov 7 21:59:07 2003 ++++ include/init.h Sat Nov 19 19:39:18 2005 +@@ -45,7 +45,7 @@ + + #define DAT(x) (add_prefix(x, DATA_DIR)) + #define HISCORE(x) (add_prefix(x, HISCORE_DIR)) +-#define CONFIG(x) (add_prefix(x, CONFIG_DIR)) ++#define CONFIG(x) (add_prefix(x, getenv("HOME"))) + + + // Initialize SDL diff --git a/games/formido/files/patch-src--config.cpp b/games/formido/files/patch-src--config.cpp new file mode 100644 index 000000000000..8b37eadd0cce --- /dev/null +++ b/games/formido/files/patch-src--config.cpp @@ -0,0 +1,14 @@ +--- /work/a/ports/NEW/formido/work/formido-1.0/src/config.cpp.orig Fri Nov 7 18:59:01 2003 ++++ /work/a/ports/NEW/formido/work/formido-1.0/src/config.cpp Fri Nov 25 03:54:00 2005 +@@ -30,6 +30,11 @@ + void load_config(char *file, CONFIG *conf) {
+
+ FILE *f = fopen(file, "rt");
++ if(!f) { ++ // Try default config first ++ file = DEFAULT_CONFIG_FILE; ++ f = fopen(file, "rt"); ++ } + if(!f)
+ error_msg("Unable to load config file: %s!", file);
+
|