1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-10-21 20:38:45 +00:00

- Add stage support

- Add DOCS and OPENGL options
- Use options helpers
- Convert USE_GMAKE to USES
This commit is contained in:
Danilo Egea Gondolfo 2013-11-01 02:50:40 +00:00
parent e906ac4045
commit c3dfea07b2
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=332338

View File

@ -11,41 +11,35 @@ MAINTAINER= ports@FreeBSD.org
COMMENT= Unix port of Descent 2 Game
GNU_CONFIGURE= yes
USES= gmake
USE_SDL= sdl image
USE_GMAKE= yes
CONFIGURE_ARGS= --disable-network --disable-debug
PORTDOCS= README TODO NEWS AUTHORS readme.txt installation.txt
PLIST_FILES= bin/d2x
.ifdef(WITH_OPENGL)
USE_GL= glut
CONFIGURE_ARGS+=--with-opengl
CPPFLAGS+= -I${LOCALBASE}/include
LDFLAGS+= -L${LOCALBASE}/lib
.endif
OPTIONS_DEFINE= OPENGL DOCS
NO_STAGE= yes
pre-everything::
.ifndef(WITH_OPENGL)
@${ECHO_MSG} ""
@${ECHO_MSG} "Define WITH_OPENGL to use OpenGL for 3D graphics"
@${ECHO_MSG} ""
OPENGL_CONFIGURE_WITH= opengl
OPENGL_CXXFLAGS= -I${LOCALBASE}/include
OPENGL_LDFLAGS= -L${LOCALBASE}/lib
.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MOPENGL}
USE_GL= glut
.endif
do-install:
.ifdef(WITH_OPENGL)
${INSTALL} ${WRKSRC}/d2x-gl ${PREFIX}/bin/d2x
.if ${PORT_OPTIONS:MOPENGL}
${INSTALL_PROGRAM} ${WRKSRC}/d2x-gl ${STAGEDIR}${PREFIX}/bin/d2x
.else
${INSTALL} ${WRKSRC}/d2x-sdl ${PREFIX}/bin/d2x
${INSTALL_PROGRAM} ${WRKSRC}/d2x-sdl ${STAGEDIR}${PREFIX}/bin/d2x
.endif
.if !defined(NOPORTDOCS)
${MKDIR} ${DOCSDIR}
@${MKDIR} ${STAGEDIR}${DOCSDIR}
.for i in ${PORTDOCS}
${INSTALL_DATA} ${WRKSRC}/${i} ${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/${i} ${STAGEDIR}${DOCSDIR}
.endfor
.endif
${CAT} ${PKGMESSAGE}
.include <bsd.port.mk>