2006-12-26 05:36:35 +01:00
|
|
|
PORTNAME= q2pro
|
|
|
|
PORTVERSION= ${SVN_REV}
|
2021-06-19 22:16:08 +02:00
|
|
|
PORTREVISION= 13
|
2006-12-26 05:36:35 +01:00
|
|
|
CATEGORIES= games
|
2014-07-08 08:42:23 +02:00
|
|
|
MASTER_SITES= LOCAL/alepulver
|
2006-12-26 05:36:35 +01:00
|
|
|
|
2014-12-05 10:21:10 +01:00
|
|
|
MAINTAINER= danfe@FreeBSD.org
|
2006-12-26 05:36:35 +01:00
|
|
|
COMMENT= Quake II engine modification compatible with R1Q2
|
2022-09-07 23:06:12 +02:00
|
|
|
WWW= http://q2pro.sourceforge.net/
|
2006-12-26 05:36:35 +01:00
|
|
|
|
2016-01-12 17:20:31 +01:00
|
|
|
LICENSE= GPLv2+
|
2014-10-30 12:37:03 +01:00
|
|
|
LICENSE_FILE= ${WRKSRC}/gnu.txt
|
|
|
|
|
2014-05-26 10:44:34 +02:00
|
|
|
USES= dos2unix gmake tar:bzip2
|
2006-12-26 05:36:35 +01:00
|
|
|
WRKSRC= ${WRKDIR}/${PORTNAME}
|
|
|
|
ALL_TARGET= #
|
|
|
|
|
2013-03-17 17:37:13 +01:00
|
|
|
SVN_REV= 142
|
2006-12-26 05:36:35 +01:00
|
|
|
|
|
|
|
MAKE_ENV= LIBDIR="${LIBDIR}"
|
2014-07-08 08:42:23 +02:00
|
|
|
PLIST_SUB= LIBDIR="${LIBDIR:S|${PREFIX}/||}"
|
2006-12-26 05:36:35 +01:00
|
|
|
LIBDIR= ${PREFIX}/lib/${PORTNAME}
|
2018-09-26 18:12:12 +02:00
|
|
|
LDFLAGS_i386= -Wl,-znotext
|
2006-12-26 05:36:35 +01:00
|
|
|
|
2016-04-28 20:02:18 +02:00
|
|
|
OPTIONS_DEFINE= CLIENT DEDICATED GAME GL SOFT UI
|
2013-03-17 17:37:13 +01:00
|
|
|
OPTIONS_DEFINE_i386= ASM
|
|
|
|
OPTIONS_DEFAULT= CLIENT DEDICATED GL SOFT UI
|
2016-04-28 20:02:18 +02:00
|
|
|
OPTIONS_DEFAULT_i386= ASM
|
2006-12-26 05:36:35 +01:00
|
|
|
|
2013-03-17 17:37:13 +01:00
|
|
|
CLIENT_DESC= Build client
|
|
|
|
DEDICATED_DESC= Build dedicated server
|
|
|
|
GAME_DESC= Build main game (default mod)
|
2016-04-28 20:02:18 +02:00
|
|
|
GL_DESC= Build OpenGL renderer
|
|
|
|
SOFT_DESC= Build software renderer
|
2013-03-17 17:37:13 +01:00
|
|
|
UI_DESC= Build user interface (for client menus)
|
2006-12-26 05:36:35 +01:00
|
|
|
|
2013-03-17 17:37:13 +01:00
|
|
|
.include <bsd.port.options.mk>
|
2006-12-26 05:36:35 +01:00
|
|
|
|
2013-03-17 17:37:13 +01:00
|
|
|
.if ${PORT_OPTIONS:MCLIENT}
|
2019-11-05 23:16:14 +01:00
|
|
|
USES+= sdl
|
2007-01-13 04:12:34 +01:00
|
|
|
USE_SDL+= sdl
|
2006-12-26 05:36:35 +01:00
|
|
|
ALL_TARGET+= client
|
|
|
|
PLIST_SUB+= CLIENT=""
|
|
|
|
.else
|
|
|
|
PLIST_SUB+= CLIENT="@comment "
|
|
|
|
.endif
|
|
|
|
|
2013-03-17 17:37:13 +01:00
|
|
|
.if ${PORT_OPTIONS:MDEDICATED}
|
2006-12-26 05:36:35 +01:00
|
|
|
ALL_TARGET+= server
|
|
|
|
PLIST_SUB+= DEDICATED=""
|
|
|
|
.else
|
|
|
|
PLIST_SUB+= DEDICATED="@comment "
|
|
|
|
.endif
|
|
|
|
|
2013-03-17 17:37:13 +01:00
|
|
|
.if ${PORT_OPTIONS:MGAME}
|
2006-12-26 05:36:35 +01:00
|
|
|
ALL_TARGET+= game
|
|
|
|
PLIST_SUB+= GAME=""
|
|
|
|
.else
|
|
|
|
PLIST_SUB+= GAME="@comment "
|
|
|
|
.endif
|
|
|
|
|
2013-03-17 17:37:13 +01:00
|
|
|
.if ${PORT_OPTIONS:MGL}
|
2016-04-01 16:00:51 +02:00
|
|
|
LIB_DEPENDS+= libpng.so:graphics/png
|
2019-11-05 23:16:14 +01:00
|
|
|
USES+= gl jpeg
|
2013-03-17 17:37:13 +01:00
|
|
|
USE_GL= gl
|
2006-12-26 05:36:35 +01:00
|
|
|
ALL_TARGET+= ref_newgl
|
|
|
|
PLIST_SUB+= GL=""
|
|
|
|
.else
|
|
|
|
PLIST_SUB+= GL="@comment "
|
|
|
|
.endif
|
|
|
|
|
2013-03-17 17:37:13 +01:00
|
|
|
.if ${PORT_OPTIONS:MSOFT}
|
2006-12-26 05:36:35 +01:00
|
|
|
ALL_TARGET+= ref_soft
|
|
|
|
PLIST_SUB+= SOFT=""
|
|
|
|
.else
|
|
|
|
PLIST_SUB+= SOFT="@comment "
|
|
|
|
.endif
|
|
|
|
|
2013-03-17 17:37:13 +01:00
|
|
|
.if ${PORT_OPTIONS:MUI}
|
2006-12-26 05:36:35 +01:00
|
|
|
ALL_TARGET+= ui
|
|
|
|
PLIST_SUB+= UI=""
|
|
|
|
.else
|
|
|
|
PLIST_SUB+= UI="@comment "
|
|
|
|
.endif
|
|
|
|
|
2013-03-17 17:37:13 +01:00
|
|
|
.if ${PORT_OPTIONS:MASM}
|
2007-01-20 17:08:29 +01:00
|
|
|
MAKE_ENV+= USE_X86_ASM=yes
|
|
|
|
.endif
|
|
|
|
|
2010-02-05 12:46:55 +01:00
|
|
|
post-patch:
|
2014-07-08 08:42:23 +02:00
|
|
|
@${REINPLACE_CMD} -e 's|jpeg_mem_src|local_jpeg_mem_src|' \
|
2016-04-28 20:02:18 +02:00
|
|
|
-e '/png_set_gray_1_2_4_to_8/s|png_set|&_expand|' \
|
|
|
|
${WRKSRC}/ref_shared/r_images.c
|
|
|
|
@${REINPLACE_CMD} -E 's|[[:digit:]]+|${SVN_REV}|' \
|
|
|
|
${WRKSRC}/include/version.h
|
2020-08-31 06:00:21 +02:00
|
|
|
# Fix the build with -fno-common (for Clang 11 and GCC 10)
|
|
|
|
@${REINPLACE_CMD} -e '/^unsigned[[:blank:]]*d_8to24table/,+1d' \
|
|
|
|
${WRKSRC}/ref_soft/sw_main.c
|
|
|
|
@${REINPLACE_CMD} -e '/\*cl_paused/,+1d' \
|
|
|
|
${WRKSRC}/source/cl_null.c
|
2010-02-05 12:46:55 +01:00
|
|
|
|
2006-12-26 05:36:35 +01:00
|
|
|
do-install:
|
2014-07-08 08:42:23 +02:00
|
|
|
@${MKDIR} ${STAGEDIR}${LIBDIR}/baseq2
|
2013-03-17 17:37:13 +01:00
|
|
|
.if ${PORT_OPTIONS:MCLIENT}
|
2014-07-08 08:42:23 +02:00
|
|
|
${INSTALL_PROGRAM} ${WRKSRC}/build/release/q2pro \
|
|
|
|
${STAGEDIR}${PREFIX}/bin
|
2006-12-26 05:36:35 +01:00
|
|
|
.endif
|
2013-03-17 17:37:13 +01:00
|
|
|
.if ${PORT_OPTIONS:MDEDICATED}
|
2014-07-08 08:42:23 +02:00
|
|
|
${INSTALL_PROGRAM} ${WRKSRC}/build/release/q2proded \
|
|
|
|
${STAGEDIR}${PREFIX}/bin
|
2006-12-26 05:36:35 +01:00
|
|
|
.endif
|
2013-03-17 17:37:13 +01:00
|
|
|
.if ${PORT_OPTIONS:MGAME}
|
2014-07-08 08:42:23 +02:00
|
|
|
${INSTALL_PROGRAM} ${WRKSRC}/build/release/game.so \
|
|
|
|
${STAGEDIR}${LIBDIR}/baseq2
|
2006-12-26 05:36:35 +01:00
|
|
|
.endif
|
2013-03-17 17:37:13 +01:00
|
|
|
.if ${PORT_OPTIONS:MGL}
|
2014-07-08 08:42:23 +02:00
|
|
|
${INSTALL_PROGRAM} ${WRKSRC}/build/release/ref_newgl.so \
|
|
|
|
${STAGEDIR}${LIBDIR}
|
2006-12-26 05:36:35 +01:00
|
|
|
.endif
|
2013-03-17 17:37:13 +01:00
|
|
|
.if ${PORT_OPTIONS:MSOFT}
|
2014-07-08 08:42:23 +02:00
|
|
|
${INSTALL_PROGRAM} ${WRKSRC}/build/release/ref_soft.so \
|
|
|
|
${STAGEDIR}${LIBDIR}
|
2006-12-26 05:36:35 +01:00
|
|
|
.endif
|
2013-03-17 17:37:13 +01:00
|
|
|
.if ${PORT_OPTIONS:MUI}
|
2014-07-08 08:42:23 +02:00
|
|
|
${INSTALL_PROGRAM} ${WRKSRC}/build/release/ui.so \
|
|
|
|
${STAGEDIR}${LIBDIR}
|
2006-12-26 05:36:35 +01:00
|
|
|
.endif
|
|
|
|
|
2013-03-17 17:37:13 +01:00
|
|
|
generate-distfile:
|
2006-12-26 05:36:35 +01:00
|
|
|
@if [ -f ${DISTDIR}/${DISTNAME}${EXTRACT_SUFX} ]; then \
|
|
|
|
${ECHO_CMD} "ERROR: the distfile already exists."; \
|
|
|
|
${FALSE}; \
|
|
|
|
fi
|
|
|
|
svn export -r${SVN_REV} \
|
|
|
|
https://svn.sourceforge.net/svnroot/q2pro/q2pro q2pro
|
|
|
|
${TAR} jcf ${DISTDIR}/${DISTNAME}${EXTRACT_SUFX} q2pro
|
2016-10-21 14:51:40 +02:00
|
|
|
${RM} -r q2pro
|
2006-12-26 05:36:35 +01:00
|
|
|
|
2013-03-17 17:37:13 +01:00
|
|
|
.include "${.CURDIR}/../quake2-data/Makefile.include"
|
|
|
|
.include <bsd.port.mk>
|