aboutsummaryrefslogtreecommitdiff
path: root/games/daimonin/files
diff options
context:
space:
mode:
authorPav Lucistnik <pav@FreeBSD.org>2010-09-27 09:02:17 +0000
committerPav Lucistnik <pav@FreeBSD.org>2010-09-27 09:02:17 +0000
commit329d477c09375f5b2a1963c6e5eed6615f43be09 (patch)
tree12fc7912e2ed9923cefb0cca3b0d6416f45c350b /games/daimonin/files
parent1353d52f69bb4e077b564b7e8a33edf977f41252 (diff)
downloadports-329d477c09375f5b2a1963c6e5eed6615f43be09.tar.gz
ports-329d477c09375f5b2a1963c6e5eed6615f43be09.zip
- Update daimonin to 0.10.5
- Split music download to separate port - Give maintainership to submitter Submitted by: J. R. Olroyd <jr@opal.com>
Notes
Notes: svn path=/head/; revision=261931
Diffstat (limited to 'games/daimonin/files')
-rw-r--r--games/daimonin/files/daimonin.sh.in18
-rw-r--r--games/daimonin/files/extra-patch-src-wrapper.c11
-rw-r--r--games/daimonin/files/patch-configure11
-rw-r--r--games/daimonin/files/patch-daimonin.com11
-rw-r--r--games/daimonin/files/patch-settings-keys-laptop.dat25
-rw-r--r--games/daimonin/files/patch-settings-keys-rogue.dat25
-rw-r--r--games/daimonin/files/patch-src-socket.c75
-rw-r--r--games/daimonin/files/patch-src-uncompr.c16
8 files changed, 155 insertions, 37 deletions
diff --git a/games/daimonin/files/daimonin.sh.in b/games/daimonin/files/daimonin.sh.in
index 362553462815..5b5787cbd9aa 100644
--- a/games/daimonin/files/daimonin.sh.in
+++ b/games/daimonin/files/daimonin.sh.in
@@ -1,5 +1,15 @@
#!/bin/sh
-mkdir -p ~/.daimonin
-chmod -R +w ~/.daimonin
-cp -R %%PREFIX%%/share/daimonin-%%PORTVERSION%%/ ~/.daimonin
-cd ~/.daimonin && ./daimonin $*
+# /usr/local/bin/daimonin
+# FreeBSD wrapper to start daimonin
+
+PORTVERSION=%%PORTVERSION%%
+VERSION=${PORTVERSION%.*}
+
+# create home dir in ~/.daimonin/$VERSION and create logs subdir
+# to avoid errors from daimonin's own PhysFS code
+if [ ! -d ~/.daimonin/$VERSION/logs ]; then
+ mkdir -p ~/.daimonin/$VERSION/logs
+fi
+
+# start game
+exec %%PREFIX%%/share/daimonin/daimonin ${@+"$@"}
diff --git a/games/daimonin/files/extra-patch-src-wrapper.c b/games/daimonin/files/extra-patch-src-wrapper.c
new file mode 100644
index 000000000000..d62e3b83331e
--- /dev/null
+++ b/games/daimonin/files/extra-patch-src-wrapper.c
@@ -0,0 +1,11 @@
+--- ../../src/wrapper.c.orig 2010-08-22 16:53:22.000000000 -0400
++++ ../../src/wrapper.c 2010-09-20 11:55:46.000000000 -0400
+@@ -40,7 +40,7 @@
+ }
+ /* we log all logLevel < LOGLEVEL*/
+ else if (LOGLEVEL >= 0 &&
+- logLevel >= LOGLEVEL)
++ logLevel > LOGLEVEL)
+ {
+ return;
+ }
diff --git a/games/daimonin/files/patch-configure b/games/daimonin/files/patch-configure
deleted file mode 100644
index a874545d966f..000000000000
--- a/games/daimonin/files/patch-configure
+++ /dev/null
@@ -1,11 +0,0 @@
---- configure.orig 2008-05-10 13:02:39.000000000 +0300
-+++ configure 2008-05-10 13:04:26.000000000 +0300
-@@ -2232,7 +2232,7 @@
-
- # Define the identity of the package.
- PACKAGE=daimonin
-- VERSION=0.9.7
-+ VERSION=0.9.7.1
-
-
- cat >>confdefs.h <<_ACEOF
diff --git a/games/daimonin/files/patch-daimonin.com b/games/daimonin/files/patch-daimonin.com
deleted file mode 100644
index a3f564651365..000000000000
--- a/games/daimonin/files/patch-daimonin.com
+++ /dev/null
@@ -1,11 +0,0 @@
---- ../../src/main.c.orig 2010-05-15 12:15:25.000000000 +0200
-+++ ../../src/main.c 2010-05-15 12:16:53.000000000 +0200
-@@ -500,7 +500,7 @@
-
- /* we have to have it here, before we junp back because of missing config file */
-
-- strcpy(options.metaserver, "damn.informatik.uni-bremen.de");
-+ strcpy(options.metaserver, "www.daimonin.com");
- options.metaserver_port = DEFAULT_METASERVER_PORT;
-
- txtwin_start_size = txtwin[TW_MIX].size;
diff --git a/games/daimonin/files/patch-settings-keys-laptop.dat b/games/daimonin/files/patch-settings-keys-laptop.dat
new file mode 100644
index 000000000000..192312c736d9
--- /dev/null
+++ b/games/daimonin/files/patch-settings-keys-laptop.dat
@@ -0,0 +1,25 @@
+--- ../../settings/keys-laptop.dat.orig 2010-08-05 15:36:27.000000000 -0400
++++ ../../settings/keys-laptop.dat 2010-09-20 23:47:37.000000000 -0400
+@@ -1,13 +1,13 @@
+ +"Movement"
+-265 1 "[9]" "?M_NORTH"
+-262 1 "[o]" "?M_NORTHEAST"
+-259 1 "[l]" "?M_EAST"
+-258 1 "[k]" "?M_SOUTHEAST"
+-257 1 "[j]" "?M_SOUTH"
+-260 1 "[u]" "?M_SOUTHWEST"
+-263 1 "[7]" "?M_WEST"
+-264 1 "[8]" "?M_NORTHWEST"
+-261 1 "[i]" "?M_STAY"
++265 1 "9" "?M_NORTH"
++262 1 "o" "?M_NORTHEAST"
++259 1 "l" "?M_EAST"
++258 1 "k" "?M_SOUTHEAST"
++257 1 "j" "?M_SOUTH"
++260 1 "u" "?M_SOUTHWEST"
++263 1 "7" "?M_WEST"
++264 1 "8" "?M_NORTHWEST"
++261 1 "i" "?M_STAY"
+ 091 1 "[" "/left"
+ 093 1 "]" "/right"
+
diff --git a/games/daimonin/files/patch-settings-keys-rogue.dat b/games/daimonin/files/patch-settings-keys-rogue.dat
new file mode 100644
index 000000000000..d7964fd77925
--- /dev/null
+++ b/games/daimonin/files/patch-settings-keys-rogue.dat
@@ -0,0 +1,25 @@
+--- ../../settings/keys-rogue.dat.orig 2010-09-22 21:28:14.000000000 -0400
++++ ../../settings/keys-rogue.dat 2010-09-22 21:26:05.000000000 -0400
+@@ -1,13 +1,13 @@
+ +"Movement"
+-265 1 "[9]" "?M_NORTH"
+-262 1 "[o]" "?M_NORTHEAST"
+-259 1 "[l]" "?M_EAST"
+-258 1 "[k]" "?M_SOUTHEAST"
+-257 1 "[j]" "?M_SOUTH"
+-260 1 "[u]" "?M_SOUTHWEST"
+-263 1 "[7]" "?M_WEST"
+-264 1 "[8]" "?M_NORTHWEST"
+-261 1 "[i]" "?M_STAY"
++117 1 "u" "?M_NORTH"
++108 1 "l" "?M_NORTHEAST"
++110 1 "n" "?M_EAST"
++106 1 "j" "?M_SOUTHEAST"
++098 1 "b" "?M_SOUTH"
++104 1 "h" "?M_SOUTHWEST"
++121 1 "y" "?M_WEST"
++107 1 "k" "?M_NORTHWEST"
++105 1 "i" "?M_STAY"
+ 091 1 "[" "/left"
+ 093 1 "]" "/right"
+
diff --git a/games/daimonin/files/patch-src-socket.c b/games/daimonin/files/patch-src-socket.c
index b3b066e35bd2..14369d4ee21e 100644
--- a/games/daimonin/files/patch-src-socket.c
+++ b/games/daimonin/files/patch-src-socket.c
@@ -1,6 +1,19 @@
---- ../../src/socket.c.orig 2008-05-10 13:14:59.000000000 +0300
-+++ ../../src/socket.c 2008-05-10 13:15:04.000000000 +0300
-@@ -706,7 +706,9 @@
+--- ../../src/socket.c.orig 2010-08-22 16:53:22.000000000 -0400
++++ ../../src/socket.c 2010-09-20 15:04:30.000000000 -0400
+@@ -728,6 +728,7 @@
+ memcpy(&insock.sin_addr, hostbn->h_addr, hostbn->h_length);
+ }
+
++#if 0
+ // Set non-blocking.
+ flags = fcntl(*socket_temp, F_GETFL);
+ if (fcntl(*socket_temp, F_SETFL, flags | O_NONBLOCK) == -1)
+@@ -736,11 +737,14 @@
+ *socket_temp = SOCKET_NO;
+ return(FALSE);
+ }
++#endif
+ // Try to connect.
start_timer = SDL_GetTicks();
while (connect(*socket_temp, (struct sockaddr *) &insock, sizeof(insock)) == -1)
{
@@ -11,3 +24,59 @@
/* timeout.... without connect will REALLY hang a long time */
if (start_timer + SOCKET_TIMEOUT_MS < SDL_GetTicks())
{
+@@ -749,6 +753,7 @@
+ return(FALSE);
+ }
+ }
++#if 0
+ // Set back to blocking.
+ if (fcntl(*socket_temp, F_SETFL, flags) == -1)
+ {
+@@ -756,6 +761,7 @@
+ *socket_temp = SOCKET_NO;
+ return(FALSE);
+ }
++#endif
+ #else
+ struct addrinfo hints;
+ struct addrinfo *res = NULL, *ai;
+@@ -786,6 +792,7 @@
+ *socket_temp = SOCKET_NO;
+ continue;
+ }
++#if 0
+ // Set non-blocking.
+ flags = fcntl(*socket_temp, F_GETFL);
+ if (fcntl(*socket_temp, F_SETFL, flags | O_NONBLOCK) == -1)
+@@ -794,11 +801,14 @@
+ *socket_temp = SOCKET_NO;
+ return(FALSE);
+ }
++#endif
+ // Try to connect.
+ start_timer = SDL_GetTicks();
+ while (connect(*socket_temp, ai->ai_addr, ai->ai_addrlen) != 0)
+ {
+- SDL_Delay(3);
++ // EINPROGRESS leads to EALREADY over few iterations
++ if (errno == EALREADY) break;
++ SDL_Delay(30);
+ /* timeout.... without connect will REALLY hang a long time */
+ if (start_timer + SOCKET_TIMEOUT_MS < SDL_GetTicks())
+ {
+@@ -807,6 +817,7 @@
+ goto next_try;
+ }
+ }
++#if 0
+ // Set back to blocking.
+ if (fcntl(*socket_temp, F_SETFL, flags) == -1)
+ {
+@@ -814,6 +825,7 @@
+ *socket_temp = SOCKET_NO;
+ return(FALSE);
+ }
++#endif
+ break;
+ next_try:
+ ;
diff --git a/games/daimonin/files/patch-src-uncompr.c b/games/daimonin/files/patch-src-uncompr.c
index 5d1b07b4f201..e10b6a073c0e 100644
--- a/games/daimonin/files/patch-src-uncompr.c
+++ b/games/daimonin/files/patch-src-uncompr.c
@@ -1,11 +1,11 @@
---- ../../src/uncompr.c.orig Sun May 20 02:10:22 2007
-+++ ../../src/uncompr.c Mon Jun 4 11:40:00 2007
-@@ -60,7 +60,7 @@
+--- ../../src/uncompr.c.orig 2010-09-19 10:32:48.000000000 -0400
++++ ../../src/uncompr.c 2010-09-19 10:35:17.000000000 -0400
+@@ -37,7 +37,7 @@
stream.next_out = dest;
- stream.avail_out = (uInt) * destLen;
-- if ((uLong) stream.avail_out != *destLen)
-+ if ((uLong) stream.avail_out != (uInt) *destLen)
- return Z_BUF_ERROR;
+ stream.avail_out = (uInt)*destLen;
+- if ((uLong)stream.avail_out != *destLen) return Z_BUF_ERROR;
++ if ((uLong)stream.avail_out != (uLong)*destLen) return Z_BUF_ERROR;
- stream.zalloc = (alloc_func) 0;
+ stream.zalloc = (alloc_func)0;
+ stream.zfree = (free_func)0;