From 8e236553e72b37154092708a09b20e72dd5406ef Mon Sep 17 00:00:00 2001 From: Alexey Dokuchaev Date: Sun, 17 Mar 2013 10:11:03 +0000 Subject: [PATCH] - Trim old-school Makefile header per recent agreements - Convert to new OPTIONS framework (courtesy of jgh@) - Turn simple one-line patch into REINPLACE_CMD - Clarify in COMMENT that this is a game (not engine) source code - Make COMMENT really reflect what's being installed (based on OPTIONS) - Generally cleanup Makefile while here, drop maintainership - Reword port description text a bit --- games/quake-source/Makefile | 45 ++++++++++--------- .../files/patch-send_v101qc_progs.src | 8 ---- games/quake-source/pkg-descr | 7 ++- 3 files changed, 26 insertions(+), 34 deletions(-) delete mode 100644 games/quake-source/files/patch-send_v101qc_progs.src diff --git a/games/quake-source/Makefile b/games/quake-source/Makefile index 7839f5ea2931..519cda1afa60 100644 --- a/games/quake-source/Makefile +++ b/games/quake-source/Makefile @@ -1,9 +1,5 @@ -# New ports collection makefile for: quake-source -# Date created: 15 Sep 2005 -# Whom: Alejandro Pulver -# +# Created by: Alejandro Pulver # $FreeBSD$ -# PORTNAME= source PORTVERSION= 1.01 @@ -15,45 +11,50 @@ PKGNAMEPREFIX= quake- DISTNAME= qcc DISTFILES= ${DISTNAME}${EXTRACT_SUFX} -MAINTAINER= danfe@FreeBSD.org -COMMENT= Quake and QuakeWorld source +MAINTAINER= ports@FreeBSD.org +COMMENT= Quake game source code NO_BUILD= yes NO_WRKSUBDIR= yes -OPTIONS= QUAKEWORLD "Install QuakeWorld source" on - LATEST_LINK= ${PKGNAMEPREFIX}${PORTNAME} -.include "Makefile.include" +OPTIONS_DEFINE= QUAKEWORLD +OPTIONS_DEFAULT= QUAKEWORLD -.include +QUAKEWORLD_DESC= Install QuakeWorld game source -.if !defined(WITHOUT_QUAKEWORLD) +.include + +.if ${PORT_OPTIONS:MQUAKEWORLD} MASTER_SITES+= ${MASTER_SITE_IDSOFTWARE:S|$|quakeworld/unix/:qw|} DISTFILES+= qwsv-2.30-glibc-i386-unknown-linux2.0${EXTRACT_SUFX}:qw +COMMENT:= ${COMMENT:S/Quake/& and QuakeWorld/} PLIST_SUB+= QUAKEWORLD="" .else PLIST_SUB+= QUAKEWORLD="@comment " .endif pre-patch: +# CRLF -> LF conversion (XXX why not USE_DOS2UNIX?) @${FIND} ${WRKSRC} -type f | ${XARGS} ${FILE} | \ - ${GREP} 'CRLF' | ${SED} -e 's/:.*//' | \ - ${XARGS} ${REINPLACE_CMD} -i "" -e "s/`${PRINTF} '\r'`$$//" + ${GREP} 'CRLF' | ${SED} -e 's/:.*//' | ${XARGS} \ + ${REINPLACE_CMD} -i "" -e "s/`${PRINTF} '\r'`$$//" post-patch: - @${RM} ${WRKSRC}/send/v101qc/progs.src.orig + @${REINPLACE_CMD} -e 's,^\.\.,.,' ${WRKSRC}/send/v101qc/progs.src + @${RM} ${WRKSRC}/send/v101qc/progs.src.bak do-install: - ${MKDIR} ${DATADIR} - ${CP} -R ${WRKSRC}/send/v101qc ${DATADIR} -.if !defined(WITHOUT_QUAKEWORLD) - ${MKDIR} ${DATADIR}/qw -. for f in *.h *.qc *.src + @${MKDIR} ${DATADIR} + ${CP} -a ${WRKSRC}/send/v101qc ${DATADIR} +.if ${PORT_OPTIONS:MQUAKEWORLD} + @${MKDIR} ${DATADIR}/qw +. for f in *.h *.qc *.src @${REINPLACE_CMD} -e "s|`${ECHO_CMD} -e '\r'`$$||" ${WRKSRC}/qw/${f} ${INSTALL_DATA} ${WRKSRC}/qw/${f} ${DATADIR}/qw -. endfor +. endfor .endif -.include +.include "Makefile.include" +.include diff --git a/games/quake-source/files/patch-send_v101qc_progs.src b/games/quake-source/files/patch-send_v101qc_progs.src deleted file mode 100644 index 7457b20d96df..000000000000 --- a/games/quake-source/files/patch-send_v101qc_progs.src +++ /dev/null @@ -1,8 +0,0 @@ ---- send/v101qc/progs.src.orig Thu Jul 25 03:51:28 1996 -+++ send/v101qc/progs.src Thu Dec 8 17:57:20 2005 -@@ -1,4 +1,4 @@ --../progs.dat -+./progs.dat - - defs.qc - subs.qc diff --git a/games/quake-source/pkg-descr b/games/quake-source/pkg-descr index cb51069ce818..949fe54cb6c6 100644 --- a/games/quake-source/pkg-descr +++ b/games/quake-source/pkg-descr @@ -1,6 +1,5 @@ -Quake and QuakeWorld sources. - This port installs the Quake (and optionally QuakeWorld) game sources (in -QuakeC) to allow the development of Quake mods. +QuakeC) to allow the development of Quake modifications (mods). -Note that to compile it you need a QuakeC compiler (there are many in ports). +Note that to compile it you need a QuakeC compiler (several are available +in the ports).