From 8199e9dc487a0e6b99c306fa637033bf11374c41 Mon Sep 17 00:00:00 2001 From: Jason Helfman Date: Fri, 31 May 2013 14:40:56 +0000 Subject: - adopt optionsNG for games - trim historical headers and trim comments - some Makefile cleanup Approved by: portmgr (bapt) --- games/quake3/Makefile | 40 ++++++++++++++++++---------------------- 1 file changed, 18 insertions(+), 22 deletions(-) (limited to 'games/quake3') diff --git a/games/quake3/Makefile b/games/quake3/Makefile index 25287a3f3385..ce4790705476 100644 --- a/games/quake3/Makefile +++ b/games/quake3/Makefile @@ -1,9 +1,5 @@ -# New ports collection makefile for: quake3 -# Date created: 23 August 2005 -# Whom: pypt -# +# Created by: pypt # $FreeBSD$ -# PORTNAME= quake3 PORTVERSION= 1.32c @@ -28,11 +24,15 @@ USE_GMAKE= yes WRKSRC= ${WRKDIR}/${PORTNAME}-${REALVERSION} BUILD_WRKSRC= ${WRKSRC}/code/unix -OPTIONS= CLIENT "Build client" on \ - DEDICATED "Build dedicated server" on \ - GAMELIBS "Build game libraries (when not mandatory)" off \ - OPTIMIZED_CFLAGS "Enable compilation optimizations" on \ - SMP "Build SMP (threaded) client" on +OPTIONS_DEFINE= GAMELIBS OPTIMIZED_CFLAGS +OPTIONS_MULTI= FLAVOR +OPTIONS_MULTI_FLAVOR= CLIENT DEDICATED THREADS +FLAVOR_DESC= Executable Selection +CLIENT_DESC= Build client +DEDICATED_DESC= Build dedicated server +GAMELIBS_DESC= Build game libraries (when not mandatory) + +OPTIONS_DEFAULT= CLIENT DEDICATED OPTIMIZED_CFLAGS THREADS MAKE_ENV= LIBDIR="${LIBDIR}" PLIST_SUB= LIBDIR="${LIBDIR:S/${PREFIX}\///}" @@ -41,13 +41,9 @@ LIBDIR= ${PREFIX}/lib/${PORTNAME} REALVERSION= 1.32b VM_ARCHS= i386 powerpc +.include .include -.if defined(WITHOUT_CLIENT) && defined(WITHOUT_DEDICATED) && \ - defined(WITHOUT_SMP) -IGNORE= needs at least one of CLIENT, DEDICATED and SMP options -.endif - .if ${ARCH} == "i386" BUILD_DEPENDS+= nasm:${PORTSDIR}/devel/nasm .endif @@ -62,12 +58,12 @@ HAVE_VM_COMPILED= yes MAKE_ENV+= DLL_ONLY=true .endif -.if !defined(WITHOUT_CLIENT) || !defined(WITHOUT_SMP) +.if ${PORT_OPTIONS:MCLIENT} || ${PORT_OPTIONS:MTHREADS} USE_GL= yes USE_XORG= xxf86dga .endif -.if !defined(WITHOUT_CLIENT) +.if ${PORT_OPTIONS:MCLIENT} MAKE_ENV+= CLIENT=YES PLIST_SUB+= CLIENT="" Q3BIN+= quake3 @@ -75,7 +71,7 @@ Q3BIN+= quake3 PLIST_SUB+= CLIENT="@comment " .endif -.if !defined(WITHOUT_DEDICATED) +.if ${PORT_OPTIONS:MDEDICATED} MAKE_ENV+= DEDICATED=YES PLIST_SUB+= DEDICATED="" Q3BIN+= q3ded @@ -83,18 +79,18 @@ Q3BIN+= q3ded PLIST_SUB+= DEDICATED="@comment " .endif -.if defined(WITH_GAMELIBS) || !defined(HAVE_VM_COMPILED) +.if ${PORT_OPTIONS:MGAMELIBS) || !defined(HAVE_VM_COMPILED} MAKE_ENV+= GAMELIBS=YES PLIST_SUB+= GAMELIBS="" .else PLIST_SUB+= GAMELIBS="@comment " .endif -.if !defined(WITHOUT_OPTIMIZED_CFLAGS) +.if ${PORT_OPTIONS:MOPTIMIZED_CFLAGS} MAKE_ENV+= OPTIMIZED_CFLAGS=YES .endif -.if !defined(WITHOUT_SMP) +.if ${PORT_OPTIONS:MTHREADS} MAKE_ENV+= SMP=YES \ PTHREAD_LIBS="${PTHREAD_LIBS}" PLIST_SUB+= SMP="" @@ -115,7 +111,7 @@ do-install: .for bin in ${Q3BIN} ${INSTALL_PROGRAM} ${BUILD_WRKSRC}/release/${bin} ${PREFIX}/bin .endfor -.if defined(WITH_GAMELIBS) || !defined(HAVE_VM_COMPILED) +.if ${PORT_OPTIONS:MGAMELIBS) || !defined(HAVE_VM_COMPILED} .for dir in baseq3 missionpack ${MKDIR} ${LIBDIR}/${dir} ${INSTALL_PROGRAM} ${BUILD_WRKSRC}/release/${dir}/*.so ${LIBDIR}/${dir} -- cgit v1.2.3