aboutsummaryrefslogtreecommitdiffstats
path: root/games
diff options
context:
space:
mode:
authordanfe <danfe@FreeBSD.org>2014-09-09 21:15:36 +0800
committerdanfe <danfe@FreeBSD.org>2014-09-09 21:15:36 +0800
commitf7676092755e95e737753165f397f339b5e461ec (patch)
treeb6439677266d13bec9eae058d0cd49a6d9bded93 /games
parent815ee2f37d3d5b4cbea61ee2a4bd47bba37900ab (diff)
downloadfreebsd-ports-gnome-f7676092755e95e737753165f397f339b5e461ec.tar.gz
freebsd-ports-gnome-f7676092755e95e737753165f397f339b5e461ec.tar.zst
freebsd-ports-gnome-f7676092755e95e737753165f397f339b5e461ec.zip
In preparation to next version update, cleanup things a bit first:
- Add missing option description to "clients and servers" multichoice - Sort the knobs in a more logical order within the Makefile - Use more specific "gl" in USE_GL instead of umbrella "yes" - Unbreak the build against Clang and clean up Makefile while here - Transfer maintainership to the games@ team
Diffstat (limited to 'games')
-rw-r--r--games/cleanq3/Makefile35
-rw-r--r--games/cleanq3/files/patch-code-unix-Makefile2
2 files changed, 21 insertions, 16 deletions
diff --git a/games/cleanq3/Makefile b/games/cleanq3/Makefile
index 49085040d2e0..bc139eb8ef72 100644
--- a/games/cleanq3/Makefile
+++ b/games/cleanq3/Makefile
@@ -8,7 +8,7 @@ CATEGORIES= games
MASTER_SITES= http://www.bfeared.com/library/quake/archive/quakedev/temor/downloads/
DISTNAME= CleanQ3_v${PORTVERSION}-srcbin
-MAINTAINER= ports@FreeBSD.org
+MAINTAINER= games@FreeBSD.org
COMMENT= Cleaned up copy of the original Quake III Arena source code
USES= dos2unix gmake zip
@@ -16,32 +16,33 @@ WRKSRC= ${WRKDIR}/CleanQ3
BUILD_WRKSRC= ${WRKSRC}/code/unix
MAKE_JOBS_UNSAFE= yes
+MAKE_ENV= LIBDIR="${LIBDIR}"
+PLIST_SUB= LIBDIR="${LIBDIR:S/${PREFIX}\///}"
+
+LIBDIR= ${PREFIX}/lib/${PORTNAME}
+VM_ARCHS= i386
+
OPTIONS_DEFINE= GAMELIBS OPTIMIZED_CFLAGS
-OPTIONS_MULTI= TYPE
-OPTIONS_MULTI_TYPE= CLIENT SMP_CLIENT DEDICATED
+OPTIONS_MULTI= FLAVOR
+OPTIONS_MULTI_FLAVOR= CLIENT SMP_CLIENT DEDICATED
OPTIONS_DEFAULT= CLIENT SMP_CLIENT DEDICATED OPTIMIZED_CFLAGS
+FLAVOR_DESC= Clients and servers
CLIENT_DESC= Build client
SMP_CLIENT_DESC= Build SMP (threaded) client
DEDICATED_DESC= Build dedicated server
GAMELIBS_DESC= Build game libraries (when not mandatory)
-MAKE_ENV= LIBDIR="${LIBDIR}"
-PLIST_SUB= LIBDIR="${LIBDIR:S/${PREFIX}\///}"
-
-LIBDIR= ${PREFIX}/lib/${PORTNAME}
-VM_ARCHS= i386
-
.include <bsd.port.options.mk>
-.if ${ARCH} == "i386"
+.if ${ARCH} == i386
BUILD_DEPENDS= nasm:${PORTSDIR}/devel/nasm
.endif
.for i in ${ARCH}
-. if ${VM_ARCHS:M${i}} != ""
+. if ${VM_ARCHS:M${i}}
HAVE_VM_COMPILED= yes
-. endif
+. endif
.endfor
.if !defined(HAVE_VM_COMPILED)
@@ -49,7 +50,7 @@ MAKE_ENV+= DLL_ONLY=true
.endif
.if ${PORT_OPTIONS:MCLIENT} || ${PORT_OPTIONS:MSMP_CLIENT}
-USE_GL= yes
+USE_GL= gl
USE_XORG= xxf86dga
.endif
@@ -95,15 +96,19 @@ post-patch:
's|//[[:blank:]]*\(Swap_Init[[:blank:]]*();\)|\1|' \
${WRKSRC}/code/botlib/be_interface.c \
${WRKSRC}/code/renderer/tr_init.c
+ @${REINPLACE_CMD} -e '/callMask = 0/s|^static||' \
+ ${WRKSRC}/code/qcommon/vm_x86.c
do-install:
.for bin in ${Q3BIN}
- ${INSTALL_PROGRAM} ${BUILD_WRKSRC}/release/${bin} ${STAGEDIR}${PREFIX}/bin
+ ${INSTALL_PROGRAM} ${BUILD_WRKSRC}/release/${bin} \
+ ${STAGEDIR}${PREFIX}/bin
.endfor
.if ${PORT_OPTIONS:MGAMELIBS} || !defined(HAVE_VM_COMPILED)
.for dir in baseq3 missionpack
@${MKDIR} ${STAGEDIR}${LIBDIR}/${dir}
- ${INSTALL_PROGRAM} ${BUILD_WRKSRC}/release/${dir}/*.so ${STAGEDIR}${LIBDIR}/${dir}
+ ${INSTALL_PROGRAM} ${BUILD_WRKSRC}/release/${dir}/*.so \
+ ${STAGEDIR}${LIBDIR}/${dir}
.endfor
.endif
diff --git a/games/cleanq3/files/patch-code-unix-Makefile b/games/cleanq3/files/patch-code-unix-Makefile
index d44232d388f2..ca8955dff06a 100644
--- a/games/cleanq3/files/patch-code-unix-Makefile
+++ b/games/cleanq3/files/patch-code-unix-Makefile
@@ -61,7 +61,7 @@
-GL_CFLAGS = -I$(MESADIR)/include -I/usr/X11R6/include
+ifdef OPTIMIZED_CFLAGS
+ ifeq ($(ARCH),i386)
-+RELEASE_CFLAGS=$(BASE_CFLAGS) -O3 -fomit-frame-pointer -pipe -ffast-math -falign-loops=2 -falign-jumps=2 -falign-functions=2 -fno-strict-aliasing -fstrength-reduce
++RELEASE_CFLAGS=$(BASE_CFLAGS) -O3 -fomit-frame-pointer -pipe -ffast-math -falign-functions=2 -fno-strict-aliasing -fstrength-reduce
+ else
+RELEASE_CFLAGS=$(BASE_CFLAGS) -O3 -ffast-math -funroll-loops -fomit-frame-pointer -fexpensive-optimizations
+ endif