diff options
author | Alejandro Pulver <alepulver@FreeBSD.org> | 2007-02-15 03:58:28 +0000 |
---|---|---|
committer | Alejandro Pulver <alepulver@FreeBSD.org> | 2007-02-15 03:58:28 +0000 |
commit | c5e7fd99d5b109370e074d6ef4592ea06cca35fc (patch) | |
tree | dfca48fa1104813813527c404225f60ec4a3aff2 /games/tremor | |
parent | d561d56ea66b2076fae81d38489e6ff505d38c80 (diff) | |
download | ports-c5e7fd99d5b109370e074d6ef4592ea06cca35fc.tar.gz ports-c5e7fd99d5b109370e074d6ef4592ea06cca35fc.zip |
Notes
Diffstat (limited to 'games/tremor')
-rw-r--r-- | games/tremor/Makefile | 55 | ||||
-rw-r--r-- | games/tremor/distinfo | 6 | ||||
-rw-r--r-- | games/tremor/files/patch-Makefile | 227 | ||||
-rw-r--r-- | games/tremor/files/patch-src__cd_linux.c | 252 | ||||
-rw-r--r-- | games/tremor/files/patch-src__common.c | 79 | ||||
-rw-r--r-- | games/tremor/files/patch-src__host.c | 4 | ||||
-rw-r--r-- | games/tremor/files/patch-src__keys.c | 4 | ||||
-rw-r--r-- | games/tremor/files/patch-src__net.h | 11 | ||||
-rw-r--r-- | games/tremor/files/patch-src__r_part.c | 11 | ||||
-rw-r--r-- | games/tremor/files/patch-src__snd_linux.c | 14 | ||||
-rw-r--r-- | games/tremor/files/patch-src__sys.h | 11 | ||||
-rw-r--r-- | games/tremor/files/patch-src__vid_glx.c | 12 | ||||
-rw-r--r-- | games/tremor/pkg-plist | 4 |
13 files changed, 175 insertions, 515 deletions
diff --git a/games/tremor/Makefile b/games/tremor/Makefile index 45ce92d07479..431bd89dbb70 100644 --- a/games/tremor/Makefile +++ b/games/tremor/Makefile @@ -6,15 +6,15 @@ # PORTNAME= tremor -PORTVERSION= 3.2.4 -PORTREVISION= 1 +PORTVERSION= 3.2.4.1 CATEGORIES= games MASTER_SITES= http://qudos.quakedev.com/linux/quake1/:src \ http://tremor.quakedev.com/:data -DISTFILES= Tremor-v${PORTVERSION}-bin-src.linux.tar.bz2:src \ - tremor_3.2.4-bin.zip:data +DISTNAME= ${PORTNAME}-${PORTVERSION}-src +DISTFILES= ${DISTNAME}${EXTRACT_SUFX}:src \ + ${PORTNAME}_${PORTVERSION:S/.1//}-bin.zip:data DIST_SUBDIR= ${PORTNAME} -EXTRACT_ONLY= Tremor-v${PORTVERSION}-bin-src.linux.tar.bz2 +EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX} MAINTAINER= alepulver@FreeBSD.org COMMENT= Enhaced Quake engine based on JoeQuake @@ -24,23 +24,32 @@ LIB_DEPENDS= jpeg.9:${PORTSDIR}/graphics/jpeg \ EXTRACT_DEPENDS=unzip:${PORTSDIR}/archivers/unzip USE_BZIP2= yes -USE_GCC= 3.2+ +USE_GCC= 3.4+ USE_GL= yes USE_GMAKE= yes +ALL_TARGET= release -OPTIONS= GOODIES "Extra graphics, DM maps and models" off \ +OPTIONS= GLX "Build OpenGL X11 client" on \ + GOODIES "Extra graphics, DM maps and models" off \ OPTIMIZED_CFLAGS "Enable compilation optimizations" on \ SDL "Build SDL client" on \ - TEXTURES "Collection of extra textures" off \ - X86_ASM "Enable x86 assembly code when possible" on - -WRKSRC= ${WRKDIR}/Tremor_${PORTVERSION}-bin-src.linux -ALL_TARGET= release + TEXTURES "Collection of extra textures" off .include "${.CURDIR}/../quake-data/Makefile.include" .include <bsd.port.pre.mk> +.if defined(WITHOUT_GLX) && defined(WITHOUT_SDL) +IGNORE= needs at least one executable (GLX and SDL) +.endif + +.if !defined(WITHOUT_GLX) +MAKE_ENV+= BUILD_TREMOR=YES +PLIST_SUB+= GLX="" +.else +PLIST_SUB+= GLX="@comment " +.endif + .if defined(WITH_GOODIES) DISTFILES+= tremor_goodies.zip:data PLIST_SUB+= GOODIES="" @@ -48,17 +57,13 @@ PLIST_SUB+= GOODIES="" PLIST_SUB+= GOODIES="@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 +.if !defined(WITHOUT_OPTIMIZED_CFLAGS) +MAKE_ENV+= OPTIMIZE=YES +.endif .if !defined(WITHOUT_SDL) USE_SDL= sdl -MAKE_ENV+= BUILD_SDL=YES +MAKE_ENV+= BUILD_TREMOR_SDL=YES PLIST_SUB+= SDL="" .else PLIST_SUB+= SDL="@comment " @@ -86,15 +91,13 @@ post-extract: .endif do-install: - ${INSTALL_PROGRAM} ${WRKSRC}/release/${PORTNAME} ${PREFIX}/bin +.if !defined(WITHOUT_GLX) + ${INSTALL_PROGRAM} ${WRKSRC}/quake/${PORTNAME}-glx ${PREFIX}/bin +.endif .if !defined(WITHOUT_SDL) - ${INSTALL_PROGRAM} ${WRKSRC}/release/${PORTNAME}-sdl ${PREFIX}/bin + ${INSTALL_PROGRAM} ${WRKSRC}/quake/${PORTNAME}-sdl ${PREFIX}/bin .endif ${MKDIR} ${Q1DIR}/${PORTNAME} ${CP} -R ${WRKDIR}/base/* ${Q1DIR}/${PORTNAME} -.if !defined(NOPORTDOCS) - ${MKDIR} ${DOCSDIR} - ${INSTALL_DATA} ${WRKSRC}/tremor.txt ${DOCSDIR} -.endif .include <bsd.port.post.mk> diff --git a/games/tremor/distinfo b/games/tremor/distinfo index 7b6a79da788a..4477ed8dd30b 100644 --- a/games/tremor/distinfo +++ b/games/tremor/distinfo @@ -1,6 +1,6 @@ -MD5 (tremor/Tremor-v3.2.4-bin-src.linux.tar.bz2) = 303912bdee7f7a525c9859a33d01d36f -SHA256 (tremor/Tremor-v3.2.4-bin-src.linux.tar.bz2) = c31d6ac7b37971315b1ee7677ca04594e3aaa564209a63413697761c39e2dff6 -SIZE (tremor/Tremor-v3.2.4-bin-src.linux.tar.bz2) = 1186180 +MD5 (tremor/tremor-3.2.4.1-src.tar.bz2) = 77bd732035332c4b4c4aabd48358f54d +SHA256 (tremor/tremor-3.2.4.1-src.tar.bz2) = e65d1a26e69dd3179d6bd038afb2f0607a346e12ab282b0f10d7fe52bcd4b66f +SIZE (tremor/tremor-3.2.4.1-src.tar.bz2) = 584455 MD5 (tremor/tremor_3.2.4-bin.zip) = b478c32cbe75f3b3f91285f00f1a4ae1 SHA256 (tremor/tremor_3.2.4-bin.zip) = 3b1fe258c8b9850ddce9640ec462a5348be6604ab359b21031e908e53834551e SIZE (tremor/tremor_3.2.4-bin.zip) = 5432207 diff --git a/games/tremor/files/patch-Makefile b/games/tremor/files/patch-Makefile index 2a846d3940b1..64c76ac1849d 100644 --- a/games/tremor/files/patch-Makefile +++ b/games/tremor/files/patch-Makefile @@ -1,136 +1,93 @@ ---- Makefile.orig Thu Nov 10 09:57:12 2005 -+++ Makefile Mon May 29 16:46:29 2006 -@@ -9,9 +9,9 @@ - #
-
- BASEVERSION=1.09
--VERSION=$(BASEVERSION)$(GLIBC)
-+VERSION=$(BASEVERSION)
-
--BUILD_SDL=YES # Tremor sdl glx executable (uses SDL for cdrom and sound)
-+#BUILD_SDL=YES # Tremor sdl glx executable (uses SDL for cdrom and sound)
-
- ifneq (,$(findstring libc6,$(shell if [ -e /lib/libc.so.6 ];then echo libc6;fi)))
- GLIBC=-glibc
-@@ -19,45 +19,49 @@ - GLIBC=
- endif
-
--ifneq (,$(findstring alpha,$(shell uname -m)))
--ARCH=axp
--else
--ARCH=i386
--endif
-+ARCH=$(shell uname -m)
- NOARCH=noarch
-
- MOUNT_DIR=./src
-
--BUILD_DEBUG_DIR=debug$(ARCH)$(GLIBC)
--BUILD_RELEASE_DIR=release$(ARCH)$(GLIBC)
-+BUILD_DEBUG_DIR=debug
-+BUILD_RELEASE_DIR=release
-
--CC=gcc
-+CC?=gcc
-
--BASE_CFLAGS=-Dstricmp=strcasecmp -Did386 -funsigned-char #-Wall
-+BASE_CFLAGS=$(CFLAGS) -I$(LOCALBASE)/include -DDATADIR='"$(Q1DIR)"' -Dstricmp=strcasecmp -funsigned-char
-+
-+RELEASE_CFLAGS=$(BASE_CFLAGS)
-+
-+ifeq ($(strip $(USE_OPTIMIZED_CFLAGS)),YES)
-+RELEASE_CFLAGS+=-O2 -ffast-math -funroll-loops \
-+ -fomit-frame-pointer -fexpensive-optimizations -fno-strict-aliasing
-+endif
-
--RELEASE_CFLAGS=$(BASE_CFLAGS) -march=i686 -O2 -ffast-math -funroll-loops \
-- -fomit-frame-pointer -fexpensive-optimizations -fno-strict-aliasing -pipe
--
- DEBUG_CFLAGS=$(BASE_CFLAGS) -g
-
-+LDFLAGS+=-L$(LOCALBASE)/lib -lm
-
--LDFLAGS=-lm -ldl
-+ifeq ($(ARCH),i386)
-+USE_X86_ASM ?= YES
-+else
-+USE_X86_ASM = NO
-+endif
-
--ifeq ($(strip $(BUILD_SDL)),YES)
-- LDFLAGS += \
-- -lSDL
-- BASE_CFLAGS += \
-- -D_SDL_FIX -D_SDL_BIN
-+ifeq ($(strip $(USE_X86_ASM)),YES)
-+BASE_CFLAGS+=-Did386
- endif
-
-
- ifeq ($(strip $(BUILD_SDL)),YES)
--SDLCFLAGS=$(shell sdl-config --cflags)
--SDLLDFLAGS=$(shell sdl-config --libs)
-+ BASE_CFLAGS += \
-+ -D_SDL_FIX -D_SDL_BIN
-+ SDLCFLAGS=$(shell $(SDL_CONFIG) --cflags)
-+ SDLLDFLAGS=$(shell $(SDL_CONFIG) --libs)
- endif
-
--GLLDFLAGS=-L/usr/X11R6/lib -L/usr/lib -L/usr/local/lib -lGL -lGLU -lX11 -lXext -ldl -lXxf86dga -lXxf86vm -lm -lpng -lz -ljpeg
--GLCFLAGS= -I/usr/include -I/usr/X11R6/include
-+GLLDFLAGS=-L$(X11BASE)/lib -lGL -lGLU -lX11 -lXext -lXxf86dga -lXxf86vm -lpng -lz -ljpeg
-+GLCFLAGS=-I$(X11BASE)/include
-
- DO_CC=$(CC) $(CFLAGS) -o $@ -c $<
- DO_DEBUG_CC=$(CC) $(DEBUG_CFLAGS) -o $@ -c $<
-@@ -73,10 +77,10 @@ - # SETUP AND BUILD
- #############################################################################
-
--TARGETS=$(BUILDDIR)/tremor.glx
-+TARGETS=$(BUILDDIR)/tremor
-
- ifeq ($(strip $(BUILD_SDL)),YES)
-- TARGETS +=$(BUILDDIR)/tremor-sdl.glx
-+ TARGETS += $(BUILDDIR)/tremor-sdl
- endif
-
- all:
-@@ -166,11 +170,14 @@ - $(BUILDDIR)/glquake/sys_linux.o \
- $(BUILDDIR)/glquake/snd_dma.o \
- $(BUILDDIR)/glquake/snd_mem.o \
-- $(BUILDDIR)/glquake/snd_mix.o \
-- \
-+ $(BUILDDIR)/glquake/snd_mix.o
-+
-+ifeq ($(strip $(USE_X86_ASM)),YES)
-+GLQUAKE_OBJS+= \
- $(BUILDDIR)/glquake/math.o \
- $(BUILDDIR)/glquake/snd_mixa.o \
- $(BUILDDIR)/glquake/sys_x86.o
-+endif
-
- GLQUAKE_LNX_OBJS = \
- $(BUILDDIR)/glquake/cd_linux.o \
-@@ -183,10 +190,10 @@ - GLX_OBJS=$(BUILDDIR)/glquake/vid_glx.o \
- $(BUILDDIR)/glquake/vid_common_gl.o
-
--$(BUILDDIR)/tremor.glx : $(GLQUAKE_OBJS) $(GLQUAKE_LNX_OBJS) $(GLX_OBJS)
-+$(BUILDDIR)/tremor : $(GLQUAKE_OBJS) $(GLQUAKE_LNX_OBJS) $(GLX_OBJS)
- $(CC) $(CFLAGS) -o $@ $(GLQUAKE_OBJS) $(GLQUAKE_LNX_OBJS) $(GLX_OBJS) $(GLLDFLAGS) $(LDFLAGS)
-
--$(BUILDDIR)/tremor-sdl.glx : $(GLQUAKE_OBJS) $(GLQUAKE_SDL_OBJS) $(GLX_OBJS)
-+$(BUILDDIR)/tremor-sdl : $(GLQUAKE_OBJS) $(GLQUAKE_SDL_OBJS) $(GLX_OBJS)
- $(CC) $(CFLAGS) -o $@ $(GLQUAKE_OBJS) $(GLQUAKE_SDL_OBJS) $(GLX_OBJS) $(GLLDFLAGS) $(LDFLAGS) $(SDLLDFLAGS)
-
- $(BUILDDIR)/glquake/cl_demo.o : $(MOUNT_DIR)/cl_demo.c
-@@ -395,4 +402,4 @@ - $(GLX_OBJS) \
- $(GLQUAKE_LNX_OBJS) \
- $(GLQUAKE_SDL_OBJS)
-- +--- Makefile.orig Wed Jan 17 06:19:35 2007 ++++ Makefile Wed Feb 14 15:40:17 2007 +@@ -21,51 +21,44 @@ + BUILD_DEBUG_DIR=debug_build + BUILD_RELEASE_DIR=release_build + +-BUILD_TREMOR=YES # Tremor glx executable (uses ioctl's for cdrom and oss for sound). +-BUILD_TREMOR_SDL=YES # Tremor sdl glx executable (uses SDL for cdrom and sound). +-BUILD_DZIP=NO # Dzip binary for compress/uncompress demos ++BUILD_TREMOR?=NO # Tremor glx executable (uses ioctl's for cdrom and oss for sound). ++BUILD_TREMOR_SDL?=NO # Tremor sdl glx executable (uses SDL for cdrom and sound). ++BUILD_DZIP?=NO # Dzip binary for compress/uncompress demos + + ifeq ($(OSTYPE),linux) + WITH_FMOD=NO # Use FMOD library for ingame music, no tested + endif + + # Use DATADIR for reading and ~/.tremor for writting. +-WITH_DATADIR=NO ++WITH_DATADIR=YES + # The next option is required when DATADIR is set to YES, Use ~/ for writing, instead of . +-WITH_HOMEDIR=NO ++WITH_HOMEDIR=YES + # Directory within $HOME to write to + HOMEDIR=.tremor + + +-CC=gcc ++CC?=gcc + CC_VERSION=$(shell $(CC) -dumpversion | sed -e 's/\..*//g') + CC_VERSION_NUM=$(shell $(CC) -dumpversion) + +-OPTIMIZE=NO # Enable Optimization, release build only. ++OPTIMIZE?=NO # Enable Optimization, release build only. + STRIP=NO # Remove symbols from binaries, reduce size. + VERBOSE=NO + +-LOCALBASE= /usr/local +-GAMEBASE= /usr/local +-X11BASE=/usr/X11R6 ++LOCALBASE?=/usr/local ++GAMEBASE=$(LOCALBASE) ++X11BASE?=/usr/X11R6 + SYSBINDIR=$(LOCALBASE)/bin +-DATADIR= $(GAMEBASE)/games/quake +- +-ifeq ($(ARCH),x86_64) +- ARCH_LIBDIR=64 +-endif ++DATADIR=$(Q1DIR) + + # Seems that gcc 4.0 has some issues with -march option here, so i added it by default. + # Feel free to remove it. +-BASE_CFLAGS+= \ ++BASE_CFLAGS+= $(CFLAGS) \ + -I$(LOCALBASE)/include \ + -I$(X11BASE)/include \ + -Dstricmp=strcasecmp \ + -DGLQUAKE +-ifeq ($(ARCH),i386) +- BASE_CFLAGS+=-march=$(MARCH) +-endif +- ++ + DEBUG_CFLAGS=$(BASE_CFLAGS) -g -ggdb -Wall + RELEASE_CFLAGS+=$(BASE_CFLAGS) \ + -fno-strict-aliasing \ +@@ -76,9 +69,6 @@ + -falign-loops=2 \ + -falign-jumps=2 \ + -falign-functions=2 +- ifeq ($(ARCH),i386) +- RELEASE_CFLAGS+=-march=$(MARCH) +- endif + endif + + ifeq ($(strip $(STRIP)),YES) +@@ -107,7 +97,7 @@ + -lGL -lGLU -ljpeg `libpng-config --libs` + + +-SDL_CONFIG=sdl-config ++SDL_CONFIG?=sdl-config + SDL_CFLAGS=$(shell $(SDL_CONFIG) --cflags) + SDL_LDFLAGS=$(shell $(SDL_CONFIG) --libs) + +@@ -405,4 +395,4 @@ + @echo + @printf "Type tremor as user to start playing.\n" + @echo ..... +- @echo Done \ No newline at end of file -+
++ @echo Done diff --git a/games/tremor/files/patch-src__cd_linux.c b/games/tremor/files/patch-src__cd_linux.c deleted file mode 100644 index 78e5d12e4eca..000000000000 --- a/games/tremor/files/patch-src__cd_linux.c +++ /dev/null @@ -1,252 +0,0 @@ ---- ./src/cd_linux.c.orig Sun Sep 12 09:41:28 2004 -+++ ./src/cd_linux.c Tue May 16 14:59:52 2006 -@@ -31,7 +31,11 @@ - #include <time.h> - #include <errno.h> - -+#ifdef __FreeBSD__ -+#include <sys/cdio.h> -+#else - #include <linux/cdrom.h> -+#endif - - #include "quakedef.h" - -@@ -54,8 +58,13 @@ - if (cdfile == -1 || !enabled) - return; // no cd init'd - -+#ifdef __FreeBSD__ -+ if (ioctl(cdfile, CDIOCEJECT) == -1) -+ Con_DPrintf ("ioctl cdioceject failed\n"); -+#else - if (ioctl(cdfile, CDROMEJECT) == -1) - Con_DPrintf ("ioctl cdromeject failed\n"); -+#endif - } - - static void CDAudio_CloseDoor (void) -@@ -63,38 +72,67 @@ - if (cdfile == -1 || !enabled) - return; // no cd init'd - -+#ifdef __FreeBSD__ -+ if (ioctl(cdfile, CDIOCCLOSE) == -1) -+ Con_DPrintf ("ioctl cdiocclose failed\n"); -+#else - if (ioctl(cdfile, CDROMCLOSETRAY) == -1) - Con_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) -+ { -+ Con_DPrintf ("ioctl cdioreadtocheader failed\n"); -+#else - if (ioctl(cdfile, CDROMREADTOCHDR, &tochdr) == -1) - { - Con_DPrintf ("ioctl cdromreadtochdr failed\n"); -+#endif - return -1; - } - -+#ifdef __FreeBSD__ -+ if (tochdr.starting_track < 1) -+#else - if (tochdr.cdth_trk0 < 1) -+#endif - { - Con_DPrintf ("CDAudio: no music tracks\n"); - return -1; - } - - cdValid = true; -+#ifdef __FreeBSD__ -+ maxTrack = tochdr.ending_track; -+#else - maxTrack = tochdr.cdth_trk1; -+#endif - - return 0; - } - - void CDAudio_Play (byte track, qboolean 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; -@@ -114,6 +152,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 ) -+ { -+ Con_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; -@@ -123,6 +176,7 @@ - return; - } - if (entry.cdte_ctrl == CDROM_DATA_TRACK) -+#endif - { - Con_Printf ("CDAudio: track %i is not audio\n", track); - return; -@@ -135,19 +189,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) -+ { -+ Con_DPrintf ("ioctl cdiocplaytracks failed\n"); -+#else - if (ioctl(cdfile, CDROMPLAYTRKIND, &ti) == -1) - { - Con_DPrintf ("ioctl cdromplaytrkind failed\n"); -+#endif - return; - } - -+#ifdef __FreeBSD__ -+ if (ioctl(cdfile, CDIOCRESUME) == -1) -+ Con_DPrintf ("ioctl cdiocresume failed\n"); -+#else - if (ioctl(cdfile, CDROMRESUME) == -1) - Con_DPrintf ("ioctl cdromresume failed\n"); -+#endif - - playLooping = looping; - playTrack = track; -@@ -165,8 +237,13 @@ - if (!playing) - return; - -+#ifdef __FreeBSD__ -+ if (ioctl(cdfile, CDIOCSTOP) == -1) -+ Con_DPrintf ("ioctl cdiocstop failed (%d)\n", errno); -+#else - if (ioctl(cdfile, CDROMSTOP) == -1) - Con_DPrintf ("ioctl cdromstop failed (%d)\n", errno); -+#endif - - wasPlaying = false; - playing = false; -@@ -180,8 +257,13 @@ - if (!playing) - return; - -+#ifdef __FreeBSD__ -+ if (ioctl(cdfile, CDIOCPAUSE) == -1) -+ Con_DPrintf ("ioctl cdiocpause failed\n"); -+#else - if (ioctl(cdfile, CDROMPAUSE) == -1) - Con_DPrintf ("ioctl cdrompause failed\n"); -+#endif - - wasPlaying = playing; - playing = false; -@@ -198,8 +280,13 @@ - if (!wasPlaying) - return; - -+#ifdef __FreeBSD__ -+ if (ioctl(cdfile, CDIOCRESUME) == -1) -+ Con_DPrintf ("ioctl cdiocresume failed\n"); -+#else - if (ioctl(cdfile, CDROMRESUME) == -1) - Con_DPrintf ("ioctl cdromresume failed\n"); -+#endif - playing = true; - } - -@@ -322,7 +409,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) -@@ -347,6 +439,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 ) { -+ Con_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) - { -@@ -360,6 +470,7 @@ - if (playLooping) - CDAudio_Play (playTrack, true); - } -+#endif - } - } - diff --git a/games/tremor/files/patch-src__common.c b/games/tremor/files/patch-src__common.c index f74338828d0a..82f7c1953d3e 100644 --- a/games/tremor/files/patch-src__common.c +++ b/games/tremor/files/patch-src__common.c @@ -1,48 +1,61 @@ ---- ./src/common.c.orig Thu Nov 10 09:56:53 2005 -+++ ./src/common.c Tue May 16 15:00:44 2006 -@@ -1769,14 +1769,18 @@ - */ - void COM_InitFilesystem (void) +--- common.c.orig Fri Jan 12 10:37:34 2007 ++++ common.c Thu Feb 15 00:51:54 2007 +@@ -1599,9 +1599,13 @@ { -+ char *home; -+ char homepath[MAX_OSPATH]; - int i; - -+ home = getenv("HOME"); -+ - // -basedir <path> - // Overrides the system supplied base directory (under GAMENAME) - if ((i = COM_CheckParm ("-basedir")) && i < com_argc-1) - Q_strncpyz (com_basedir, com_argv[i+1], sizeof(com_basedir)); - else -- Q_strncpyz (com_basedir, host_parms.basedir, sizeof(com_basedir)); -+ Q_strncpyz (com_basedir, DATADIR, sizeof(com_basedir)); + searchpath_t *search,*otherpaths=NULL; + pack_t *pak; +- char *filename; ++ char *filename, *p; + dirdata_t dirdata; - for (i=0 ; i < strlen(com_basedir) ; i++) - if (com_basedir[i] == '\\') -@@ -1788,7 +1792,11 @@ ++ if ((p = strrchr(dir, '/'))) ++ Q_strncpyz (com_gamedirname, ++p, sizeof(com_gamedirname)); ++ else ++ Q_strncpyz (com_gamedirname, p, sizeof(com_gamedirname)); + // update current gamedir + Q_strncpyz (com_gamedir, dir, sizeof(com_gamedir)); + // +@@ -1768,7 +1772,7 @@ + { + int i; + #if defined (HOMEDIR) +- char *home, *tmp; ++ char *home, homepath[MAX_OSPATH]; + home = getenv("HOME"); + #endif - // start up with GAMENAME by default (id1) - COM_AddGameDirectory (va("%s/"GAMENAME, com_basedir)); +@@ -1797,7 +1801,11 @@ + if (home != NULL) + COM_AddGameDirectory(va("%s/"HOMEDIR"/"GAMENAME, home)); + #endif - COM_AddGameDirectory (va("%s/base", com_basedir)); // JT021305 - use base as default GAMENAME ++ COM_AddGameDirectory (va("%s/tremor", com_basedir)); ++#if defined (HOMEDIR) + if (home != NULL) -+ COM_AddGameDirectory(va("%s/.tremor/"GAMENAME, home)); -+ COM_AddGameDirectory (va("%s/tremor", com_basedir)); // JT021305 - use base as default GAMENAME -+ if (home != NULL) -+ COM_AddGameDirectory(va("%s/.tremor/tremor", home)); ++ COM_AddGameDirectory(va("%s/"HOMEDIR"/tremor", home)); ++#endif if (COM_CheckParm("-rogue")) COM_AddGameDirectory (va("%s/rogue", com_basedir)); -@@ -1807,4 +1815,12 @@ - // Adds basedir/gamedir as an override game - if ((i = COM_CheckParm("-game")) && i < com_argc-1) +@@ -1818,15 +1826,12 @@ COM_AddGameDirectory (va("%s/%s", com_basedir, com_argv[i+1])); -+ + + #if defined (HOMEDIR) +- tmp = Sys_HomeDir(); +- Sys_mkdir(tmp); +- COM_AddGameDirectory (tmp); +- chdir(tmp); +- if ((i = COM_CheckParm("-game")) && i < com_argc-1) +- { +- tmp = va("%s/%s", Sys_HomeDir(), com_argv[i+1]); +- Sys_mkdir(tmp); +- COM_AddGameDirectory (tmp); + if (home != NULL) { -+ Q_snprintfz(homepath, sizeof(homepath), "%s/.tremor/%s", ++ Q_snprintfz(homepath, sizeof(homepath), "%s/"HOMEDIR"/%s", + home, com_gamedirname); + COM_CreatePath(homepath); + Sys_mkdir(homepath); + COM_AddGameDirectory(homepath); -+ } + } + #endif } diff --git a/games/tremor/files/patch-src__host.c b/games/tremor/files/patch-src__host.c index 3105f6d8bebd..25deb914f717 100644 --- a/games/tremor/files/patch-src__host.c +++ b/games/tremor/files/patch-src__host.c @@ -1,5 +1,5 @@ ---- ./src/host.c.orig Sat Mar 26 21:14:38 2005 -+++ ./src/host.c Tue May 16 14:59:52 2006 +--- ./host.c.orig Sat Mar 26 21:14:38 2005 ++++ ./host.c Tue May 16 14:59:52 2006 @@ -987,7 +987,7 @@ Host_WriteConfiguration (); diff --git a/games/tremor/files/patch-src__keys.c b/games/tremor/files/patch-src__keys.c index 4172cd47e242..a019fe014754 100644 --- a/games/tremor/files/patch-src__keys.c +++ b/games/tremor/files/patch-src__keys.c @@ -1,5 +1,5 @@ ---- ./src/keys.c.orig Fri Oct 29 19:15:24 2004 -+++ ./src/keys.c Tue May 16 14:59:52 2006 +--- ./keys.c.orig Fri Oct 29 19:15:24 2004 ++++ ./keys.c Tue May 16 14:59:52 2006 @@ -674,7 +674,7 @@ FILE *cmdhist; cmdhistory_t cmdhistory; diff --git a/games/tremor/files/patch-src__net.h b/games/tremor/files/patch-src__net.h deleted file mode 100644 index d8a6a23a933e..000000000000 --- a/games/tremor/files/patch-src__net.h +++ /dev/null @@ -1,11 +0,0 @@ ---- ./src/net.h.orig Sun Nov 14 08:19:46 2004 -+++ ./src/net.h Tue May 16 14:59:52 2006 -@@ -253,7 +253,7 @@ - extern int hostCacheCount; - extern hostcache_t hostcache[HOSTCACHESIZE]; - --#if !defined(_WIN32 ) && !defined (__linux__) -+#if !defined(_WIN32 ) && !defined (__unix__) - #ifndef htonl - extern unsigned long htonl (unsigned long hostlong); - #endif diff --git a/games/tremor/files/patch-src__r_part.c b/games/tremor/files/patch-src__r_part.c deleted file mode 100644 index bc558933b4b3..000000000000 --- a/games/tremor/files/patch-src__r_part.c +++ /dev/null @@ -1,11 +0,0 @@ ---- src/r_part.c.orig Fri Mar 25 17:50:30 2005 -+++ src/r_part.c Mon May 29 17:46:46 2006 -@@ -59,7 +59,7 @@ - - vec3_t r_pright, r_pup, r_ppn; - --#if !id386 -+#if 0 - - /* - ============== diff --git a/games/tremor/files/patch-src__snd_linux.c b/games/tremor/files/patch-src__snd_linux.c deleted file mode 100644 index 1443917ae971..000000000000 --- a/games/tremor/files/patch-src__snd_linux.c +++ /dev/null @@ -1,14 +0,0 @@ ---- ./src/snd_linux.c.orig Mon Oct 31 20:29:19 2005 -+++ ./src/snd_linux.c Tue May 16 14:59:52 2006 -@@ -25,7 +25,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" - diff --git a/games/tremor/files/patch-src__sys.h b/games/tremor/files/patch-src__sys.h deleted file mode 100644 index 5fb6bae13433..000000000000 --- a/games/tremor/files/patch-src__sys.h +++ /dev/null @@ -1,11 +0,0 @@ ---- ./src/sys.h.orig Mon Oct 31 20:47:55 2005 -+++ ./src/sys.h Tue May 16 14:59:52 2006 -@@ -65,7 +65,7 @@ - - char *Sys_GetClipboardData (void); - --#ifdef __linux__ //QuDos *.pak linux loading from tenebrae -+#ifdef __unix__ //QuDos *.pak linux loading from tenebrae - typedef struct - { - char entry[MAX_OSPATH]; // current entry in the list diff --git a/games/tremor/files/patch-src__vid_glx.c b/games/tremor/files/patch-src__vid_glx.c deleted file mode 100644 index 53d4e358b7bd..000000000000 --- a/games/tremor/files/patch-src__vid_glx.c +++ /dev/null @@ -1,12 +0,0 @@ ---- ./src/vid_glx.c.orig Thu Nov 10 07:03:04 2005 -+++ ./src/vid_glx.c Tue May 16 14:59:52 2006 -@@ -22,7 +22,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> diff --git a/games/tremor/pkg-plist b/games/tremor/pkg-plist index 9a3c141ebdee..7d7e8edb6664 100644 --- a/games/tremor/pkg-plist +++ b/games/tremor/pkg-plist @@ -1,6 +1,5 @@ -bin/tremor +%%GLX%%bin/tremor-glx %%SDL%%bin/tremor-sdl -%%PORTDOCS%%%%DOCSDIR%%/tremor.txt %%GOODIES%%%%Q1DIR%%/tremor/md3ammo.pak %%Q1DIR%%/tremor/autoexec.cfg %%Q1DIR%%/tremor/config.cfg @@ -13,4 +12,3 @@ bin/tremor @dirrm %%Q1DIR%%/tremor/textures/charsets @dirrm %%Q1DIR%%/tremor/textures @dirrm %%Q1DIR%%/tremor -%%PORTDOCS%%@dirrm %%DOCSDIR%% |