aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--games/Makefile1
-rw-r--r--games/quetoo/Makefile84
-rw-r--r--games/quetoo/distinfo3
-rw-r--r--games/quetoo/files/patch-src+q_sh.c44
-rw-r--r--games/quetoo/pkg-descr6
-rw-r--r--games/quetoo/pkg-plist16
6 files changed, 154 insertions, 0 deletions
diff --git a/games/Makefile b/games/Makefile
index 34dacf3af960..c0d668c701ef 100644
--- a/games/Makefile
+++ b/games/Makefile
@@ -523,6 +523,7 @@
SUBDIR += quake3
SUBDIR += quake3-data
SUBDIR += quakeforge
+ SUBDIR += quetoo
SUBDIR += quit
SUBDIR += qwdtools
SUBDIR += race
diff --git a/games/quetoo/Makefile b/games/quetoo/Makefile
new file mode 100644
index 000000000000..1dcc93ea0cef
--- /dev/null
+++ b/games/quetoo/Makefile
@@ -0,0 +1,84 @@
+# New ports collection makefile for: Quetoo
+# Date created: 10 Apr 2006
+# Whom: Alexey Dokuchaev <danfe@FreeBSD.org>
+#
+# $FreeBSD$
+#
+
+PORTNAME= quetoo
+PORTVERSION= 0.3.3
+CATEGORIES= games
+MASTER_SITES= http://jdolan.dyndns.org/jaydolan/files/
+
+MAINTAINER= danfe@FreeBSD.org
+COMMENT= Fast, stable, compatible, and secure Quake II engine
+
+USE_BZIP2= yes
+USE_SDL= sdl
+USE_GL= yes
+GNU_CONFIGURE= yes
+CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include -I${X11BASE}/include \
+ ${PTHREAD_CFLAGS}" LDFLAGS="-L${LOCALBASE}/lib \
+ -L${X11BASE}/lib ${PTHREAD_LIBS}" \
+ OPENGL_CFLAGS="-I${X11BASE}/include" \
+ OPENGL_LIBS="-L${X11BASE}/lib" \
+ MYSQL_LIBS="-L${LOCALBASE}/lib/mysql -lmysqlclient" \
+ MYSQL_CFLAGS="-I${LOCALBASE}/include"
+
+LIBDIR= ${PREFIX}/lib/${PORTNAME}
+PLIST_SUB+= LIBDIR="${LIBDIR:S/${PREFIX}\///}"
+
+OPTIONS= QMASS "Build QMass deathmatch mod" on \
+ MYSQL "Enable MySQL frag logging" off \
+ OPTIMIZED_CFLAGS "Enable extra optimization options" off
+
+.include <bsd.port.pre.mk>
+
+.if !defined(WITHOUT_QMASS)
+Q2GAMES= baseq2 ctf qmass
+CONFIGURE_ARGS+= --enable-qmass
+PLIST_SUB+= QMASS=""
+.else
+Q2GAMES= baseq2 ctf
+PLIST_SUB+= QMASS="@comment "
+.endif
+
+.if defined(WITH_MYSQL)
+USE_MYSQL= yes
+CONFIGURE_ARGS+= --with-mysql
+.endif
+
+.if !defined(WITH_OPTIMIZED_CFLAGS)
+CONFIGURE_ARGS+= --disable-opt --disable-sse
+.endif
+
+post-extract: .SILENT
+ ${REINPLACE_CMD} -E 's,^(eval PKGDATADIR=).*$$,\1"${Q2DIR}",; \
+ s,-ldl,,; s, -lGL,,' ${WRKSRC}/configure
+.if !defined(WITH_MYSQL)
+ ${REINPLACE_CMD} '22266,22268d' ${WRKSRC}/configure
+.else
+ ${REINPLACE_CMD} 's,src$$,& @MYSQL_CFLAGS@,' \
+ ${WRKSRC}/src/qmass/Makefile.in
+.endif
+ ${REINPLACE_CMD} 's,alsa,sdl,' ${WRKSRC}/src/snd_dma.c
+
+do-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/src/quetoo ${PREFIX}/bin/quetoo
+ @${MKDIR} ${LIBDIR}
+ ${INSTALL_PROGRAM} ${WRKSRC}/src/.libs/*.so ${LIBDIR}
+.for g in ${Q2GAMES}
+ @${MKDIR} ${LIBDIR}/${g}
+ ${INSTALL_PROGRAM} ${WRKSRC}/src/${g}/.libs/game.so ${LIBDIR}/${g}
+.endfor
+.if !defined(NOPORTDOCS)
+ @${MKDIR} ${DOCSDIR}
+ ${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR}
+. if !defined(WITHOUT_QMASS)
+ ${INSTALL_DATA} ${WRKSRC}/src/qmass/README ${DOCSDIR}/qmass-README
+. endif
+.endif
+
+.include "${.CURDIR}/../quake2-data/Makefile.include"
+
+.include <bsd.port.post.mk>
diff --git a/games/quetoo/distinfo b/games/quetoo/distinfo
new file mode 100644
index 000000000000..e712fc8eaed1
--- /dev/null
+++ b/games/quetoo/distinfo
@@ -0,0 +1,3 @@
+MD5 (quetoo-0.3.3.tar.bz2) = ab946032e611acd66a24db19356fff66
+SHA256 (quetoo-0.3.3.tar.bz2) = 02001861ba42507c0d5b45ed39702a5a04e73a7c00d693b4bc47317136dfb675
+SIZE (quetoo-0.3.3.tar.bz2) = 891379
diff --git a/games/quetoo/files/patch-src+q_sh.c b/games/quetoo/files/patch-src+q_sh.c
new file mode 100644
index 000000000000..b72451904ccb
--- /dev/null
+++ b/games/quetoo/files/patch-src+q_sh.c
@@ -0,0 +1,44 @@
+--- src/q_sh.c.orig Sun Apr 2 01:27:58 2006
++++ src/q_sh.c Tue Apr 4 00:35:10 2006
+@@ -28,6 +28,7 @@
+ #include <unistd.h>
+ #include <sys/mman.h>
+ #include <sys/time.h>
++#include <machine/param.h>
+
+ #include "qcommon.h"
+
+@@ -42,7 +43,7 @@
+ curhunksize = 0;
+
+ membase = mmap(0, maxhunksize,
+- PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0
++ PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANON, -1, 0
+ );
+
+ if(membase == NULL || membase ==(byte *) - 1)
+@@ -66,9 +67,22 @@
+ }
+
+ int Hunk_End(void){
+- byte *n;
++ byte *n = membase;
+
+- n = mremap(membase, maxhunksize, curhunksize + sizeof(int), 0);
++ size_t old_size = maxhunksize;
++ size_t new_size = curhunksize + sizeof(int);
++ void * unmap_base;
++ size_t unmap_len;
++
++ new_size = round_page(new_size);
++ old_size = round_page(old_size);
++ if (new_size > old_size)
++ n = (byte *)-1; /* error */
++ else if (new_size < old_size) {
++ unmap_base = (caddr_t)(membase + new_size);
++ unmap_len = old_size - new_size;
++ n = munmap(unmap_base, unmap_len) + membase;
++ }
+
+ if(n != membase)
+ Sys_Error("Hunk_End: Could not remap virtual block(%d)", errno);
diff --git a/games/quetoo/pkg-descr b/games/quetoo/pkg-descr
new file mode 100644
index 000000000000..42bf9d91762a
--- /dev/null
+++ b/games/quetoo/pkg-descr
@@ -0,0 +1,6 @@
+The focus of Quetoo is simplicity, security, stability, and speed. It
+contains critical security updates for both clients and servers, an
+improved console, and some major speed increases. Quetoo is up to 48%
+faster than stock Quake II.
+
+WWW: http://jdolan.dyndns.org/jaydolan/quetoo.html
diff --git a/games/quetoo/pkg-plist b/games/quetoo/pkg-plist
new file mode 100644
index 000000000000..f73ef709de02
--- /dev/null
+++ b/games/quetoo/pkg-plist
@@ -0,0 +1,16 @@
+bin/quetoo
+%%LIBDIR%%/baseq2/game.so
+%%LIBDIR%%/ctf/game.so
+%%QMASS%%%%LIBDIR%%/qmass/game.so
+%%LIBDIR%%/ref_glsdl.so
+%%LIBDIR%%/ref_glx.so
+%%LIBDIR%%/ref_softsdl.so
+%%LIBDIR%%/ref_softx.so
+%%LIBDIR%%/snd_sdl.so
+%%PORTDOCS%%%%DOCSDIR%%/README
+%%QMASS%%%%PORTDOCS%%%%DOCSDIR%%/qmass-README
+%%PORTDOCS%%@dirrm %%DOCSDIR%%
+@dirrm %%LIBDIR%%/baseq2
+@dirrm %%LIBDIR%%/ctf
+%%QMASS%%@dirrm %%LIBDIR%%/qmass
+@dirrm %%LIBDIR%%