diff options
author | Alejandro Pulver <alepulver@FreeBSD.org> | 2007-01-10 21:28:35 +0000 |
---|---|---|
committer | Alejandro Pulver <alepulver@FreeBSD.org> | 2007-01-10 21:28:35 +0000 |
commit | 81de0f5228527c42b4d27208ff5a1a3c9bb3f386 (patch) | |
tree | ccbe9ebd245445532a8039526e03f643dea4b111 /games/q2p | |
parent | c23df656f7cf48a99a7f75fde36caf6ddb80a23f (diff) | |
download | ports-81de0f5228527c42b4d27208ff5a1a3c9bb3f386.tar.gz ports-81de0f5228527c42b4d27208ff5a1a3c9bb3f386.zip |
Notes
Diffstat (limited to 'games/q2p')
-rw-r--r-- | games/q2p/Makefile | 135 | ||||
-rw-r--r-- | games/q2p/distinfo | 3 | ||||
-rw-r--r-- | games/q2p/files/patch-Makefile | 241 | ||||
-rw-r--r-- | games/q2p/files/patch-qcommon__files.c | 53 | ||||
-rw-r--r-- | games/q2p/pkg-descr | 1 | ||||
-rw-r--r-- | games/q2p/pkg-plist | 16 |
6 files changed, 449 insertions, 0 deletions
diff --git a/games/q2p/Makefile b/games/q2p/Makefile new file mode 100644 index 000000000000..5166afb770b1 --- /dev/null +++ b/games/q2p/Makefile @@ -0,0 +1,135 @@ +# New ports collection makefile for: q2p +# Date created: 2007-01-05 +# Whom: alepulver +# +# $FreeBSD$ +# + +PORTNAME= q2p +PORTVERSION= 0.2.20061231 +CATEGORIES= games +MASTER_SITES= http://qudos.quakedev.com/linux/quake2/engines/Q2P/ +DISTNAME= Q2P-0.2-2006-12-31 + +MAINTAINER= alepulver@FreeBSD.org +COMMENT= Ehnaced OpenGL only Quake II engine + +USE_BZIP2= yes +USE_GCC= 3.4+ +USE_GMAKE= yes +ALL_TARGET= release + +OPTIONS= CLIENT "Build client" on \ + CTF "Build CTF (Capture The Flag) modification" off \ + DEDICATED "Build dedicated server" on \ + GAME "Build a main game .so modification" off \ + GLX "Build OpenGL renderer" on \ + OPTIMIZED_CFLAGS "Enable compilation optimizations" on \ + OSS "Enable Open Sound System sound support" on \ + SDL "Enable SDL sound support" on \ + SDLGL "Build SDL OpenGL renderer" on + +MAKE_ENV= DATADIR="${Q2DIR}" LIBDIR="${LIBDIR}" +PLIST_SUB= LIBDIR="${LIBDIR:S/${PREFIX}\///}" +LIBDIR= ${PREFIX}/lib/${PORTNAME} + +.include "${.CURDIR}/../quake2-data/Makefile.include" + +.include <bsd.port.pre.mk> + +.if !defined(WITHOUT_GLX) || !defined(WITHOUT_SDLGL) +USE_GL= yes +LIB_DEPENDS+= jpeg.9:${PORTSDIR}/graphics/jpeg \ + png.5:${PORTSDIR}/graphics/png +.endif + +.if !defined(WITHOUT_SDL) || !defined(WITHOUT_SDLGL) +USE_SDL= sdl +.endif + +.if !defined(WITHOUT_CLIENT) +LIB_DEPENDS+= vorbis.3:${PORTSDIR}/audio/libvorbis +MAKE_ENV+= BUILD_Q2P=YES +PLIST_SUB+= CLIENT="" +Q2BIN+= ${PORTNAME} +.else +PLIST_SUB+= CLIENT="@comment " +.endif + +.if defined(WITH_CTF) +MAKE_ENV+= BUILD_CTF=YES +PLIST_SUB+= CTF="" +.else +PLIST_SUB+= CTF="@comment " +.endif + +.if !defined(WITHOUT_DEDICATED) +MAKE_ENV+= BUILD_DEDICATED=YES +PLIST_SUB+= DEDICATED="" +Q2BIN+= ${PORTNAME}-ded +.else +PLIST_SUB+= DEDICATED="@comment " +.endif + +.if defined(WITH_GAME) +MAKE_ENV+= BUILD_GAME=YES +PLIST_SUB+= GAME="" +.else +PLIST_SUB+= GAME="@comment " +.endif + +.for opt in GLX SDLGL +. if !defined(WITHOUT_${opt}) +MAKE_ENV+= BUILD_${opt}=YES +PLIST_SUB+= ${opt}="" +Q2REF+= ${opt:L:S/glx/gl/:S/sdlgl/sdl/} +. else +PLIST_SUB+= ${opt}="@comment " +. endif +.endfor + +.if !defined(WITH_OPTIMIZED_CFLAGS) +MAKE_ENV+= OPTIMIZE=YES +.endif + +.if !defined(WITHOUT_OSS) +MAKE_ENV+= BUILD_OSS_SND=YES +PLIST_SUB+= OSS="" +Q2SND+= oss +.else +PLIST_SUB+= OSS="@comment " +.endif + +.if !defined(WITHOUT_SDL) +MAKE_ENV+= BUILD_SDL_SND=YES +PLIST_SUB+= SDL="" +Q2SND+= sdl +.else +PLIST_SUB+= SDL="@comment " +.endif + +do-install: +.for bin in ${Q2BIN} + ${INSTALL_PROGRAM} ${WRKSRC}/quake2/${bin} ${PREFIX}/bin +.endfor + ${MKDIR} ${LIBDIR}/baseq2 +.for ref in ${Q2REF} + ${INSTALL_PROGRAM} ${WRKSRC}/quake2/vid_${ref}.so ${LIBDIR} +.endfor +.for snd in ${Q2SND} + ${INSTALL_PROGRAM} ${WRKSRC}/quake2/snd_${snd}.so ${LIBDIR} +.endfor +.if defined(WITH_CTF) + ${MKDIR} ${LIBDIR}/ctf + ${INSTALL_PROGRAM} ${WRKSRC}/quake2/ctf/game.so ${LIBDIR}/ctf +.endif +.if defined(WITH_GAME) + ${INSTALL_PROGRAM} ${WRKSRC}/quake2/baseq2/game.so ${LIBDIR}/baseq2 +.endif + ${INSTALL_DATA} ${WRKSRC}/data/baseq2/* ${LIBDIR}/baseq2 +.if !defined(NOPORTDOCS) + ${MKDIR} ${DOCSDIR} + cd ${WRKSRC} && ${INSTALL_DATA} Q2P_readme.txt Ogg_readme.txt ${DOCSDIR} +.endif + +.include <bsd.port.post.mk> diff --git a/games/q2p/distinfo b/games/q2p/distinfo new file mode 100644 index 000000000000..0d933a40b0ba --- /dev/null +++ b/games/q2p/distinfo @@ -0,0 +1,3 @@ +MD5 (Q2P-0.2-2006-12-31.tar.bz2) = f9d1f79788257782642a3a63a25752df +SHA256 (Q2P-0.2-2006-12-31.tar.bz2) = 158f25b1c729b1b4ccc343b7108b560fc467c2e05ebea90a2608eeb62118ef32 +SIZE (Q2P-0.2-2006-12-31.tar.bz2) = 10138150 diff --git a/games/q2p/files/patch-Makefile b/games/q2p/files/patch-Makefile new file mode 100644 index 000000000000..337e42f12766 --- /dev/null +++ b/games/q2p/files/patch-Makefile @@ -0,0 +1,241 @@ +--- ./Makefile.orig Sun Dec 31 14:01:34 2006 ++++ ./Makefile Fri Jan 5 15:51:35 2007 +@@ -9,7 +9,7 @@ + + # Check OS type. + OSTYPE= $(shell uname -s | tr A-Z a-z) +-ARCH= $(shell uname -m | sed -e s/i.86/i386/) ++ARCH?= $(shell uname -m | sed -e s/i.86/i386/) + MARCH= $(shell uname -m) + OP_SYSTEM= $(shell uname -sr) + +@@ -27,75 +27,75 @@ + # verbose compilation # + # process. # + #===========================# +-VERBOSE=NO ++VERBOSE=YES + + #===========================# + # Q2P Client # + #===========================# +-BUILD_Q2P=YES ++BUILD_Q2P?=NO + + #===========================# + # Enable Optimizations. # + # Release build only. # + #===========================# +-OPTIMIZE=NO ++OPTIMIZE?=NO + + #===========================# + # Remove symbols from # + # binaries, reduce size. # + # Release build only. # + #===========================# +-STRIP=YES ++STRIP?=YES + + #===========================# + # Sound Drivers # + #===========================# + ifeq ($(OSTYPE),linux) +-BUILD_ALSA_SND=YES ++BUILD_ALSA_SND?=NO + endif +-BUILD_OSS_SND=YES +-BUILD_SDL_SND=YES ++BUILD_OSS_SND?=NO ++BUILD_SDL_SND?=NO + + #===========================# + # Quake 2 dedicated server. # + #===========================# +-BUILD_DEDICATED=YES ++BUILD_DEDICATED?=NO + + #===========================# + # GLX, SDL-GLX # + # render. # + #===========================# +-BUILD_GLX=YES +-BUILD_SDLGL=YES ++BUILD_GLX?=NO ++BUILD_SDLGL?=NO + + #===========================# + # Linked To GLU library. # + #===========================# +-WITH_GLULIB=YES ++WITH_GLULIB?=YES + + #===========================# + # Built in DGA mouse # + # support. # + #===========================# +-WITH_XF86_DGA=NO ++WITH_XF86_DGA?=YES + + #===========================# + # Read from $(DATADIR) and # + # write to "~/.quake2" # + #===========================# +-WITH_DATADIR=NO ++WITH_DATADIR?=YES + + #===========================# + # Load renderers # + # from $(LIBDIR) # + #===========================# +-WITH_LIBDIR=NO ++WITH_LIBDIR?=YES + + #===========================# + # Built in CD Audio # + # support. # + #===========================# +-WITH_CDAUDIO=NO ++WITH_CDAUDIO?=YES + ifeq ($(OSTYPE),freebsd) + CD_API=cd_freebsd.c + endif +@@ -107,22 +107,19 @@ + # Enable XMMS/Audacious # + # support. Only one of them # + # at same time. # +-# No yet for FreeBSD :( # + #===========================# +-ifeq ($(OSTYPE),linux) +-WITH_AUDACIOUS=YES +-WITH_XMMS=NO +-endif ++WITH_AUDACIOUS?=NO ++WITH_XMMS?=NO + + #===========================# + # Quake 2 game library. # + #===========================# +-BUILD_GAME=YES ++BUILD_GAME?=NO + + #===========================# + # CTF Library. # + #===========================# +-BUILD_CTF=YES ++BUILD_CTF?=NO + + + CLIENT_DIR=$(MOUNT_DIR)/client +@@ -133,24 +130,24 @@ + GAME_DIR=$(MOUNT_DIR)/game + CTF_DIR=$(MOUNT_DIR)/ctf + +-CC=gcc ++CC?=gcc + CC_VERSION=$(shell $(CC) -dumpversion) + +-X11BASE= /usr/X11R6 +-LOCALBASE= /usr/local +-GAMEBASE= /usr/local +-SYSBINDIR=$(LOCALBASE)/bin ++X11BASE?= /usr/X11R6 ++LOCALBASE?= /usr/local ++GAMEBASE?= $(PREFIX) ++SYSBINDIR?= $(PREFIX)/bin + + ifeq ($(OSTYPE),freebsd) +- DATADIR= $(GAMEBASE)/share/quake2 +- LIBDIR= $(GAMEBASE)/lib/quake2 ++ DATADIR?= $(GAMEBASE)/share/quake2 ++ LIBDIR?= $(GAMEBASE)/lib/quake2 + else +- DATADIR= $(GAMEBASE)/games/quake2 +- LIBDIR= $(GAMEBASE)/games/quake2 ++ DATADIR?= $(GAMEBASE)/games/quake2 ++ LIBDIR?= $(GAMEBASE)/games/quake2 + endif + + SHLIB_EXT=so +-GAME_NAME=game$(ARCH).$(SHLIB_EXT) ++GAME_NAME=game.$(SHLIB_EXT) + + BASE_CFLAGS+=-I$(LOCALBASE)/include \ + -I$(X11BASE)/include \ +@@ -168,15 +165,14 @@ + + ifeq ($(strip $(OPTIMIZE)),YES) + RELEASE_CFLAGS+=-O3 \ +- -march=$(MARCH) \ + -funroll-loops \ + -fstrength-reduce \ +- -fexpensive-optimizations \ +- -falign-loops=2 \ ++ -fexpensive-optimizations -fomit-frame-pointer -ffast-math ++ifeq ($(ARCH),i386) ++ RELEASE_CFLAGS+=-falign-loops=2 \ + -falign-jumps=2 \ + -falign-functions=2 +-else +- RELEASE_CFLAGS+=-O2 ++endif + endif + + ifeq ($(strip $(STRIP)),YES) +@@ -263,7 +259,7 @@ + endif + + ifeq ($(strip $(BUILD_DEDICATED)),YES) +- TARGETS += $(BINDIR)/q2p-dedicated ++ TARGETS += $(BINDIR)/q2p-ded + DED_CFLAGS += -DDEDICATED_ONLY + endif + +@@ -292,11 +288,11 @@ + endif + + ifeq ($(strip $(BUILD_GAME)),YES) +- TARGETS+=$(BINDIR)/baseq2/game$(ARCH).$(SHLIB_EXT) ++ TARGETS+=$(BINDIR)/baseq2/game.$(SHLIB_EXT) + endif + + ifeq ($(strip $(BUILD_CTF)),YES) +- TARGETS+=$(BINDIR)/ctf/game$(ARCH).$(SHLIB_EXT) ++ TARGETS+=$(BINDIR)/ctf/game.$(SHLIB_EXT) + endif + + all: +@@ -585,7 +581,7 @@ + $(BUILDDIR)/ded/q_shared.o $(BUILDDIR)/ded/pmove.o \ + $(BUILDDIR)/ded/cl_null.o $(BUILDDIR)/ded/cd_null.o + +-$(BINDIR)/q2p-dedicated : $(Q2PDED_OBJS) ++$(BINDIR)/q2p-ded : $(Q2PDED_OBJS) + @echo + @echo "**Built Q2P dedicated client with cflags:" + @echo "$(CC) $(CC_VERSION)"; +@@ -709,7 +705,7 @@ + $(BUILDDIR)/game/m_tank.o $(BUILDDIR)/game/p_hud.o $(BUILDDIR)/game/p_trail.o \ + $(BUILDDIR)/game/p_view.o $(BUILDDIR)/game/p_weapon.o $(BUILDDIR)/game/m_flash.o + +-$(BINDIR)/baseq2/game$(ARCH).$(SHLIB_EXT) : $(GAME_OBJS) ++$(BINDIR)/baseq2/game.$(SHLIB_EXT) : $(GAME_OBJS) + @echo + @echo "**Built $@ with cflags:" + @echo "$(CC) $(CC_VERSION) $(CFLAGS)"; +@@ -784,7 +780,7 @@ + $(BUILDDIR)/ctf/p_menu.o $(BUILDDIR)/ctf/p_trail.o $(BUILDDIR)/ctf/p_view.o \ + $(BUILDDIR)/ctf/p_weapon.o $(BUILDDIR)/ctf/q_shared.o + +-$(BINDIR)/ctf/game$(ARCH).$(SHLIB_EXT) : $(CTF_OBJS) ++$(BINDIR)/ctf/game.$(SHLIB_EXT) : $(CTF_OBJS) + @echo + @echo "**Built $@ with cflags:" + @echo "$(CC) $(CC_VERSION) $(CFLAGS)"; +@@ -935,4 +931,4 @@ + @tar cjvf $(Q2P_VERSION_BZ2)-$(OSTYPE)-$(DATE).tar.bz2 $(BINDIR) + @printf ".... Done.\n" + +- +\ No newline at end of file ++ diff --git a/games/q2p/files/patch-qcommon__files.c b/games/q2p/files/patch-qcommon__files.c new file mode 100644 index 000000000000..baee4917b5bd --- /dev/null +++ b/games/q2p/files/patch-qcommon__files.c @@ -0,0 +1,53 @@ +--- ./qcommon/files.c.orig Sun Dec 31 14:01:34 2006 ++++ ./qcommon/files.c Fri Jan 5 15:51:13 2007 +@@ -1090,9 +1090,6 @@ + int ndirs; + char *tmp; + //VoiD -E- *.pak support +- +- // Create directory if it does not exist +- Sys_Mkdir(fs_gamedir); + + strcpy(fs_gamedir, dir); + +@@ -1443,6 +1440,9 @@ + Cvar_FullSet ("gamedir", dir, CVAR_SERVERINFO|CVAR_NOSET); + if (fs_cddir->string[0]) + FS_AddGameDirectory (va("%s/%s", fs_cddir->string, dir) ); ++#if defined(DATADIR) ++ FS_AddGameDirectory(va("%s/%s", DATADIR, dir)); ++#endif + #if defined(LIBDIR) + FS_AddGameDirectory(va("%s/%s", LIBDIR, dir)); + #endif +@@ -1777,11 +1777,8 @@ + // basedir <path> + // allows the game to run from outside the data tree + // +-#if defined(DATADIR) +- fs_basedir = Cvar_Get ("basedir", DATADIR, CVAR_NOSET); +-#else + fs_basedir = Cvar_Get ("basedir", ".", CVAR_NOSET); +-#endif ++ + // + // cddir <path> + // Logically concatenates the cddir after the basedir for +@@ -1794,6 +1791,9 @@ + // + // start up with baseq2 by default + // ++#if defined(DATADIR) ++ FS_AddGameDirectory(va("%s/"BASEDIRNAME, DATADIR)); ++#endif + #if defined(LIBDIR) + FS_AddGameDirectory(va("%s/"BASEDIRNAME, LIBDIR)); + #endif +@@ -1819,6 +1819,7 @@ + + #if defined (__unix__) + /* Create directory if it does not exist. */ ++ FS_CreatePath(fs_gamedir); + Sys_Mkdir(fs_gamedir); + #endif + } diff --git a/games/q2p/pkg-descr b/games/q2p/pkg-descr new file mode 100644 index 000000000000..ded38b013284 --- /dev/null +++ b/games/q2p/pkg-descr @@ -0,0 +1 @@ +Enhaced OpenGL only Quake II engine. diff --git a/games/q2p/pkg-plist b/games/q2p/pkg-plist new file mode 100644 index 000000000000..767d678b94ef --- /dev/null +++ b/games/q2p/pkg-plist @@ -0,0 +1,16 @@ +%%CLIENT%%bin/q2p +%%DEDICATED%%bin/q2p-ded +%%LIBDIR%%/baseq2/autoexec.cfg +%%GAME%%%%LIBDIR%%/baseq2/game.so +%%LIBDIR%%/baseq2/q2p.q2z +%%CTF%%%%LIBDIR%%/ctf/game.so +%%OSS%%%%LIBDIR%%/snd_oss.so +%%SDL%%%%LIBDIR%%/snd_sdl.so +%%GLX%%%%LIBDIR%%/vid_gl.so +%%SDLGL%%%%LIBDIR%%/vid_sdl.so +%%PORTDOCS%%%%DOCSDIR%%/Ogg_readme.txt +%%PORTDOCS%%%%DOCSDIR%%/Q2P_readme.txt +%%PORTDOCS%%@dirrm %%DOCSDIR%% +@dirrm %%LIBDIR%%/baseq2 +%%CTF%%@dirrm %%LIBDIR%%/ctf +@dirrm %%LIBDIR%% |