- Update daimonin to 0.10.5

- Split music download to separate port
- Give maintainership to submitter

Submitted by:	J. R. Olroyd <jr@opal.com>
This commit is contained in:
Pav Lucistnik 2010-09-27 09:02:17 +00:00
parent 1353d52f69
commit 329d477c09
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=261931
23 changed files with 1603 additions and 1188 deletions

View file

@ -168,6 +168,7 @@
SUBDIR += d2x
SUBDIR += d2x-xl
SUBDIR += daimonin-client
SUBDIR += daimonin-music
SUBDIR += dangen
SUBDIR += dangerdeep
SUBDIR += dangerdeep-data

View file

@ -5,36 +5,88 @@
# $FreeBSD$
#
PORTNAME= daimonin_client
PORTVERSION= 0.9.7.1
PORTREVISION= 8
PORTNAME= daimonin
PORTVERSION= 0.10.5
CATEGORIES= games
MASTER_SITES= SF/daimonin/Client%20Sources/Client%20Source%20${PORTVERSION}
MASTER_SITES= http://daimonin.svn.sourceforge.net/viewvc/daimonin/main/client/?view=tar&pathrev=${SVN_REVISION}&file=
DIST_SUBDIR= ${PORTNAME}
MAINTAINER= pav@FreeBSD.org
MAINTAINER= fbsd@opal.com
COMMENT= Free open source Massively Multiplayer On-line Role-playing Game (MMORPG)
LIB_DEPENDS= physfs.1:${PORTSDIR}/devel/physfs \
curl.6:${PORTSDIR}/ftp/curl
USE_ZIP= yes
SVN_REVISION= 6021
FETCH_BEFORE_ARGS= -o ${DISTDIR}/${DIST_SUBDIR}/${DISTNAME}${EXTRACT_SUFX}
HAS_CONFIGURE= yes
CONFIGURE_ARGS= --prefix=${PREFIX}/share
CONFIGURE_ENV= CFLAGS="-pipe" LDFLAGS="-L${LOCALBASE}/lib"
CONFIGURE_ARGS= --disable-simplelayout --enable-getaddrinfo
CONFIGURE_ENV= LDFLAGS="-L${LOCALBASE}/lib"
USE_AUTOTOOLS= automake:110 autoconf:267
USE_SDL= mixer image
SUB_FILES= daimonin.sh
SUB_LIST= PORTVERSION=${PORTVERSION}
PLIST_SUB= PORTVERSION=${PORTVERSION}
WRKSRC= ${WRKDIR}/client/make/linux
OPTIONS= KB_DESKTOP "Install key bindings for desktop (num keypad)" on \
KB_LAPTOP "Install key bindings for laptop (789uojkl)" off \
KB_ROGUE "Install rogue-like key bindings (hjkl and yubn)" off \
MUSIC "Download and Install music files (83 Mb)" on \
DEBUG "Enable debugging messages in log" off
DD?= /bin/dd
.include <bsd.port.pre.mk>
.if defined(WITH_KB_DESKTOP) && defined(WITH_KB_LAPTOP) || \
defined(WITH_KB_LAPTOP) && defined(WITH_KB_ROGUE) || \
defined(WITH_KB_DESKTOP) && defined(WITH_KB_ROGUE)
pre-fetch::
@${ECHO_MSG} 'error: only one of the KB_* OPTIONS may be used - rerun "make config"'
@${FALSE}
.endif
.if defined(WITH_DEBUG)
EXTRA_PATCHES+= ${FILESDIR}/extra-patch-src-wrapper.c
.endif
.if defined(WITH_MUSIC)
RUN_DEPENDS+= ${DATADIR}/media/AnichGiantTrouble.ogg:${PORTSDIR}/games/daimonin-music
.endif
post-fetch-script:
@# the downloaded .tar.gz DISTFILE is regenerated for each download, so contains a different timestamp each time
@# clear the timestamp here so the checksum works
@${PRINTF} '\0\0\0\0' | ${DD} of=${DISTDIR}/${DIST_SUBDIR}/${DISTFILES} bs=1w count=1 seek=1 conv=notrunc 2>/dev/null
pre-patch:
${CP} ${WRKSRC}/../../settings/keys-laptop.dat ${WRKSRC}/../../settings/keys-rogue.dat
post-patch:
@${CHMOD} a+x ${WRKSRC}/configure ${WRKSRC}/make_utils/install-sh
@${CHMOD} a+x ${WRKSRC}/make_utils/install-sh
@${CP} ${PORTSDIR}/Templates/config.guess ${PORTSDIR}/Templates/config.sub \
${WRKSRC}/make_utils/
pre-configure:
cd ${WRKSRC}; ${LN} -sf ${AUTOMAKE_DIR}/COPYING . && ${AUTORECONF}
post-install:
${MV} ${PREFIX}/bin/daimonin ${DATADIR}
${INSTALL_SCRIPT} ${WRKDIR}/daimonin.sh ${PREFIX}/bin/daimonin
${CHMOD} a+x ${PREFIX}/bin/daimonin
@${FIND} ${DATADIR} -name '*.orig' -exec rm {} \;
${MV} ${DATADIR}/settings/keys.dat ${DATADIR}/settings/keys-desktop.dat
.if defined(WITH_KB_LAPTOP)
@${ECHO} Configuring keyboard bindings for laptop
${LN} -s ${DATADIR}/settings/keys-laptop.dat ${DATADIR}/settings/keys.dat
.elif defined(WITH_KB_ROGUE)
@${ECHO} Configuring rogue-like keyboard bindings
${LN} -s ${DATADIR}/settings/keys-rogue.dat ${DATADIR}/settings/keys.dat
.else
@${ECHO} Configuring keyboard bindings for desktop
${LN} -s ${DATADIR}/settings/keys-desktop.dat ${DATADIR}/settings/keys.dat
.endif
.include <bsd.port.mk>
.include <bsd.port.post.mk>

View file

@ -1,3 +1,3 @@
MD5 (daimonin_client-0.9.7.1.zip) = 4078dbb9172dff66b5d9804664462150
SHA256 (daimonin_client-0.9.7.1.zip) = d82c0cf71a053cbe8ffa29baa7528c9c482a9b45b02e4219db66c6fe1d864074
SIZE (daimonin_client-0.9.7.1.zip) = 28805652
MD5 (daimonin/daimonin-0.10.5.tar.gz) = 408ad46cc08b1b366626c05f11feab94
SHA256 (daimonin/daimonin-0.10.5.tar.gz) = 689c39d6513843bbbd5e2a6cc8b5b2f63c6444a9d2916be6f767e95f9d18f891
SIZE (daimonin/daimonin-0.10.5.tar.gz) = 15554328

View file

@ -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 ${@+"$@"}

View file

@ -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;
}

View file

@ -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

View file

@ -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;

View file

@ -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"

View file

@ -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"

View file

@ -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:
;

View file

@ -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;

File diff suppressed because it is too large Load diff

View file

@ -5,36 +5,88 @@
# $FreeBSD$
#
PORTNAME= daimonin_client
PORTVERSION= 0.9.7.1
PORTREVISION= 8
PORTNAME= daimonin
PORTVERSION= 0.10.5
CATEGORIES= games
MASTER_SITES= SF/daimonin/Client%20Sources/Client%20Source%20${PORTVERSION}
MASTER_SITES= http://daimonin.svn.sourceforge.net/viewvc/daimonin/main/client/?view=tar&pathrev=${SVN_REVISION}&file=
DIST_SUBDIR= ${PORTNAME}
MAINTAINER= pav@FreeBSD.org
MAINTAINER= fbsd@opal.com
COMMENT= Free open source Massively Multiplayer On-line Role-playing Game (MMORPG)
LIB_DEPENDS= physfs.1:${PORTSDIR}/devel/physfs \
curl.6:${PORTSDIR}/ftp/curl
USE_ZIP= yes
SVN_REVISION= 6021
FETCH_BEFORE_ARGS= -o ${DISTDIR}/${DIST_SUBDIR}/${DISTNAME}${EXTRACT_SUFX}
HAS_CONFIGURE= yes
CONFIGURE_ARGS= --prefix=${PREFIX}/share
CONFIGURE_ENV= CFLAGS="-pipe" LDFLAGS="-L${LOCALBASE}/lib"
CONFIGURE_ARGS= --disable-simplelayout --enable-getaddrinfo
CONFIGURE_ENV= LDFLAGS="-L${LOCALBASE}/lib"
USE_AUTOTOOLS= automake:110 autoconf:267
USE_SDL= mixer image
SUB_FILES= daimonin.sh
SUB_LIST= PORTVERSION=${PORTVERSION}
PLIST_SUB= PORTVERSION=${PORTVERSION}
WRKSRC= ${WRKDIR}/client/make/linux
OPTIONS= KB_DESKTOP "Install key bindings for desktop (num keypad)" on \
KB_LAPTOP "Install key bindings for laptop (789uojkl)" off \
KB_ROGUE "Install rogue-like key bindings (hjkl and yubn)" off \
MUSIC "Download and Install music files (83 Mb)" on \
DEBUG "Enable debugging messages in log" off
DD?= /bin/dd
.include <bsd.port.pre.mk>
.if defined(WITH_KB_DESKTOP) && defined(WITH_KB_LAPTOP) || \
defined(WITH_KB_LAPTOP) && defined(WITH_KB_ROGUE) || \
defined(WITH_KB_DESKTOP) && defined(WITH_KB_ROGUE)
pre-fetch::
@${ECHO_MSG} 'error: only one of the KB_* OPTIONS may be used - rerun "make config"'
@${FALSE}
.endif
.if defined(WITH_DEBUG)
EXTRA_PATCHES+= ${FILESDIR}/extra-patch-src-wrapper.c
.endif
.if defined(WITH_MUSIC)
RUN_DEPENDS+= ${DATADIR}/media/AnichGiantTrouble.ogg:${PORTSDIR}/games/daimonin-music
.endif
post-fetch-script:
@# the downloaded .tar.gz DISTFILE is regenerated for each download, so contains a different timestamp each time
@# clear the timestamp here so the checksum works
@${PRINTF} '\0\0\0\0' | ${DD} of=${DISTDIR}/${DIST_SUBDIR}/${DISTFILES} bs=1w count=1 seek=1 conv=notrunc 2>/dev/null
pre-patch:
${CP} ${WRKSRC}/../../settings/keys-laptop.dat ${WRKSRC}/../../settings/keys-rogue.dat
post-patch:
@${CHMOD} a+x ${WRKSRC}/configure ${WRKSRC}/make_utils/install-sh
@${CHMOD} a+x ${WRKSRC}/make_utils/install-sh
@${CP} ${PORTSDIR}/Templates/config.guess ${PORTSDIR}/Templates/config.sub \
${WRKSRC}/make_utils/
pre-configure:
cd ${WRKSRC}; ${LN} -sf ${AUTOMAKE_DIR}/COPYING . && ${AUTORECONF}
post-install:
${MV} ${PREFIX}/bin/daimonin ${DATADIR}
${INSTALL_SCRIPT} ${WRKDIR}/daimonin.sh ${PREFIX}/bin/daimonin
${CHMOD} a+x ${PREFIX}/bin/daimonin
@${FIND} ${DATADIR} -name '*.orig' -exec rm {} \;
${MV} ${DATADIR}/settings/keys.dat ${DATADIR}/settings/keys-desktop.dat
.if defined(WITH_KB_LAPTOP)
@${ECHO} Configuring keyboard bindings for laptop
${LN} -s ${DATADIR}/settings/keys-laptop.dat ${DATADIR}/settings/keys.dat
.elif defined(WITH_KB_ROGUE)
@${ECHO} Configuring rogue-like keyboard bindings
${LN} -s ${DATADIR}/settings/keys-rogue.dat ${DATADIR}/settings/keys.dat
.else
@${ECHO} Configuring keyboard bindings for desktop
${LN} -s ${DATADIR}/settings/keys-desktop.dat ${DATADIR}/settings/keys.dat
.endif
.include <bsd.port.mk>
.include <bsd.port.post.mk>

View file

@ -1,3 +1,3 @@
MD5 (daimonin_client-0.9.7.1.zip) = 4078dbb9172dff66b5d9804664462150
SHA256 (daimonin_client-0.9.7.1.zip) = d82c0cf71a053cbe8ffa29baa7528c9c482a9b45b02e4219db66c6fe1d864074
SIZE (daimonin_client-0.9.7.1.zip) = 28805652
MD5 (daimonin/daimonin-0.10.5.tar.gz) = 408ad46cc08b1b366626c05f11feab94
SHA256 (daimonin/daimonin-0.10.5.tar.gz) = 689c39d6513843bbbd5e2a6cc8b5b2f63c6444a9d2916be6f767e95f9d18f891
SIZE (daimonin/daimonin-0.10.5.tar.gz) = 15554328

View file

@ -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 ${@+"$@"}

View file

@ -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;
}

View file

@ -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

View file

@ -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;

View file

@ -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"

View file

@ -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"

View file

@ -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:
;

View file

@ -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;

File diff suppressed because it is too large Load diff