Convert to new options framework.

PR:		ports/168837
Submitted by:	Tobias Rehbein <tobias.rehbein@web.de> (maintainer)
Approved by:	crees (mentor)
This commit is contained in:
Guido Falsi 2012-06-12 21:08:54 +00:00
parent acd2a0f825
commit da637196cf
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=299153
2 changed files with 13 additions and 11 deletions

View file

@ -5,7 +5,7 @@
# $FreeBSD$ # $FreeBSD$
# #
WITH_SDL= yes PORT_OPTIONS+= SDL
MASTERDIR= ${.CURDIR}/../stonesoup MASTERDIR= ${.CURDIR}/../stonesoup

View file

@ -34,9 +34,11 @@ WRKSRC= ${WRKDIR}/stone_soup-${PORTVERSION}/source/
SUB_FILES= README.FreeBSD SUB_FILES= README.FreeBSD
PLIST_SUB= SAVEDIR="${SAVEDIR}" PLIST_SUB= SAVEDIR="${SAVEDIR}"
OPTIONS= SOUND "Sound support" off \ OPTIONS_DEFINE= SOUND WIZARD LUA_BINDINGS DOCS EXAMPLES
WIZARD "Wizard mode" off \
LUA_BINDINGS "Bindings for LUA user scripts" off SOUND_DESC= Sound support
WIZARD_DESC= Wizard mode
LUA_BINDINGS_DESC= Bindings for LUA user scripts
MAKE_ARGS= prefix=${PREFIX} \ MAKE_ARGS= prefix=${PREFIX} \
DATADIR=${DATADIR} \ DATADIR=${DATADIR} \
@ -60,11 +62,11 @@ MAKE_ARGS+= NO_INLINE_DEPGEN=1
MAKE_ARGS+= V=yes MAKE_ARGS+= V=yes
.endif .endif
.if defined(WITHOUT_WIZARD) .if empty(PORT_OPTIONS:MWIZARD)
MAKE_ARGS+= NOWIZARD=y MAKE_ARGS+= NOWIZARD=y
.endif .endif
.if defined(WITH_SDL) .if ${PORT_OPTIONS:MSDL}
CONFLICTS+= ${PORTNAME}-[0-9]* CONFLICTS+= ${PORTNAME}-[0-9]*
MAKE_ARGS+= TILES=y MAKE_ARGS+= TILES=y
PLIST_SUB+= SDL="" PLIST_SUB+= SDL=""
@ -79,16 +81,16 @@ CONFLICTS+= ${PORTNAME}-sdl-[0-9]*
PLIST_SUB+= SDL="@comment " PLIST_SUB+= SDL="@comment "
.endif .endif
.if defined(WITH_SOUND) .if ${PORT_OPTIONS:MSOUND}
RUN_DEPENDS+= sox:${PORTSDIR}/audio/sox RUN_DEPENDS+= sox:${PORTSDIR}/audio/sox
.endif .endif
.if defined(WITHOUT_LUA_BINDINGS) .if empty(PORT_OPTIONS:MLUA_BINDINGS)
MAKE_ARGS+= NO_LUA_BINDINGS=yes MAKE_ARGS+= NO_LUA_BINDINGS=yes
.endif .endif
post-patch: post-patch:
.if defined(WITH_SOUND) .if ${PORT_OPTIONS:MSOUND}
@${REINPLACE_CMD} -e "s,%%LOCALBASE%%,${LOCALBASE}," ${WRKSRC}/AppHdr.h @${REINPLACE_CMD} -e "s,%%LOCALBASE%%,${LOCALBASE}," ${WRKSRC}/AppHdr.h
@${REINPLACE_CMD} -e "s,%%SOUND%%,," ${WRKSRC}/AppHdr.h @${REINPLACE_CMD} -e "s,%%SOUND%%,," ${WRKSRC}/AppHdr.h
.else .else
@ -96,11 +98,11 @@ post-patch:
.endif .endif
post-install: post-install:
.if !defined(NOPORTDOCS) .if ${PORT_OPTIONS:MDOCS}
${MKDIR} ${DOCSDIR} ${MKDIR} ${DOCSDIR}
${INSTALL_DATA} ${WRKDIR}/README.FreeBSD ${DOCSDIR} ${INSTALL_DATA} ${WRKDIR}/README.FreeBSD ${DOCSDIR}
.endif .endif
.if !defined(NOPORTEXAMPLES) .if ${PORT_OPTIONS:MEXAMPLES}
${MKDIR} ${EXAMPLESDIR} ${MKDIR} ${EXAMPLESDIR}
${INSTALL_DATA} ${DATADIR}/settings/init.txt ${EXAMPLESDIR}/sample.crawlrc ${INSTALL_DATA} ${DATADIR}/settings/init.txt ${EXAMPLESDIR}/sample.crawlrc
.endif .endif