mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-17 03:25:46 +00:00
216 lines
4.9 KiB
Makefile
216 lines
4.9 KiB
Makefile
# Created by: Alejandro Pulver <alepulver@FreeBSD.org>
|
|
# $FreeBSD$
|
|
|
|
PORTNAME= qudos
|
|
PORTVERSION= 0.40.1
|
|
PORTREVISION= 15
|
|
CATEGORIES= games
|
|
MASTER_SITES= http://qudos.quakedev.com/linux/quake2/engines/QuDos/
|
|
DISTNAME= QuDos-${PORTVERSION}-src
|
|
DISTFILES= ${DISTNAME}${EXTRACT_SUFX} \
|
|
QuDos-${PORTVERSION}.pk3
|
|
EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX}
|
|
|
|
MAINTAINER= danfe@FreeBSD.org
|
|
COMMENT= Enhanced OpenGL-only Quake II engine
|
|
|
|
USE_BZIP2= yes
|
|
USE_GMAKE= yes
|
|
|
|
MAKE_ENV= WITH_DATADIR=YES WITH_LIBDIR=YES WITH_XMMS=NO \
|
|
DATADIR="${Q2DIR}" LIBDIR="${LIBDIR}"
|
|
PLIST_SUB= LIBDIR="${LIBDIR:S/${PREFIX}\///}" VER="${PORTVERSION}"
|
|
LIBDIR= ${PREFIX}/lib/${PORTNAME}
|
|
|
|
MOD_LIST= 3ZB2 CTF JABOT ROGUE XATRIX ZAERO
|
|
|
|
OPTIONS_DEFINE= 3ZB2 BOTS CLIENT CTF DEDICATED GAME GAME_MOD \
|
|
GLX IPV6 JABOT JOYSTICK OSS QMAX REDBLUE RETEXTURE \
|
|
ROGUE SDL SDLGL XATRIX ZAERO DOCS
|
|
OPTIONS_DEFINE_i386= ASM
|
|
OPTIONS_DEFINE_amd64= ASM
|
|
OPTIONS_DEFAULT_i386= ASM
|
|
OPTIONS_DEFAULT_amd64= ASM
|
|
|
|
OPTIONS_DEFAULT= 3ZB2 BOTS CLIENT DEDICATED GAME_MOD GLX JOYSTICK OSS \
|
|
QMAX SDL SDLGL
|
|
|
|
3ZB2_DESC= Build 3zb2 mod (bots)
|
|
BOTS_DESC= Ace Bot support in mods
|
|
CLIENT_DESC= Build client
|
|
CTF_DESC= Build CTF (Capture The Flag) mod
|
|
DEDICATED_DESC= Build dedicated server
|
|
GAME_DESC= Build main game (default mod)
|
|
GAME_MOD_DESC= Add custom add-ons to the main game
|
|
JABOT_DESC= Build JABot mod (bots)
|
|
JOYSTICK_DESC= Joystick support
|
|
QMAX_DESC= Enable fancier OpenGL graphics
|
|
REDBLUE_DESC= Enable red-blue 3D glasses renderer
|
|
RETEXTURE_DESC= Retextured graphics support
|
|
ROGUE_DESC= Build Ground Zero (Rogue) mission pack
|
|
SDLGL_DESC= Build SDL OpenGL renderer
|
|
XATRIX_DESC= Build The Reckoning (Xatrix) mission pack
|
|
ZAERO_DESC= Build Zaero mission pack
|
|
|
|
MAKE_ENV+= BUILD_ARTS_SND=NO
|
|
|
|
.include <bsd.port.options.mk>
|
|
|
|
.for mod in ${MOD_LIST}
|
|
. if ${PORT_OPTIONS:M${mod}}
|
|
MAKE_ENV+= BUILD_${mod}=YES
|
|
PLIST_SUB+= ${mod}=""
|
|
. else
|
|
MAKE_ENV+= BUILD_${mod}=NO
|
|
PLIST_SUB+= ${mod}="@comment "
|
|
. endif
|
|
.endfor
|
|
|
|
.if ${PORT_OPTIONS:MGLX} || ${PORT_OPTIONS:MSDLGL}
|
|
USE_GL= glu
|
|
LIB_DEPENDS+= jpeg:${PORTSDIR}/graphics/jpeg \
|
|
png15:${PORTSDIR}/graphics/png
|
|
.endif
|
|
|
|
.if ${PORT_OPTIONS:MSDL} || ${PORT_OPTIONS:MSDLGL}
|
|
USE_SDL= sdl
|
|
.endif
|
|
|
|
.if ${PORT_OPTIONS:MCLIENT}
|
|
LIB_DEPENDS+= vorbis:${PORTSDIR}/audio/libvorbis
|
|
MAKE_ENV+= BUILD_QUAKE2=YES
|
|
PLIST_SUB+= CLIENT=""
|
|
Q2BIN+= ${PORTNAME}
|
|
.else
|
|
MAKE_ENV+= BUILD_QUAKE2=NO
|
|
PLIST_SUB+= CLIENT="@comment "
|
|
.endif
|
|
|
|
.if ${PORT_OPTIONS:MDEDICATED}
|
|
MAKE_ENV+= BUILD_DEDICATED=YES
|
|
PLIST_SUB+= DEDICATED=""
|
|
Q2BIN+= ${PORTNAME}-ded
|
|
.else
|
|
MAKE_ENV+= BUILD_DEDICATED=NO
|
|
PLIST_SUB+= DEDICATED="@comment "
|
|
.endif
|
|
|
|
.if ${PORT_OPTIONS:MGAME}
|
|
MAKE_ENV+= BUILD_GAME=YES
|
|
PLIST_SUB+= GAME=""
|
|
.else
|
|
MAKE_ENV+= BUILD_GAME=NO
|
|
PLIST_SUB+= GAME="@comment "
|
|
.endif
|
|
|
|
.if ${PORT_OPTIONS:MGAME_MOD}
|
|
MAKE_ENV+= WITH_GAME_MOD=YES
|
|
.else
|
|
MAKE_ENV+= WITH_GAME_MOD=NO
|
|
.endif
|
|
|
|
.for opt in GLX SDLGL
|
|
. if ${PORT_OPTIONS:M${opt}}
|
|
MAKE_ENV+= BUILD_${opt}=YES
|
|
PLIST_SUB+= ${opt}=""
|
|
Q2REF+= ${opt:L}
|
|
. else
|
|
MAKE_ENV+= BUILD_${opt}=NO
|
|
PLIST_SUB+= ${opt}="@comment "
|
|
. endif
|
|
.endfor
|
|
|
|
.if ${PORT_OPTIONS:MIPV6}
|
|
MAKE_ENV+= WITH_IPV6=YES
|
|
.else
|
|
MAKE_ENV+= WITH_IPV6=NO
|
|
.endif
|
|
|
|
.if ${PORT_OPTIONS:MJOYSTICK}
|
|
MAKE_ENV+= WITH_JOYSTICK=YES
|
|
.else
|
|
MAKE_ENV+= WITH_JOYSTICK=NO
|
|
.endif
|
|
|
|
.if ${PORT_OPTIONS:MOSS}
|
|
MAKE_ENV+= BUILD_OSS_SND=YES
|
|
PLIST_SUB+= OSS=""
|
|
Q2SND+= oss
|
|
.else
|
|
MAKE_ENV+= BUILD_OSS_SND=NO
|
|
PLIST_SUB+= OSS="@comment "
|
|
.endif
|
|
|
|
.if ${PORT_OPTIONS:MQMAX}
|
|
MAKE_ENV+= WITH_QMAX=YES
|
|
.else
|
|
MAKE_ENV+= WITH_QMAX=NO
|
|
.endif
|
|
|
|
.if ${PORT_OPTIONS:MREDBLUE}
|
|
MAKE_ENV+= WITH_REDBLUE=YES
|
|
.else
|
|
MAKE_ENV+= WITH_REDBLUE=NO
|
|
.endif
|
|
|
|
.if ${PORT_OPTIONS:MRETEXTURE}
|
|
MAKE_ENV+= WITH_RETEXTURE=YES
|
|
.else
|
|
MAKE_ENV+= WITH_RETEXTURE=NO
|
|
.endif
|
|
|
|
.if ${PORT_OPTIONS:MSDL}
|
|
MAKE_ENV+= BUILD_SDL_SND=YES
|
|
PLIST_SUB+= SDL=""
|
|
Q2SND+= sdl
|
|
.else
|
|
MAKE_ENV+= BUILD_SDL_SND=NO
|
|
PLIST_SUB+= SDL="@comment "
|
|
.endif
|
|
|
|
.if ${PORT_OPTIONS:MASM}
|
|
MAKE_ENV+= WITH_X86_ASM=YES
|
|
.else
|
|
MAKE_ENV+= WITH_X86_ASM=NO
|
|
.endif
|
|
|
|
post-patch:
|
|
# Resolve name collision with jpeg-8
|
|
${REINPLACE_CMD} -e 's|jpeg_mem_src|local_jpeg_mem_src|' \
|
|
${WRKSRC}/src/ref_gl/gl_image.c
|
|
|
|
post-build:
|
|
.for bin in ${Q2BIN}
|
|
@cd ${WRKSRC}/quake2 && ${MV} ${bin:S/qudos/QuDos/} ${bin}
|
|
.endfor
|
|
|
|
do-install:
|
|
.for bin in ${Q2BIN}
|
|
${INSTALL_PROGRAM} ${WRKSRC}/quake2/${bin} ${PREFIX}/bin
|
|
.endfor
|
|
@${MKDIR} ${LIBDIR}/baseq2
|
|
.for ref in ${Q2REF}
|
|
${INSTALL_PROGRAM} ${WRKSRC}/quake2/ref_q2${ref}.so ${LIBDIR}
|
|
.endfor
|
|
.for snd in ${Q2SND}
|
|
${INSTALL_PROGRAM} ${WRKSRC}/quake2/snd_${snd}.so ${LIBDIR}
|
|
.endfor
|
|
.if ${PORT_OPTIONS:MGAME}
|
|
${INSTALL_PROGRAM} ${WRKSRC}/quake2/baseq2/game.so ${LIBDIR}/baseq2
|
|
.endif
|
|
.for mod in ${MOD_LIST:L}
|
|
.if ${PORT_OPTIONS:M${mod:U}}
|
|
@${MKDIR} ${LIBDIR}/${mod}
|
|
${INSTALL_PROGRAM} ${WRKSRC}/quake2/${mod}/game.so ${LIBDIR}/${mod}
|
|
.endif
|
|
.endfor
|
|
${INSTALL_DATA} ${_DISTDIR}/QuDos-${PORTVERSION}.pk3 ${LIBDIR}/baseq2
|
|
.if ${PORT_OPTIONS:MDOCS}
|
|
@${MKDIR} ${DOCSDIR}
|
|
${INSTALL_DATA} ${WRKSRC}/docs/QuDos.txt \
|
|
${WRKSRC}/docs/Ogg_readme.txt ${DOCSDIR}
|
|
.endif
|
|
|
|
.include "${.CURDIR}/../quake2-data/Makefile.include"
|
|
.include <bsd.port.mk>
|