1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-27 00:57:50 +00:00

[UPDATE] games/quake2forge: integrate with "quake2-data"

Changes:
	* Integrate with "quake2-data".
	* Add OPTIONS.
	* Add support for Rogue and Xatrix mission packs.

PR:		ports/87180
Submitted by:	Alejandro Pulver <alejandro@varnet.biz>
This commit is contained in:
Edwin Groothuis 2005-11-22 05:15:42 +00:00
parent 758d4bd9f9
commit e81f50450d
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=148995
11 changed files with 329 additions and 137 deletions

View File

@ -8,37 +8,40 @@
PORTNAME= quake2forge
PORTVERSION= 0.3
CATEGORIES= games
MASTER_SITES= ftp://ftp.quakeforge.net/quake2forge/ \
http://www.galgenberg.net/~q/
MASTER_SITES= http://www.galgenberg.net/~q/:qf \
ftp://ftp.idsoftware.com/idstuff/quake2/source/:id \
ftp://ftp.fasta.fh-dortmund.de/mirror/idstuff/quake2/source/:id
DISTNAME= quake2-${PORTVERSION}
DISTFILES= ${DISTNAME}${EXTRACT_SUFX}:qf
DIST_SUBDIR= ${PORTNAME}
EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX}
MAINTAINER= q@galgenberg.net
COMMENT= First Person Shooter with many addons available
USE_BZIP2= yes
USE_GMAKE= yes
USE_AUTOTOOLS= autoconf:259 libtool:15
USE_REINPLACE= yes
WANT_SDL= yes
.include <bsd.port.pre.mk>
CONFIGURE_ARGS= --program-transform-name='s/^quake2$$/q2f/'
CONFIGURE_TARGET=--build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
.if ${HAVE_SDL:Msdl}!=""
WITH_SDL= yes
.endif
OPTIONS= AO "Enable libao support" off \
GL "Enable OpenGL support" on \
ROGUE "Build Ground Zero (Rogue) mission pack" off \
SDL "Enable SDL support" off \
SVGA "Enable SVGAlib support" off \
X11 "Enable X11 support" on \
XATRIX "Build The Reckoning (Xatrix) mission pack" off
.if exists(${LOCALBASE}/lib/libvga.so.1)
WITH_SVGALIB= yes
.endif
LIBDIR= ${PREFIX}/lib/${PORTNAME}
.if exists(${LOCALBASE}/lib/libao.so.3)
WITH_LIBAO= yes
.endif
.include "${.CURDIR}/../quake2-data/Makefile.include"
.if !defined (WITHOUT_LIBAO) && defined(WITH_LIBAO)
.include <bsd.port.pre.mk>
.if defined(WITH_AO) || exists(${LOCALBASE}/lib/libao.so.3)
LIB_DEPENDS+= ao.3:${PORTSDIR}/audio/libao
CONFIGURE_ARGS+=--with-ao=${LOCALBASE}
PLIST_SUB+= AO=""
@ -47,7 +50,42 @@ CONFIGURE_ARGS+=--without-ao
PLIST_SUB+= AO="@comment "
.endif
.if !defined (WITHOUT_SVGALIB) && defined(WITH_SVGALIB)
.if defined(WITH_GL) || exists(${X11BASE}/lib/libGL.so.1)
USE_GL= yes
CONFIGURE_ARGS+=--with-opengl=${X11BASE}
PLIST_SUB+= GL=""
.else
CONFIGURE_ARGS+=--with-opengl=no
PLIST_SUB+= GL="@comment "
.endif
.if defined(WITH_ROGUE)
DISTFILES+= roguesrc320.shar.Z:id
EXTRA_PATCHES+= ${FILESDIR}/extra-patch-src_rogue_g__local.h \
${FILESDIR}/extra-patch-src_rogue_q__shared.c
Q2MP+= rogue
ROGUE_OFF= 454
PLIST_SUB+= ROGUE=""
.else
PLIST_SUB+= ROGUE="@comment "
.endif
.if defined(WITH_SDL) || ${HAVE_SDL:Msdl}!=""
USE_SDL= yes
CONFIGURE_ARGS+=--with-sdl=${LOCALBASE}
PLIST_SUB+= SDL=""
.else
CONFIGURE_ARGS+=--disable-sdl --disable-sdltest
PLIST_SUB+= SDL="@comment "
.endif
.if defined(WITH_GL) && (defined(WITH_SDL) || ${HAVE_SDL:Msdl}!="")
PLIST_SUB+= SDLGL=""
.else
PLIST_SUB+= SDLGL="@comment "
.endif
.if defined(WITH_SVGA) || exists(${LOCALBASE}/lib/libvga.so.1)
LIB_DEPENDS+= vga.1:${PORTSDIR}/graphics/svgalib
CONFIGURE_ARGS+=--with-svgalib=${LOCALBASE}
PLIST_SUB+= SVGA=""
@ -56,71 +94,60 @@ CONFIGURE_ARGS+=--with-svgalib=no
PLIST_SUB+= SVGA="@comment "
.endif
.if !defined(WITHOUT_X11)
.if defined(WITH_X11) || exists(${X11BASE}/lib/libX11.so.6)
USE_XLIB= yes
CONFIGURE_ARGS+=--with-x
PLIST_SUB+= X11=""
.else
WITHOUT_GL= yes
CONFIGURE_ARGS+=--without-x
PLIST_SUB+= X11="@comment "
.endif
.if !defined(WITHOUT_GL)
CONFIGURE_ARGS+=--with-opengl=${X11BASE}
PLIST_SUB+= GL=""
.if defined(WITH_XATRIX)
DISTFILES+= xatrixsrc320.shar.Z:id
EXTRA_PATCHES+= ${FILESDIR}/extra-patch-src_xatrix_q__shared.c
Q2MP+= xatrix
XATRIX_OFF= 441
PLIST_SUB+= XATRIX=""
.else
CONFIGURE_ARGS+=--with-opengl=no
PLIST_SUB+= GL="@comment "
PLIST_SUB+= XATRIX="@comment "
.endif
.if !defined(WITHOUT_SDL) && defined(WITH_SDL)
USE_SDL= yes
CONFIGURE_ARGS+=--with-sdl=${LOCALBASE}
.if !defined(WITHOUT_GL)
PLIST_SUB+= SDLGL=""
.else
PLIST_SUB+= SDLGL="@comment "
.endif
PLIST_SUB+= SDL=""
.else
CONFIGURE_ARGS+=--disable-sdl --disable-sdltest
PLIST_SUB+= SDL="@comment "
PLIST_SUB+= SDLGL="@comment "
.endif
post-extract:
.for mp in ${Q2MP}
@${MKDIR} ${WRKSRC}/src/${mp}
@(cd ${WRKSRC}/src/${mp} && ${GUNZIP_CMD} -c \
${DISTDIR}/${DIST_SUBDIR}/${mp}src320.shar.Z > \
${mp}src320.shar && \
${TAIL} +${${mp:U}_OFF} ${mp}src320.shar | ${SH})
.endfor
pre-everything::
.if !defined(WITH_LIBAO)
@${ECHO_MSG} "Define WITH_LIBAO to use libao"
.endif
.if !defined(WITH_SVGALIB)
@${ECHO_MSG} "Define WITH_SVGALIB to use svgalib"
.endif
.if !defined(WITH_SDL)
@${ECHO_MSG} "Define WITH_SDL to use SDL"
.endif
.if !defined(WITHOUT_X11)
@${ECHO_MSG} "Define WITHOUT_X11 to disable X11 and OpenGL support"
.endif
.if !defined(WITHOUT_GL)
@${ECHO_MSG} "Define WITHOUT_GL to disable OpenGL support"
.endif
.if ( ${OSVERSION} < 500000 )
post-patch:
@${FIND} ${WRKSRC} -type f -name Makefile.in -print0 | \
${XARGS} -0 ${REINPLACE_CMD} -e \
's|\($$(libdir)/\)@PACKAGE@|\1${PORTNAME}|'
@${REINPLACE_CMD} -e 's|\($$libdir/\)$$PACKAGE|\1${PORTNAME}|' \
${CONFIGURE_WRKSRC}/${CONFIGURE_SCRIPT}.in
.if ${OSVERSION} < 500000
@${REINPLACE_CMD} -e 's/%zu/%u/g' ${WRKSRC}/src/main.c
.endif
do-install:
@(cd ${INSTALL_WRKSRC} && ${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} ${INSTALL_TARGET})
.if !defined(NOPORTDOCS)
${MKDIR} ${PREFIX}/share/doc/quake2/ctf
${INSTALL_MAN} ${WRKSRC}/docs/README.* ${WRKSRC}/docs/*.txt ${PREFIX}/share/doc/quake2
${INSTALL_MAN} ${WRKSRC}/docs/ctf/*.html ${WRKSRC}/docs/ctf/*.gif \
${WRKSRC}/docs/ctf/*.jpg ${PREFIX}/share/doc/quake2/ctf
.endif
post-build:
.for mp in ${Q2MP}
@(cd ${WRKSRC}/src/${mp}; ${MAKE} -f ${FILESDIR}/Makefile.${mp})
.endfor
post-install:
@${SED} -e 's#$${PREFIX}#${PREFIX}#g' ${PKGMESSAGE}
.for mp in ${Q2MP}
${MKDIR} ${LIBDIR}/${mp}
${INSTALL_PROGRAM} ${WRKSRC}/src/${mp}/game.so ${LIBDIR}/${mp}
.endfor
.if !defined(NOPORTDOCS)
${MKDIR} ${DOCSDIR}/ctf
${INSTALL_DATA} ${WRKSRC}/docs/README.* ${WRKSRC}/docs/*.txt ${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/docs/ctf/*.html ${WRKSRC}/docs/ctf/*.gif \
${WRKSRC}/docs/ctf/*.jpg ${DOCSDIR}/ctf
.endif
@${ECHO_CMD}; ${CAT} ${PKGMESSAGE}; ${ECHO_CMD}
.include <bsd.port.post.mk>

View File

@ -1,2 +1,3 @@
MD5 (quake2-0.3.tar.bz2) = af115d76a2f09d5847acb10e55bfa850
SIZE (quake2-0.3.tar.bz2) = 1383644
MD5 (quake2forge/quake2-0.3.tar.bz2) = af115d76a2f09d5847acb10e55bfa850
SHA256 (quake2forge/quake2-0.3.tar.bz2) = 5a868970b16eb674fd019201700f0c3011a1a5479cf8fad2c297ded0c0c74f03
SIZE (quake2forge/quake2-0.3.tar.bz2) = 1383644

View File

@ -0,0 +1,68 @@
# BSD Makefile for Quake II: Ground Zero (Rogue) game source
SHLIB_NAME= game.so
SRCS= dm_ball.c \
dm_tag.c \
g_ai.c \
g_chase.c \
g_cmds.c \
g_combat.c \
g_func.c \
g_items.c \
g_main.c \
g_misc.c \
g_monster.c \
g_newai.c \
g_newdm.c \
g_newfnc.c \
g_newtarg.c \
g_newtrig.c \
g_newweap.c \
g_phys.c \
g_save.c \
g_spawn.c \
g_sphere.c \
g_svcmds.c \
g_target.c \
g_trigger.c \
g_turret.c \
g_utils.c \
g_weapon.c \
m_actor.c \
m_berserk.c \
m_boss2.c \
m_boss3.c \
m_boss31.c \
m_boss32.c \
m_brain.c \
m_carrier.c \
m_chick.c \
m_flash.c \
m_flipper.c \
m_float.c \
m_flyer.c \
m_gladiator.c \
m_gunner.c \
m_hover.c \
m_infantry.c \
m_insane.c \
m_medic.c \
m_move.c \
m_mutant.c \
m_parasite.c \
m_soldier.c \
m_stalker.c \
m_supertank.c \
m_tank.c \
m_turret.c \
m_widow.c \
m_widow2.c \
p_client.c \
p_hud.c \
p_trail.c \
p_view.c \
p_weapon.c \
q_shared.c
.include <bsd.lib.mk>

View File

@ -0,0 +1,58 @@
# BSD Makefile for Quake II: The Reckoning (Xatrix) game source
SHLIB_NAME= game.so
SRCS= g_ai.c \
g_chase.c \
g_cmds.c \
g_combat.c \
g_func.c \
g_items.c \
g_main.c \
g_misc.c \
g_monster.c \
g_phys.c \
g_save.c \
g_spawn.c \
g_svcmds.c \
g_target.c \
g_trigger.c \
g_turret.c \
g_utils.c \
g_weapon.c \
m_actor.c \
m_berserk.c \
m_boss2.c \
m_boss3.c \
m_boss31.c \
m_boss32.c \
m_boss5.c \
m_brain.c \
m_chick.c \
m_fixbot.c \
m_flash.c \
m_flipper.c \
m_float.c \
m_flyer.c \
m_gekk.c \
m_gladb.c \
m_gladiator.c \
m_gunner.c \
m_hover.c \
m_infantry.c \
m_insane.c \
m_medic.c \
m_move.c \
m_mutant.c \
m_parasite.c \
m_soldier.c \
m_supertank.c \
m_tank.c \
p_client.c \
p_hud.c \
p_trail.c \
p_view.c \
p_weapon.c \
q_shared.c
.include <bsd.lib.mk>

View File

@ -0,0 +1,10 @@
--- src/rogue/g_local.h.orig Mon Nov 30 17:53:20 1998
+++ src/rogue/g_local.h Tue Sep 27 20:20:27 2005
@@ -22,7 +22,6 @@
//==================================================================
#ifndef _WIN32
-#include <nan.h>
#define min(a,b) ((a) < (b) ? (a) : (b))
#define max(a,b) ((a) > (b) ? (a) : (b))
#ifdef __sun__

View File

@ -0,0 +1,11 @@
--- src/rogue/q_shared.c.orig Mon Nov 30 17:53:34 1998
+++ src/rogue/q_shared.c Tue Sep 27 20:03:24 2005
@@ -329,7 +329,7 @@
Returns 1, 2, or 1 + 2
==================
*/
-#if !id386 || defined __linux__
+#if !id386 || defined __linux__ || defined __FreeBSD__
int BoxOnPlaneSide (vec3_t emins, vec3_t emaxs, struct cplane_s *p)
{
float dist1, dist2;

View File

@ -0,0 +1,11 @@
--- src/xatrix/q_shared.c.orig Mon Nov 30 17:55:36 1998
+++ src/xatrix/q_shared.c Tue Sep 27 20:04:53 2005
@@ -326,7 +326,7 @@
Returns 1, 2, or 1 + 2
==================
*/
-#if !id386 || defined __linux__
+#if !id386 || defined __linux__ || defined __FreeBSD__
int BoxOnPlaneSide (vec3_t emins, vec3_t emaxs, struct cplane_s *p)
{
float dist1, dist2;

View File

@ -0,0 +1,11 @@
--- Makefile.in.orig Tue Mar 16 07:38:08 2004
+++ Makefile.in Wed Sep 28 17:52:34 2005
@@ -243,7 +243,7 @@
target_os = @target_os@
target_vendor = @target_vendor@
unamepath = @unamepath@
-SUBDIRS = src data docs
+SUBDIRS = src docs
EXTRA_DIST = quake2.dsp quake2.dsw quake2.mak \
quake2.spec \
HACKING NEWS THANKS TODO \

View File

@ -1,5 +1,5 @@
--- configure.in.orig Tue Mar 16 11:07:38 2004
+++ configure.in Fri Mar 4 14:30:46 2005
--- configure.in.orig Tue Mar 16 07:07:38 2004
+++ configure.in Wed Sep 28 20:52:44 2005
@@ -109,6 +109,7 @@
# test for the library first, for people who may have the libs
# installed but no headers
@ -33,3 +33,13 @@
AC_SUBST(OPENGL_CFLAGS)
AC_SUBST(OPENGL_LIBS)
else
@@ -779,9 +778,6 @@
src/ctf/Makefile
src/xatrix/Makefile
src/rogue/Makefile
- data/Makefile
- data/pixmaps/Makefile
- data/baseq2/Makefile
docs/Makefile
docs/ctf/Makefile
quake2.spec

View File

@ -1,19 +1,9 @@
===============================================
============================================================
Install pak0.pak, models, skins and additional
stuff in ${PREFIX}/share/quake2
If you experience problems with mouse movements when running
in GLX-Mode, try setting in_dgamouse to 1.
To play the official Quake 2 levels, you have
to copy/link pak0.pak, players and video from
Install/Data/baseq2 on the Quake 2 CD to the
${PREFIX}/share/quake2/baseq2 directory.
ATTENTION: The Quake2Forge binary now gets installed as q2f
instead of quake2 to avoid conflicting with games/quake2lnx
If you experience problems with mouse move-
ments when running in GLX-Mode, try setting
in_dgamouse to 1.
ATTENTION: The Quake2Forge binary now gets
installed as q2f instead of quake2 to avoid
conflicting with games/quake2lnx
===============================================
============================================================

View File

@ -1,54 +1,49 @@
bin/q2f
%%SVGA%%lib/quake2/ref_soft.so
%%SDL%%lib/quake2/ref_softsdl.so
%%SDLGL%%lib/quake2/ref_sdlgl.so
%%GL%%lib/quake2/ref_glx.so
%%SVGA%%%%GL%%lib/quake2/ref_tdfx.so
%%X11%%lib/quake2/ref_softx.so
lib/quake2/snd_oss.so
%%SDL%%lib/quake2/snd_sdl.so
%%AO%%lib/quake2/snd_ao.so
lib/quake2/baseq2/game.so
lib/quake2/ctf/game.so
%%PORTDOCS%%share/doc/quake2/README.axp
%%PORTDOCS%%share/doc/quake2/README.install
%%PORTDOCS%%share/doc/quake2/README.joystick
%%PORTDOCS%%share/doc/quake2/README.linux
%%PORTDOCS%%share/doc/quake2/README.sdl
%%PORTDOCS%%share/doc/quake2/README.solaris
%%PORTDOCS%%share/doc/quake2/README.Solaris
%%PORTDOCS%%share/doc/quake2/README.sound
%%PORTDOCS%%share/doc/quake2/TODO-ctf.txt
%%PORTDOCS%%share/doc/quake2/changes-ctf.txt
%%PORTDOCS%%share/doc/quake2/changes.txt
%%PORTDOCS%%share/doc/quake2/joystick.txt
%%PORTDOCS%%share/doc/quake2/readme.txt
%%PORTDOCS%%share/doc/quake2/ctf/admin.gif
%%PORTDOCS%%share/doc/quake2/ctf/adminset.gif
%%PORTDOCS%%share/doc/quake2/ctf/automac.gif
%%PORTDOCS%%share/doc/quake2/ctf/ghost.jpg
%%PORTDOCS%%share/doc/quake2/ctf/grapple.jpg
%%PORTDOCS%%share/doc/quake2/ctf/layout.jpg
%%PORTDOCS%%share/doc/quake2/ctf/mainctf_back.jpg
%%PORTDOCS%%share/doc/quake2/ctf/menu.gif
%%PORTDOCS%%share/doc/quake2/ctf/q2ctf.html
%%PORTDOCS%%share/doc/quake2/ctf/say_team.gif
%%PORTDOCS%%share/doc/quake2/ctf/stats.jpg
%%PORTDOCS%%share/doc/quake2/ctf/tech1.gif
%%PORTDOCS%%share/doc/quake2/ctf/tech2.gif
%%PORTDOCS%%share/doc/quake2/ctf/tech3.gif
%%PORTDOCS%%share/doc/quake2/ctf/tech4.gif
%%PORTDOCS%%@dirrm share/doc/quake2/ctf
%%PORTDOCS%%@dirrm share/doc/quake2
@dirrm lib/quake2/baseq2
@dirrm lib/quake2/ctf
@dirrm lib/quake2
@unexec rm %D/share/quake2/baseq2/config.cfg 2>/dev/null || true
@unexec rm %D/share/quake2/ctf/config.cfg 2>/dev/null || true
@unexec rm %D/share/quake2/rogue/config.cfg 2>/dev/null || true
@unexec rm %D/share/quake2/xatrix/config.cfg 2>/dev/null || true
@unexec rmdir %D/share/quake2/baseq2 2>/dev/null || true
@unexec rmdir %D/share/quake2/ctf 2>/dev/null || true
@unexec rmdir %D/share/quake2/rogue 2>/dev/null || true
@unexec rmdir %D/share/quake2/xatrix 2>/dev/null || true
@unexec rmdir %D/share/quake2 2>/dev/null || true
lib/quake2forge/baseq2/game.so
lib/quake2forge/ctf/game.so
%%ROGUE%%lib/quake2forge/rogue/game.so
%%XATRIX%%lib/quake2forge/xatrix/game.so
%%GL%%lib/quake2forge/ref_glx.so
%%SDLGL%%lib/quake2forge/ref_sdlgl.so
%%SVGA%%lib/quake2forge/ref_soft.so
%%SDL%%lib/quake2forge/ref_softsdl.so
%%X11%%lib/quake2forge/ref_softx.so
%%SVGA%%%%GL%%lib/quake2forge/ref_tdfx.so
%%AO%%lib/quake2forge/snd_ao.so
lib/quake2forge/snd_oss.so
%%SDL%%lib/quake2forge/snd_sdl.so
%%PORTDOCS%%%%DOCSDIR%%/README.Solaris
%%PORTDOCS%%%%DOCSDIR%%/README.axp
%%PORTDOCS%%%%DOCSDIR%%/README.install
%%PORTDOCS%%%%DOCSDIR%%/README.joystick
%%PORTDOCS%%%%DOCSDIR%%/README.linux
%%PORTDOCS%%%%DOCSDIR%%/README.sdl
%%PORTDOCS%%%%DOCSDIR%%/README.solaris
%%PORTDOCS%%%%DOCSDIR%%/README.sound
%%PORTDOCS%%%%DOCSDIR%%/TODO-ctf.txt
%%PORTDOCS%%%%DOCSDIR%%/changes-ctf.txt
%%PORTDOCS%%%%DOCSDIR%%/changes.txt
%%PORTDOCS%%%%DOCSDIR%%/ctf/admin.gif
%%PORTDOCS%%%%DOCSDIR%%/ctf/adminset.gif
%%PORTDOCS%%%%DOCSDIR%%/ctf/automac.gif
%%PORTDOCS%%%%DOCSDIR%%/ctf/ghost.jpg
%%PORTDOCS%%%%DOCSDIR%%/ctf/grapple.jpg
%%PORTDOCS%%%%DOCSDIR%%/ctf/layout.jpg
%%PORTDOCS%%%%DOCSDIR%%/ctf/mainctf_back.jpg
%%PORTDOCS%%%%DOCSDIR%%/ctf/menu.gif
%%PORTDOCS%%%%DOCSDIR%%/ctf/q2ctf.html
%%PORTDOCS%%%%DOCSDIR%%/ctf/say_team.gif
%%PORTDOCS%%%%DOCSDIR%%/ctf/stats.jpg
%%PORTDOCS%%%%DOCSDIR%%/ctf/tech1.gif
%%PORTDOCS%%%%DOCSDIR%%/ctf/tech2.gif
%%PORTDOCS%%%%DOCSDIR%%/ctf/tech3.gif
%%PORTDOCS%%%%DOCSDIR%%/ctf/tech4.gif
%%PORTDOCS%%%%DOCSDIR%%/joystick.txt
%%PORTDOCS%%%%DOCSDIR%%/readme.txt
%%PORTDOCS%%@dirrm %%DOCSDIR%%/ctf
%%PORTDOCS%%@dirrm %%DOCSDIR%%
@dirrm lib/quake2forge/ctf
@dirrm lib/quake2forge/baseq2
%%ROGUE%%@dirrm lib/quake2forge/rogue
%%XATRIX%%@dirrm lib/quake2forge/xatrix
@dirrm lib/quake2forge