2013-03-17 16:22:02 +01:00
|
|
|
# Created by: Alejandro Pulver <alepulver@FreeBSD.org>
|
2006-05-21 23:35:18 +02:00
|
|
|
# $FreeBSD$
|
|
|
|
|
|
|
|
PORTNAME= r1q2
|
2014-07-08 10:14:51 +02:00
|
|
|
PORTVERSION= 8012
|
2017-05-23 07:03:14 +02:00
|
|
|
PORTREVISION= 4
|
2006-05-21 23:35:18 +02:00
|
|
|
CATEGORIES= games
|
2014-07-08 10:14:51 +02:00
|
|
|
MASTER_SITES= http://old.r1ch.net/stuff/r1q2/src/
|
2006-05-21 23:35:18 +02:00
|
|
|
DISTNAME= ${PORTNAME}-b${PORTVERSION}-src
|
|
|
|
|
2014-07-08 10:14:51 +02:00
|
|
|
MAINTAINER= danfe@FreeBSD.org
|
2011-08-30 15:33:46 +02:00
|
|
|
COMMENT= Enhanced Quake II client/server focusing on stability
|
2006-05-21 23:35:18 +02:00
|
|
|
|
2010-10-11 05:18:03 +02:00
|
|
|
ONLY_FOR_ARCHS= i386 amd64
|
2013-03-17 16:22:02 +01:00
|
|
|
ONLY_FOR_ARCHS_REASON= sets the FPU rounding mode and precision (not available in fenv.h)
|
|
|
|
|
2017-09-22 12:48:28 +02:00
|
|
|
USES= dos2unix gmake zip
|
2006-05-21 23:35:18 +02:00
|
|
|
NO_WRKSUBDIR= yes
|
2006-12-22 04:53:10 +01:00
|
|
|
BUILD_WRKSRC= ${WRKSRC}/binaries
|
|
|
|
ALL_TARGET= #
|
2006-05-21 23:35:18 +02:00
|
|
|
|
2013-03-17 16:22:02 +01:00
|
|
|
LIBDIR= ${PREFIX}/lib/${PORTNAME}
|
2015-03-26 00:00:50 +01:00
|
|
|
MAKE_ENV= LIBDIR="${LIBDIR}"
|
2014-07-08 10:14:51 +02:00
|
|
|
PLIST_SUB= LIBDIR="${LIBDIR:S|${PREFIX}/||}"
|
2006-05-21 23:35:18 +02:00
|
|
|
|
2013-03-17 16:22:02 +01:00
|
|
|
OPTIONS_DEFINE= GAME REF_GL DOCS
|
|
|
|
OPTIONS_MULTI= FLAVOR
|
|
|
|
OPTIONS_MULTI_FLAVOR= CLIENT DEDICATED
|
|
|
|
OPTIONS_DEFAULT= CLIENT DEDICATED REF_GL
|
2006-05-21 23:35:18 +02:00
|
|
|
|
2014-07-08 10:14:51 +02:00
|
|
|
FLAVOR_DESC= Clients and servers
|
2013-03-17 16:22:02 +01:00
|
|
|
CLIENT_DESC= Build client
|
|
|
|
DEDICATED_DESC= Build dedicated server
|
2013-03-17 17:54:51 +01:00
|
|
|
GAME_DESC= Build main game (default mod)
|
2013-03-17 16:22:02 +01:00
|
|
|
REF_GL_DESC= Build renderer (required for client)
|
2006-05-21 23:35:18 +02:00
|
|
|
|
2013-03-17 16:22:02 +01:00
|
|
|
.include <bsd.port.options.mk>
|
2006-07-22 20:53:38 +02:00
|
|
|
|
2013-03-17 16:22:02 +01:00
|
|
|
.if ${PORT_OPTIONS:MCLIENT}
|
2006-12-22 04:53:10 +01:00
|
|
|
ALL_TARGET+= client
|
2006-07-22 20:53:38 +02:00
|
|
|
PLIST_SUB+= CLIENT=""
|
|
|
|
.else
|
|
|
|
PLIST_SUB+= CLIENT="@comment "
|
|
|
|
.endif
|
|
|
|
|
2013-03-17 16:22:02 +01:00
|
|
|
.if ${PORT_OPTIONS:MDEDICATED}
|
2006-12-22 04:53:10 +01:00
|
|
|
ALL_TARGET+= r1q2ded
|
2006-05-21 23:35:18 +02:00
|
|
|
PLIST_SUB+= DEDICATED=""
|
|
|
|
.else
|
|
|
|
PLIST_SUB+= DEDICATED="@comment "
|
|
|
|
.endif
|
|
|
|
|
2013-03-17 16:22:02 +01:00
|
|
|
.if ${PORT_OPTIONS:MGAME}
|
2006-12-22 04:53:10 +01:00
|
|
|
ALL_TARGET+= game
|
2006-07-22 20:53:38 +02:00
|
|
|
PLIST_SUB+= GAME=""
|
|
|
|
.else
|
|
|
|
PLIST_SUB+= GAME="@comment "
|
|
|
|
.endif
|
|
|
|
|
2013-03-17 16:22:02 +01:00
|
|
|
.if ${PORT_OPTIONS:MREF_GL}
|
2015-06-22 20:33:20 +02:00
|
|
|
USES+= jpeg
|
2013-03-17 16:22:02 +01:00
|
|
|
USE_GL= gl
|
2006-12-22 04:53:10 +01:00
|
|
|
USE_SDL= sdl
|
2016-04-01 16:00:51 +02:00
|
|
|
LIB_DEPENDS+= libpng.so:graphics/png
|
2006-12-22 04:53:10 +01:00
|
|
|
ALL_TARGET+= ref_gl
|
|
|
|
PLIST_SUB+= REF_GL=""
|
2006-05-21 23:35:18 +02:00
|
|
|
.else
|
2006-12-22 04:53:10 +01:00
|
|
|
PLIST_SUB+= REF_GL="@comment "
|
2006-05-21 23:35:18 +02:00
|
|
|
.endif
|
|
|
|
|
|
|
|
post-patch:
|
2006-12-22 04:53:10 +01:00
|
|
|
@${REINPLACE_CMD} -e 's|game$$(ARCH)|game|g' \
|
|
|
|
${BUILD_WRKSRC}/game/Makefile
|
2006-05-21 23:35:18 +02:00
|
|
|
|
2006-12-22 04:53:10 +01:00
|
|
|
pre-build:
|
|
|
|
@${FIND} ${BUILD_WRKSRC} -type d -depth 1 -exec ${MKDIR} {}/.depends \;
|
|
|
|
|
2006-05-21 23:35:18 +02:00
|
|
|
do-install:
|
2013-03-17 16:22:02 +01:00
|
|
|
.if ${PORT_OPTIONS:MCLIENT}
|
2006-12-22 04:53:10 +01:00
|
|
|
${INSTALL_PROGRAM} ${BUILD_WRKSRC}/client/quake2 \
|
2014-07-08 10:14:51 +02:00
|
|
|
${STAGEDIR}${PREFIX}/bin/${PORTNAME}
|
2006-12-22 04:53:10 +01:00
|
|
|
.endif
|
2013-03-17 16:22:02 +01:00
|
|
|
.if ${PORT_OPTIONS:MDEDICATED}
|
2014-07-08 10:14:51 +02:00
|
|
|
${INSTALL_PROGRAM} ${BUILD_WRKSRC}/r1q2ded/r1q2ded \
|
|
|
|
${STAGEDIR}${PREFIX}/bin
|
2006-12-22 04:53:10 +01:00
|
|
|
.endif
|
2014-07-08 10:14:51 +02:00
|
|
|
@${MKDIR} ${STAGEDIR}${LIBDIR}/baseq2
|
2013-03-17 16:22:02 +01:00
|
|
|
.if ${PORT_OPTIONS:MGAME}
|
2014-07-08 10:14:51 +02:00
|
|
|
${INSTALL_PROGRAM} ${BUILD_WRKSRC}/game/game.so \
|
|
|
|
${STAGEDIR}${LIBDIR}/baseq2
|
2006-12-22 04:53:10 +01:00
|
|
|
.endif
|
2013-03-17 16:22:02 +01:00
|
|
|
.if ${PORT_OPTIONS:MREF_GL}
|
2014-07-08 10:14:51 +02:00
|
|
|
${INSTALL_PROGRAM} ${BUILD_WRKSRC}/ref_gl/ref_gl.so \
|
|
|
|
${STAGEDIR}${LIBDIR}
|
2006-05-21 23:35:18 +02:00
|
|
|
.endif
|
2014-07-08 10:14:51 +02:00
|
|
|
@${MKDIR} ${STAGEDIR}${DOCSDIR}
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/r1q2.txt ${WRKSRC}/readme.txt \
|
|
|
|
${STAGEDIR}${DOCSDIR}
|
2006-05-21 23:35:18 +02:00
|
|
|
|
2013-03-17 16:22:02 +01:00
|
|
|
.include "${.CURDIR}/../quake2-data/Makefile.include"
|
|
|
|
.include <bsd.port.mk>
|