aboutsummaryrefslogtreecommitdiffstats
path: root/games
diff options
context:
space:
mode:
authorbapt <bapt@FreeBSD.org>2012-11-29 15:45:36 +0800
committerbapt <bapt@FreeBSD.org>2012-11-29 15:45:36 +0800
commitecf9fa79e4c9fa96271dbddc8a7a2b191ba257fa (patch)
treeef11a75ce3015b542bf73748f26d093a9bce5bf0 /games
parent0fe72be700e5ea2a47a340127cbac5634d6f882d (diff)
downloadfreebsd-ports-gnome-ecf9fa79e4c9fa96271dbddc8a7a2b191ba257fa.tar.gz
freebsd-ports-gnome-ecf9fa79e4c9fa96271dbddc8a7a2b191ba257fa.tar.zst
freebsd-ports-gnome-ecf9fa79e4c9fa96271dbddc8a7a2b191ba257fa.zip
2012-11-29 net/amqp08: No more public distfiles
2012-11-29 games/kmquake2: No more public distfiles Feature safe: yes
Diffstat (limited to 'games')
-rw-r--r--games/Makefile1
-rw-r--r--games/kmquake2/Makefile182
-rw-r--r--games/kmquake2/distinfo12
-rw-r--r--games/kmquake2/files/extra-patch-addons__Makefile174
-rw-r--r--games/kmquake2/files/patch-Makefile156
-rw-r--r--games/kmquake2/files/patch-client__snd_loc.h11
-rw-r--r--games/kmquake2/files/patch-client__snd_ogg.c390
-rw-r--r--games/kmquake2/files/patch-client__snd_ogg.h92
-rw-r--r--games/kmquake2/files/patch-qcommon__files.c229
-rw-r--r--games/kmquake2/files/patch-qcommon__qcommon.h10
-rw-r--r--games/kmquake2/files/patch-unix__gl_glx.c30
-rw-r--r--games/kmquake2/files/patch-unix__sys_unix.c45
-rw-r--r--games/kmquake2/pkg-descr1
-rw-r--r--games/kmquake2/pkg-plist49
14 files changed, 0 insertions, 1382 deletions
diff --git a/games/Makefile b/games/Makefile
index 026ce9db0efe..ef8945e1593f 100644
--- a/games/Makefile
+++ b/games/Makefile
@@ -440,7 +440,6 @@
SUBDIR += klondike
SUBDIR += kmancala
SUBDIR += kmastermind
- SUBDIR += kmquake2
SUBDIR += knights
SUBDIR += knights-kde4
SUBDIR += kobodeluxe
diff --git a/games/kmquake2/Makefile b/games/kmquake2/Makefile
deleted file mode 100644
index 095cb9c95a4e..000000000000
--- a/games/kmquake2/Makefile
+++ /dev/null
@@ -1,182 +0,0 @@
-# Created by: alepulver
-# $FreeBSD$
-
-PORTNAME= kmquake2
-PORTVERSION= 0.19
-PORTREVISION= 16
-CATEGORIES= games
-MASTER_SITES= http://qudos.quakedev.com/linux/quake2/engines/KMQuake2/:src \
- http://qexpo2005.quakedev.com/uploaded/54/:data \
- http://www.markshan.com/maps/:pax \
- ftp://ftp.splatterworld.de/games/q2/mods/:pax \
- http://www.markshan.com/engine/:paxpatch
-DISTNAME= KMQuake2_${PORTVERSION:S/.//}_src_unix
-DISTFILES= ${DISTNAME}${EXTRACT_SUFX}:src \
- ${KMQ2_FLARES}:src \
- ${KMQ2_DATA}:data
-DIST_SUBDIR= ${PORTNAME}
-EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX}
-
-MAINTAINER= ports@FreeBSD.org
-COMMENT= Enhanced Quake2 OpenGL only engine with Lazarus support
-
-DEPRECATED= No more public distfiles
-EXPIRATION_DATE= 2012-11-29
-
-EXTRACT_DEPENDS=unzip:${PORTSDIR}/archivers/unzip
-
-USE_BZIP2= yes
-USE_XORG= xxf86dga
-USE_GMAKE= yes
-WRKSRC= ${WRKDIR}/KMQuake2_${PORTVERSION:S/.//}_src_unix
-
-OPTIONS_MULTI= EXE
-OPTIONS_MULTI_EXE= CLIENT DEDICATED SDL
-OPTIONS_DEFINE= 3ZB2 CFT GAME HYBRID LIGHTS OPTIMIZED_CFLAGS PAX ROGUE XMATRIX ZAERO DOCS
-OPTIONS_DEFAULT= CLIENT DEDICATED OPTIMIZED_CFLAGS SDL GAME
-CLIENT_DESC= Build client
-CFT_DESC= Build CTF (Capture The Flag) modification
-3ZB2_DESC= Build 3zb2 modification (bots)
-CTF_DESC= Build CTF (Capture The Flag) modification
-DEDICATED_DESC= Build dedicated server
-GAME_DESC= Build a main game .so file (required)
-HYBRID_DESC= Build Rogue-Xatrix hybrid modification
-LIGHTS_DESC= Build Lights modification with bots
-PAX_DESC= Build Pax Imperia modification
-ROGUE_DESC= Build Ground Zero (Rogue) mission pack
-XMATRIX_DESC= Build The Reckoning (Xatrix) mission pack
-ZAERO_DESC= Build Zaero mission pack
-
-ALL_TARGET= release
-
-MAKE_ENV= LIBDIR="${LIBDIR}"
-PLIST_SUB= LIBDIR=${LIBDIR:S/${PREFIX}\///}
-
-LIBDIR= ${PREFIX}/lib/${PORTNAME}
-
-KMQ2_ADDONS= KMQuake2_addons_src_unix-1${EXTRACT_SUFX}
-KMQ2_DATA= kmquake2_${PORTVERSION:S/.//}.zip
-KMQ2_FLARES= Flares.tar
-PAX_DATA= paximperia.zip
-PAX_PATCH= pax_101_patch.zip
-
-MOD_LIST= 3ZB2 CTF HYBRID LIGHTS PAX ROGUE XATRIX ZAERO
-
-.include "${.CURDIR}/../quake2-data/Makefile.include"
-
-.include <bsd.port.options.mk>
-
-.for mod in ${MOD_LIST}
-. if ${PORT_OPTIONS:M${mod}}
-MOD_REQUESTED+= ${mod:L}
-MAKE_ENV+= BUILD_${mod}=YES
-PLIST_SUB+= ${mod}=""
-. else
-PLIST_SUB+= ${mod}="@comment "
-. endif
-.endfor
-
-.if defined(MOD_REQUESTED)
-DISTFILES+= ${KMQ2_ADDONS}:src
-EXTRACT_ONLY+= ${KMQ2_ADDONS}
-EXTRA_PATCHES+= ${FILESDIR}/extra-patch-addons__Makefile
-MAKE_ENV+= KMQ2_ADDONS="${KMQ2_ADDONS:S/-1${EXTRACT_SUFX}//}"
-.endif
-
-.if ${PORT_OPTIONS:MCLIENT} || !empty(PORT_OPTIONS:MSDL)
-LIB_DEPENDS+= jpeg.11:${PORTSDIR}/graphics/jpeg \
- png15:${PORTSDIR}/graphics/png \
- vorbis.4:${PORTSDIR}/audio/libvorbis
-USE_OPENAL= al
-USE_GL= yes
-.endif
-
-.if ${PORT_OPTIONS:MCLIENT}
-MAKE_ENV+= BUILD_KMQUAKE2=YES
-PLIST_SUB+= CLIENT=""
-Q2BIN+= ${PORTNAME}
-.else
-PLIST_SUB+= CLIENT="@comment "
-.endif
-
-.if ${PORT_OPTIONS:MDEDICATED}
-MAKE_ENV+= BUILD_KMQUAKE2_DEDICATED=YES
-PLIST_SUB+= DEDICATED=""
-Q2BIN+= ${PORTNAME}-ded
-.else
-PLIST_SUB+= DEDICATED="@comment "
-.endif
-
-.if ${PORT_OPTIONS:MGAME}
-MAKE_ENV+= BUILD_GAME=YES
-PLIST_SUB+= GAME=""
-.else
-PLIST_SUB+= GAME="@comment "
-.endif
-
-.if ${PORT_OPTIONS:MOPTIMIZED_CFLAGS}
-MAKE_ENV+= OPTIMIZED_CFLAGS=YES
-.endif
-
-.if ${PORT_OPTIONS:MPAX}
-DISTFILES+= ${PAX_DATA}:pax \
- ${PAX_PATCH}:paxpatch
-PLIST_SUB+= PAX=""
-.else
-PLIST_SUB+= PAX="@comment "
-.endif
-
-.if ${PORT_OPTIONS:MSDL}
-USE_SDL= sdl
-MAKE_ENV+= BUILD_KMQUAKE2_SDL=YES
-PLIST_SUB+= SDL=""
-Q2BIN+= ${PORTNAME}-sdl
-.else
-PLIST_SUB+= SDL="@comment "
-.endif
-
-post-patch:
-# Resolve name collision with jpeg-8 and API png
- ${REINPLACE_CMD} -e 's|jpeg_mem_src|local_jpeg_mem_src|' \
- -e 's|png_set_gray_1_2_4_to_8|png_set_expand_gray_1_2_4_to_8|' \
- ${WRKSRC}/renderer/r_image.c
-.if defined(MOD_REQUESTED)
- @${FIND} ${WRKDIR}/${KMQ2_ADDONS:S/-1${EXTRACT_SUFX}//} \
- -type f -print0 | ${XARGS} -0 ${REINPLACE_CMD} -e \
- 's|__linux__|__unix__|; s|#include <bits/nan\.h>||'
-.endif
-
-post-extract:
- @${UNZIP_CMD} -qo \
- ${DISTDIR}/${DIST_SUBDIR}/${KMQ2_DATA} \
- baseq2/kmquake2.pk3 -d ${WRKSRC}/quake2
- @${TAR} xf ${DISTDIR}/${DIST_SUBDIR}/${KMQ2_FLARES} -C ${WRKSRC}
- @${CHMOD} go-w ${WRKSRC}/quake2/baseq2/kmquake2.pk3
-.if ${PORT_OPTIONS:MPAX}
- @${UNZIP_CMD} -qo ${DISTDIR}/${DIST_SUBDIR}/${PAX_DATA} \
- -x "*.dll" "*.bat" -d ${WRKSRC}/quake2/pax
- @${UNZIP_CMD} -qo ${DISTDIR}/${DIST_SUBDIR}/${PAX_PATCH} \
- -x "*.dll" -d ${WRKSRC}/quake2/pax
-.endif
-
-do-install:
-.for bin in ${Q2BIN}
- ${INSTALL_PROGRAM} ${WRKSRC}/quake2/${bin} ${PREFIX}/bin
-.endfor
- ${MKDIR} ${LIBDIR}/baseq2
-.if ${PORT_OPTIONS:MGAME}
- ${CP} -Rp ${WRKSRC}/quake2/baseq2/* ${LIBDIR}/baseq2
-.endif
-.if defined(MOD_REQUESTED)
- ${CP} -Rp ${WRKDIR}/${KMQ2_ADDONS:S/-1${EXTRACT_SUFX}//}/quake2/* \
- ${LIBDIR}
-.endif
-.if ${PORT_OPTIONS:MPAX}
- ${CP} -R ${WRKSRC}/quake2/pax ${LIBDIR}
-.endif
-.if ${PORT_OPTIONS:MDOCS}
- ${MKDIR} ${DOCSDIR}
- cd ${WRKSRC} && ${INSTALL_DATA} Readme.unix kmquake2.txt ${DOCSDIR}
-.endif
-
-.include <bsd.port.mk>
diff --git a/games/kmquake2/distinfo b/games/kmquake2/distinfo
deleted file mode 100644
index c21fe5b8c5e1..000000000000
--- a/games/kmquake2/distinfo
+++ /dev/null
@@ -1,12 +0,0 @@
-SHA256 (kmquake2/KMQuake2_019_src_unix.tar.bz2) = ab2fa3ca4c19afed294863041d2b00ffe46ac376a5ff2486ce60873a26f70214
-SIZE (kmquake2/KMQuake2_019_src_unix.tar.bz2) = 888147
-SHA256 (kmquake2/Flares.tar) = 601107405d5aee315c71d0dccbae0a79e4f2f58801892022542f061dd724ce74
-SIZE (kmquake2/Flares.tar) = 501760
-SHA256 (kmquake2/kmquake2_019.zip) = 7a00ee04f75e5e9e8461ebead803e69b28fe9d189ab2fbdfdd3070be2697d8fb
-SIZE (kmquake2/kmquake2_019.zip) = 9671912
-SHA256 (kmquake2/KMQuake2_addons_src_unix-1.tar.bz2) = 405ff591d0470698ea24e13fc431d96f9437e62150554df81da8d7c1cb180b8e
-SIZE (kmquake2/KMQuake2_addons_src_unix-1.tar.bz2) = 2651741
-SHA256 (kmquake2/paximperia.zip) = 4ff15f652f191058736239a6480869bd39d9c4f3a1c77cc733167a79fc7398b5
-SIZE (kmquake2/paximperia.zip) = 38240357
-SHA256 (kmquake2/pax_101_patch.zip) = 096da429ee0c34122c0cfbd49472b7a9ae6480e410546e6332d97fb15b3a02f5
-SIZE (kmquake2/pax_101_patch.zip) = 1342990
diff --git a/games/kmquake2/files/extra-patch-addons__Makefile b/games/kmquake2/files/extra-patch-addons__Makefile
deleted file mode 100644
index 986990b1d16b..000000000000
--- a/games/kmquake2/files/extra-patch-addons__Makefile
+++ /dev/null
@@ -1,174 +0,0 @@
---- ../KMQuake2_addons_src_unix/Makefile.orig Sun Apr 9 13:33:05 2006
-+++ ../KMQuake2_addons_src_unix/Makefile Sat May 20 11:55:47 2006
-@@ -17,32 +17,16 @@
- #OPTIONS
- ######################################
-
--BUILD_3ZB2=YES # game$(ARCH).so for 3zb2 bots.
--BUILD_CTF=YES # game$(ARCH).so for Capture the Flag.
--BUILD_HYBRID=YES # game$(ARCH).so for Rogue-Xatrix hybrid.
--BUILD_LAZARUS=YES # game$(ARCH).so for Lazarus mod.
--BUILD_LIGHTS=YES # game$(ARCH).so for Lights mod with bots.
--BUILD_PAX=YES # game$(ARCH).so for Pax Imperia Addon.
--BUILD_ROGUE=YES # game$(ARCH).so for Rogue (see README for details)
--BUILD_XATRIX=YES # game$(ARCH).so for Xatrix (see README for details)
--BUILD_ZAERO=YES # game$(ARCH).so for Zaero (commercial expansion pack)
-
- ######################################
-
- ######################################
-
--VERSION=KMQuake2_Addons
- MOUNT_DIR=.
- BINDIR=quake2
-
- CC?=gcc
--BASE_CFLAGS=
- DEBUG_CFLAGS=$(BASE_CFLAGS) -g -ggdb -Wall -pipe
--RELEASE_CFLAGS=$(BASE_CFLAGS) -O2 -ffast-math -funroll-loops -fomit-frame-pointer -fexpensive-optimizations
--
--ifeq ($(ARCH),i386)
-- RELEASE_CFLAGS+=-falign-loops=2 -falign-jumps=2 -falign-functions=2 -fno-strict-aliasing
--endif
-
- BUILD_DEBUG_DIR=build_debug
- BUILD_RELEASE_DIR=build_release
-@@ -97,39 +81,39 @@
- endif
-
- ifeq ($(strip $(BUILD_3ZB2)),YES)
-- TARGETS+=$(BINDIR)/3zb2/kmq2game$(ARCH).$(SHLIBEXT)
-+ TARGETS+=$(BINDIR)/3zb2/kmq2game.$(SHLIBEXT)
- endif
-
- ifeq ($(strip $(BUILD_CTF)),YES)
-- TARGETS+=$(BINDIR)/ctf/kmq2game$(ARCH).$(SHLIBEXT)
-+ TARGETS+=$(BINDIR)/ctf/kmq2game.$(SHLIBEXT)
- endif
-
- ifeq ($(strip $(BUILD_HYBRID)),YES)
-- TARGETS+=$(BINDIR)/rogue_xatrix/kmq2game$(ARCH).$(SHLIBEXT)
-+ TARGETS+=$(BINDIR)/rogue_xatrix/kmq2game.$(SHLIBEXT)
- endif
-
- ifeq ($(strip $(BUILD_PAX)),YES)
-- TARGETS+=$(BINDIR)/pax/kmq2game$(ARCH).$(SHLIBEXT)
-+ TARGETS+=$(BINDIR)/pax/kmq2game.$(SHLIBEXT)
- endif
-
- ifeq ($(strip $(BUILD_ROGUE)),YES)
-- TARGETS+=$(BINDIR)/rogue/kmq2game$(ARCH).$(SHLIBEXT)
-+ TARGETS+=$(BINDIR)/rogue/kmq2game.$(SHLIBEXT)
- endif
-
- ifeq ($(strip $(BUILD_XATRIX)),YES)
-- TARGETS+=$(BINDIR)/xatrix/kmq2game$(ARCH).$(SHLIBEXT)
-+ TARGETS+=$(BINDIR)/xatrix/kmq2game.$(SHLIBEXT)
- endif
-
- ifeq ($(strip $(BUILD_ZAERO)),YES)
-- TARGETS+=$(BINDIR)/zaero/kmq2game$(ARCH).$(SHLIBEXT)
-+ TARGETS+=$(BINDIR)/zaero/kmq2game.$(SHLIBEXT)
- endif
-
- ifeq ($(strip $(BUILD_LIGHTS)),YES)
-- TARGETS+=$(BINDIR)/lights/kmq2game$(ARCH).$(SHLIBEXT)
-+ TARGETS+=$(BINDIR)/lights/kmq2game.$(SHLIBEXT)
- endif
-
- ifeq ($(strip $(BUILD_LAZARUS)),YES)
-- TARGETS+=$(BINDIR)/lazarus/kmq2game$(ARCH).$(SHLIBEXT)
-+ TARGETS+=$(BINDIR)/lazarus/kmq2game.$(SHLIBEXT)
- endif
-
- all:
-@@ -246,7 +230,7 @@
- @-mkdir -p $(BINDIR)/lights
- endif
-
-- $(MAKE) targets BUILDDIR=$(BUILD_RELEASE_DIR) CFLAGS+="$(RELEASE_CFLAGS) -DKMQUAKE2_VERSION='\"$(VERSION)\"'"
-+ $(MAKE) targets BUILDDIR=$(BUILD_RELEASE_DIR) CFLAGS+="$(RELEASE_CFLAGS)"
-
- targets: $(TARGETS)
-
-@@ -332,7 +316,7 @@
- $(BUILDDIR)/lazarus/p_weapon.o \
- $(BUILDDIR)/lazarus/q_shared.o
-
--$(BINDIR)/lazarus/kmq2game$(ARCH).$(SHLIBEXT) : $(LAZARUS_OBJS)
-+$(BINDIR)/lazarus/kmq2game.$(SHLIBEXT) : $(LAZARUS_OBJS)
- $(CC) $(CFLAGS) $(SHLIBLDFLAGS) -o $@ $(LAZARUS_OBJS)
-
- $(BUILDDIR)/lazarus/acebot_ai.o : $(LAZARUS_DIR)/acesrc/acebot_ai.c
-@@ -597,7 +581,7 @@
- $(BUILDDIR)/ctf/p_weapon.o \
- $(BUILDDIR)/ctf/q_shared.o
-
--$(BINDIR)/ctf/kmq2game$(ARCH).$(SHLIBEXT) : $(CTF_OBJS)
-+$(BINDIR)/ctf/kmq2game.$(SHLIBEXT) : $(CTF_OBJS)
- $(CC) $(CFLAGS) $(SHLIBLDFLAGS) -o $@ $(CTF_OBJS)
-
- $(BUILDDIR)/ctf/g_ai.o : $(CTF_DIR)/g_ai.c
-@@ -736,7 +720,7 @@
- $(BUILDDIR)/xatrix/p_weapon.o \
- $(BUILDDIR)/xatrix/q_shared.o
-
--$(BINDIR)/xatrix/kmq2game$(ARCH).$(SHLIBEXT) : $(XATRIX_OBJS)
-+$(BINDIR)/xatrix/kmq2game.$(SHLIBEXT) : $(XATRIX_OBJS)
- $(CC) $(CFLAGS) $(SHLIBLDFLAGS) -o $@ $(XATRIX_OBJS)
-
- $(BUILDDIR)/xatrix/g_ai.o : $(XATRIX_DIR)/g_ai.c
-@@ -963,7 +947,7 @@
- $(BUILDDIR)/rogue/p_weapon.o \
- $(BUILDDIR)/rogue/q_shared.o
-
--$(BINDIR)/rogue/kmq2game$(ARCH).$(SHLIBEXT) : $(ROGUE_OBJS)
-+$(BINDIR)/rogue/kmq2game.$(SHLIBEXT) : $(ROGUE_OBJS)
- $(CC) $(CFLAGS) $(SHLIBLDFLAGS) -o $@ $(ROGUE_OBJS)
-
- $(BUILDDIR)/rogue/dm_ball.o : $(ROGUE_DIR)/dm_ball.c
-@@ -1222,7 +1206,7 @@
- $(BUILDDIR)/zaero/q_shared.o
-
-
--$(BINDIR)/zaero/kmq2game$(ARCH).$(SHLIBEXT) : $(ZAERO_OBJS)
-+$(BINDIR)/zaero/kmq2game.$(SHLIBEXT) : $(ZAERO_OBJS)
- $(CC) $(CFLAGS) $(SHLIBLDFLAGS) -o $@ $(ZAERO_OBJS)
-
- $(BUILDDIR)/zaero/g_ai.o : $(ZAERO_DIR)/g_ai.c
-@@ -1505,7 +1489,7 @@
- $(BUILDDIR)/pax/p_weapon.o \
- $(BUILDDIR)/pax/q_shared.o
-
--$(BINDIR)/pax/kmq2game$(ARCH).$(SHLIBEXT) : $(PAX_OBJS)
-+$(BINDIR)/pax/kmq2game.$(SHLIBEXT) : $(PAX_OBJS)
- $(CC) $(CFLAGS) $(SHLIBLDFLAGS) -o $@ $(PAX_OBJS)
-
- $(BUILDDIR)/pax/dm_ball.o : $(PAX_DIR)/dm_ball.c
-@@ -1802,7 +1786,7 @@
- $(BUILDDIR)/3zb2/p_weapon.o \
- $(BUILDDIR)/3zb2/q_shared.o
-
--$(BINDIR)/3zb2/kmq2game$(ARCH).$(SHLIBEXT) : $(3ZB2_OBJS)
-+$(BINDIR)/3zb2/kmq2game.$(SHLIBEXT) : $(3ZB2_OBJS)
- $(CC) $(CFLAGS) $(SHLIBLDFLAGS) -o $@ $(3ZB2_OBJS)
-
- $(BUILDDIR)/3zb2/bot.o : $(3ZB2_DIR)/bot.c
-@@ -1962,7 +1946,7 @@
- $(BUILDDIR)/lights/scanner.o \
- $(BUILDDIR)/lights/m_flash.o
-
--$(BINDIR)/lights/kmq2game$(ARCH).$(SHLIBEXT) : $(LBOTS_OBJS)
-+$(BINDIR)/lights/kmq2game.$(SHLIBEXT) : $(LBOTS_OBJS)
- $(CC) $(CFLAGS) $(SHLIBLDFLAGS) -o $@ $(LBOTS_OBJS)
-
- $(BUILDDIR)/lights/acebot_ai.o : $(LBOTS_DIR)/ace/acebot_ai.c
-@@ -2242,7 +2226,7 @@
- $(BUILDDIR)/rogue_xatrix/p_weapon.o \
- $(BUILDDIR)/rogue_xatrix/q_shared.o
-
--$(BINDIR)/rogue_xatrix/kmq2game$(ARCH).$(SHLIBEXT) : $(HYBRID_OBJS)
-+$(BINDIR)/rogue_xatrix/kmq2game.$(SHLIBEXT) : $(HYBRID_OBJS)
- $(CC) $(CFLAGS) $(SHLIBLDFLAGS) -o $@ $(HYBRID_OBJS)
-
- $(BUILDDIR)/rogue_xatrix/dm_ball.o : $(HYBRID_DIR)/dm_ball.c
diff --git a/games/kmquake2/files/patch-Makefile b/games/kmquake2/files/patch-Makefile
deleted file mode 100644
index 25d27cab782f..000000000000
--- a/games/kmquake2/files/patch-Makefile
+++ /dev/null
@@ -1,156 +0,0 @@
---- ./Makefile.orig Mon Apr 10 04:38:03 2006
-+++ ./Makefile Thu Jun 8 15:41:00 2006
-@@ -20,12 +20,12 @@
- #OPTIONS
- ######################################
-
--BUILD_DATADIR=NO # Use DATADIR to read (data, renderers, etc.) and ~/.quake2 to write.
--BUILD_GAME=YES # game$(ARCH).so
--BUILD_KMQUAKE2=YES # kmquake executable (uses OSS for cdrom and sound)
--BUILD_KMQUAKE2_DEDICATED=YES # build a dedicated kmquake2 server
--BUILD_KMQUAKE2_SDL=YES # kmquake2-sdl executable (uses SDL for cdrom and sound)
--BUILD_LIBDIR=NO # Use LIBDIR to read data and renderers (independent from DATADIR).
-+BUILD_DATADIR=YES # Use DATADIR to read (data, renderers, etc.) and ~/.quake2 to write.
-+#BUILD_GAME=YES # game$(ARCH).so
-+#BUILD_KMQUAKE2=YES # kmquake executable (uses OSS for cdrom and sound)
-+#BUILD_KMQUAKE2_DEDICATED=YES # build a dedicated kmquake2 server
-+#BUILD_KMQUAKE2_SDL=YES # kmquake2-sdl executable (uses SDL for cdrom and sound)
-+BUILD_LIBDIR=YES # Use LIBDIR to read data and renderers (independent from DATADIR).
-
- ######################################
-
-@@ -38,13 +38,17 @@
- BINDIR=quake2
-
- CC?=gcc
--BASE_CFLAGS=
-+BASE_CFLAGS=$(CFLAGS)
- DEBUG_CFLAGS=$(BASE_CFLAGS) -g -ggdb -Wall -pipe
--RELEASE_CFLAGS=$(BASE_CFLAGS) -O2 -ffast-math -funroll-loops -fomit-frame-pointer -fexpensive-optimizations
-+RELEASE_CFLAGS=$(BASE_CFLAGS)
-+
-+ifdef OPTIMIZED_CFLAGS
-+RELEASE_CFLAGS+=-O2 -ffast-math -funroll-loops -fomit-frame-pointer -fexpensive-optimizations
-
- ifeq ($(ARCH),i386)
- RELEASE_CFLAGS+=-falign-loops=2 -falign-jumps=2 -falign-functions=2 -fno-strict-aliasing
- endif
-+endif
-
- CLIENT_DIR=$(MOUNT_DIR)/client
- SERVER_DIR=$(MOUNT_DIR)/server
-@@ -62,7 +66,7 @@
- endif
-
- #Ogg Vorbis support
--LDFLAGS += \
-+CLIENT_LDFLAGS = \
- -lvorbisfile \
- -lvorbis \
- -logg
-@@ -72,7 +76,7 @@
- X11BASE?=/usr/X11R6
- PREFIX?=$(LOCALBASE)
-
--DATADIR?=$(LOCALBASE)/share/quake2
-+Q2DIR?=$(LOCALBASE)/share/quake2
- LIBDIR?=$(LOCALBASE)/lib/kmquake2
-
- XCFLAGS=-I$(LOCALBASE)/include
-@@ -91,7 +95,7 @@
- endif
-
- ifeq ($(strip $(BUILD_DATADIR)),YES)
-- BASE_CFLAGS+=-DDATADIR='\"$(DATADIR)\"'
-+ BASE_CFLAGS+=-DDATADIR='\"$(Q2DIR)\"'
- endif
-
- ifeq ($(strip $(BUILD_KMQUAKE2_SDL)),YES)
-@@ -109,7 +113,7 @@
-
- DO_CC=$(CC) $(CFLAGS) -I$(LOCALBASE)/include -o $@ -c $<
- DO_DED_CC=$(CC) $(CFLAGS) -DDEDICATED_ONLY -o $@ -c $<
--DO_DED_DEBUG_CC=$(CC) $(DEBUG_CFLAGS) -DDEDICATED_ONLY -o $@ -c $<
-+DO_DED_DEBUG_CC=$(CC) $(CFLAGS) -DDEDICATED_ONLY -o $@ -c $<
- DO_SHLIB_CC=$(CC) $(CFLAGS) $(SHLIBCFLAGS) -o $@ -c $<
- DO_GL_SHLIB_CC=$(CC) $(CFLAGS) $(SHLIBCFLAGS) $(GLCFLAGS) -o $@ -c $<
- DO_AS=$(CC) $(CFLAGS) -DELF -x assembler-with-cpp -o $@ -c $<
-@@ -128,7 +132,7 @@
- endif
-
- ifeq ($(strip $(BUILD_KMQUAKE2_DEDICATED)),YES)
-- TARGETS += $(BINDIR)/kmquake2_netserver
-+ TARGETS += $(BINDIR)/kmquake2-ded
- endif
-
- ifeq ($(strip $(BUILD_KMQUAKE2_SDL)),YES)
-@@ -136,7 +140,11 @@
- endif
-
- ifeq ($(strip $(BUILD_GAME)),YES)
-- TARGETS+=$(BINDIR)/baseq2/kmq2game$(ARCH).$(SHLIBEXT)
-+ TARGETS+=$(BINDIR)/baseq2/kmq2game.$(SHLIBEXT)
-+endif
-+
-+ifdef KMQ2_ADDONS
-+ TARGETS += addons
- endif
-
- all:
-@@ -164,7 +172,7 @@
- $(BUILD_DEBUG_DIR)/ref_gl \
- $(BUILD_DEBUG_DIR)/game
-
-- $(MAKE) targets BUILDDIR=$(BUILD_DEBUG_DIR) CFLAGS+="$(DEBUG_CFLAGS) -DKMQUAKE2_VERSION='\"$(VERSION) Debug\"'"
-+ $(MAKE) targets BUILDDIR=$(BUILD_DEBUG_DIR) CFLAGS="$(DEBUG_CFLAGS) -DKMQUAKE2_VERSION='\"$(VERSION) Debug\"'"
- release:
-
- @-mkdir -p $(BUILD_RELEASE_DIR) \
-@@ -174,7 +182,7 @@
- $(BUILD_RELEASE_DIR)/ref_gl \
- $(BUILD_RELEASE_DIR)/game
-
-- $(MAKE) targets BUILDDIR=$(BUILD_RELEASE_DIR) CFLAGS+="$(RELEASE_CFLAGS) -DKMQUAKE2_VERSION='\"$(VERSION)\"'"
-+ $(MAKE) targets BUILDDIR=$(BUILD_RELEASE_DIR) CFLAGS="$(RELEASE_CFLAGS) -DKMQUAKE2_VERSION='\"$(VERSION)\"'"
-
- targets: $(TARGETS)
-
-@@ -285,13 +293,16 @@
- @echo
- @echo "==================== Linking $@ ===================="
- @echo
-- $(CC) $(CFLAGS) -o $@ $(QUAKE2_OBJS) $(QUAKE2_AS_OBJS) $(QUAKE2_LNX_OBJS) $(GLXLDFLAGS) $(LDFLAGS)
-+ $(CC) $(CFLAGS) -o $@ $(QUAKE2_OBJS) $(QUAKE2_AS_OBJS) $(QUAKE2_LNX_OBJS) $(GLXLDFLAGS) $(LDFLAGS) $(CLIENT_LDFLAGS)
-
- $(BINDIR)/kmquake2-sdl : $(QUAKE2_OBJS) $(QUAKE2_AS_OBJS) $(QUAKE2_SDL_OBJS)
- @echo
- @echo "==================== Linking $@ ===================="
- @echo
-- $(CC) $(CFLAGS) -o $@ $(QUAKE2_OBJS) $(QUAKE2_AS_OBJS) $(QUAKE2_SDL_OBJS) $(GLXLDFLAGS) $(LDFLAGS) $(SDLLDFLAGS)
-+ $(CC) $(CFLAGS) -o $@ $(QUAKE2_OBJS) $(QUAKE2_AS_OBJS) $(QUAKE2_SDL_OBJS) $(GLXLDFLAGS) $(LDFLAGS) $(SDLLDFLAGS) $(CLIENT_LDFLAGS)
-+
-+addons:
-+ $(MAKE) -C ../$(KMQ2_ADDONS) release
-
- $(BUILDDIR)/client/cl_cin.o : $(CLIENT_DIR)/cl_cin.c
- $(DO_CC)
-@@ -586,7 +597,7 @@
- $(BUILDDIR)/ded/cl_null.o \
- $(BUILDDIR)/ded/cd_null.o
-
--$(BINDIR)/kmquake2_netserver : $(Q2DED_OBJS)
-+$(BINDIR)/kmquake2-ded : $(Q2DED_OBJS)
- $(CC) $(CFLAGS) -o $@ $(Q2DED_OBJS) $(LDFLAGS)
-
- $(BUILDDIR)/ded/cmd.o : $(COMMON_DIR)/cmd.c
-@@ -753,8 +764,8 @@
- $(BUILDDIR)/game/p_weapon.o \
- $(BUILDDIR)/game/q_shared.o
-
--$(BINDIR)/baseq2/kmq2game$(ARCH).$(SHLIBEXT) : $(GAME_OBJS)
-- $(CC) $(CFLAGS) $(SHLIBLDFLAGS) -o $@ $(GAME_OBJS) -lGL
-+$(BINDIR)/baseq2/kmq2game.$(SHLIBEXT) : $(GAME_OBJS)
-+ $(CC) $(CFLAGS) $(SHLIBLDFLAGS) -o $@ $(GAME_OBJS) -L$(LOCALBASE)/lib -lGL
-
- $(BUILDDIR)/game/acebot_ai.o : $(GAME_DIR)/acesrc/acebot_ai.c
- $(DO_SHLIB_CC)
diff --git a/games/kmquake2/files/patch-client__snd_loc.h b/games/kmquake2/files/patch-client__snd_loc.h
deleted file mode 100644
index 7844aabee6e8..000000000000
--- a/games/kmquake2/files/patch-client__snd_loc.h
+++ /dev/null
@@ -1,11 +0,0 @@
---- ./client/snd_loc.h.orig Wed Jan 11 10:51:56 2006
-+++ ./client/snd_loc.h Thu Jun 8 13:39:12 2006
-@@ -22,7 +22,7 @@
- #ifdef OGG_SUPPORT
- #if defined __unix__
- #include <vorbis/vorbisfile.h> // Knightmare added- vorbis support
--#include <AL/altypes.h>
-+#include <AL/al.h>
- #else
- #include "include/vorbisfile.h" // Knightmare added- vorbis support
- #include "include/altypes.h"
diff --git a/games/kmquake2/files/patch-client__snd_ogg.c b/games/kmquake2/files/patch-client__snd_ogg.c
deleted file mode 100644
index e02ab92d5ede..000000000000
--- a/games/kmquake2/files/patch-client__snd_ogg.c
+++ /dev/null
@@ -1,390 +0,0 @@
---- ./client/snd_ogg.c.orig Sun Apr 9 09:28:58 2006
-+++ ./client/snd_ogg.c Sat Dec 30 01:12:08 2006
-@@ -1,4 +1,21 @@
- /*
-+* This program is free software; you can redistribute it and/or
-+* modify it under the terms of the GNU General Public License
-+* as published by the Free Software Foundation; either version 2
-+* of the License, or(at your option) any later version.
-+*
-+* This program is distributed in the hope that it will be useful,
-+* but WITHOUT ANY WARRANTY; without even the implied warranty of
-+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-+*
-+* See the GNU General Public License for more details.
-+*
-+* You should have received a copy of the GNU General Public License
-+* along with this program; if not, write to the Free Software
-+* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-+*/
-+
-+/*
- ==========================================================
-
- OGG Vorbis decoding
-@@ -8,12 +25,9 @@
-
- #include <sys/time.h>
- #include <errno.h>
--
--#include "client.h"
--
--#ifdef OGGVORBIS
- #include <vorbis/vorbisfile.h>
-
-+#include "client.h"
- #include "snd_loc.h"
- #include "snd_ogg.h"
-
-@@ -22,6 +36,7 @@
-
- qboolean ogg_first_init = true; /* First initialization flag. */
- qboolean ogg_started = false; /* Initialization flag. */
-+byte *ogg_buffer; /* File buffer. */
- char **ogg_filelist; /* List of Ogg Vorbis files. */
- char ovBuf[4096]; /* Buffer for sound. */
- int ogg_curfile; /* Index of currently played file. */
-@@ -29,6 +44,7 @@
- int ovSection; /* Position in Ogg Vorbis file. */
- ogg_status_t ogg_status; /* Status indicator. */
- cvar_t *ogg_autoplay; /* Play this song when started. */
-+cvar_t *ogg_check; /* Check Ogg files or not. */
- cvar_t *ogg_playlist; /* Playlist. */
- cvar_t *ogg_sequence; /* Sequence play indicator. */
- cvar_t *ogg_volume; /* Music volume. */
-@@ -59,6 +75,7 @@
-
- /* Cvars. */
- ogg_autoplay = Cvar_Get("ogg_autoplay", "?", CVAR_ARCHIVE);
-+ ogg_check = Cvar_Get("ogg_check", "0", CVAR_ARCHIVE);
- ogg_playlist = Cvar_Get("ogg_playlist", "playlist", CVAR_ARCHIVE);
- ogg_sequence = Cvar_Get("ogg_sequence", "next", CVAR_ARCHIVE);
- ogg_volume = Cvar_Get("ogg_volume", "0.7", CVAR_ARCHIVE);
-@@ -67,6 +84,7 @@
- Cmd_AddCommand("ogg_list", OGG_ListCmd);
- Cmd_AddCommand("ogg_pause", OGG_PauseCmd);
- Cmd_AddCommand("ogg_play", OGG_PlayCmd);
-+ Cmd_AddCommand("ogg_reinit", OGG_Reinit);
- Cmd_AddCommand("ogg_resume", OGG_ResumeCmd);
- Cmd_AddCommand("ogg_seek", OGG_SeekCmd);
- Cmd_AddCommand("ogg_status", OGG_StatusCmd);
-@@ -82,6 +100,7 @@
- /* Check if we have Ogg Vorbis files. */
- if (ogg_numfiles <= 0) {
- Com_Printf("No Ogg Vorbis files found.\n");
-+ ogg_started = true; /* For OGG_Shutdown(). */
- OGG_Shutdown();
- return;
- }
-@@ -89,6 +108,7 @@
- /* Initialize variables. */
- if (ogg_first_init) {
- srand(time(NULL));
-+ ogg_buffer = NULL;
- ogg_curfile = -1;
- ogg_status = STOP;
- ogg_first_init = false;
-@@ -112,7 +132,6 @@
- */
- void OGG_Shutdown(void)
- {
-- int i; /* Loop counter. */
-
- if (!ogg_started)
- return;
-@@ -122,15 +141,13 @@
- OGG_Stop();
-
- /* Free the list of files. */
-- for (i = 0; i < ogg_numfiles; i++)
-- free(ogg_filelist[i]);
-- if (ogg_numfiles > 0)
-- free(ogg_filelist);
-+ FS_FreeList(ogg_filelist, ogg_numfiles + 1);
-
- /* Remove console commands. */
- Cmd_RemoveCommand("ogg_list");
- Cmd_RemoveCommand("ogg_pause");
- Cmd_RemoveCommand("ogg_play");
-+ Cmd_RemoveCommand("ogg_reinit");
- Cmd_RemoveCommand("ogg_resume");
- Cmd_RemoveCommand("ogg_seek");
- Cmd_RemoveCommand("ogg_status");
-@@ -162,17 +179,21 @@
- */
- qboolean OGG_Check(char *name)
- {
-- qboolean res; /* Return value. */
-- FILE *fp; /* File pointer. */
-- OggVorbis_File ovf; /* Ogg Vorbis file. */
-+ qboolean res; /* Return value. */
-+ byte *buffer; /* File buffer. */
-+ int size; /* File size. */
-+ OggVorbis_File ovf; /* Ogg Vorbis file. */
-+
-+ if (ogg_check->value == 0)
-+ return (true);
-
- res = false;
-- if ((fp = fopen(name, "r")) != NULL) {
-- if (ov_test(fp, &ovf, NULL, 0) == 0) {
-+ if ((size = FS_LoadFile(name, (void**)&buffer)) > 0) {
-+ if (ov_test(NULL, &ovf, (char *)buffer, size) == 0) {
- res = true;
- ov_clear(&ovf);
-- } else
-- fclose(fp);
-+ }
-+ FS_FreeFile(buffer);
- }
-
- return (res);
-@@ -229,23 +250,15 @@
- Load list of Ogg Vorbis files in "music".
- ==========
- */
--void FS_FreeList(char **list, int nfiles);
--char **FS_ListFiles(char *findname, int *numfiles, unsigned musthave, unsigned canthave);
- void OGG_LoadFileList(void)
- {
- char **list; /* List of .ogg files. */
-- char oggpath[MAX_OSPATH]; /* Path to .ogg files. */
- int i; /* Loop counter. */
- int j; /* Real position in list. */
-- int length; /* Name length. */
-
-- /* Set search path. */
-- strncpy(oggpath, fs_basedir->string, sizeof(oggpath)-1);
-- oggpath[sizeof(oggpath)-1] = '\0';
-- strncat(oggpath, "/music/*.ogg", sizeof(oggpath)-strlen(oggpath)-1);
--
- /* Get file list. */
-- list = FS_ListFiles(oggpath, &ogg_numfiles, 0, SFF_SUBDIR | SFF_HIDDEN | SFF_SYSTEM);
-+ list = FS_ListFiles2(va("%s/*.ogg", OGG_DIR), &ogg_numfiles, 0,
-+ SFF_SUBDIR | SFF_HIDDEN | SFF_SYSTEM);
- ogg_numfiles--;
-
- /* Check if there are posible Ogg files. */
-@@ -257,17 +270,15 @@
-
- /* Add valid Ogg Vorbis file to the list. */
- for (i = 0, j = 0; i < ogg_numfiles; i++) {
-- if (!OGG_Check(list[i]))
-+ if (!OGG_Check(list[i])) {
-+ free(list[i]);
- continue;
-- length = strlen(list[j]);
-- ogg_filelist[j] = malloc(length+1);
-- strncpy(ogg_filelist[j], list[j], length);
-- ogg_filelist[j][length] = '\0';
-- j++;
-+ }
-+ ogg_filelist[j++] = list[i];
- }
-
- /* Free the file list. */
-- FS_FreeList(list, ogg_numfiles);
-+ free(list);
-
- /* Adjust the list size (remove space for invalid music files). */
- ogg_numfiles = j;
-@@ -283,54 +294,40 @@
- */
- void OGG_LoadPlaylist(char *playlist)
- {
-- char *buffer; /* Buffer to read the file. */
-- char *name; /* Name of music file. */
-+ byte *buffer; /* Buffer to read the file. */
- char *ptr; /* Pointer for parsing the file. */
- int i; /* Loop counter. */
-- int j; /* Real position in list. */
-- int length; /* Length of buffer and strings. */
-- FILE *fp; /* File pointer. */
-+ int size; /* Length of buffer and strings. */
-
- /* Open playlist. */
-- if ((fp = fopen(va("%s/music/%s", fs_basedir->string, playlist), "r")) == NULL) {
-+ if ((size = FS_LoadFile(va("%s/%s.lst", OGG_DIR, ogg_playlist->string),
-+ (void **)&buffer)) < 0) {
- Com_Printf("OGG_LoadPlaylist: could not open playlist: %s.\n", strerror(errno));
- return;
- }
-
-- /* Read playlist into buffer. */
-- fseek(fp, 0, SEEK_END);
-- length = ftell(fp);
-- fseek(fp, 0, SEEK_SET);
-- buffer = malloc(length);
-- fread(buffer, length, 1, fp);
--
- /* Count the files in playlist. */
-- ptr = buffer;
-- while ((name = COM_Parse(&ptr))[0] != '\0')
-- ogg_numfiles++;
-+ for (ptr = strtok((char *)buffer, "\n");
-+ ptr != NULL;
-+ ptr = strtok(NULL, "\n")) {
-+ if ((byte *)ptr != buffer)
-+ ptr[-1] = '\n';
-+ if (OGG_Check(va("%s/%s", OGG_DIR, ptr)))
-+ ogg_numfiles++;
-+ }
-
- /* Allocate file list. */
- ogg_filelist = malloc(sizeof(char *) * ogg_numfiles);
-
-- /* Add valid Ogg Vorbis file to the list. */
-- ptr = buffer;
-- for (i = 0, j = 0; i < ogg_numfiles; i++) {
-- name = va("%s/music/%s.ogg", fs_basedir->string, COM_Parse(&ptr));
-- if (!OGG_Check(name))
-- continue;
-- length = strlen(name);
-- ogg_filelist[j] = malloc(length+1);
-- strncpy(ogg_filelist[j], name, length);
-- ogg_filelist[j][length] = '\0';
-- j++;
-- }
--
-- /* Adjust the list size (remove space for invalid music files). */
-- ogg_numfiles = j;
-- ogg_filelist = realloc(ogg_filelist, sizeof(char *) * ogg_numfiles);
-+ i = 0;
-+ for (ptr = strtok((char *)buffer, "\n");
-+ ptr != NULL;
-+ ptr = strtok(NULL, "\n"))
-+ if (OGG_Check(va("%s/%s", OGG_DIR, ptr)))
-+ ogg_filelist[i++] = strdup(va("%s/%s", OGG_DIR, ptr));
-
- /* Free file buffer. */
-- free(buffer);
-+ FS_FreeFile(buffer);
- }
-
- /*
-@@ -342,9 +339,9 @@
- */
- qboolean OGG_Open(ogg_seek_t type, int offset)
- {
-- int pos; /* Absolute position. */
-- int res; /* Error indicator. */
-- FILE *fp; /* File pointer. */
-+ int size; /* File size. */
-+ int pos; /* Absolute position. */
-+ int res; /* Error indicator. */
-
- pos = -1;
-
-@@ -378,15 +375,15 @@
- }
-
- /* Find file. */
-- if ((fp = fopen(ogg_filelist[pos], "r")) == NULL) {
-+ if ((size = FS_LoadFile(ogg_filelist[pos], (void **)&ogg_buffer)) == -1) {
- Com_Printf("OGG_Open: could not open %d (%s): %s.\n", pos, ogg_filelist[pos], strerror(errno));
- return (false);
- }
-
- /* Open ogg vorbis file. */
-- if ((res = ov_open(fp, &ovFile, NULL, 0)) < 0) {
-+ if ((res = ov_open(NULL, &ovFile, (char *)ogg_buffer, size)) < 0) {
- Com_Printf("OGG_Open: '%s' is not a valid Ogg Vorbis file (error %i).\n", ogg_filelist[pos], res);
-- fclose(fp);
-+ FS_FreeFile(ogg_buffer);
- return (false);
- }
-
-@@ -395,9 +392,8 @@
- ogg_curfile = pos;
- ogg_status = PLAY;
-
-- //OGG_StatusCmd();
- Com_Printf("Playing file %d '%s'\n", pos, ogg_filelist[pos]);
--
-+
- return (true);
- }
-
-@@ -413,7 +409,7 @@
- char *name; /* File name. */
- int i; /* Loop counter. */
-
-- name = va("%s/music/%s.ogg", fs_basedir->string, filename);
-+ name = va("%s/%s.ogg", OGG_DIR, filename);
-
- for (i = 0; i < ogg_numfiles; i++)
- if (strcmp(name, ogg_filelist[i]) == 0)
-@@ -482,11 +478,19 @@
- Stop playing the current file.
- ==========
- */
--void OGG_Stop( void )
-+void OGG_Stop(void)
- {
-
-+ if (ogg_status == STOP)
-+ return;
-+
- ov_clear(&ovFile);
- ogg_status = STOP;
-+
-+ if (ogg_buffer != NULL) {
-+ FS_FreeFile(ogg_buffer);
-+ ogg_buffer = NULL;
-+ }
- }
-
- /*
-@@ -498,6 +502,7 @@
- */
- void OGG_Stream(void)
- {
-+
- if (!ogg_started)
- return;
-
-@@ -617,9 +622,6 @@
- {
- int i;
-
-- if (!ogg_started)
-- return;
--
- for (i = 0; i < ogg_numfiles; i++)
- Com_Printf("%d %s\n", i+1, ogg_filelist[i]);
-
-@@ -687,9 +689,6 @@
- void OGG_PlayCmd( void )
- {
-
-- if (!ogg_started)
-- return;
--
- if (Cmd_Argc() < 2) {
- Com_Printf("Usage: ogg_play {filename | #n | ? | >n | <n}\n");
- return;
-@@ -722,6 +721,9 @@
- void OGG_SeekCmd(void)
- {
-
-+ if (ogg_status != STOP)
-+ return;
-+
- if (Cmd_Argc() < 2) {
- Com_Printf("Usage: ogg_seek {n | <n | >n}\n");
- return;
-@@ -760,9 +762,11 @@
- ogg_curfile+1, ogg_filelist[ogg_curfile], ov_time_tell(&ovFile));
- break;
- case STOP:
-- Com_Printf("Stopped file %d (%s).\n",
-- ogg_curfile+1, ogg_filelist[ogg_curfile]);
-+ if (ogg_curfile == -1)
-+ Com_Printf("Stopped.\n");
-+ else
-+ Com_Printf("Stopped file %d (%s).\n",
-+ ogg_curfile+1, ogg_filelist[ogg_curfile]);
- break;
- }
- }
--#endif
diff --git a/games/kmquake2/files/patch-client__snd_ogg.h b/games/kmquake2/files/patch-client__snd_ogg.h
deleted file mode 100644
index 0d66828dae77..000000000000
--- a/games/kmquake2/files/patch-client__snd_ogg.h
+++ /dev/null
@@ -1,92 +0,0 @@
---- ./client/snd_ogg.h.orig Sun Apr 9 09:21:42 2006
-+++ ./client/snd_ogg.h Sat Dec 30 01:12:03 2006
-@@ -1,14 +1,33 @@
- /*
--==========================================================
--
-- OGG Vorbis decoding
--
--==========================================================
-+* This program is free software; you can redistribute it and/or
-+* modify it under the terms of the GNU General Public License
-+* as published by the Free Software Foundation; either version 2
-+* of the License, or(at your option) any later version.
-+*
-+* This program is distributed in the hope that it will be useful,
-+* but WITHOUT ANY WARRANTY; without even the implied warranty of
-+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-+*
-+* See the GNU General Public License for more details.
-+*
-+* You should have received a copy of the GNU General Public License
-+* along with this program; if not, write to the Free Software
-+* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-+/*
-+ * ==========================================================
-+ *
-+ * OGG Vorbis decoding
-+ *
-+ * ==========================================================
-+ */
-+
- #ifndef _SND_OGG_H_
- #define _SND_OGG_H_
-
-+#define OGG_DIR "music"
-+
- typedef enum {
- PLAY,
- PAUSE,
-@@ -20,29 +39,29 @@
- REL
- } ogg_seek_t;
-
--void OGG_Init(void);
--void OGG_Shutdown(void);
--void OGG_Reinit(void);
--qboolean OGG_Check(char *name);
--void OGG_Seek(ogg_seek_t type, double offset);
--void OGG_LoadFileList(void);
--void OGG_LoadPlaylist(char *name);
--qboolean OGG_Open(ogg_seek_t type, int offset);
--qboolean OGG_OpenName(char *filename);
--int OGG_Read(void);
--void OGG_Sequence(void);
--void OGG_Stop(void);
--void OGG_Stream(void);
--void S_RawSamplesVol(int samples, int rate, int width, int channels, byte *data, float volume);
-+void OGG_Init (void);
-+void OGG_Shutdown(void);
-+void OGG_Reinit(void);
-+qboolean OGG_Check(char *name);
-+void OGG_Seek (ogg_seek_t type, double offset);
-+void OGG_LoadFileList(void);
-+void OGG_LoadPlaylist(char *name);
-+qboolean OGG_Open(ogg_seek_t type, int offset);
-+qboolean OGG_OpenName(char *filename);
-+int OGG_Read (void);
-+void OGG_Sequence(void);
-+void OGG_Stop (void);
-+void OGG_Stream(void);
-+void S_RawSamplesVol(int samples, int rate, int width, int channels, byte * data, float volume);
-
- /* Console commands. */
-
--void OGG_ListCmd(void);
--void OGG_ParseCmd(char *arg);
--void OGG_PauseCmd(void);
--void OGG_PlayCmd(void);
--void OGG_ResumeCmd(void);
--void OGG_SeekCmd(void);
--void OGG_StatusCmd(void);
-+void OGG_ListCmd(void);
-+void OGG_ParseCmd(char *arg);
-+void OGG_PauseCmd(void);
-+void OGG_PlayCmd(void);
-+void OGG_ResumeCmd(void);
-+void OGG_SeekCmd(void);
-+void OGG_StatusCmd(void);
-
- #endif
diff --git a/games/kmquake2/files/patch-qcommon__files.c b/games/kmquake2/files/patch-qcommon__files.c
deleted file mode 100644
index 38e9c502047f..000000000000
--- a/games/kmquake2/files/patch-qcommon__files.c
+++ /dev/null
@@ -1,229 +0,0 @@
---- qcommon/files.c.orig Thu Mar 23 06:30:01 2006
-+++ qcommon/files.c Sat Dec 30 01:23:45 2006
-@@ -1314,7 +1314,7 @@
- char *homedir; /* Home directory. */
-
- if ((homedir = getenv("HOME")) != NULL) {
-- Com_sprintf(gdir, sizeof(gdir), "%s/.quake2/%s", homedir, dir);
-+ Com_sprintf(gdir, sizeof(gdir), "%s/.kmquake2/%s", homedir, dir);
- FS_AddGameDirectory(gdir);
- }
- }
-@@ -1468,16 +1468,7 @@
- // basedir <path>
- // allows the game to run from outside the data tree
- //
--#if defined __unix__
--#ifdef DATADIR
-- fs_basedir = Cvar_Get("basedir", DATADIR, CVAR_NOSET);
--#else
-- fs_basedir = Cvar_Get("basedir", ".", CVAR_NOSET);
--#endif
--#endif
--#ifdef _WIN32
- fs_basedir = Cvar_Get ("basedir", ".", CVAR_NOSET);
--#endif
-
- //
- // cddir <path>
-@@ -1491,11 +1482,14 @@
- //
- // start up with baseq2 by default
- //
--#ifdef LIBDIR // unix
-+#ifdef DATADIR
-+ FS_AddGameDirectory(va("%s/"BASEDIRNAME, DATADIR));
-+#endif
-+#ifdef LIBDIR
- FS_AddGameDirectory(va("%s/"BASEDIRNAME, LIBDIR));
- #endif
- FS_AddGameDirectory (va("%s/"BASEDIRNAME, fs_basedir->string) );
--#ifdef DATADIR // unix
-+#ifdef DATADIR
- FS_AddHomeAsGameDirectory(BASEDIRNAME);
- #endif
- // any set gamedirs will be freed up to here
-@@ -1512,6 +1506,7 @@
-
- #ifdef __unix__
- /* Create directory if it does not exist. */
-+ FS_CreatePath(fs_gamedir);
- Sys_Mkdir(fs_gamedir);
-
- Com_Printf("Using '%s' for writing.\n", fs_gamedir);
-@@ -1624,11 +1619,14 @@
- Cvar_FullSet ("gamedir", dir, CVAR_SERVERINFO|CVAR_NOSET);
- if (fs_cddir->string[0])
- FS_AddGameDirectory (va("%s/%s", fs_cddir->string, dir) );
-+#ifdef DATADIR
-+ FS_AddGameDirectory(va("%s/%s", DATADIR, dir));
-+#endif
- #ifdef LIBDIR
- FS_AddGameDirectory(va("%s/%s", LIBDIR, dir));
- #endif
- FS_AddGameDirectory (va("%s/%s", fs_basedir->string, dir) );
--#if defined(DATADIR) && !defined(_WIN32)
-+#ifdef DATADIR
- FS_AddHomeAsGameDirectory(dir);
- #endif
- }
-@@ -1799,6 +1797,159 @@
- return (list);
- }
- #endif
-+
-+/*
-+ * CompareAttributesPack
-+ *
-+ * Compare file attributes (musthave and canthave) in packed files. If
-+ * "output" is not NULL, "size" is greater than zero and the file matches the
-+ * attributes then a copy of the matching string will be placed there (with
-+ * SFF_SUBDIR it changes).
-+ *
-+ * Returns a boolean value, true if the attributes match the file.
-+ */
-+qboolean
-+ComparePackFiles(const char *findname, const char *name,
-+ unsigned musthave, unsigned canthave, char *output, int size)
-+{
-+ qboolean retval;
-+ char *ptr;
-+ char buffer[MAX_OSPATH];
-+
-+ Q_strncpyz(buffer, name, sizeof(buffer));
-+
-+ if ((canthave & SFF_SUBDIR) && name[strlen(name)-1] == '/')
-+ return (false);
-+
-+ if (musthave & SFF_SUBDIR) {
-+ if ((ptr = strrchr(buffer, '/')) != NULL)
-+ *ptr = '\0';
-+ else
-+ return (false);
-+ }
-+
-+ if ((musthave & SFF_HIDDEN) || (canthave & SFF_HIDDEN)) {
-+ if ((ptr = strrchr(buffer, '/')) == NULL)
-+ ptr = buffer;
-+ if (((musthave & SFF_HIDDEN) && ptr[1] != '.') ||
-+ ((canthave & SFF_HIDDEN) && ptr[1] == '.'))
-+ return (false);
-+ }
-+
-+ if (canthave & SFF_RDONLY)
-+ return (false);
-+
-+ retval = glob_match((char *)findname, buffer);
-+
-+ if (retval && output != NULL)
-+ Q_strncpyz(output, buffer, size);
-+
-+ return (retval);
-+}
-+
-+/*
-+ * FS_ListFiles2
-+ *
-+ * Create a list of files that match a criteria.
-+ *
-+ * Searchs are relative to the game directory and use all the search paths
-+ * including .pak and .pk3 files.
-+ */
-+char **
-+FS_ListFiles2(char *findname, int *numfiles, unsigned musthave, unsigned canthave)
-+{
-+ fsSearchPath_t *search; /* Search path. */
-+ int i, j; /* Loop counters. */
-+ int nfiles; /* Number of files found. */
-+ int tmpnfiles; /* Temp number of files. */
-+ char **tmplist; /* Temporary list of files. */
-+ char **list; /* List of files found. */
-+ char path[MAX_OSPATH]; /* Temporary path. */
-+
-+ nfiles = 0;
-+ list = malloc(sizeof(char *));
-+
-+ for (search = fs_searchPaths; search != NULL; search = search->next) {
-+ if (search->pack != NULL) {
-+ if (canthave & SFF_INPACK)
-+ continue;
-+
-+ for (i = 0, j = 0; i < search->pack->numFiles; i++)
-+ if (ComparePackFiles(findname,
-+ search->pack->files[i].name,
-+ musthave, canthave, NULL, 0))
-+ j++;
-+ if (j == 0)
-+ continue;
-+ nfiles += j;
-+ list = realloc(list, nfiles * sizeof(char *));
-+ for (i = 0, j = nfiles - j;
-+ i < search->pack->numFiles;
-+ i++)
-+ if (ComparePackFiles(findname,
-+ search->pack->files[i].name,
-+ musthave, canthave, path, sizeof(path)))
-+ list[j++] = strdup(path);
-+ } else if (search->path != NULL) {
-+ if (musthave & SFF_INPACK)
-+ continue;
-+
-+ Com_sprintf(path, sizeof(path), "%s/%s",
-+ search->path, findname);
-+ tmplist = FS_ListFiles(path, &tmpnfiles, musthave,
-+ canthave);
-+ if (tmplist != NULL) {
-+ tmpnfiles--;
-+ nfiles += tmpnfiles;
-+ list = realloc(list, nfiles * sizeof(char *));
-+ for (i = 0, j = nfiles - tmpnfiles;
-+ i < tmpnfiles;
-+ i++, j++)
-+ list[j] = strdup(tmplist[i] +
-+ strlen(search->path) + 1);
-+ FS_FreeList(tmplist, tmpnfiles + 1);
-+ }
-+ }
-+ }
-+
-+ /* Delete duplicates. */
-+ tmpnfiles = 0;
-+ for (i = 0; i < nfiles; i++) {
-+ if (list[i] == NULL)
-+ continue;
-+ for (j = i + 1; j < nfiles; j++)
-+ if (list[j] != NULL &&
-+ strcmp(list[i], list[j]) == 0) {
-+ free(list[j]);
-+ list[j] = NULL;
-+ tmpnfiles++;
-+ }
-+ }
-+
-+ if (tmpnfiles > 0) {
-+ nfiles -= tmpnfiles;
-+ tmplist = malloc(nfiles * sizeof(char *));
-+ for (i = 0, j = 0; i < nfiles + tmpnfiles; i++)
-+ if (list[i] != NULL)
-+ tmplist[j++] = list[i];
-+ free(list);
-+ list = tmplist;
-+ }
-+
-+ /* Add a guard. */
-+ if (nfiles > 0) {
-+ nfiles++;
-+ list = realloc(list, nfiles * sizeof(char *));
-+ list[nfiles - 1] = NULL;
-+ } else {
-+ free(list);
-+ list = NULL;
-+ }
-+
-+ *numfiles = nfiles;
-+
-+ return (list);
-+}
-
- /*
- ================
diff --git a/games/kmquake2/files/patch-qcommon__qcommon.h b/games/kmquake2/files/patch-qcommon__qcommon.h
deleted file mode 100644
index c0bd3590d1f2..000000000000
--- a/games/kmquake2/files/patch-qcommon__qcommon.h
+++ /dev/null
@@ -1,10 +0,0 @@
---- qcommon/qcommon.h.orig Wed Dec 28 21:01:15 2005
-+++ qcommon/qcommon.h Sat Dec 30 01:22:07 2006
-@@ -758,6 +758,7 @@
- ==============================================================
- */
-
-+#define SFF_INPACK 0x20 /* For FS_ListFiles2(). */
-
- typedef int fileHandle_t;
-
diff --git a/games/kmquake2/files/patch-unix__gl_glx.c b/games/kmquake2/files/patch-unix__gl_glx.c
deleted file mode 100644
index d81b239ef8de..000000000000
--- a/games/kmquake2/files/patch-unix__gl_glx.c
+++ /dev/null
@@ -1,30 +0,0 @@
---- ./unix/gl_glx.c.orig Mon Apr 3 14:40:42 2006
-+++ ./unix/gl_glx.c Thu Jun 8 13:39:12 2006
-@@ -379,15 +379,11 @@
- }
- else
- {
-- if( !event.xmotion.send_event ) {
-- mx += event.xmotion.x - p_mouse_x;
-- my += event.xmotion.y - p_mouse_y;
-+ mx += (event.xmotion.x - mwx) * 2;
-+ my += (event.xmotion.y - mwy) * 2;
-
-- if( abs( mwx - event.xmotion.x ) > mwx / 2 || abs( mwy - event.xmotion.y ) > mwy / 2 )
-+ if (mwx || mwy)
- dowarp = true;
-- }
-- p_mouse_x = event.xmotion.x;
-- p_mouse_y = event.xmotion.y;
- }
- }
- break;
-@@ -451,8 +447,6 @@
- if (dowarp)
- {
- /* move the mouse to the window center again */
-- p_mouse_x = mwx;
-- p_mouse_y = mwy;
- XWarpPointer (dpy, None, win, 0, 0, 0, 0, mwx, mwy);
- }
- }
diff --git a/games/kmquake2/files/patch-unix__sys_unix.c b/games/kmquake2/files/patch-unix__sys_unix.c
deleted file mode 100644
index 48469854ec4e..000000000000
--- a/games/kmquake2/files/patch-unix__sys_unix.c
+++ /dev/null
@@ -1,45 +0,0 @@
---- ./unix/sys_unix.c.orig Thu Apr 6 11:30:11 2006
-+++ ./unix/sys_unix.c Thu Jun 8 13:39:12 2006
-@@ -219,23 +219,10 @@
- void *(*GetGameAPI) (void *);
-
- char name[MAX_OSPATH];
-- char curpath[MAX_OSPATH];
- char *path;
-
- // Knightmare- changed game library name for better cohabitation
--#ifdef __i386__
-- const char *gamename = "kmq2gamei386.so";
--#elif defined __alpha__
-- const char *gamename = "kmq2gameaxp.so";
--#elif defined __x86_64__
-- const char *gamename = "kmq2gamex86_64.so";
--#elif defined __powerpc__
-- const char *gamename = "kmq2gameppc.so";
--#elif defined __sparc__
-- const char *gamename = "kmq2gamesparc.so";
--#else
--#error Unknown arch
--#endif
-+ const char *gamename = "kmq2game.so";
-
- setreuid(getuid(), getuid());
- setegid(getgid());
-@@ -243,8 +230,6 @@
- if (game_library)
- Com_Error (ERR_FATAL, "Sys_GetGameAPI without Sys_UnloadingGame");
-
-- getcwd(curpath, sizeof(curpath));
--
- Com_Printf("------- Loading %s -------\n", gamename);
-
- // now run through the search paths
-@@ -254,7 +239,7 @@
- path = FS_NextPath (path);
- if (!path)
- return NULL; // couldn't find one anywhere
-- sprintf (name, "%s/%s/%s", curpath, path, gamename);
-+ sprintf (name, "%s/%s", path, gamename);
- game_library = dlopen (name, RTLD_LAZY );
- if (game_library)
- {
diff --git a/games/kmquake2/pkg-descr b/games/kmquake2/pkg-descr
deleted file mode 100644
index 5b7872867ab7..000000000000
--- a/games/kmquake2/pkg-descr
+++ /dev/null
@@ -1 +0,0 @@
-Enhanced Quake2 OpenGL only engine with integrated Lazarus support.
diff --git a/games/kmquake2/pkg-plist b/games/kmquake2/pkg-plist
deleted file mode 100644
index a7f99c71f884..000000000000
--- a/games/kmquake2/pkg-plist
+++ /dev/null
@@ -1,49 +0,0 @@
-%%CLIENT%%bin/kmquake2
-%%DEDICATED%%bin/kmquake2-ded
-%%SDL%%bin/kmquake2-sdl
-%%3ZB2%%%%LIBDIR%%/3zb2/kmq2game.so
-%%LIBDIR%%/baseq2/gfx/flare1.png
-%%LIBDIR%%/baseq2/gfx/flare2.png
-%%LIBDIR%%/baseq2/gfx/flare3.png
-%%LIBDIR%%/baseq2/gfx/flare4.png
-%%LIBDIR%%/baseq2/gfx/flare5.png
-%%LIBDIR%%/baseq2/gfx/flare6.png
-%%GAME%%%%LIBDIR%%/baseq2/kmq2game.so
-%%LIBDIR%%/baseq2/kmquake2.pk3
-%%CTF%%%%LIBDIR%%/ctf/kmq2game.so
-%%LIGHTS%%%%LIBDIR%%/lights/kmq2game.so
-%%PAX%%%%LIBDIR%%/pax/default.cfg
-%%PAX%%%%LIBDIR%%/pax/kmq2game.so
-%%PAX%%%%LIBDIR%%/pax/levelshots/pax.jpg
-%%PAX%%%%LIBDIR%%/pax/levelshots/pax2.jpg
-%%PAX%%%%LIBDIR%%/pax/levelshots/pax3.jpg
-%%PAX%%%%LIBDIR%%/pax/levelshots/pax4.jpg
-%%PAX%%%%LIBDIR%%/pax/levelshots/pax5.jpg
-%%PAX%%%%LIBDIR%%/pax/levelshots/pax6.jpg
-%%PAX%%%%LIBDIR%%/pax/levelshots/pax7.jpg
-%%PAX%%%%LIBDIR%%/pax/levelshots/pax8.jpg
-%%PAX%%%%LIBDIR%%/pax/pax.pak
-%%PAX%%%%LIBDIR%%/pax/paxpatch.pak
-%%PAX%%%%LIBDIR%%/pax/readme.html
-%%PAX%%%%LIBDIR%%/pax/sound/world/driller1.wav
-%%ROGUE%%%%LIBDIR%%/rogue/kmq2game.so
-%%HYBRID%%%%LIBDIR%%/rogue_xatrix/kmq2game.so
-%%XATRIX%%%%LIBDIR%%/xatrix/kmq2game.so
-%%ZAERO%%%%LIBDIR%%/zaero/kmq2game.so
-%%PORTDOCS%%%%DOCSDIR%%/Readme.unix
-%%PORTDOCS%%%%DOCSDIR%%/kmquake2.txt
-%%PORTDOCS%%@dirrm %%DOCSDIR%%
-%%ZAERO%%@dirrm %%LIBDIR%%/zaero
-%%XATRIX%%@dirrm %%LIBDIR%%/xatrix
-%%HYBRID%%@dirrm %%LIBDIR%%/rogue_xatrix
-%%ROGUE%%@dirrm %%LIBDIR%%/rogue
-%%PAX%%@dirrm %%LIBDIR%%/pax/sound/world
-%%PAX%%@dirrm %%LIBDIR%%/pax/sound
-%%PAX%%@dirrm %%LIBDIR%%/pax/levelshots
-%%PAX%%@dirrm %%LIBDIR%%/pax
-%%LIGHTS%%@dirrm %%LIBDIR%%/lights
-%%CTF%%@dirrm %%LIBDIR%%/ctf
-@dirrm %%LIBDIR%%/baseq2/gfx
-@dirrm %%LIBDIR%%/baseq2
-%%3ZB2%%@dirrm %%LIBDIR%%/3zb2
-@dirrm %%LIBDIR%%