aboutsummaryrefslogtreecommitdiff
path: root/games/tetrinet-x
diff options
context:
space:
mode:
authorAlex Dupre <ale@FreeBSD.org>2004-06-18 07:30:07 +0000
committerAlex Dupre <ale@FreeBSD.org>2004-06-18 07:30:07 +0000
commit4da31eb8bea4007c1e46748e2faae7ca58df307f (patch)
tree1bb6861b44d18a7f99b10a0cecafed9e92cc8e01 /games/tetrinet-x
parentd5b6a64e68f32a7a29bdb173b81f4528e30e7b28 (diff)
downloadports-4da31eb8bea4007c1e46748e2faae7ca58df307f.tar.gz
ports-4da31eb8bea4007c1e46748e2faae7ca58df307f.zip
Notes
Diffstat (limited to 'games/tetrinet-x')
-rw-r--r--games/tetrinet-x/Makefile20
-rw-r--r--games/tetrinet-x/files/patch-src::main.c53
-rw-r--r--games/tetrinet-x/files/patch-src::main.h20
-rw-r--r--games/tetrinet-x/files/patch-src::net.c18
4 files changed, 98 insertions, 13 deletions
diff --git a/games/tetrinet-x/Makefile b/games/tetrinet-x/Makefile
index 7e310d570317..36c1f9b33bc4 100644
--- a/games/tetrinet-x/Makefile
+++ b/games/tetrinet-x/Makefile
@@ -10,7 +10,8 @@ PORTVERSION= 1.13.16
CATEGORIES= games
MASTER_SITES= http://www.giovannelli.it/~gmarco/files/ \
ftp://ftp.dementia.nu/tetrinet/servers/tetrix/
-DISTFILES= ${PORTNAME}.${PORTVERSION}.tgz
+DISTNAME= ${PORTNAME}.${PORTVERSION}
+EXTRACT_SUFX= .tgz
MAINTAINER= gmarco@giovannelli.it
COMMENT= An addictive 6 player tetr*s game
@@ -19,17 +20,11 @@ WRKSRC= ${WRKDIR}/tetrinetx-${PORTVERSION}
INSTALLDIR= ${PREFIX}/tetrinet-x
-.include <bsd.port.pre.mk>
-
-.if ${OSVERSION} >= 501000
-BROKEN= "Does not compile"
-.endif
-
do-build:
- (cd ${WRKDIR}/tetrinetx-1.13.16/src && \
- gcc -O2 -fno-strength-reduce -Wall main.c -o ../bin/tetrix.freebsd)
- (cd ${WRKDIR}/tetrinetx-1.13.16/contrib/query/src && \
- gcc -O2 -fno-strength-reduce -Wall query.c -o ../../../bin/server-query)
+ (cd ${WRKSRC}/src && \
+ ${CC} ${CFLAGS} main.c -o ../bin/tetrix.freebsd)
+ (cd ${WRKSRC}/contrib/query/src && \
+ ${CC} ${CFLAGS} query.c -o ../../../bin/server-query)
do-install:
${MKDIR} ${INSTALLDIR}
@@ -48,6 +43,5 @@ post-install:
@${ECHO} "Please modify configuration files located in ${INSTALLDIR}"
@${ECHO} "before attempting to run Tetrinet server"
@${ECHO} ""
- @${ECHO} ""
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
diff --git a/games/tetrinet-x/files/patch-src::main.c b/games/tetrinet-x/files/patch-src::main.c
new file mode 100644
index 000000000000..a9939a7d746d
--- /dev/null
+++ b/games/tetrinet-x/files/patch-src::main.c
@@ -0,0 +1,53 @@
+--- src/main.c.orig Thu Dec 24 06:24:50 1998
++++ src/main.c Thu Jun 17 10:06:39 2004
+@@ -319,12 +319,10 @@
+
+ /* lvprintf( priority, same as printf ) - Logs to the log IF priority is smaller */
+ /* or equal to game.verbose */
+-void lvprintf(va_alist)
+-va_dcl
++void lvprintf(int priority, char *format, ...)
+ { /* No bounds checking. Be very careful what you log */
+- char *format; va_list va; static char SBUF2[768];int priority;
+- va_start(va);
+- priority=va_arg(va,int);format=va_arg(va,char *);
++ va_list va; static char SBUF2[768];
++ va_start(va, format);
+ vsprintf(SBUF2,format,va);
+ if (strlen(SBUF2)>512)
+ {
+@@ -338,15 +336,14 @@
+ }
+
+ /* lprintf( same as printf ) - Logs to the log. */
+-void lprintf(va_alist)
+-va_dcl
++void lprintf(char *format, ...)
+ { /* No bounds checking. Be very careful what you log */
+- char *format; va_list va; static char SBUF2[768];
++ va_list va; static char SBUF2[768];
+ FILE *file_out;
+ char *mytime;
+ char *P;
+ time_t cur_time;
+- va_start(va);
++ va_start(va, format);
+ format=va_arg(va,char *);
+ vsprintf(SBUF2,format,va);
+ if (strlen(SBUF2)>512)
+@@ -2462,7 +2459,7 @@
+ /* Winlist - Returns Winlist */
+ if (!strcasecmp(buf,"getwinlist"))
+ {
+- lvprintf("%s: GetWinlist request\n",n->host);
++ lprintf("%s: GetWinlist request\n",n->host);
+ for(i=0;i<MAXWINLIST;i++)
+ {
+ if(winlist[i].inuse)
+@@ -3071,4 +3068,4 @@
+
+
+ }
+- }
+\ No newline at end of file
++ }
diff --git a/games/tetrinet-x/files/patch-src::main.h b/games/tetrinet-x/files/patch-src::main.h
new file mode 100644
index 000000000000..5f3038369b1a
--- /dev/null
+++ b/games/tetrinet-x/files/patch-src::main.h
@@ -0,0 +1,20 @@
+--- src/main.h.orig Thu Dec 24 06:24:50 1998
++++ src/main.h Thu Jun 17 09:55:28 2004
+@@ -24,7 +24,7 @@
+ #endif
+ #endif /* but virtually every other OS NEEDS both */
+ #include <arpa/inet.h> /* is this really necessary? */
+-#include <varargs.h>
++#include <stdarg.h>
+ #include <errno.h>
+ #if HAVE_UNISTD_H
+ #include <unistd.h>
+@@ -296,5 +296,5 @@
+ void net_connected(struct net_t *n, char *buf);
+ void net_waitingforteam(struct net_t *n, char *buf);
+ void init_main(void);
+-void lprintf();
+-void lvprintf();
+\ No newline at end of file
++void lprintf(char *format, ...);
++void lvprintf(int priority, char *format, ...);
diff --git a/games/tetrinet-x/files/patch-src::net.c b/games/tetrinet-x/files/patch-src::net.c
new file mode 100644
index 000000000000..4b347233cdc0
--- /dev/null
+++ b/games/tetrinet-x/files/patch-src::net.c
@@ -0,0 +1,18 @@
+--- src/net.c.orig Thu Dec 24 06:24:50 1998
++++ src/net.c Thu Jun 17 09:52:06 2004
+@@ -537,12 +537,10 @@
+ pointer, precede with a socket number */
+ /* please stop using this one except for server output. dcc output
+ should now use dprintf(idx,"format",[params]); */
+-void tprintf(va_alist)
+-va_dcl
++void tprintf(int sock, char *format, ...)
+ {
+- char *format; int sock; va_list va; static char SBUF2[1050];
+- va_start(va);
+- sock=va_arg(va,int); format=va_arg(va,char *);
++ va_list va; static char SBUF2[1050];
++ va_start(va, format);
+ vsprintf(SBUF2,format,va);
+ if (strlen(SBUF2)>1022)
+ {