2013-04-27 07:12:07 +00:00
|
|
|
# Created by: Alexey Dokuchaev <danfe@regency.nsu.ru>
|
2003-06-18 09:21:21 +00:00
|
|
|
# $FreeBSD$
|
|
|
|
|
|
|
|
PORTNAME= quake2lnx
|
2005-03-15 19:32:31 +00:00
|
|
|
PORTVERSION= 0.16.2
|
2013-08-09 13:28:18 +00:00
|
|
|
PORTREVISION= 11
|
2013-08-09 14:29:39 +00:00
|
|
|
CATEGORIES= games
|
2007-01-03 16:31:05 +00:00
|
|
|
MASTER_SITES= http://offload1.icculus.org/quake2/files/
|
2003-06-18 09:21:21 +00:00
|
|
|
DISTNAME= quake2-r${PORTVERSION}
|
2007-01-03 16:31:05 +00:00
|
|
|
DISTFILES= ${DISTNAME}${EXTRACT_SUFX}
|
2004-05-08 19:01:30 +00:00
|
|
|
DIST_SUBDIR= ${PORTNAME}
|
2003-06-18 09:21:21 +00:00
|
|
|
EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX}
|
|
|
|
|
2004-08-27 08:46:33 +00:00
|
|
|
MAINTAINER= danfe@FreeBSD.org
|
2006-04-03 18:41:20 +00:00
|
|
|
COMMENT= Icculus.org version of the original Quake II
|
2003-06-18 09:21:21 +00:00
|
|
|
|
2013-04-27 07:12:07 +00:00
|
|
|
LICENSE= GPLv2
|
|
|
|
|
2013-08-09 13:28:18 +00:00
|
|
|
USES= gmake
|
2004-03-08 01:01:31 +00:00
|
|
|
WANT_SDL= yes
|
2005-11-17 10:51:28 +00:00
|
|
|
ALL_TARGET= build_release
|
2003-06-18 09:21:21 +00:00
|
|
|
|
2005-11-17 10:51:28 +00:00
|
|
|
LIBDIR= ${PREFIX}/lib/${PORTNAME}
|
2013-08-09 07:16:28 +00:00
|
|
|
PLIST_SUB+= LIBDIR="${LIBDIR:S/${PREFIX}\///}"
|
2003-06-18 09:21:21 +00:00
|
|
|
|
2013-04-27 07:12:07 +00:00
|
|
|
OPTIONS_DEFINE= X11 GLX EYECANDY SOFTSDL SDLGL SDLCLIENT AA CLIENT \
|
|
|
|
SERVER GAME CTF RETEXTURE JOYSTICK REDBLUE IPV6 \
|
2013-07-26 23:52:01 +00:00
|
|
|
OPTIMIZED_CFLAGS DOCS
|
2013-04-27 07:12:07 +00:00
|
|
|
OPTIONS_DEFAULT= X11 GLX CLIENT SERVER
|
|
|
|
OPTIONS_DEFINE_i386= SVGA ASM
|
|
|
|
OPTIONS_DEFAULT_i386= ASM
|
|
|
|
|
|
|
|
X11_DESC= Build X11 (software) renderer
|
|
|
|
GLX_DESC= Build OpenGL (GLX) renderer
|
|
|
|
EYECANDY_DESC= Build client with fancier GL graphics
|
|
|
|
SOFTSDL_DESC= Build software SDL renderer
|
|
|
|
SDLGL_DESC= Build SDL OpenGL renderer
|
|
|
|
SDLCLIENT_DESC= Build SDL client
|
|
|
|
SVGA_DESC= Build SVGA renderer
|
|
|
|
AA_DESC= Build ASCII graphics renderer
|
2013-08-09 07:16:28 +00:00
|
|
|
CLIENT_DESC= Build original client
|
2013-04-27 07:12:07 +00:00
|
|
|
SERVER_DESC= Build dedicated server
|
|
|
|
GAME_DESC= Build main game (default mod)
|
2013-08-09 07:16:28 +00:00
|
|
|
CTF_DESC= Build Capture The Flag mod
|
2013-04-27 07:12:07 +00:00
|
|
|
RETEXTURE_DESC= Retextured graphics support
|
|
|
|
JOYSTICK_DESC= Joystick support
|
|
|
|
REDBLUE_DESC= Enable 3D glasses rendering
|
|
|
|
|
2013-09-20 17:36:33 +00:00
|
|
|
NO_STAGE= yes
|
2013-04-27 07:12:07 +00:00
|
|
|
.include <bsd.port.options.mk>
|
2003-06-18 09:21:21 +00:00
|
|
|
|
2006-03-21 11:37:03 +00:00
|
|
|
### #
|
|
|
|
## CLIENTS AND RENDERERS ##
|
|
|
|
# ###
|
2003-06-18 09:21:21 +00:00
|
|
|
|
2013-04-27 07:12:07 +00:00
|
|
|
.if ${PORT_OPTIONS:MX11}
|
- Remove unneeded dependency from gtk12/gtk20 [1]
- Remove USE_XLIB/USE_X_PREFIX/USE_XPM in favor of USE_XORG
- Remove X11BASE support in favor of LOCALBASE or PREFIX
- Use USE_LDCONFIG instead of INSTALLS_SHLIB
- Remove unneeded USE_GCC 3.4+
Thanks to all Helpers:
Dmitry Marakasov, Chess Griffin, beech@, dinoex, rafan, gahr,
ehaupt, nox, itetcu, flz, pav
PR: 116263
Tested on: pointyhat
Approved by: portmgr (pav)
2008-04-19 17:56:05 +00:00
|
|
|
USE_XORG= x11 xxf86dga
|
2006-03-21 11:37:03 +00:00
|
|
|
MAKE_ARGS+= BUILD_X11=YES
|
|
|
|
REF_TARGETS+= softx
|
|
|
|
PLIST_SUB+= X11=""
|
2003-06-18 09:21:21 +00:00
|
|
|
.else
|
2006-03-21 11:37:03 +00:00
|
|
|
PLIST_SUB+= X11="@comment "
|
2003-06-18 09:21:21 +00:00
|
|
|
.endif
|
|
|
|
|
2013-04-27 07:12:07 +00:00
|
|
|
.if ${PORT_OPTIONS:MGLX} || ${PORT_OPTIONS:MEYECANDY}
|
|
|
|
USE_GL= gl
|
2005-11-17 10:51:28 +00:00
|
|
|
MAKE_ARGS+= BUILD_GLX=YES
|
|
|
|
REF_TARGETS+= glx
|
|
|
|
PLIST_SUB+= GLX=""
|
2005-03-15 19:32:31 +00:00
|
|
|
.else
|
2005-11-17 10:51:28 +00:00
|
|
|
PLIST_SUB+= GLX="@comment "
|
2005-03-15 19:32:31 +00:00
|
|
|
.endif
|
|
|
|
|
2013-04-27 07:12:07 +00:00
|
|
|
.if ${PORT_OPTIONS:MEYECANDY}
|
2007-01-03 16:31:05 +00:00
|
|
|
DISTFILES+= maxpak.pak
|
2013-08-09 07:16:28 +00:00
|
|
|
LIB_DEPENDS+= libjpeg.so:${PORTSDIR}/graphics/jpeg
|
|
|
|
USE_GL= glu
|
2006-03-21 11:37:03 +00:00
|
|
|
MAKE_ARGS+= BUILD_QMAX=YES
|
|
|
|
PLIST_SUB+= QMAX=""
|
2005-11-17 10:51:28 +00:00
|
|
|
.else
|
2006-03-21 11:37:03 +00:00
|
|
|
PLIST_SUB+= QMAX="@comment "
|
2005-03-15 19:32:31 +00:00
|
|
|
.endif
|
|
|
|
|
2013-04-27 07:12:07 +00:00
|
|
|
.if ${PORT_OPTIONS:MSOFTSDL}
|
2005-11-17 10:51:28 +00:00
|
|
|
USE_SDL= sdl
|
|
|
|
MAKE_ARGS+= BUILD_SDL=YES
|
|
|
|
REF_TARGETS+= softsdl
|
2013-04-27 07:12:07 +00:00
|
|
|
PLIST_SUB+= SOFTSDL=""
|
2005-11-17 10:51:28 +00:00
|
|
|
.else
|
2013-04-27 07:12:07 +00:00
|
|
|
PLIST_SUB+= SOFTSDL="@comment "
|
2003-06-18 09:21:21 +00:00
|
|
|
.endif
|
|
|
|
|
2013-04-27 07:12:07 +00:00
|
|
|
.if ${PORT_OPTIONS:MSDLGL}
|
|
|
|
USE_SDL= sdl
|
2006-03-21 11:37:03 +00:00
|
|
|
MAKE_ARGS+= BUILD_SDLGL=YES
|
|
|
|
REF_TARGETS+= sdlgl
|
|
|
|
PLIST_SUB+= SDLGL=""
|
|
|
|
.else
|
|
|
|
PLIST_SUB+= SDLGL="@comment "
|
|
|
|
.endif
|
|
|
|
|
2013-04-27 07:12:07 +00:00
|
|
|
.if ${PORT_OPTIONS:MSDLCLIENT}
|
|
|
|
USE_SDL= sdl
|
2005-11-17 10:51:28 +00:00
|
|
|
MAKE_ARGS+= BUILD_SDLQUAKE2=YES
|
2006-08-14 20:38:43 +00:00
|
|
|
EXE_TARGETS+= quake2-sdl
|
2005-11-17 10:51:28 +00:00
|
|
|
PLIST_SUB+= SDLCLIENT=""
|
|
|
|
.else
|
|
|
|
PLIST_SUB+= SDLCLIENT="@comment "
|
2003-06-18 09:21:21 +00:00
|
|
|
.endif
|
|
|
|
|
2013-04-27 07:12:07 +00:00
|
|
|
.if ${PORT_OPTIONS:MSVGA}
|
2013-08-09 07:16:28 +00:00
|
|
|
LIB_DEPENDS+= libvga.so:${PORTSDIR}/graphics/svgalib
|
2006-03-21 11:37:03 +00:00
|
|
|
MAKE_ARGS+= BUILD_SVGA=YES
|
|
|
|
REF_TARGETS+= soft
|
|
|
|
PLIST_SUB+= SVGA=""
|
2005-11-17 10:51:28 +00:00
|
|
|
.else
|
2006-03-21 11:37:03 +00:00
|
|
|
PLIST_SUB+= SVGA="@comment "
|
|
|
|
.endif
|
|
|
|
|
2013-04-27 07:12:07 +00:00
|
|
|
.if ${PORT_OPTIONS:MAA}
|
2013-08-09 07:16:28 +00:00
|
|
|
LIB_DEPENDS+= libaa.so:${PORTSDIR}/graphics/aalib
|
2006-03-21 11:37:03 +00:00
|
|
|
MAKE_ARGS+= BUILD_AA=YES
|
|
|
|
REF_TARGETS+= softaa
|
|
|
|
PLIST_SUB+= AA=""
|
|
|
|
.else
|
|
|
|
PLIST_SUB+= AA="@comment "
|
|
|
|
.endif
|
|
|
|
|
2013-04-27 07:12:07 +00:00
|
|
|
.if ${PORT_OPTIONS:MCLIENT}
|
2006-03-21 11:37:03 +00:00
|
|
|
MAKE_ARGS+= BUILD_CLIENT=YES
|
|
|
|
EXE_TARGETS+= quake2
|
|
|
|
PLIST_SUB+= CLIENT=""
|
|
|
|
.else
|
|
|
|
PLIST_SUB+= CLIENT="@comment "
|
2003-06-18 09:21:21 +00:00
|
|
|
.endif
|
|
|
|
|
2013-04-27 07:12:07 +00:00
|
|
|
.if ${PORT_OPTIONS:MSERVER}
|
2005-11-17 10:51:28 +00:00
|
|
|
MAKE_ARGS+= BUILD_DEDICATED=YES
|
|
|
|
PLIST_SUB+= SERVER=""
|
|
|
|
EXE_TARGETS+= q2ded
|
|
|
|
.else
|
|
|
|
PLIST_SUB+= SERVER="@comment "
|
2003-06-18 09:21:21 +00:00
|
|
|
.endif
|
|
|
|
|
2006-03-21 11:37:03 +00:00
|
|
|
### #
|
|
|
|
## GAME, MISSION ADDONS, AND MODS ##
|
|
|
|
# ###
|
|
|
|
|
2013-04-27 07:12:07 +00:00
|
|
|
.if ${PORT_OPTIONS:MGAME}
|
2006-03-21 11:37:03 +00:00
|
|
|
MAKE_ARGS+= BUILD_GAME=YES
|
|
|
|
PLIST_SUB+= GAME=""
|
2005-11-17 10:51:28 +00:00
|
|
|
.else
|
2006-03-21 11:37:03 +00:00
|
|
|
PLIST_SUB+= GAME="@comment "
|
|
|
|
.endif
|
|
|
|
|
2013-04-27 07:12:07 +00:00
|
|
|
.if ${PORT_OPTIONS:MCTF}
|
2006-03-21 11:37:03 +00:00
|
|
|
MAKE_ARGS+= BUILD_CTFDLL=YES
|
|
|
|
PLIST_SUB+= CTF=""
|
|
|
|
.else
|
|
|
|
PLIST_SUB+= CTF="@comment "
|
|
|
|
.endif
|
|
|
|
|
|
|
|
### #
|
|
|
|
## MISCELLANEOUS TUNABLES ##
|
|
|
|
# ###
|
|
|
|
|
2013-04-27 07:12:07 +00:00
|
|
|
.if ${PORT_OPTIONS:MRETEXTURE}
|
2006-03-21 11:37:03 +00:00
|
|
|
MAKE_ARGS+= BUILD_RETEXTURE=YES
|
2007-01-03 16:31:05 +00:00
|
|
|
RUN_DEPENDS+= ${Q2DIR}/baseq2/pak10.pak:${PORTSDIR}/games/quake2-extras
|
2006-03-21 11:37:03 +00:00
|
|
|
.endif
|
|
|
|
|
2013-04-27 07:12:07 +00:00
|
|
|
.if ${PORT_OPTIONS:MJOYSTICK}
|
2006-03-21 11:37:03 +00:00
|
|
|
MAKE_ARGS+= BUILD_JOYSTICK=YES
|
|
|
|
.endif
|
|
|
|
|
2013-04-27 07:12:07 +00:00
|
|
|
.if ${PORT_OPTIONS:MREDBLUE}
|
2006-03-21 11:37:03 +00:00
|
|
|
MAKE_ARGS+= BUILD_REDBLUE=YES
|
|
|
|
.endif
|
|
|
|
|
2013-04-27 07:12:07 +00:00
|
|
|
.if ${PORT_OPTIONS:MIPV6}
|
2013-08-09 14:29:39 +00:00
|
|
|
CATEGORIES+= ipv6
|
2006-03-21 11:37:03 +00:00
|
|
|
MAKE_ARGS+= HAVE_IPV6=YES
|
|
|
|
.endif
|
|
|
|
|
2013-04-27 07:12:07 +00:00
|
|
|
.if ${PORT_OPTIONS:MOPTIMIZED_CFLAGS}
|
2006-03-21 11:37:03 +00:00
|
|
|
MAKE_ARGS+= OPTIMIZED_CFLAGS="-O3 -s -ffast-math -funroll-loops -fomit-frame-pointer -fexpensive-optimizations"
|
2003-06-18 09:21:21 +00:00
|
|
|
.endif
|
|
|
|
|
2013-04-27 07:12:07 +00:00
|
|
|
.if ! ${PORT_OPTIONS:MASM}
|
2005-11-17 10:51:28 +00:00
|
|
|
MAKE_ARGS+= NO_X86_ASM=YES
|
|
|
|
.endif
|
2003-06-18 09:21:21 +00:00
|
|
|
|
2006-03-21 11:37:03 +00:00
|
|
|
### #
|
|
|
|
## END OF CONFIGURATION KNOBS ##
|
|
|
|
# ###
|
|
|
|
|
2006-03-21 16:24:32 +00:00
|
|
|
post-patch: .SILENT
|
2006-08-14 20:38:43 +00:00
|
|
|
${REINPLACE_CMD} -e 's|%%DATADIR%%|${Q2DIR}| ; \
|
2006-03-21 16:24:32 +00:00
|
|
|
s|%%LIBDIR%%|${LIBDIR}|' ${WRKSRC}/src/qcommon/files.c \
|
|
|
|
${WRKSRC}/src/linux/vid_so.c
|
|
|
|
${REINPLACE_CMD} -e 's|dllname, RTLD_LAZY|& \| RTLD_GLOBAL|' \
|
|
|
|
${WRKSRC}/src/linux/qgl_linux.c
|
2013-04-27 07:12:07 +00:00
|
|
|
${REINPLACE_CMD} -e 's|/js|/joy|' ${WRKSRC}/src/linux/joystick.c
|
2013-08-09 07:16:28 +00:00
|
|
|
${REINPLACE_CMD} -e 's|jpeg_mem_src|local_&|' \
|
|
|
|
${WRKSRC}/src/ref_candygl/gl_image.c
|
2006-03-21 16:24:32 +00:00
|
|
|
|
2003-06-18 09:21:21 +00:00
|
|
|
do-install:
|
|
|
|
.for tgt in ${EXE_TARGETS}
|
2013-08-09 07:16:28 +00:00
|
|
|
${INSTALL_PROGRAM} ${WRKSRC}/release/${tgt} ${PREFIX}/bin
|
2003-06-18 09:21:21 +00:00
|
|
|
.endfor
|
2006-08-14 20:38:43 +00:00
|
|
|
@${MKDIR} ${LIBDIR}/baseq2
|
2003-06-18 09:21:21 +00:00
|
|
|
.for tgt in ${REF_TARGETS}
|
2013-08-09 07:16:28 +00:00
|
|
|
${INSTALL_PROGRAM} ${WRKSRC}/release/ref_${tgt}.so ${LIBDIR}
|
2003-06-18 09:21:21 +00:00
|
|
|
.endfor
|
2013-04-27 07:12:07 +00:00
|
|
|
.if ${PORT_OPTIONS:MCTF}
|
2005-11-18 10:02:24 +00:00
|
|
|
@${MKDIR} ${LIBDIR}/ctf
|
2013-08-09 07:16:28 +00:00
|
|
|
${INSTALL_PROGRAM} ${WRKSRC}/release/ctf/game.so ${LIBDIR}/ctf
|
2003-06-18 09:21:21 +00:00
|
|
|
.endif
|
2013-04-27 07:12:07 +00:00
|
|
|
.if ${PORT_OPTIONS:MEYECANDY}
|
2006-08-14 20:38:43 +00:00
|
|
|
${INSTALL_DATA} ${DISTDIR}/${DIST_SUBDIR}/maxpak.pak ${LIBDIR}/baseq2
|
2005-03-21 12:22:46 +00:00
|
|
|
.endif
|
2013-04-27 07:12:07 +00:00
|
|
|
.if ${PORT_OPTIONS:MGAME}
|
2013-08-09 07:16:28 +00:00
|
|
|
${INSTALL_PROGRAM} ${WRKSRC}/release/game.so ${LIBDIR}/baseq2
|
2005-03-15 19:32:31 +00:00
|
|
|
.endif
|
2013-04-27 07:12:07 +00:00
|
|
|
.if ${PORT_OPTIONS:MDOCS}
|
2003-06-18 09:21:21 +00:00
|
|
|
@${MKDIR} ${DOCSDIR}
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR}
|
2005-03-15 19:32:31 +00:00
|
|
|
${INSTALL_DATA} ${WRKSRC}/src/docs/README ${DOCSDIR}/README.320
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/src/docs/joystick.txt ${DOCSDIR}
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/src/docs/quake2.3dfxgl ${DOCSDIR}
|
2003-06-18 09:21:21 +00:00
|
|
|
.endif
|
|
|
|
|
2006-03-21 11:37:03 +00:00
|
|
|
.include "${.CURDIR}/../quake2-data/Makefile.include"
|
2013-04-27 07:12:07 +00:00
|
|
|
.include <bsd.port.mk>
|