From 17630f45342a4d5c719e8c85f8b7f01de384d00b Mon Sep 17 00:00:00 2001 From: alepulver Date: Fri, 28 Jul 2006 22:50:14 +0000 Subject: - Bump PORTREVISION. - Remove ROGUE and XATRIX options (moved to "games/quake2-rogue" and "games/quake2-xatrix"). - Add GAME and CTF options (off by default). - Disable building game.so and ctf/game.so by default (provided by "games/quake2-data" and "games/quake2-ctf" respectively). - Follow the rules in "games/quake2-data/Makefile.include": fix handling of the search paths. - Misc changes in pkg-plist. --- games/quake2forge/Makefile | 93 ++++++++-------------- games/quake2forge/distinfo | 12 +-- games/quake2forge/files/Makefile.rogue | 68 ---------------- games/quake2forge/files/Makefile.xatrix | 58 -------------- .../files/extra-patch-src_rogue_g__local.h | 10 --- .../files/extra-patch-src_rogue_q__shared.c | 11 --- .../files/extra-patch-src_xatrix_q__shared.c | 11 --- games/quake2forge/files/patch-src__files.c | 23 ++++++ games/quake2forge/pkg-message | 2 +- games/quake2forge/pkg-plist | 56 ++++++------- 10 files changed, 86 insertions(+), 258 deletions(-) delete mode 100644 games/quake2forge/files/Makefile.rogue delete mode 100644 games/quake2forge/files/Makefile.xatrix delete mode 100644 games/quake2forge/files/extra-patch-src_rogue_g__local.h delete mode 100644 games/quake2forge/files/extra-patch-src_rogue_q__shared.c delete mode 100644 games/quake2forge/files/extra-patch-src_xatrix_q__shared.c create mode 100644 games/quake2forge/files/patch-src__files.c (limited to 'games') diff --git a/games/quake2forge/Makefile b/games/quake2forge/Makefile index a360a6ac31b6..92a751384508 100644 --- a/games/quake2forge/Makefile +++ b/games/quake2forge/Makefile @@ -7,32 +7,27 @@ PORTNAME= quake2forge PORTVERSION= 0.3 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= games -MASTER_SITES= http://www.galgenberg.net/distfiles/:qf \ - ${MASTER_SITE_IDSOFTWARE:S|$|quake2/source/:id|} +MASTER_SITES= http://www.galgenberg.net/distfiles/ DISTNAME= quake2-${PORTVERSION} -DISTFILES= ${DISTNAME}${EXTRACT_SUFX}:qf -DIST_SUBDIR= ${PORTNAME} -EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX} MAINTAINER= alepulver@FreeBSD.org COMMENT= First Person Shooter with many addons available USE_AUTOTOOLS= autoconf:259 libtool:15 USE_BZIP2= yes -WANT_SDL= yes CONFIGURE_ARGS= --program-transform-name='s/^quake2$$/${PORTNAME}/' CONFIGURE_TARGET=--build=${MACHINE_ARCH}-portbld-freebsd${OSREL} -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 +OPTIONS= AO "Build libao sound module" off \ + CTF "Build the CTF (Capture The Flag) modification" off \ + GAME "Build a main game .so file" off \ + GL "Build OpenGL renderer" on \ + SDL "Build SDL renderers" off \ + SVGA "Build SVGA renderer" off \ + X11 "Build X11 renderer" on LIBDIR= ${PREFIX}/lib/${PORTNAME} @@ -49,7 +44,21 @@ CONFIGURE_ARGS+=--without-ao PLIST_SUB+= AO="@comment " .endif -.if !defined(WITHOUT_GL) +.if defined(WITH_CTF) +PLIST_SUB+= CTF="" +.else +Q2F_BADMODS+= ctf +PLIST_SUB+= CTF="@comment " +.endif + +.if defined(WITH_GAME) +PLIST_SUB+= GAME="" +.else +Q2F_BADMODS+= baseq2 +PLIST_SUB+= GAME="@comment " +.endif + +.if defined(WITH_GL) USE_GL= yes CONFIGURE_ARGS+=--with-opengl=${X11BASE} PLIST_SUB+= GL="" @@ -58,17 +67,6 @@ 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) USE_SDL= yes CONFIGURE_ARGS+=--with-sdl=${LOCALBASE} @@ -78,7 +76,7 @@ CONFIGURE_ARGS+=--disable-sdl --disable-sdltest PLIST_SUB+= SDL="@comment " .endif -.if !defined(WITHOUT_GL) && defined(WITH_SDL) +.if defined(WITH_GL) && defined(WITH_SDL) PLIST_SUB+= SDLGL="" .else PLIST_SUB+= SDLGL="@comment " @@ -93,7 +91,7 @@ CONFIGURE_ARGS+=--with-svgalib=no PLIST_SUB+= SVGA="@comment " .endif -.if !defined(WITHOUT_X11) +.if defined(WITH_X11) USE_XLIB= yes CONFIGURE_ARGS+=--with-x PLIST_SUB+= X11="" @@ -102,25 +100,6 @@ CONFIGURE_ARGS+=--without-x PLIST_SUB+= X11="@comment " .endif -.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 -PLIST_SUB+= XATRIX="@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 - post-patch: @${FIND} ${WRKSRC} -type f -name Makefile.in -print0 | \ ${XARGS} -0 ${REINPLACE_CMD} -e \ @@ -130,22 +109,20 @@ post-patch: .if ${OSVERSION} < 500000 @${REINPLACE_CMD} -e 's/%zu/%u/g' ${WRKSRC}/src/main.c .endif - -post-build: -.for mp in ${Q2MP} - @(cd ${WRKSRC}/src/${mp}; ${MAKE} -f ${FILESDIR}/Makefile.${mp}) +.for f in ${Q2F_BADMODS} + @${REINPLACE_CMD} -i "" -e 's/${f}//' ${WRKSRC}/src/Makefile.in .endfor post-install: -.for mp in ${Q2MP} - ${MKDIR} ${LIBDIR}/${mp} - ${INSTALL_PROGRAM} ${WRKSRC}/src/${mp}/game.so ${LIBDIR}/${mp} -.endfor .if !defined(NOPORTDOCS) - ${MKDIR} ${DOCSDIR}/ctf + ${MKDIR} ${DOCSDIR} ${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 +.if defined(WITH_CTF) + ${MKDIR} ${DOCSDIR}/ctf +.for f in *.html *.gif *.jpg + ${INSTALL_DATA} ${WRKSRC}/docs/ctf/${f} ${DOCSDIR}/ctf +.endfor +.endif .endif @${ECHO_CMD}; ${CAT} ${PKGMESSAGE}; ${ECHO_CMD} diff --git a/games/quake2forge/distinfo b/games/quake2forge/distinfo index f5b4fa347d75..efe2af207f70 100644 --- a/games/quake2forge/distinfo +++ b/games/quake2forge/distinfo @@ -1,9 +1,3 @@ -MD5 (quake2forge/quake2-0.3.tar.bz2) = af115d76a2f09d5847acb10e55bfa850 -SHA256 (quake2forge/quake2-0.3.tar.bz2) = 5a868970b16eb674fd019201700f0c3011a1a5479cf8fad2c297ded0c0c74f03 -SIZE (quake2forge/quake2-0.3.tar.bz2) = 1383644 -MD5 (quake2forge/roguesrc320.shar.Z) = 7d5e052839c9e629bad0a6570aa70554 -SHA256 (quake2forge/roguesrc320.shar.Z) = ceefb2fd748961cb0bc3244220f3eb09d8f7b8ca2eb32cdf9b284727a2fdc919 -SIZE (quake2forge/roguesrc320.shar.Z) = 626769 -MD5 (quake2forge/xatrixsrc320.shar.Z) = 41fc4ecc4f25c068e7d1f488bd4a1e1a -SHA256 (quake2forge/xatrixsrc320.shar.Z) = 94bf596cd85d38ea294b99ccb0ebb5e4b9776cca335001b3803e2d8407395589 -SIZE (quake2forge/xatrixsrc320.shar.Z) = 455917 +MD5 (quake2-0.3.tar.bz2) = af115d76a2f09d5847acb10e55bfa850 +SHA256 (quake2-0.3.tar.bz2) = 5a868970b16eb674fd019201700f0c3011a1a5479cf8fad2c297ded0c0c74f03 +SIZE (quake2-0.3.tar.bz2) = 1383644 diff --git a/games/quake2forge/files/Makefile.rogue b/games/quake2forge/files/Makefile.rogue deleted file mode 100644 index c62c037704ab..000000000000 --- a/games/quake2forge/files/Makefile.rogue +++ /dev/null @@ -1,68 +0,0 @@ -# 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 diff --git a/games/quake2forge/files/Makefile.xatrix b/games/quake2forge/files/Makefile.xatrix deleted file mode 100644 index 7a56b35537a2..000000000000 --- a/games/quake2forge/files/Makefile.xatrix +++ /dev/null @@ -1,58 +0,0 @@ -# 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 diff --git a/games/quake2forge/files/extra-patch-src_rogue_g__local.h b/games/quake2forge/files/extra-patch-src_rogue_g__local.h deleted file mode 100644 index 6b43c988effc..000000000000 --- a/games/quake2forge/files/extra-patch-src_rogue_g__local.h +++ /dev/null @@ -1,10 +0,0 @@ ---- 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 - #define min(a,b) ((a) < (b) ? (a) : (b)) - #define max(a,b) ((a) > (b) ? (a) : (b)) - #ifdef __sun__ diff --git a/games/quake2forge/files/extra-patch-src_rogue_q__shared.c b/games/quake2forge/files/extra-patch-src_rogue_q__shared.c deleted file mode 100644 index 25ffc42c24b4..000000000000 --- a/games/quake2forge/files/extra-patch-src_rogue_q__shared.c +++ /dev/null @@ -1,11 +0,0 @@ ---- 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; diff --git a/games/quake2forge/files/extra-patch-src_xatrix_q__shared.c b/games/quake2forge/files/extra-patch-src_xatrix_q__shared.c deleted file mode 100644 index 917934b400b9..000000000000 --- a/games/quake2forge/files/extra-patch-src_xatrix_q__shared.c +++ /dev/null @@ -1,11 +0,0 @@ ---- 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; diff --git a/games/quake2forge/files/patch-src__files.c b/games/quake2forge/files/patch-src__files.c new file mode 100644 index 000000000000..5370103a4c64 --- /dev/null +++ b/games/quake2forge/files/patch-src__files.c @@ -0,0 +1,23 @@ +--- src/files.c.orig Sun Feb 23 09:12:37 2003 ++++ src/files.c Thu Jul 27 17:05:41 2006 +@@ -721,6 +721,8 @@ + Cvar_FullSet ("gamedir", dir, CVAR_SERVERINFO|CVAR_NOSET); + if (fs_cddir->string[0]) + FS_AddGameDirectory (va("%s/%s", fs_cddir->string, dir) ); ++ FS_AddGameDirectory(PKGDATADIR"/"BASEDIRNAME); ++ FS_AddGameDirectory(PKGLIBDIR"/"BASEDIRNAME); + FS_AddGameDirectory (va("%s/%s", fs_basedir->string, dir) ); + FS_AddHomeAsGameDirectory (dir); + } +@@ -953,9 +955,9 @@ + // + // add baseq2 to search path + // +- /*FS_AddGameDirectory (va("%s/"BASEDIRNAME, fs_basedir->string) );*/ +- FS_AddGameDirectory(PKGLIBDIR"/"BASEDIRNAME); + FS_AddGameDirectory(PKGDATADIR"/"BASEDIRNAME); ++ FS_AddGameDirectory(PKGLIBDIR"/"BASEDIRNAME); ++ FS_AddGameDirectory (va("%s/"BASEDIRNAME, fs_basedir->string) ); + + // + // then add a '.quake2/baseq2' directory in home directory by default diff --git a/games/quake2forge/pkg-message b/games/quake2forge/pkg-message index 5920b446ea37..c1c391c419bb 100644 --- a/games/quake2forge/pkg-message +++ b/games/quake2forge/pkg-message @@ -10,6 +10,6 @@ setting in_dgamouse to 1 (this is actually for people that use the DGA X11 extension). You can not change the gamma in SDL-Mode, but you can use "xgamma" to adjust -the gamma before and after running Quake2Forge. +it before and after running Quake2Forge. ============================================================================== diff --git a/games/quake2forge/pkg-plist b/games/quake2forge/pkg-plist index 2ce0912e6f5f..d509b7614c40 100644 --- a/games/quake2forge/pkg-plist +++ b/games/quake2forge/pkg-plist @@ -1,16 +1,10 @@ bin/quake2forge -lib/quake2forge/baseq2/game.a -lib/quake2forge/baseq2/game.la -lib/quake2forge/baseq2/game.so -lib/quake2forge/ctf/game.a -lib/quake2forge/ctf/game.la -lib/quake2forge/ctf/game.so -%%ROGUE%%lib/quake2forge/rogue/game.a -%%ROGUE%%lib/quake2forge/rogue/game.la -%%ROGUE%%lib/quake2forge/rogue/game.so -%%XATRIX%%lib/quake2forge/xatrix/game.a -%%XATRIX%%lib/quake2forge/xatrix/game.la -%%XATRIX%%lib/quake2forge/xatrix/game.so +%%GAME%%lib/quake2forge/baseq2/game.a +%%GAME%%lib/quake2forge/baseq2/game.la +%%GAME%%lib/quake2forge/baseq2/game.so +%%CTF%%lib/quake2forge/ctf/game.a +%%CTF%%lib/quake2forge/ctf/game.la +%%CTF%%lib/quake2forge/ctf/game.so %%GL%%lib/quake2forge/ref_glx.a %%GL%%lib/quake2forge/ref_glx.la %%GL%%lib/quake2forge/ref_glx.so @@ -49,27 +43,25 @@ lib/quake2forge/snd_oss.so %%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 +%%CTF%%%%PORTDOCS%%%%DOCSDIR%%/ctf/admin.gif +%%CTF%%%%PORTDOCS%%%%DOCSDIR%%/ctf/adminset.gif +%%CTF%%%%PORTDOCS%%%%DOCSDIR%%/ctf/automac.gif +%%CTF%%%%PORTDOCS%%%%DOCSDIR%%/ctf/ghost.jpg +%%CTF%%%%PORTDOCS%%%%DOCSDIR%%/ctf/grapple.jpg +%%CTF%%%%PORTDOCS%%%%DOCSDIR%%/ctf/layout.jpg +%%CTF%%%%PORTDOCS%%%%DOCSDIR%%/ctf/mainctf_back.jpg +%%CTF%%%%PORTDOCS%%%%DOCSDIR%%/ctf/menu.gif +%%CTF%%%%PORTDOCS%%%%DOCSDIR%%/ctf/q2ctf.html +%%CTF%%%%PORTDOCS%%%%DOCSDIR%%/ctf/say_team.gif +%%CTF%%%%PORTDOCS%%%%DOCSDIR%%/ctf/stats.jpg +%%CTF%%%%PORTDOCS%%%%DOCSDIR%%/ctf/tech1.gif +%%CTF%%%%PORTDOCS%%%%DOCSDIR%%/ctf/tech2.gif +%%CTF%%%%PORTDOCS%%%%DOCSDIR%%/ctf/tech3.gif +%%CTF%%%%PORTDOCS%%%%DOCSDIR%%/ctf/tech4.gif %%PORTDOCS%%%%DOCSDIR%%/joystick.txt %%PORTDOCS%%%%DOCSDIR%%/readme.txt -%%PORTDOCS%%@dirrm %%DOCSDIR%%/ctf +%%CTF%%%%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 +%%CTF%%@dirrm lib/quake2forge/ctf +%%GAME%%@dirrm lib/quake2forge/baseq2 @dirrm lib/quake2forge -- cgit