diff options
Diffstat (limited to 'games/cataclysm-dda/files')
-rw-r--r-- | games/cataclysm-dda/files/cataclysm.in | 17 | ||||
-rw-r--r-- | games/cataclysm-dda/files/patch-debug.cpp | 10 | ||||
-rw-r--r-- | games/cataclysm-dda/files/patch-src-cata_tiles.cpp | 12 | ||||
-rw-r--r-- | games/cataclysm-dda/files/patch-src-game.cpp | 33 | ||||
-rw-r--r-- | games/cataclysm-dda/files/patch-src-sdltiles.cpp | 19 | ||||
-rw-r--r-- | games/cataclysm-dda/files/patch-src-translations.cpp | 18 |
6 files changed, 82 insertions, 27 deletions
diff --git a/games/cataclysm-dda/files/cataclysm.in b/games/cataclysm-dda/files/cataclysm.in deleted file mode 100644 index cd3ed1fd0d4e..000000000000 --- a/games/cataclysm-dda/files/cataclysm.in +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/sh - -BIN=%%PREFIX%%/libexec/cataclysm - -die () { - echo `basename $0`" failed: $1" - exit 1 -} - -if [ "x$HOME" = "x" ]; then - HOME=`getent passwd $(id -nu) | cut -d: -f6` -fi -test "x$HOME" = "x" && die "HOME directory is not found" - -GAMEDIR=$HOME/.cataclysm -mkdir -p $GAMEDIR/data || die "Can\`t create $GAMEDIR/data directory" -cd $GAMEDIR && exec $BIN $@ diff --git a/games/cataclysm-dda/files/patch-debug.cpp b/games/cataclysm-dda/files/patch-debug.cpp deleted file mode 100644 index 0a9355ddd827..000000000000 --- a/games/cataclysm-dda/files/patch-debug.cpp +++ /dev/null @@ -1,10 +0,0 @@ ---- debug.cpp.orig 2013-11-26 02:52:18.384654297 +0400 -+++ debug.cpp 2013-11-26 02:52:27.078654024 +0400 -@@ -8,7 +8,6 @@ - - - #if !(defined _WIN32 || defined WINDOWS || defined __CYGWIN__) --#include <execinfo.h> - #include <stdlib.h> - #endif - diff --git a/games/cataclysm-dda/files/patch-src-cata_tiles.cpp b/games/cataclysm-dda/files/patch-src-cata_tiles.cpp new file mode 100644 index 000000000000..54d8184f96b3 --- /dev/null +++ b/games/cataclysm-dda/files/patch-src-cata_tiles.cpp @@ -0,0 +1,12 @@ +--- src/cata_tiles.cpp.orig 2014-11-17 06:09:38.000000000 +0300 ++++ src/cata_tiles.cpp 2014-11-30 11:56:51.119502150 +0300 +@@ -164,9 +164,6 @@ void cata_tiles::get_tile_information(st + int cata_tiles::load_tileset(std::string path, int R, int G, int B) + { + std::string img_path = path; +-#ifdef PREFIX // use the PREFIX path over the current directory +- img_path = (FILENAMES["datadir"] + "/" + img_path); +-#endif + /** reinit tile_atlas */ + SDL_Surface *tile_atlas = IMG_Load(img_path.c_str()); + diff --git a/games/cataclysm-dda/files/patch-src-game.cpp b/games/cataclysm-dda/files/patch-src-game.cpp new file mode 100644 index 000000000000..884a7be30db5 --- /dev/null +++ b/games/cataclysm-dda/files/patch-src-game.cpp @@ -0,0 +1,33 @@ +--- src/game.cpp.orig 2014-11-17 06:09:38.000000000 +0300 ++++ src/game.cpp 2014-11-23 14:15:08.005205207 +0300 +@@ -4535,15 +4535,17 @@ std::vector<std::string> game::list_acti + void game::write_memorial_file(std::string sLastWords) + { + ++ std::string memorialdir = FILENAMES["memorialdir"]; ++ + //Open the file first +- DIR *dir = opendir("memorial"); ++ DIR *dir = opendir(memorialdir.c_str()); + if (!dir) { + #if (defined _WIN32 || defined __WIN32__) +- mkdir("memorial"); ++ mkdir(memorialdir.c_str()); + #else +- mkdir("memorial", 0777); ++ mkdir(memorialdir.c_str(), 0777); + #endif +- dir = opendir("memorial"); ++ dir = opendir(memorialdir.c_str()); + if (!dir) { + dbg(D_ERROR) << "game:write_memorial_file: Unable to make memorial directory."; + debugmsg("Could not make './memorial' directory"); +@@ -4581,7 +4583,7 @@ void game::write_memorial_file(std::stri + } + + //Omit the name if too many unusable characters stripped +- std::string memorial_file_path = string_format("memorial/%s%s.txt", ++ std::string memorial_file_path = string_format((memorialdir + "%s%s.txt").c_str(), + player_name.str().length() <= (u.name.length() / 5) ? "" : player_name.str().c_str(), + timestamp.c_str()); + diff --git a/games/cataclysm-dda/files/patch-src-sdltiles.cpp b/games/cataclysm-dda/files/patch-src-sdltiles.cpp new file mode 100644 index 000000000000..ec452e0c56b9 --- /dev/null +++ b/games/cataclysm-dda/files/patch-src-sdltiles.cpp @@ -0,0 +1,19 @@ +--- src/sdltiles.cpp.orig 2014-11-17 06:09:38.000000000 +0300 ++++ src/sdltiles.cpp 2014-11-30 13:31:51.462125514 +0300 +@@ -1,4 +1,5 @@ + #if (defined TILES) ++#include <sys/param.h> + #include "catacurse.h" + #include "options.h" + #include "output.h" +@@ -1213,8 +1214,8 @@ static void save_font_list() + wordexp("~/Library/Fonts", &exp, 0); + font_folder_list(fout, exp.we_wordv[0]); + wordfree(&exp);*/ +-#elif (defined linux || defined __linux) +- font_folder_list(fout, "/usr/share/fonts"); ++#elif (defined linux || defined __linux || defined __FreeBSD__) ++ font_folder_list(fout, "/usr/local/lib/X11/fonts"); + font_folder_list(fout, "/usr/local/share/fonts"); + wordexp_t exp; + wordexp("~/.fonts", &exp, 0); diff --git a/games/cataclysm-dda/files/patch-src-translations.cpp b/games/cataclysm-dda/files/patch-src-translations.cpp new file mode 100644 index 000000000000..7aaa30f28fab --- /dev/null +++ b/games/cataclysm-dda/files/patch-src-translations.cpp @@ -0,0 +1,18 @@ +--- src/translations.cpp.orig 2014-11-17 06:09:38.000000000 +0300 ++++ src/translations.cpp 2014-11-30 13:22:06.603147068 +0300 +@@ -1,5 +1,6 @@ + #include "translations.h" + ++#include <sys/param.h> + #include <string> + #ifdef LOCALIZE + #undef __STRICT_ANSI__ // _putenv in minGW need that +@@ -72,7 +73,7 @@ void set_language(bool reload_options) + + // Step 2. Bind to gettext domain. + const char *locale_dir; +-#ifdef __linux__ ++#if (defined __linux__ || defined __FreeBSD__) + if (!FILENAMES["base_path"].empty()) { + locale_dir = std::string(FILENAMES["base_path"] + "share/locale").c_str(); + } else { |