diff options
author | bapt <bapt@FreeBSD.org> | 2012-06-13 00:35:45 +0800 |
---|---|---|
committer | bapt <bapt@FreeBSD.org> | 2012-06-13 00:35:45 +0800 |
commit | b0ad879e3e23b8ba6d75396d593d1bba436ffed6 (patch) | |
tree | 8b078441d20301eb3b13f3b6b3a374c4688468a4 /games/evq3 | |
parent | 624c78988bf68a8f633b795635f8ba4b2fffed13 (diff) | |
download | freebsd-ports-gnome-b0ad879e3e23b8ba6d75396d593d1bba436ffed6.tar.gz freebsd-ports-gnome-b0ad879e3e23b8ba6d75396d593d1bba436ffed6.tar.zst freebsd-ports-gnome-b0ad879e3e23b8ba6d75396d593d1bba436ffed6.zip |
Convert to new options framework
Diffstat (limited to 'games/evq3')
-rw-r--r-- | games/evq3/Makefile | 56 |
1 files changed, 26 insertions, 30 deletions
diff --git a/games/evq3/Makefile b/games/evq3/Makefile index 69af1dd44a2f..e6ee21defe47 100644 --- a/games/evq3/Makefile +++ b/games/evq3/Makefile @@ -27,17 +27,18 @@ ALL_TARGET= release WRKSRC= ${WRKDIR}/${PORTNAME} CFLAGS+= -DMAP_ANONYMOUS=MAP_ANON -OPTIONS= CLIENT "Build client" on \ - CURL "Enable curl support" on \ - CURL_DLOPEN "Enable dynamic loading of curl" on \ - GAMELIBS "Build game libraries (when not mandatory)" off \ - DEDICATED "Build dedicated server" on \ - OPENAL "Enable OpenAL (3D sound) support" off \ - OPENAL_DLOPEN "Enable dynamic loading of OpenAL" off \ - OPTIMIZED_CFLAGS "Enable compilation optimizations" on \ - SMP "Build SMP (threaded) client" on \ - VOIP "Enable Voice Over IP" off \ - VORBIS "Enable Ogg Vorbis codec support" on +OPTIONS_DEFINE= CURL CURL_DLOPEN GAMELIBS OPENAL OPENAL_DLOPEN VOIP VORBIS OPTIMIZED_CFLAGS +OPTIONS_DEFAULT= CLIENT CURL CURL_DLOPEN DEDICATED OPTIMIZED_CFLAGS SMP VORBIS +OPTIONS_MULTI= TYPE +OPTIONS_MULTI_TYPE= CLIENT DEDICATED SMP +CLIENT_DESC= Build client +CURL_DLOPEN_DESC= Enable dynamic loading of curl +GAMELIBS_DESC= Build game libraries (when not mandatory) +DEDICATED_DESC= Build dedicated server +OPENAL_DESC= Enable OpenAL (3D sound) support +OPENAL_DLOPEN_DESC= Enable dynamic loading of OpenAL +SMP_DESC= Build SMP (threaded) client +VOIP_DESC= Enable Voice Over IP MAKE_ENV= DEFAULT_BASEDIR="${Q3DIR}" LIBDIR="${LIBDIR}" \ PTHREAD_LIBS="${PTHREAD_LIBS}" @@ -50,11 +51,6 @@ VM_ARCHS= amd64 i386 .include <bsd.port.pre.mk> -.if defined(WITHOUT_CLIENT) && defined(WITHOUT_DEDICATED) && \ - defined(WITHOUT_SMP) -IGNORE= needs at least one of CLIENT, DEDICATED and SMP options -.endif - .for i in ${ARCH} . if ${VM_ARCHS:M${i}} != "" HAVE_VM_COMPILED= yes @@ -65,38 +61,38 @@ HAVE_VM_COMPILED= yes MAKE_ENV+= HAVE_VM_COMPILED=true .endif -.if !defined(WITHOUT_CLIENT) || !defined(WITHOUT_SMP) +.if ${PORT_OPTIONS:MCLIENT} || !empty(PORT_OPTIONS:MSMP) # curl -. if defined(WITH_CURL) +. if ${PORT_OPTIONS:MCURL} LIB_DEPENDS+= curl.6:${PORTSDIR}/ftp/curl MAKE_ENV+= USE_CURL=1 -. if defined(WITH_CURL_DLOPEN) +. if ${PORT_OPTIONS:MCURL_DLOPEN) MAKE_ENV+= USE_CURL_DLOPEN=1 . endif . endif # OpenAL -. if defined(WITH_OPENAL) +. if ${PORT_OPTIONS:MOPENAL} USE_OPENAL= al MAKE_ENV+= USE_OPENAL=1 -. if defined(WITH_OPENAL_DLOPEN) +. if ${PORT_OPTIONS:MOPENAL_DLOPEN) MAKE_ENV+= USE_OPENAL_DLOPEN=1 . endif . endif # SDL USE_SDL= sdl # VOIP -. if defined(WITH_VOIP) +. if ${PORT_OPTIONS:MVOIP} LIB_DEPENDS+= speex.1:${PORTSDIR}/audio/speex MAKE_ENV+= USE_VOIP=1 . endif # Vorbis -. if defined(WITH_VORBIS) +. if ${PORT_OPTIONS:MVORBIS} LIB_DEPENDS+= vorbis.4:${PORTSDIR}/audio/libvorbis MAKE_ENV+= USE_CODEC_VORBIS=1 . endif .endif -.if !defined(WITHOUT_CLIENT) +.if ${PORT_OPTIONS:MCLIENT} MAKE_ENV+= BUILD_CLIENT=1 PLIST_SUB+= CLIENT="" Q3BIN+= evq3 @@ -104,7 +100,7 @@ Q3BIN+= evq3 PLIST_SUB+= CLIENT="@comment " .endif -.if !defined(WITHOUT_DEDICATED) +.if ${PORT_OPTIONS:MDEDICATED} MAKE_ENV+= BUILD_SERVER=1 PLIST_SUB+= DEDICATED="" Q3BIN+= evq3ded @@ -112,18 +108,18 @@ Q3BIN+= evq3ded PLIST_SUB+= DEDICATED="@comment " .endif -.if defined(WITH_GAMELIBS) || !defined(HAVE_VM_COMPILED) +.if ${PORT_OPTIONS:MGAMELIBS} || !defined(HAVE_VM_COMPILED) MAKE_ENV+= BUILD_GAME_SO=1 PLIST_SUB+= GAMELIBS="" .else PLIST_SUB+= GAMELIBS="@comment " .endif -.if !defined(WITHOUT_OPTIMIZED_CFLAGS) +.if ${PORT_OPTIONS:MOPTIMIZED_CFLAGS} MAKE_ENV+= USE_OPTIMIZED_CFLAGS=1 .endif -.if !defined(WITHOUT_SMP) +.if ${PORT_OPTIONS:MSMP} MAKE_ENV+= BUILD_CLIENT_SMP=1 PLIST_SUB+= SMP="" Q3BIN+= evq3-smp @@ -146,13 +142,13 @@ do-install: .for bin in ${Q3BIN} ${INSTALL_PROGRAM} ${WRKSRC}/build/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} ${WRKSRC}/build/release/${dir}/*.so ${LIBDIR}/${dir} . endfor .endif -.if !defined(NOPORTDOCS) +.if ${PORT_OPTIONS:MDOCS} ${MKDIR} ${DOCSDIR} ${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR} .endif |