1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-23 00:43:28 +00:00

Combining the features of all modern QuakeWorld clients, ezQuake makes

QuakeWorld easier to start and play. The immortal first person shooter Quake
in the brand new skin with superb graphics and extremely fast gameplay.

Features:

- Modern graphics.
- Multiview support.
- Tons of features to serve latest pro-gaming needs.
- Inbuilt Server Browser & MP3 player control.
- Recorded Games Browser.
- Customization of all possible graphics elements of the game including Head
  Up Display.
- All sorts of scripting possibilities.
- MAC OS X platform supported. Software version for computers without 3D
  graphics accelerators.

WWW: http://ezquake.sourceforge.net/
This commit is contained in:
Alejandro Pulver 2006-08-31 22:42:23 +00:00
parent 8a15aa5afe
commit bcf691f299
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=171772
22 changed files with 2916 additions and 0 deletions

View File

@ -177,6 +177,7 @@
SUBDIR += exhaust-ma
SUBDIR += exmars
SUBDIR += exult
SUBDIR += ezquake
SUBDIR += falconseye
SUBDIR += farblazer
SUBDIR += fargoal

104
games/ezquake/Makefile Normal file
View File

@ -0,0 +1,104 @@
# New ports collection makefile for: ezquake
# Date created: 29 Aug 2006
# Whom: alepulver
#
# $FreeBSD$
#
PORTNAME= ezquake
PORTVERSION= 1517
CATEGORIES= games
MASTER_SITES= SF
DISTNAME= ${PORTNAME}_source_${PORTVERSION}
DISTFILES= ${DISTNAME}.7z \
${PORTNAME}_linux_${PORTVERSION}${EXTRACT_SUFX}
DIST_SUBDIR= ${PORTNAME}
EXTRACT_ONLY= ${PORTNAME}_linux_${PORTVERSION}${EXTRACT_SUFX}
MAINTAINER= alepulver@FreeBSD.org
COMMENT= Modern QuakeWorld client
EXTRACT_DEPENDS=p7zip:${PORTSDIR}/archivers/p7zip
LIB_DEPENDS= expat.6:${PORTSDIR}/textproc/expat2 \
jpeg.9:${PORTSDIR}/graphics/jpeg \
pcre.0:${PORTSDIR}/devel/pcre \
png.5:${PORTSDIR}/graphics/png \
xmms.4:${PORTSDIR}/multimedia/xmms
USE_GCC= 3.2+
USE_GMAKE= yes
USE_TCL= yes
USE_TCL_BUILD= yes
MAKE_ENV= TCL_SUFX="${TCL_VER:S/.//}"
.for v in TCL_INCLUDEDIR TCL_LIBDIR PTHREAD_LIBS
MAKE_ENV+= ${v}="${${v}}"
.endfor
NO_WRKSUBDIR= yes
OPTIONS= GLX "Build GLX client" on \
OPTIMIZED_CFLAGS "Enable compilation optimizations" on \
X11 "Build X11 client" on \
X86_ASM "Enable x86 assembly code" on
.include "${.CURDIR}/../quake-data/Makefile.include"
.include <bsd.port.pre.mk>
.if defined(WITHOUT_GLX) && defined(WITHOUT_X11)
IGNORE= needs at least one interface (GLX or X11)
.endif
.if !defined(WITHOUT_GLX)
USE_GL= yes
ALL_TARGET+= glx_release
PLIST_SUB+= GLX=""
.else
PLIST_SUB+= GLX="@comment "
.endif
.if !defined(WITHOUT_X11)
USE_XLIB= yes
ALL_TARGET+= x11_release
PLIST_SUB+= X11=""
.else
PLIST_SUB+= X11="@comment "
.endif
.for f in OPTIMIZED_CFLAGS X86_ASM
. if !defined(WITHOUT_${f})
MAKE_ENV+= USE_${f}=YES
. else
MAKE_ENV+= USE_${f}=NO
. endif
.endfor
post-extract:
@cd ${WRKDIR} && 7z x -y ${DISTDIR}/${DIST_SUBDIR}/${DISTNAME}.7z \
>/dev/null
@${FIND} ${WRKDIR} -type d -name CVS -print0 | ${XARGS} -0 ${RM} -rf
post-patch:
@${REINPLACE_CMD} -e 's|libtcl\.so|libtcl${TCL_VER:S/.//}|' \
${WRKSRC}/embed_tcl.h
@${REINPLACE_CMD} -e 's|%%X11BASE%%|${X11BASE}|' ${WRKSRC}/mp3_player.c
do-install:
${MKDIR} ${Q1DIR}/${PORTNAME}
.for f in cfg help keymaps manual pak0.pak sb textures ../qw/*
${CP} -R ${WRKSRC}/ezquake/${f} ${Q1DIR}/${PORTNAME}
.endfor
.if !defined(WITHOUT_GLX)
${INSTALL_PROGRAM} ${WRKSRC}/release/ezquake-gl.glx \
${PREFIX}/bin/ezquake-glx
.endif
.if !defined(WITHOUT_X11)
${INSTALL_PROGRAM} ${WRKSRC}/release/ezquake.x11 \
${PREFIX}/bin/ezquake-x11
.endif
post-install:
@${ECHO_CMD}
@${CAT} ${PKGMESSAGE}
@${ECHO_CMD}
.include <bsd.port.post.mk>

6
games/ezquake/distinfo Normal file
View File

@ -0,0 +1,6 @@
MD5 (ezquake/ezquake_source_1517.7z) = 006acbb0b17522266c8e70e3516edc6b
SHA256 (ezquake/ezquake_source_1517.7z) = df91df3dd268a4f71c622959d8dfcceba47499668cfea178c51fe2b9ef0dce5e
SIZE (ezquake/ezquake_source_1517.7z) = 1940056
MD5 (ezquake/ezquake_linux_1517.tar.gz) = e367ff5e2fbf3bd78b4dfc4e5aa8c7a4
SHA256 (ezquake/ezquake_linux_1517.tar.gz) = c2c320cc898aafe9619b3996b278903f09804f856c25f3a996c9a8359f104d7c
SIZE (ezquake/ezquake_linux_1517.tar.gz) = 9963640

View File

@ -0,0 +1,11 @@
--- ./EX_misc.c.orig Wed Mar 29 18:54:03 2006
+++ ./EX_misc.c Tue Aug 29 20:59:12 2006
@@ -8,7 +8,7 @@
#include "EX_misc.h"
#include "EX_FunNames.h"
-#if defined __linux || defined(__APPLE__)
+#if defined __unix__ || defined(__APPLE__)
#define CLIPBOARDSIZE 1024
static char clipboard[CLIPBOARDSIZE] = "\0"; // for clipboard implementation
#endif

View File

@ -0,0 +1,192 @@
--- ./Makefile.orig Fri Apr 7 13:48:24 2006
+++ ./Makefile Tue Aug 29 21:08:26 2006
@@ -5,54 +5,26 @@
# compilation tool and detection of targets/achitecture
-CC =gcc
CC_BASEVERSION =$(shell $(CC) -dumpversion | sed -e 's/\..*//g')
MACHINE =$(shell $(CC) -dumpmachine)
ARCH =$(shell echo $(MACHINE) | sed -e 's/.*mingw32.*/mingw32/g' -e 's/\-.*//g' -e 's/i.86/x86/g')
STRIP =strip --strip-unneeded --remove-section=.comment
-# Mac OSX Tiger : powerpc -> ppc
-ifeq ($(MACHINE),powerpc-apple-darwin8) # MacOS-10.4/ppc
- ARCH = ppc
-endif
-
-# Mac OSX Tiger : i686 -> macx86
-ifeq ($(MACHINE),i686-apple-darwin8) # MacOS-10.4/x86
- ARCH = macx86
- STRIP = strip
-endif
-
-# add special architecture based flags
-ifeq ($(ARCH),x86) # Linux/x86
- DEST_ARCH =x86
- ARCH_CFLAGS =-march=$(shell echo $(MACHINE) | sed -e 's/\-.*//g')
-endif
-ifeq ($(ARCH),mingw32) # Win32/x86 in MingW environment
- DEST_ARCH =x86
- ARCH_CFLAGS =-mwin32 -mno-cygwin
-endif
-ifeq ($(ARCH),ppc) # MacOS-X/ppc
- DEST_ARCH =ppc
- ARCH_CFLAGS =-arch ppc -faltivec -maltivec -mcpu=7450 -mtune=7450 -mpowerpc -mpowerpc-gfxopt
- ifeq ($(CC_BASEVERSION),4) # auto vectorize if we're using gcc4.0+
- ARCH_CFLAGS += -ftree-vectorize
- endif
-endif
-
-
#======================================================================
# Output Directories
#======================================================================
# location of source relative to Makefile
SOURCE_DIR =.
-BUILD_DEBUG_DIR =debug-$(ARCH)
-BUILD_RELEASE_DIR =release-$(ARCH)
+BUILD_DEBUG_DIR =debug
+BUILD_RELEASE_DIR =release
# compiler flags
PRJ_CFLAGS =-DWITH_ZLIB -DWITH_PNG -DEMBED_TCL -DUSE_TCL_STUBS
-XMMS_CFLAGS =-DWITH_XMMS `glib-config --cflags`
-BASE_CFLAGS =-Wall $(PRJ_CFLAGS) $(ARCH_CFLAGS)
+XMMS_CFLAGS =-DWITH_XMMS `xmms-config --cflags` `glib-config --cflags`
+BASE_CFLAGS =$(CFLAGS) -I$(LOCALBASE)/include `pcre-config --cflags` -I$(TCL_INCLUDEDIR) -DDATADIR='\"$(Q1DIR)\"' -Wall $(PRJ_CFLAGS) $(XMMS_CFLAGS)
+
+ifeq ($(USE_OPTIMIZED_CFLAGS),YES)
BASE_RELEASE_CFLAGS =-ffast-math -fomit-frame-pointer -fexpensive-optimizations
ifneq ($(CC_BASEVERSION),4) # if we're not auto-vectorizing then we can unroll the loops (mdfour ahoy)
BASE_RELEASE_CFLAGS += -funroll-loops
@@ -69,99 +41,47 @@
BASE_RELEASE_CFLAGS += -falign-loops=2 -falign-jumps=2 -falign-functions=2
endif
endif
+endif
+
BASE_DEBUG_CFLAGS =-g -D_DEBUG
-ifeq ($(ARCH),x86) # Linux/x86
- BASE_CFLAGS += -Did386 $(XMMS_CFLAGS)
- CL_DLFLAGS += -ldl
-endif
-ifeq ($(ARCH),mingw32) # Win32/x86 in MingW environment
- # use define for special assembly routines:
- BASE_CFLAGS += -Did386 -DMINGW32
-endif
-ifeq ($(ARCH),ppc) # MacOS-X/ppc
- BASE_CFLAGS += -D__BIG_ENDIAN__ -Ddarwin
-endif
-ifeq ($(ARCH),macx86) # MacOS-X/x86
- BASE_CFLAGS += -Ddarwin
-endif
-ifeq ($(ARCH),powerpc) # Linux/PPC
- BASE_CFLAGS += -D__BIG_ENDIAN__
- CL_DLFLAGS += -ldl
+ifeq ($(ARCH),i386)
+ ifeq ($(USE_X86_ASM),YES)
+ BASE_CFLAGS += -Did386
+ endif
endif
BASE_CFLAGS += -funsigned-char -pipe -fno-strict-aliasing
RELEASE_CFLAGS =$(BASE_CFLAGS) $(BASE_RELEASE_CFLAGS) -DNDEBUG
DEBUG_CFLAGS =$(BASE_CFLAGS) $(BASE_DEBUG_CFLAGS) -Wimplicit
-
# software and console (svga) builds
DO_CC =$(CC) -DWITH_VMODE $(CFLAGS) -o $@ -c $<
-ifeq ($(ARCH),mingw32) # Win32/x86 in MingW environment
- DO_CC += -D_WINDOWS -mwindows
-endif
DO_O_CC =$(CC) -O $(CFLAGS) -o $@ -c $<
DO_AS =$(CC) $(CFLAGS) -x assembler-with-cpp
-ifeq ($(ARCH),x86) # Linux/x86
- DO_AS += -DELF
-endif
+DO_AS += -DELF
DO_AS += -o $@ -c $<
# opengl builds
-BASE_GLCFLAGS =-DWITH_JPEG -DGLQUAKE
-ifeq ($(ARCH),x86) # Linux/x86
- ARCH_GLCFLAGS =-I/usr/include -DWITH_VMODE -DWITH_DGA -DWITH_EVDEV
-endif
-ifeq ($(ARCH),mingw32) # Win32/x86 in MingW environment
- ARCH_GLCFLAGS =-mwindows -I/opt/xmingw/include/ -I./pcre/ -I./libexpat/
-endif
-ifeq ($(ARCH),ppc) # MacOS-X/ppc
- ARCH_GLCFLAGS = -I/opt/local/include/ -I/Developer/Headers/FlatCarbon -I/sw/include -FOpenGL -FAGL
-endif
-ifeq ($(ARCH),macx86) # MacOS-X/x86
- ARCH_GLCFLAGS = -I/opt/local/include/ -I/Developer/Headers/FlatCarbon -I/sw/include -FOpenGL -FAGL `pcre-config --cflags` -I./libs
-endif
+BASE_GLCFLAGS =-DWITH_JPEG -DGLQUAKE -I$(X11BASE)/include
+ARCH_GLCFLAGS =-DWITH_VMODE -DWITH_DGA
GLCFLAGS =$(ARCH_GLCFLAGS) $(BASE_GLCFLAGS)
DO_GL_CC =$(CC) $(CFLAGS) $(GLCFLAGS) -o $@ -c $<
DO_GL_AS =$(CC) $(CFLAGS) $(GLCFLAGS) -x assembler-with-cpp
-ifeq ($(ARCH),x86) # Linux/x86
- DO_GL_AS += -DELF
-endif
+DO_GL_AS += -DELF
DO_GL_AS += -o $@ -c $<
-
# linker flags
-LDFLAGS =-lm `glib-config --libs` -lpthread -lexpat `pcre-config --libs` -ltclstub $(CL_DLFLAGS)
+LDFLAGS =-L$(LOCALBASE)/lib -lm `glib-config --libs` $(PTHREAD_LIBS) -lexpat `pcre-config --libs` -ltclstub$(TCL_SUFX) $(CL_DLFLAGS)
SVGALDFLAGS =-lvga
-X11_LDFLAGS =-L/usr/X11R6/lib -lX11 -lXext -lXxf86dga -lXxf86vm
-ifeq ($(ARCH),mingw32) # Win32/x86 in MingW environment
- LDFLAGS += -lws2_32 -luser32 -lwinmm
-endif
-ifeq ($(ARCH),ppc) # MacOS-X/ppc
- LDFLAGS =`pcre-config --libs` -lexpat -framework OpenGL -framework AGL -framework DrawSprocket -framework Carbon -framework ApplicationServices -framework IOKit
-endif
-ifeq ($(ARCH),macx86) # MacOS-X/x86
- LDFLAGS =`pcre-config --libs` -lexpat -framework OpenGL -framework AGL -framework DrawSprocket -framework Carbon -framework ApplicationServices -framework IOKit
-endif
+X11_LDFLAGS =-L$(X11BASE)/lib -lX11 -lXext -lXxf86dga -lXxf86vm
# opengl build
BASE_GL_LDFLAGS =-L/usr/X11R6/lib -lGL -lm -lX11 -lXext
ARCH_GL_LDFLAGS =
-ifeq ($(ARCH),x86) # Linux/x86
- ARCH_GL_LDFLAGS =-lXxf86dga -lXxf86vm
-endif
-ifeq ($(ARCH),mingw32) # Win32/x86 in MingW environment
- BASE_GL_LDFLAGS =
- ARCH_GL_LDFLAGS =-mwindows -lopengl32 -ldxguid -lgdi32
-endif
-ifeq ($(ARCH),ppc) # MacOS-X/ppc
- BASE_GL_LDFLAGS =
-endif
-ifeq ($(ARCH),macx86) # MacOS-X/x86
- BASE_GL_LDFLAGS =
-endif
+ARCH_GL_LDFLAGS =-lXxf86dga -lXxf86vm
GL_LDFLAGS =$(ARCH_GL_LDFLAGS) $(BASE_GL_LDFLAGS)
@@ -234,7 +154,6 @@
$(BUILDDIR)/build/snd_mix.o \
$(BUILDDIR)/build/snd_linux.o \
$(BUILDDIR)/build/snd_oss.o \
- $(BUILDDIR)/build/snd_alsa.o \
\
$(BUILDDIR)/build/cl_input.o \
$(BUILDDIR)/build/keys.o \
@@ -855,7 +774,6 @@
$(BUILDDIR)/build-gl/snd_mix.o \
$(BUILDDIR)/build-gl/snd_linux.o \
$(BUILDDIR)/build-gl/snd_oss.o \
- $(BUILDDIR)/build-gl/snd_alsa.o \
\
$(BUILDDIR)/build-gl/cl_input.o \
$(BUILDDIR)/build-gl/keys.o \

View File

@ -0,0 +1,253 @@
--- ./cd_linux.c.orig Thu Apr 6 20:23:18 2006
+++ ./cd_linux.c Tue Aug 29 20:59:12 2006
@@ -30,7 +30,11 @@
#include <string.h>
#include <time.h>
#include <errno.h>
+#ifdef __FreeBSD__
+#include <sys/cdio.h>
+#else
#include <linux/cdrom.h>
+#endif
#include "quakedef.h"
#include "cdaudio.h"
@@ -54,8 +58,13 @@
if (cdfile == -1 || !enabled)
return; // no cd init'd
+#ifdef __FreeBSD__
+ if (ioctl(cdfile, CDIOCEJECT) == -1)
+ Com_DPrintf ("ioctl cdioceject failed\n");
+#else
if ( ioctl(cdfile, CDROMEJECT) == -1 )
Com_DPrintf ("ioctl cdromeject failed\n");
+#endif
}
@@ -64,30 +73,53 @@
if (cdfile == -1 || !enabled)
return; // no cd init'd
+#ifdef __FreeBSD__
+ if (ioctl(cdfile, CDIOCCLOSE) == -1)
+ Com_DPrintf ("ioctl cdiocclose failed\n");
+#else
if ( ioctl(cdfile, CDROMCLOSETRAY) == -1 )
Com_DPrintf ("ioctl cdromclosetray failed\n");
+#endif
}
static int CDAudio_GetAudioDiskInfo(void)
{
+#ifdef __FreeBSD__
+ struct ioc_toc_header tochdr;
+#else
struct cdrom_tochdr tochdr;
+#endif
cdValid = false;
+#ifdef __FreeBSD__
+ if (ioctl(cdfile, CDIOREADTOCHEADER, &tochdr) == -1)
+ {
+ Com_DPrintf ("ioctl cdioreadtocheader failed\n");
+#else
if ( ioctl(cdfile, CDROMREADTOCHDR, &tochdr) == -1 )
{
Com_DPrintf ("ioctl cdromreadtochdr failed\n");
+#endif
return -1;
}
+#ifdef __FreeBSD__
+ if (tochdr.starting_track < 1)
+#else
if (tochdr.cdth_trk0 < 1)
+#endif
{
Com_DPrintf ("CDAudio: no music tracks\n");
return -1;
}
cdValid = true;
+#ifdef __FreeBSD__
+ maxTrack = tochdr.ending_track;
+#else
maxTrack = tochdr.cdth_trk1;
+#endif
return 0;
}
@@ -95,8 +127,14 @@
void CDAudio_Play(byte track, qbool looping)
{
+#ifdef __FreeBSD__
+ struct ioc_read_toc_entry entry;
+ struct cd_toc_entry toc_buffer;
+ struct ioc_play_track ti;
+#else
struct cdrom_tocentry entry;
struct cdrom_ti ti;
+#endif
if (cdfile == -1 || !enabled)
return;
@@ -116,6 +154,21 @@
return;
}
+#ifdef __FreeBSD__
+ #define CDROM_DATA_TRACK 4
+ bzero((char *)&toc_buffer, sizeof(toc_buffer));
+ entry.data_len = sizeof(toc_buffer);
+ entry.data = &toc_buffer;
+ // don't try to play a non-audio track
+ entry.starting_track = track;
+ entry.address_format = CD_MSF_FORMAT;
+ if ( ioctl(cdfile, CDIOREADTOCENTRYS, &entry) == -1 )
+ {
+ Com_DPrintf("ioctl cdromreadtocentry failed\n");
+ return;
+ }
+ if (toc_buffer.control == CDROM_DATA_TRACK)
+#else
// don't try to play a non-audio track
entry.cdte_track = track;
entry.cdte_format = CDROM_MSF;
@@ -125,6 +178,7 @@
return;
}
if (entry.cdte_ctrl == CDROM_DATA_TRACK)
+#endif
{
Com_Printf ("CDAudio: track %i is not audio\n", track);
return;
@@ -137,19 +191,37 @@
CDAudio_Stop();
}
+#ifdef __FreeBSD__
+ ti.start_track = track;
+ ti.end_track = track;
+ ti.start_index = 1;
+ ti.end_index = 99;
+#else
ti.cdti_trk0 = track;
ti.cdti_trk1 = track;
ti.cdti_ind0 = 1;
ti.cdti_ind1 = 99;
+#endif
+#ifdef __FreeBSD__
+ if (ioctl(cdfile, CDIOCPLAYTRACKS, &ti) == -1)
+ {
+ Com_DPrintf ("ioctl cdiocplaytracks failed\n");
+#else
if ( ioctl(cdfile, CDROMPLAYTRKIND, &ti) == -1 )
{
Com_DPrintf ("ioctl cdromplaytrkind failed\n");
+#endif
return;
}
+#ifdef __FreeBSD__
+ if (ioctl(cdfile, CDIOCRESUME) == -1)
+ Com_DPrintf ("ioctl cdiocresume failed\n");
+#else
if ( ioctl(cdfile, CDROMRESUME) == -1 )
Com_DPrintf ("ioctl cdromresume failed\n");
+#endif
playLooping = looping;
playTrack = track;
@@ -168,8 +240,13 @@
if (!playing)
return;
+#ifdef __FreeBSD__
+ if (ioctl(cdfile, CDIOCSTOP) == -1)
+ Com_DPrintf ("ioctl cdiocstop failed (%d)\n", errno);
+#else
if ( ioctl(cdfile, CDROMSTOP) == -1 )
Com_DPrintf ("ioctl cdromstop failed (%d)\n", errno);
+#endif
wasPlaying = false;
playing = false;
@@ -183,8 +260,13 @@
if (!playing)
return;
+#ifdef __FreeBSD__
+ if (ioctl(cdfile, CDIOCPAUSE) == -1)
+ Com_DPrintf ("ioctl cdiocpause failed\n");
+#else
if ( ioctl(cdfile, CDROMPAUSE) == -1 )
Com_DPrintf ("ioctl cdrompause failed\n");
+#endif
wasPlaying = playing;
playing = false;
@@ -202,8 +284,13 @@
if (!wasPlaying)
return;
+#ifdef __FreeBSD__
+ if (ioctl(cdfile, CDIOCRESUME) == -1)
+ Com_DPrintf ("ioctl cdiocresume failed\n");
+#else
if ( ioctl(cdfile, CDROMRESUME) == -1 )
Com_DPrintf ("ioctl cdromresume failed\n");
+#endif
playing = true;
}
@@ -299,7 +386,12 @@
void CDAudio_Update(void)
{
+#ifdef __FreeBSD__
+ struct ioc_read_subchannel subchnl;
+ struct cd_sub_channel_info data;
+#else
struct cdrom_subchnl subchnl;
+#endif
static time_t lastchk;
if (!enabled)
@@ -323,6 +415,24 @@
if (playing && lastchk < time(NULL)) {
lastchk = time(NULL) + 2; //two seconds between chks
+#if defined(__FreeBSD__)
+ subchnl.address_format = CD_MSF_FORMAT;
+ subchnl.data_format = CD_CURRENT_POSITION;
+ subchnl.data_len = sizeof(data);
+ subchnl.track = playTrack;
+ subchnl.data = &data;
+ if (ioctl(cdfile, CDIOCREADSUBCHANNEL, &subchnl) == -1 ) {
+ Com_DPrintf("ioctl cdiocreadsubchannel failed\n");
+ playing = false;
+ return;
+ }
+ if (subchnl.data->header.audio_status != CD_AS_PLAY_IN_PROGRESS &&
+ subchnl.data->header.audio_status != CD_AS_PLAY_PAUSED) {
+ playing = false;
+ if (playLooping)
+ CDAudio_Play(playTrack, true);
+ }
+#else
subchnl.cdsc_format = CDROM_MSF;
if (ioctl(cdfile, CDROMSUBCHNL, &subchnl) == -1 ) {
Com_DPrintf ("ioctl cdromsubchnl failed\n");
@@ -335,6 +445,7 @@
if (playLooping)
CDAudio_Play(playTrack, true);
}
+#endif
}
}

View File

@ -0,0 +1,10 @@
--- ./cl_tcl.c.orig Tue Apr 18 17:59:55 2006
+++ ./cl_tcl.c Tue Aug 29 20:59:12 2006
@@ -24,6 +24,7 @@
#define STATIC_BUILD
#include <tcl.h>
#include <time.h>
+#include <dlfcn.h>
#include "quakedef.h"
extern cmd_function_t *impulse_cmd;

View File

@ -0,0 +1,54 @@
--- ./common.c.orig Tue Apr 18 17:59:55 2006
+++ ./common.c Wed Aug 30 18:01:03 2006
@@ -1387,14 +1387,18 @@
}
void FS_InitFilesystem (void) {
+ char *home;
+ char homepath[MAX_OSPATH];
int i;
+ home = getenv("HOME");
+
// -basedir <path>
// Overrides the system supplied base directory (under id1)
if ((i = COM_CheckParm ("-basedir")) && i < com_argc - 1)
strlcpy (com_basedir, com_argv[i + 1], sizeof(com_basedir));
else
- getcwd(com_basedir, sizeof(com_basedir) - 1);
+ strlcpy(com_basedir, DATADIR, sizeof(com_basedir) - 1);
for (i = 0; i < strlen(com_basedir); i++)
if (com_basedir[i] == '\\')
@@ -1406,8 +1410,16 @@
// start up with id1 by default
FS_AddGameDirectory ( va("%s/id1", com_basedir) );
- FS_AddGameDirectory ( va("%s/ezquake", com_basedir) );
+ if (home != NULL)
+ FS_AddGameDirectory(va("%s/.ezquake/id1", home));
+
FS_AddGameDirectory ( va("%s/qw", com_basedir) );
+ if (home != NULL)
+ FS_AddGameDirectory(va("%s/.ezquake/qw", home));
+
+ FS_AddGameDirectory ( va("%s/ezquake", com_basedir) );
+ if (home != NULL)
+ FS_AddGameDirectory(va("%s/.ezquake/ezquake", home));
// any set gamedirs will be freed up to here
com_base_searchpaths = com_searchpaths;
@@ -1426,6 +1438,13 @@
{
if( UserdirSet )
FS_SetGamedir("qw");
+ }
+
+ if (home != NULL) {
+ snprintf(homepath, sizeof(homepath), "%s/.ezquake/%s", home, com_gamedirfile);
+ COM_CreatePath(homepath);
+ Sys_mkdir(homepath);
+ FS_AddGameDirectory(homepath);
}
}

View File

@ -0,0 +1,11 @@
--- config_manager.c.orig Tue Apr 18 17:59:55 2006
+++ config_manager.c Wed Aug 30 19:01:17 2006
@@ -67,7 +67,7 @@
cvar_t cfg_save_unchanged = {"cfg_save_unchanged", "0"};
cvar_t cfg_save_userinfo = {"cfg_save_userinfo", "2"};
cvar_t cfg_legacy_exec = {"cfg_legacy_exec", "1"};
-cvar_t cfg_legacy_write = {"cfg_legacy_write", "0"};
+cvar_t cfg_legacy_write = {"cfg_legacy_write", "1"};
cvar_t cfg_save_cvars = {"cfg_save_cvars", "1"};
cvar_t cfg_save_aliases = {"cfg_save_aliases", "1"};

View File

@ -0,0 +1,19 @@
--- ./image.c.orig Sat Apr 8 10:15:01 2006
+++ ./image.c Tue Aug 29 20:59:12 2006
@@ -20,6 +20,7 @@
$Id: image.c,v 1.20 2006/04/08 13:15:01 disconn3ct Exp $
*/
+#include <dlfcn.h>
#include "quakedef.h"
@@ -1271,7 +1272,7 @@
static QLIB_HANDLETYPE_T jpeg_handle = NULL;
-#define qjpeg_create_compress(cinfo) \
+#define qjpeg_create_compress(cinfo) \
qjpeg_CreateCompress((cinfo), JPEG_LIB_VERSION, (size_t) sizeof(struct jpeg_compress_struct))
static struct jpeg_error_mgr *(*qjpeg_std_error)(struct jpeg_error_mgr *);

View File

@ -0,0 +1,11 @@
--- ./menu.h.orig Thu Apr 6 13:47:34 2006
+++ ./menu.h Tue Aug 29 21:09:39 2006
@@ -34,7 +34,7 @@
m_none, m_main, m_singleplayer, m_load, m_save, m_multiplayer,
m_setup, m_options, m_video, m_keys, m_help, m_quit,
m_gameoptions, m_slist,/* m_sedit,*/ m_fps, m_demos, m_demos_del
-#if defined(_WIN32) || (defined(__linux__) && defined(WITH_XMMS))
+#if defined(_WIN32) || (defined(__unix__) && defined(WITH_XMMS))
, m_mp3_control, m_mp3_playlist
#endif
} m_state;

View File

@ -0,0 +1,10 @@
--- ./modules.c.orig Mon Mar 20 10:51:27 2006
+++ ./modules.c Tue Aug 29 20:59:12 2006
@@ -20,6 +20,7 @@
$Id: modules.c,v 1.8 2006/03/20 13:51:27 vvd0 Exp $
*/
+#include <dlfcn.h>
#include "quakedef.h"

View File

@ -0,0 +1,31 @@
--- mp3_player.c.orig Thu Apr 6 20:23:18 2006
+++ mp3_player.c Wed Aug 30 20:11:52 2006
@@ -21,6 +21,7 @@
*/
+#include <dlfcn.h>
#include "quakedef.h"
#include "mp3_player.h"
@@ -58,9 +59,10 @@
#include <sys/wait.h>
#include <sys/types.h> // fork, execv, usleep
+#include <signal.h>
#include <unistd.h> // fork, execv, usleep
-cvar_t mp3_dir = {"mp3_xmms_dir", "/usr/local/bin"};
+cvar_t mp3_dir = {"mp3_xmms_dir", "%%X11BASE%%/bin"};
cvar_t mp3_xmms_session = {"mp3_xmms_session", "0"};
#endif
@@ -134,7 +136,7 @@
}
static void XMMS_LoadLibrary(void) {
- if (!(libxmms_handle = dlopen("libxmms.so.1", RTLD_NOW)) && !(libxmms_handle = dlopen("libxmms.so", RTLD_NOW)))
+ if (!(libxmms_handle = dlopen("libxmms.so", RTLD_NOW)))
return;
if (!QLib_ProcessProcdef(libxmms_handle, xmmsProcs, NUM_XMMSPROCS)) {

View File

@ -0,0 +1,11 @@
--- ./mp3_player.h.orig Fri Sep 9 08:00:27 2005
+++ ./mp3_player.h Tue Aug 29 21:05:59 2006
@@ -19,7 +19,7 @@
*/
-#if defined(__linux__) && defined(WITH_XMMS)
+#if defined(__unix__) && defined(WITH_XMMS)
#define __XMMS__
#endif

View File

@ -0,0 +1,15 @@
--- quakeasm.h.orig Tue Jul 5 17:01:34 2005
+++ quakeasm.h Thu Aug 31 17:29:32 2006
@@ -25,12 +25,6 @@
#define __i386__ 1
#endif
-#ifdef __i386__
-#define id386 1
-#else
-#define id386 0
-#endif
-
#ifndef SERVERONLY
// !!! must be kept the same as in d_iface.h !!!

View File

@ -0,0 +1,90 @@
--- ./snd_linux.c.orig Fri Sep 9 08:00:27 2005
+++ ./snd_linux.c Tue Aug 29 20:59:12 2006
@@ -6,7 +6,6 @@
#include "quakedef.h"
-qbool SNDDMA_ALSA;
int snd_inited;
// Note: The functions here keep track of if the sound system is inited.
// They perform checks so that the real functions are only called if
@@ -15,13 +14,9 @@
// Prototypes
-qbool SNDDMA_Init_ALSA(void);
qbool SNDDMA_Init_OSS(void);
-int SNDDMA_GetDMAPos_ALSA(void);
int SNDDMA_GetDMAPos_OSS(void);
-void SNDDMA_Shutdown_ALSA(void);
void SNDDMA_Shutdown_OSS(void);
-void SNDDMA_Submit_ALSA(void);
void SNDDMA_Submit_OSS(void);
@@ -31,30 +26,8 @@
{
int retval;
- // Give user the option to force OSS...
- if(COM_CheckParm("-noalsa")) // || Cvar_VariableValue("s_noalsa") )
- {
- // User wants us to use OSS...
- Com_Printf("sound: Using OSS at user's request...\n");
- retval = SNDDMA_Init_OSS();
- }
- else
- {
- // Try ALSA first...
- Com_Printf("sound: Attempting to initialise ALSA...\n");
- retval = SNDDMA_Init_ALSA();
- if( retval )
- {
- SNDDMA_ALSA = true;
- }
- else
- {
- // Fall back to OSS...
- SNDDMA_ALSA = false;
- Com_Printf("sound: Falling back to OSS...\n");
- retval = SNDDMA_Init_OSS();
- }
- }
+ Com_Printf("sound: Initializing OSS...\n");
+ retval = SNDDMA_Init_OSS();
snd_inited = retval;
return retval;
@@ -64,10 +37,7 @@
{
if( snd_inited )
{
- if( SNDDMA_ALSA )
- return SNDDMA_GetDMAPos_ALSA();
- else
- return SNDDMA_GetDMAPos_OSS();
+ return SNDDMA_GetDMAPos_OSS();
}
else
return 0;
@@ -77,10 +47,7 @@
{
if (snd_inited)
{
- if( SNDDMA_ALSA )
- SNDDMA_Shutdown_ALSA();
- else
- SNDDMA_Shutdown_OSS();
+ SNDDMA_Shutdown_OSS();
snd_inited = 0;
}
@@ -97,8 +64,6 @@
{
if( snd_inited )
{
- if( SNDDMA_ALSA )
- SNDDMA_Submit_ALSA();
// OSS doesn't use this so no need to call it.
}
}

View File

@ -0,0 +1,75 @@
--- snd_oss.c.orig Mon Mar 20 10:51:28 2006
+++ snd_oss.c Wed Aug 30 20:09:50 2006
@@ -27,7 +27,11 @@
#include <sys/mman.h>
#include <sys/shm.h>
#include <sys/wait.h>
+#ifdef __linux__
#include <linux/soundcard.h>
+#else
+#include <sys/soundcard.h>
+#endif
#include <stdio.h>
#include "quakedef.h"
@@ -78,13 +82,6 @@
return 0;
}
- if (ioctl(audio_fd, SNDCTL_DSP_GETOSPACE, &info) == -1) {
- perror("GETOSPACE");
- Com_Printf ("Um, can't do GETOSPACE?\n");
- close(audio_fd);
- return 0;
- }
-
shm = &sn;
shm->splitbuffer = 0;
@@ -125,19 +122,6 @@
else
shm->channels = 2;
- shm->samples = info.fragstotal * info.fragsize / (shm->samplebits/8);
- shm->submission_chunk = 1;
-
- // memory map the dma buffer
-
- shm->buffer = (byte *) mmap(NULL, info.fragstotal * info.fragsize, PROT_WRITE, MAP_FILE|MAP_SHARED, audio_fd, 0);
- if (!shm->buffer) {
- perror(snd_dev);
- Com_Printf ("Could not mmap %s\n", snd_dev);
- close(audio_fd);
- return 0;
- }
-
tmp = 0;
if (shm->channels == 2)
tmp = 1;
@@ -182,6 +166,26 @@
} else {
perror(snd_dev);
Com_Printf ("%d-bit sound not supported.", shm->samplebits);
+ close(audio_fd);
+ return 0;
+ }
+
+ if (ioctl(audio_fd, SNDCTL_DSP_GETOSPACE, &info) == -1) {
+ perror("GETOSPACE");
+ Com_Printf ("Um, can't do GETOSPACE?\n");
+ close(audio_fd);
+ return 0;
+ }
+
+ shm->samples = info.fragstotal * info.fragsize / (shm->samplebits/8);
+ shm->submission_chunk = 1;
+
+ // memory map the dma buffer
+
+ shm->buffer = (byte *) mmap(NULL, info.fragstotal * info.fragsize, PROT_WRITE, MAP_FILE|MAP_SHARED, audio_fd, 0);
+ if (!shm->buffer) {
+ perror(snd_dev);
+ Com_Printf ("Could not mmap %s\n", snd_dev);
close(audio_fd);
return 0;
}

View File

@ -0,0 +1,26 @@
--- ./sys_linux.c.orig Mon Mar 20 10:51:28 2006
+++ ./sys_linux.c Tue Aug 29 20:59:12 2006
@@ -35,7 +35,6 @@
#include <ctype.h>
#include <sys/wait.h>
#include <sys/mman.h>
-#include <linux/rtc.h>
#include <sys/ioctl.h>
#include <sys/poll.h>
#include <sched.h>
@@ -256,6 +255,7 @@
if (COM_CheckParm("-nostdout"))
sys_nostdout.value = 1;
+#if 0
/* also check for -rtctimer before Host_Init is called */
if (COM_CheckParm("-rtctimer")) {
int retval;
@@ -292,6 +292,7 @@
Com_Printf("RTC Timer Enabled.\n");
}
+#endif
#if id386
Sys_SetFPCW();

View File

@ -0,0 +1,12 @@
--- ./vid_glx.c.orig Thu Apr 6 20:23:19 2006
+++ ./vid_glx.c Tue Aug 29 20:59:12 2006
@@ -20,7 +20,9 @@
#include <termios.h>
#include <sys/ioctl.h>
#include <sys/stat.h>
+#ifdef __linux__
#include <sys/vt.h>
+#endif
#include <stdarg.h>
#include <stdio.h>
#include <signal.h>

18
games/ezquake/pkg-descr Normal file
View File

@ -0,0 +1,18 @@
Combining the features of all modern QuakeWorld clients, ezQuake makes
QuakeWorld easier to start and play. The immortal first person shooter Quake
in the brand new skin with superb graphics and extremely fast gameplay.
Features:
- Modern graphics.
- Multiview support.
- Tons of features to serve latest pro-gaming needs.
- Inbuilt Server Browser & MP3 player control.
- Recorded Games Browser.
- Customization of all possible graphics elements of the game including Head
Up Display.
- All sorts of scripting possibilities.
- MAC OS X platform supported. Software version for computers without 3D
graphics accelerators.
WWW: http://ezquake.sourceforge.net/

View File

@ -0,0 +1,9 @@
==============================================================================
ezQuake has been installed.
If you have mouse problems you can try running it with the "-nomdga"
parameter (this will make the mouse work fine when the DGA X11 extension is
disabled).
==============================================================================

1947
games/ezquake/pkg-plist Normal file

File diff suppressed because it is too large Load Diff