Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 30 Mar 2014 12:32:27 +0000 (UTC)
From:      Alexey Dokuchaev <danfe@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r349614 - head/games/quake-data
Message-ID:  <201403301232.s2UCWRI6065376@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: danfe
Date: Sun Mar 30 12:32:27 2014
New Revision: 349614
URL: http://svnweb.freebsd.org/changeset/ports/349614
QAT: https://qat.redports.org/buildarchive/r349614/

Log:
  Overhaul Quake data port a bit:
  - Remove references to `archivers/unzip', it is not needed
  - Augment QW_SKINS_DESC and FULLGAME information banner
  - Set COMMENT in accordance with selected OPTIONS
  - Move skin extraction to `post-extract' target where is belongs
  - Since these files are not generated, only unpacked, install(1) them with
    `-p' switch to preserve their modification times; ditto for cp(1)
  - Transfer maintainership to newly established games@ team

Modified:
  head/games/quake-data/Makefile

Modified: head/games/quake-data/Makefile
==============================================================================
--- head/games/quake-data/Makefile	Sun Mar 30 11:06:17 2014	(r349613)
+++ head/games/quake-data/Makefile	Sun Mar 30 12:32:27 2014	(r349614)
@@ -3,7 +3,7 @@
 
 PORTNAME=	data
 PORTVERSION=	1.0.6
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	games
 MASTER_SITES=	http://www.libsdl.org/projects/quake/data/:qs
 PKGNAMEPREFIX=	${Q1PKGNAMEPREFIX}
@@ -12,11 +12,9 @@ DISTFILES=	${DISTNAME}${EXTRACT_SUFX}:qs
 DIST_SUBDIR=	${PKGNAMEPREFIX}${PORTNAME}
 EXTRACT_ONLY=	${DISTNAME}${EXTRACT_SUFX}
 
-MAINTAINER=	ports@FreeBSD.org
+MAINTAINER=	games@FreeBSD.org
 COMMENT=	Quake data files
 
-BUILD_DEPENDS=	${UNZIP_CMD}:${PORTSDIR}/archivers/unzip
-
 DATADIR=	${Q1DIR}
 NO_BUILD=	yes
 NO_WRKSUBDIR=	yes
@@ -29,7 +27,7 @@ OPTIONS_DEFAULT=	QW_DATA QW_SKINS
 
 FULLGAME_DESC=	Install full game version
 QW_DATA_DESC=	Install QuakeWorld data
-QW_SKINS_DESC=	Install QuakeWorld skins
+QW_SKINS_DESC=	Install QuakeWorld skins (implies QW_DATA)
 
 .include "Makefile.include"	# must be included before bsd.port.options.mk
 .include <bsd.port.options.mk>
@@ -39,21 +37,23 @@ DISTFILES+=	pak1.pak
 PLIST_FILES+=	%%DATADIR%%/id1/pak1.pak
 .endif
 
-.if ${PORT_OPTIONS:MQW_DATA}
+.if ${PORT_OPTIONS:MQW_DATA} || ${PORT_OPTIONS:MQW_SKINS}
 MASTER_SITES+=	${MASTER_SITE_IDSOFTWARE:S|$|quakeworld/unix/:qw|}
 DISTFILES+=	${PROGFILE}:qw
 EXTRACT_ONLY+=	${PROGFILE}
+COMMENT:=	${COMMENT:S,Quake,& and &World,}
 PLIST_SUB+=	QUAKEWORLD=""
-.  if ${PORT_OPTIONS:MQW_SKINS}
+.else
+PLIST_SUB+=	QUAKEWORLD="@comment "
+.endif
+
+.if ${PORT_OPTIONS:MQW_SKINS}
 MASTER_SITES+=	${MASTER_SITE_IDSOFTWARE:S|$|quakeworld/skins/:skins|}
 DISTFILES+=	${SKINFILES:S/$/:skins/}
-EXTRACT_DEPENDS+=	unzip:${PORTSDIR}/archivers/unzip
 PLIST_SUB+=	QUAKEWORLD_SKINS=""
-.  else
-PLIST_SUB+=	QUAKEWORLD_SKINS="@comment "
-.  endif
+COMMENT+=	and skins
 .else
-PLIST_SUB+=	QUAKEWORLD="@comment "
+PLIST_SUB+=	QUAKEWORLD_SKINS="@comment "
 .endif
 
 pre-fetch:
@@ -61,29 +61,32 @@ pre-fetch:
 	@${ECHO_CMD}
 	@${ECHO_CMD} You need to copy the file pak1.pak from the \
 		original Quake CDROM to ${_DISTDIR} in order to \
-		install this port. | ${FMT}
+		install this port with full game support. | ${FMT}
 	@${ECHO_CMD}
 	@${FALSE}
 .endif
 
+post-extract:
+.if ${PORT_OPTIONS:MQW_SKINS}
+.  for f in ${SKINFILES}
+	${EXTRACT_CMD} ${EXTRACT_BEFORE_ARGS} ${_DISTDIR}/${f} \
+		${EXTRACT_AFTER_ARGS} -C ${WRKSRC}/qw/skins
+.  endfor
+	(cd ${WRKSRC}/qw/skins && LANG=C ${SH} fixskins.sh)
+.endif
+
+# Since these files are not generated, only unpacked, install(1) them with
+# `-p' switch to preserve their modification times; ditto for cp(1).
 do-install:
 	@${MKDIR} ${STAGEDIR}${DATADIR}/id1
-	${INSTALL_DATA} ${WRKSRC}/id1/pak0.pak ${STAGEDIR}${DATADIR}/id1
+	${INSTALL_DATA} -p ${WRKSRC}/id1/pak0.pak ${STAGEDIR}${DATADIR}/id1
 .if ${PORT_OPTIONS:MFULLGAME}
-	${INSTALL_DATA} ${_DISTDIR}/pak1.pak ${STAGEDIR}${DATADIR}/id1
+	${INSTALL_DATA} -p ${_DISTDIR}/pak1.pak ${STAGEDIR}${DATADIR}/id1
 .endif
-.if ${PORT_OPTIONS:MQW_DATA}
+.if ${PORT_OPTIONS:MQW_DATA} || ${PORT_OPTIONS:MQW_SKINS}
 	@${MKDIR} ${STAGEDIR}${DATADIR}/qw
-	${INSTALL_DATA} ${WRKSRC}/qw/qwprogs.dat ${STAGEDIR}${DATADIR}/qw
-	@${MKDIR} ${STAGEDIR}${DATADIR}/qw/skins
-	${INSTALL_SCRIPT} ${WRKSRC}/qw/skins/fixskins.sh \
-		${STAGEDIR}${DATADIR}/qw/skins
-.  if ${PORT_OPTIONS:MQW_SKINS}
-.    for f in ${SKINFILES}
-	@${UNZIP_CMD} -nq ${_DISTDIR}/${f} -d ${STAGEDIR}${DATADIR}/qw/skins
-.    endfor
-	@(cd ${STAGEDIR}${DATADIR}/qw/skins && LANG=C ./fixskins.sh *)
-.  endif
+	${INSTALL_DATA} -p ${WRKSRC}/qw/qwprogs.dat ${STAGEDIR}${DATADIR}/qw
+	${CP} -a ${WRKSRC}/qw/skins ${STAGEDIR}${DATADIR}/qw
 .endif
 
 .include <bsd.port.mk>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201403301232.s2UCWRI6065376>