summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAmy Winston <amynka@gentoo.org>2016-05-29 10:28:29 +0200
committerAmy Winston <amynka@gentoo.org>2016-05-29 10:28:29 +0200
commitcf2dd43960ddaba7674b966b116cb0e9868043eb (patch)
tree42ec16c02993de9aaf702992bd6413662ba9314b /games-roguelike/mangband/files
parentdev-ruby/pcaprub: drop ruby19 (diff)
downloadgentoo-cf2dd43960ddaba7674b966b116cb0e9868043eb.tar.gz
gentoo-cf2dd43960ddaba7674b966b116cb0e9868043eb.tar.bz2
gentoo-cf2dd43960ddaba7674b966b116cb0e9868043eb.zip
games-roguelike/mangband: initial commit new package bug #139020
Package-Manager: portage-2.2.28
Diffstat (limited to 'games-roguelike/mangband/files')
-rw-r--r--games-roguelike/mangband/files/mangband-1.1.3-paths.patch118
-rw-r--r--games-roguelike/mangband/files/mangband-1.1.3-strchr.patch22
2 files changed, 140 insertions, 0 deletions
diff --git a/games-roguelike/mangband/files/mangband-1.1.3-paths.patch b/games-roguelike/mangband/files/mangband-1.1.3-paths.patch
new file mode 100644
index 000000000000..dd9551570196
--- /dev/null
+++ b/games-roguelike/mangband/files/mangband-1.1.3-paths.patch
@@ -0,0 +1,118 @@
+diff --git a/src/config.h.in b/src/config.h.in
+index e8efdca..9a6290a 100644
+--- a/config.h.in
++++ a/config.h.in
+@@ -473,6 +473,9 @@
+ #ifndef DEFAULT_PATH
+ # define DEFAULT_PATH "./lib/"
+ #endif
++#ifndef DEFAULT_PATH_W
++# define DEFAULT_PATH_W DEFAULT_PATH
++#endif
+
+
+ /*
+diff --git a/src/server/externs.h b/src/server/externs.h
+index 249e41b..e1a5c4f 100644
+--- a/server/externs.h
++++ a/server/externs.h
+@@ -644,7 +644,7 @@ extern errr init_e_info_txt(FILE *fp, char *buf);
+ extern errr init_r_info_txt(FILE *fp, char *buf);
+
+ /* init.c */
+-extern void init_file_paths(char *path);
++extern void init_file_paths(char *path, char *path2);
+ extern void init_some_arrays(void);
+ extern void load_server_cfg(void);
+
+diff --git a/src/server/init2.c b/src/server/init2.c
+index 00d8a01..27fd2b7 100644
+--- a/server/init2.c
++++ a/server/init2.c
+@@ -63,10 +63,11 @@
+ * to succeed even if the strings have not been allocated yet,
+ * as long as the variables start out as "NULL".
+ */
+-void init_file_paths(char *path)
++void init_file_paths(char *path, char *path2)
+ {
+ char *tail;
+-
++ char *tail2;
++ char *tmp;
+
+ /*** Free everything ***/
+
+@@ -103,6 +104,10 @@ void init_file_paths(char *path)
+ /* Prepare to append to the Base Path */
+ tail = path + strlen(path);
+
++ tmp = string_make(path2);
++
++ /* Prepare to append to the Base Path */
++ tail2 = path2 + strlen(path2);
+
+ #ifdef VM
+
+@@ -123,8 +128,8 @@ void init_file_paths(char *path)
+ /*** Build the sub-directory names ***/
+
+ /* Build a path name */
+- strcpy(tail, "data");
+- ANGBAND_DIR_DATA = string_make(path);
++ strcpy(tail2, "data");
++ ANGBAND_DIR_DATA = string_make(path2);
+
+ /* Build a path name */
+ strcpy(tail, "edit");
+@@ -147,16 +152,16 @@ void init_file_paths(char *path)
+ ANGBAND_DIR_PREF = string_make(path);
+ #endif
+ /* Build a path name */
+- strcpy(tail, "save");
+- ANGBAND_DIR_SAVE = string_make(path);
++ strcpy(tail2, "save");
++ ANGBAND_DIR_SAVE = string_make(path2);
+
+ /* Build a path name */
+ strcpy(tail, "text");
+ ANGBAND_DIR_TEXT = string_make(path);
+
+ /* Build a path name */
+- strcpy(tail, "user");
+- ANGBAND_DIR_USER = string_make(path);
++ strcpy(tail2, "user");
++ ANGBAND_DIR_USER = string_make(path2);
+ #if 0
+ /* Build a path name */
+ strcpy(tail, "apex");
+diff --git a/src/server/main.c b/src/server/main.c
+index 4260b8d..7884b2f 100644
+--- a/server/main.c
++++ a/server/main.c
+@@ -142,6 +142,7 @@ extern unsigned _ovrbuffer = 0x1500;
+ static void init_stuff(void)
+ {
+ char path[1024];
++ char path2[1024];
+
+ #if defined(AMIGA) || defined(VM)
+
+@@ -161,10 +162,16 @@ static void init_stuff(void)
+ /* Hack -- Add a path separator (only if needed) */
+ if (!suffix(path, PATH_SEP)) strcat(path, PATH_SEP);
+
++ /* Use the angband_path, or a default */
++ strcpy(path2, tail ? tail : DEFAULT_PATH_W);
++
++ /* Hack -- Add a path separator (only if needed) */
++ if (!suffix(path2, PATH_SEP)) strcat(path2, PATH_SEP);
++
+ #endif /* AMIGA / VM */
+
+ /* Initialize */
+- init_file_paths(path);
++ init_file_paths(path, path2);
+ }
+
+ /*
diff --git a/games-roguelike/mangband/files/mangband-1.1.3-strchr.patch b/games-roguelike/mangband/files/mangband-1.1.3-strchr.patch
new file mode 100644
index 000000000000..f1fa19e1191e
--- /dev/null
+++ b/games-roguelike/mangband/files/mangband-1.1.3-strchr.patch
@@ -0,0 +1,22 @@
+diff --git a/src/common/h-system.h b/src/common/h-system.h
+index f60bbc1..0294dd3 100644
+--- a/common/h-system.h
++++ a/common/h-system.h
+@@ -104,17 +104,6 @@
+
+ #ifdef SET_UID
+
+-# ifdef USG
+-# include <string.h>
+-# else
+-# include <strings.h>
+-extern char *strstr();
+-extern char *strchr();
+-extern char *strrchr();
+-# endif
+-
+-#else
+-
+ # include <string.h>
+
+ #endif