2013-03-16 13:33:12 +00:00
|
|
|
# Created by: Alejandro Pulver <alejandro@varnet.biz>
|
2005-10-16 22:31:37 +00:00
|
|
|
# $FreeBSD$
|
|
|
|
|
|
|
|
PORTNAME= data
|
|
|
|
PORTVERSION= 3.20
|
2006-07-28 21:38:59 +00:00
|
|
|
PORTREVISION= 3
|
2005-10-16 22:31:37 +00:00
|
|
|
CATEGORIES= games
|
2014-07-08 07:07:05 +00:00
|
|
|
MASTER_SITES= IDSOFTWARE/quake2/:data IDSOFTWARE/quake2/source/:src
|
2005-12-28 21:15:32 +00:00
|
|
|
PKGNAMEPREFIX= ${Q2PKGNAMEPREFIX}
|
2014-07-08 07:07:05 +00:00
|
|
|
DISTFILES= ${Q2_UPDATE}:data ${Q2_SRC}:src
|
2005-10-16 22:31:37 +00:00
|
|
|
|
2014-07-08 07:07:05 +00:00
|
|
|
MAINTAINER= danfe@FreeBSD.org
|
2005-10-16 22:31:37 +00:00
|
|
|
COMMENT= Quake II data files
|
|
|
|
|
2013-03-16 13:33:12 +00:00
|
|
|
# XXX we need info-unzip for q2-314-demo-x86.exe
|
2014-03-10 14:49:26 +00:00
|
|
|
USES= zip:infozip
|
2005-10-16 22:31:37 +00:00
|
|
|
NO_WRKSUBDIR= yes
|
|
|
|
|
2006-07-28 21:38:59 +00:00
|
|
|
DATADIR= ${Q2DIR}
|
2015-08-17 14:20:40 +00:00
|
|
|
DOCSDIR= ${PREFIX}/share/doc/${PKGBASE}
|
2005-10-16 22:31:37 +00:00
|
|
|
|
2006-07-28 21:38:59 +00:00
|
|
|
Q2_DEMO= q2-314-demo-x86.exe
|
2014-07-08 07:07:05 +00:00
|
|
|
Q2_SRC= q2src${PORTVERSION:S|.||}.shar.Z
|
2006-07-28 21:38:59 +00:00
|
|
|
Q2_UPDATE= q2-${PORTVERSION}-x86-full.exe
|
2005-10-16 22:31:37 +00:00
|
|
|
|
2014-07-08 07:07:05 +00:00
|
|
|
OPTIONS_DEFINE= MANUAL OPTIMIZED_CFLAGS SHAREWARE
|
|
|
|
OPTIONS_DEFAULT= OPTIMIZED_CFLAGS
|
|
|
|
|
|
|
|
MANUAL_DESC= Install the game HTML manual
|
|
|
|
SHAREWARE_DESC= Install demo version of the game data
|
|
|
|
|
2013-03-17 12:18:23 +00:00
|
|
|
.include "Makefile.include" # must be included before bsd.port.options.mk
|
2013-03-16 13:33:12 +00:00
|
|
|
.include <bsd.port.options.mk>
|
2005-10-16 22:31:37 +00:00
|
|
|
|
2013-03-16 13:33:12 +00:00
|
|
|
.if ${PORT_OPTIONS:MMANUAL} || ${PORT_OPTIONS:MSHAREWARE}
|
2006-09-18 20:02:55 +00:00
|
|
|
DISTFILES+= ${Q2_DEMO}:data
|
2006-07-28 21:38:59 +00:00
|
|
|
.endif
|
|
|
|
|
2013-03-16 13:33:12 +00:00
|
|
|
.if ${PORT_OPTIONS:MMANUAL}
|
2006-07-28 21:38:59 +00:00
|
|
|
PLIST_SUB+= MANUAL=""
|
2005-10-16 22:31:37 +00:00
|
|
|
.else
|
2006-07-28 21:38:59 +00:00
|
|
|
PLIST_SUB+= MANUAL="@comment "
|
|
|
|
.endif
|
|
|
|
|
2013-03-16 13:33:12 +00:00
|
|
|
.if ${PORT_OPTIONS:MOPTIMIZED_CFLAGS}
|
|
|
|
CFLAGS+= -ffast-math -funroll-loops -fomit-frame-pointer \
|
|
|
|
-fexpensive-optimizations
|
2005-10-16 22:31:37 +00:00
|
|
|
.endif
|
|
|
|
|
2013-03-16 13:33:12 +00:00
|
|
|
.if ${PORT_OPTIONS:MSHAREWARE}
|
2013-03-17 12:18:23 +00:00
|
|
|
PLIST_SUB+= FULL="@comment " SHAREWARE=""
|
2005-10-16 22:31:37 +00:00
|
|
|
.else
|
2013-03-17 12:18:23 +00:00
|
|
|
PLIST_SUB+= FULL="" SHAREWARE="@comment "
|
2005-10-16 22:31:37 +00:00
|
|
|
SUB_FILES= pkg-message
|
|
|
|
.endif
|
|
|
|
|
|
|
|
do-extract:
|
2015-11-05 12:36:25 +00:00
|
|
|
@${MKDIR} ${WRKSRC}
|
|
|
|
@cd ${WRKSRC} && uncompress -c ${DISTDIR}/${Q2_SRC} | \
|
2013-03-17 12:18:23 +00:00
|
|
|
${TAIL} +434 | ${SH}
|
2015-11-05 12:36:25 +00:00
|
|
|
@${UNZIP_CMD} -q -d ${WRKSRC} \
|
2006-07-28 21:38:59 +00:00
|
|
|
${DISTDIR}/${Q2_UPDATE} baseq2/* -x *.dll
|
2013-03-16 13:33:12 +00:00
|
|
|
.if ${PORT_OPTIONS:MMANUAL}
|
2015-11-05 12:36:25 +00:00
|
|
|
@${UNZIP_CMD} -ajq -d ${WRKSRC}/DOCS \
|
2006-08-04 15:19:08 +00:00
|
|
|
${DISTDIR}/${Q2_DEMO} Install/Data/DOCS/*
|
2005-10-16 22:31:37 +00:00
|
|
|
.endif
|
2013-03-16 13:33:12 +00:00
|
|
|
.if ${PORT_OPTIONS:MSHAREWARE}
|
2015-11-05 12:36:25 +00:00
|
|
|
@${RM} ${WRKSRC}/baseq2/pak[^0].pak
|
|
|
|
@${UNZIP_CMD} -jq -d ${WRKSRC}/baseq2 \
|
2006-07-28 21:38:59 +00:00
|
|
|
${DISTDIR}/${Q2_DEMO} Install/Data/baseq2/pak0.pak
|
2005-10-16 22:31:37 +00:00
|
|
|
.endif
|
|
|
|
|
2006-07-28 21:38:59 +00:00
|
|
|
post-extract:
|
|
|
|
@${CP} ${FILESDIR}/${MAKEFILE} ${WRKSRC}
|
|
|
|
|
|
|
|
post-patch:
|
|
|
|
@${REINPLACE_CMD} -e 's/__linux__/__unix__/' ${WRKSRC}/q_shared.[ch]
|
|
|
|
|
2005-10-16 22:31:37 +00:00
|
|
|
do-install:
|
2014-07-03 22:08:59 +00:00
|
|
|
@${MKDIR} ${STAGEDIR}${DATADIR}/baseq2
|
|
|
|
${INSTALL_PROGRAM} ${WRKSRC}/game.so ${STAGEDIR}${DATADIR}/baseq2
|
|
|
|
${CP} -a ${WRKSRC}/baseq2/* ${STAGEDIR}${DATADIR}/baseq2
|
2013-03-16 13:33:12 +00:00
|
|
|
.if ${PORT_OPTIONS:MMANUAL}
|
2014-07-03 22:08:59 +00:00
|
|
|
@${MKDIR} ${STAGEDIR}${DOCSDIR}
|
|
|
|
${CP} -a ${WRKSRC}/DOCS ${STAGEDIR}${DOCSDIR}/manual
|
2005-10-16 22:31:37 +00:00
|
|
|
.endif
|
|
|
|
|
2013-03-16 13:33:12 +00:00
|
|
|
.include <bsd.port.mk>
|