2013-03-16 18:34:10 +01:00
|
|
|
# Created by: Alejandro Pulver <alepulver@FreeBSD.org>
|
2005-11-17 11:35:03 +01:00
|
|
|
|
2006-08-14 01:16:03 +02:00
|
|
|
PORTNAME= q3cellshading
|
|
|
|
PORTVERSION= 1.0
|
2021-06-19 22:16:08 +02:00
|
|
|
PORTREVISION= 4
|
2005-11-17 11:35:03 +01:00
|
|
|
CATEGORIES= games
|
2006-08-14 01:16:03 +02:00
|
|
|
MASTER_SITES= SF
|
|
|
|
DISTNAME= q3cel-${PORTVERSION}-src
|
2005-11-17 11:35:03 +01:00
|
|
|
|
2011-02-27 05:54:41 +01:00
|
|
|
MAINTAINER= ports@FreeBSD.org
|
2006-08-14 01:16:03 +02:00
|
|
|
COMMENT= Quake III engine with Cell Shading capabilities
|
2005-11-17 11:35:03 +01:00
|
|
|
|
2008-01-11 20:30:23 +01:00
|
|
|
ONLY_FOR_ARCHS= i386
|
|
|
|
ONLY_FOR_ARCHS_REASON= does not run properly; try games/ioquake3 with option
|
2021-04-23 13:10:43 +02:00
|
|
|
BROKEN_FreeBSD_13= ld: error: duplicate symbol: re
|
|
|
|
BROKEN_FreeBSD_14= ld: error: duplicate symbol: re
|
2013-03-16 18:34:10 +01:00
|
|
|
|
2014-04-18 11:16:29 +02:00
|
|
|
USES= compiler dos2unix gmake zip
|
2006-08-14 01:16:03 +02:00
|
|
|
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
|
2006-05-25 23:42:29 +02:00
|
|
|
BUILD_WRKSRC= ${WRKSRC}/code/unix
|
2014-04-18 11:16:29 +02:00
|
|
|
MAKE_JOBS_UNSAFE= yes
|
2006-05-25 23:42:29 +02:00
|
|
|
|
2013-03-16 18:34:10 +01:00
|
|
|
LIBDIR= ${PREFIX}/lib/${PORTNAME}
|
2006-05-25 23:54:08 +02:00
|
|
|
MAKE_ENV= LIBDIR="${LIBDIR}"
|
2006-05-25 23:42:29 +02:00
|
|
|
PLIST_SUB= LIBDIR="${LIBDIR:S/${PREFIX}\///}"
|
2005-11-17 11:35:03 +01:00
|
|
|
|
2006-06-04 23:51:37 +02:00
|
|
|
VM_ARCHS= i386 powerpc
|
2005-11-17 11:35:03 +01:00
|
|
|
|
2013-03-16 18:34:10 +01:00
|
|
|
OPTIONS_DEFINE= GAMELIBS OPTIMIZED_CFLAGS
|
|
|
|
OPTIONS_MULTI= FLAVOR
|
|
|
|
OPTIONS_MULTI_FLAVOR= CLIENT DEDICATED SMP_CLIENT
|
|
|
|
OPTIONS_DEFAULT= CLIENT DEDICATED OPTIMIZED_CFLAGS SMP_CLIENT
|
2014-04-18 11:16:29 +02:00
|
|
|
OPTIONS_SUB= yes
|
2013-03-16 18:34:10 +01:00
|
|
|
|
|
|
|
CLIENT_DESC= Build client
|
|
|
|
DEDICATED_DESC= Build dedicated server
|
|
|
|
GAMELIBS_DESC= Force building game libraries
|
|
|
|
SMP_CLIENT_DESC= Build SMP (threaded) client
|
|
|
|
|
2018-09-10 21:56:32 +02:00
|
|
|
.include <bsd.port.options.mk>
|
2005-11-23 13:00:47 +01:00
|
|
|
|
2006-05-25 23:42:29 +02:00
|
|
|
.if ${ARCH} == "i386"
|
2016-04-01 16:00:51 +02:00
|
|
|
BUILD_DEPENDS+= nasm:devel/nasm
|
2005-11-23 13:00:47 +01:00
|
|
|
.endif
|
|
|
|
|
2013-03-16 18:34:10 +01:00
|
|
|
.for arch in ${ARCH}
|
|
|
|
. if ${VM_ARCHS:M${arch}} != ""
|
2006-06-04 23:51:37 +02:00
|
|
|
HAVE_VM_COMPILED= yes
|
2013-03-16 18:34:10 +01:00
|
|
|
. endif
|
2006-06-04 23:51:37 +02:00
|
|
|
.endfor
|
|
|
|
|
|
|
|
.if !defined(HAVE_VM_COMPILED)
|
|
|
|
MAKE_ENV+= DLL_ONLY=true
|
|
|
|
.endif
|
|
|
|
|
2013-03-16 18:34:10 +01:00
|
|
|
.if ${PORT_OPTIONS:MCLIENT} || ${PORT_OPTIONS:MSMP_CLIENT}
|
2019-11-05 23:16:14 +01:00
|
|
|
USES+= gl xorg
|
|
|
|
USE_GL= glu
|
2021-02-11 14:58:08 +01:00
|
|
|
USE_XORG= xxf86dga xxf86vm
|
2006-05-25 23:42:29 +02:00
|
|
|
.endif
|
|
|
|
|
2012-06-12 18:35:45 +02:00
|
|
|
.if ${PORT_OPTIONS:MCLIENT}
|
2006-05-25 23:42:29 +02:00
|
|
|
MAKE_ENV+= CLIENT=YES
|
|
|
|
Q3BIN+= quake3
|
|
|
|
.endif
|
|
|
|
|
2012-06-12 18:35:45 +02:00
|
|
|
.if ${PORT_OPTIONS:MDEDICATED}
|
2006-05-25 23:42:29 +02:00
|
|
|
MAKE_ENV+= DEDICATED=YES
|
|
|
|
Q3BIN+= q3ded
|
|
|
|
.endif
|
|
|
|
|
2012-06-12 18:35:45 +02:00
|
|
|
.if ${PORT_OPTIONS:MGAMELIBS} || !defined(HAVE_VM_COMPILED)
|
2006-05-25 23:42:29 +02:00
|
|
|
MAKE_ENV+= GAMELIBS=YES
|
|
|
|
.endif
|
2005-11-17 11:35:03 +01:00
|
|
|
|
2012-06-12 18:35:45 +02:00
|
|
|
.if ${PORT_OPTIONS:MOPTIMIZED_CFLAGS}
|
2006-05-25 23:42:29 +02:00
|
|
|
MAKE_ENV+= OPTIMIZED_CFLAGS=YES
|
|
|
|
.endif
|
2005-11-17 11:35:03 +01:00
|
|
|
|
2013-03-16 18:34:10 +01:00
|
|
|
.if ${PORT_OPTIONS:MSMP_CLIENT}
|
2015-03-26 00:00:50 +01:00
|
|
|
MAKE_ENV+= SMP=YES
|
2006-05-25 23:42:29 +02:00
|
|
|
Q3BIN+= quake3-smp
|
|
|
|
.endif
|
|
|
|
|
2018-09-10 21:56:32 +02:00
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
|
2006-05-25 23:42:29 +02:00
|
|
|
post-patch:
|
|
|
|
@${REINPLACE_CMD} -e 's|botlib\.log|/dev/null|' \
|
|
|
|
${WRKSRC}/code/botlib/be_interface.c
|
|
|
|
@${REINPLACE_CMD} -e \
|
|
|
|
's|//[[:blank:]]*\(Swap_Init[[:blank:]]*();\)|\1|' \
|
|
|
|
${WRKSRC}/code/botlib/be_interface.c \
|
|
|
|
${WRKSRC}/code/renderer/tr_init.c
|
2014-04-18 11:16:29 +02:00
|
|
|
.if ${COMPILER_TYPE} == clang
|
|
|
|
@${REINPLACE_CMD} -E 's,-falign-(jumps|loops)=2,,g; s|-O6||' \
|
|
|
|
${WRKSRC}/code/unix/Makefile
|
|
|
|
.endif
|
2005-11-17 11:35:03 +01:00
|
|
|
|
|
|
|
do-install:
|
2006-05-25 23:42:29 +02:00
|
|
|
.for bin in ${Q3BIN}
|
2013-03-16 18:34:10 +01:00
|
|
|
# Adjust program names to avoid conflicts with other Quake3 ports
|
2006-08-14 01:16:03 +02:00
|
|
|
${INSTALL_PROGRAM} ${BUILD_WRKSRC}/release/${bin} \
|
2014-04-18 11:16:29 +02:00
|
|
|
${STAGEDIR}${PREFIX}/bin/${bin:C/(quake3|q3)/\1cel/}
|
2006-05-25 23:42:29 +02:00
|
|
|
.endfor
|
2012-06-12 18:35:45 +02:00
|
|
|
.if ${PORT_OPTIONS:MGAMELIBS} || !defined(HAVE_VM_COMPILED)
|
2006-05-25 23:42:29 +02:00
|
|
|
.for dir in baseq3 missionpack
|
2014-04-18 11:16:29 +02:00
|
|
|
@${MKDIR} ${STAGEDIR}${LIBDIR}/${dir}
|
|
|
|
${INSTALL_PROGRAM} ${BUILD_WRKSRC}/release/${dir}/*.so \
|
|
|
|
${STAGEDIR}${LIBDIR}/${dir}
|
2006-05-25 23:42:29 +02:00
|
|
|
.endfor
|
|
|
|
.endif
|
2005-11-17 11:35:03 +01:00
|
|
|
|
2005-11-22 06:20:37 +01:00
|
|
|
.include "${.CURDIR}/../quake3-data/Makefile.include"
|
2005-11-23 13:00:47 +01:00
|
|
|
.include <bsd.port.post.mk>
|