aboutsummaryrefslogtreecommitdiffstats
path: root/games/cube
diff options
context:
space:
mode:
authorbapt <bapt@FreeBSD.org>2012-06-13 00:35:45 +0800
committerbapt <bapt@FreeBSD.org>2012-06-13 00:35:45 +0800
commitb0ad879e3e23b8ba6d75396d593d1bba436ffed6 (patch)
tree8b078441d20301eb3b13f3b6b3a374c4688468a4 /games/cube
parent624c78988bf68a8f633b795635f8ba4b2fffed13 (diff)
downloadfreebsd-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/cube')
-rw-r--r--games/cube/Makefile25
1 files changed, 12 insertions, 13 deletions
diff --git a/games/cube/Makefile b/games/cube/Makefile
index 63c78de54904..64dfc07c9b4e 100644
--- a/games/cube/Makefile
+++ b/games/cube/Makefile
@@ -26,22 +26,21 @@ CFLAGS+= -fsigned-char
ALL_TARGET= #empty
MALE_JOBS_SAFE= yes
-OPTIONS= CLIENT "Build client" on \
- DEDICATED "Build dedicated server" on \
- OPT "Optimized CFLAGS" off
+OPTIONS_DEFINE= OPTIMIZED_CFLAGS DOCS
+OPTIONS_MULTI= TYPE
+OPTIONS_MULTI_TYPE= CLIENT DEDICATED
+OPTIONS_DEFAULT= CLIENT DEDICATED
+CLIENT_DESC= Build client
+DEDICATED_DESC= Build dedicated server
SUB_FILES= cube_client cube_server
CUBE_DATA= ${PORTNAME}_${PORTVERSION:S/./_/g}_unix.tar.gz
CUBE_SRC= ${PORTNAME}_${PORTVERSION:S/./_/g}_src.zip
-.include <bsd.port.pre.mk>
+.include <bsd.port.options.mk>
-.if defined(WITHOUT_CLIENT) && defined(WITHOUT_DEDICATED)
-IGNORE= needs at least one executable (CLIENT and DEDICATED)
-.endif
-
-.if !defined(WITHOUT_CLIENT)
+.if ${PORT_OPTIONS:MCLIENT}
USE_GL= yes
USE_SDL= image mixer sdl
ALL_TARGET+= client
@@ -51,7 +50,7 @@ CUBE_BIN+= client
PLIST_SUB+= CLIENT="@comment "
.endif
-.if !defined(WITHOUT_DEDICATED)
+.if ${PORT_OPTIONS:MDEDICATED}
ALL_TARGET+= server
PLIST_SUB+= DEDICATED=""
CUBE_BIN+= server
@@ -59,7 +58,7 @@ CUBE_BIN+= server
PLIST_SUB+= DEDICATED="@comment "
.endif
-.if defined(WITH_OPT)
+.if ${PORT_OPTIONS:MOPTIMIZED_CFLAGS}
CFLAGS+= -O3 -fomit-frame-pointer
.endif
@@ -74,10 +73,10 @@ do-install:
${MKDIR} ${DATADIR}
@(cd ${WRKDIR}/cube && ${COPYTREE_SHARE} "data packages" ${DATADIR}/)
${INSTALL_DATA} ${WRKDIR}/cube/autoexec.cfg ${DATADIR}
-.if !defined(NOPORTDOCS)
+.if ${PORT_OPTIONS:MDOCS}
${MKDIR} ${DOCSDIR}
${INSTALL_DATA} ${WRKDIR}/cube/readme.html ${DOCSDIR}
@(cd ${WRKDIR}/cube/docs && ${COPYTREE_SHARE} \* ${DOCSDIR}/)
.endif
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>