diff options
Diffstat (limited to 'games/d2x')
-rw-r--r-- | games/d2x/Makefile | 36 |
1 files changed, 15 insertions, 21 deletions
diff --git a/games/d2x/Makefile b/games/d2x/Makefile index 9cb4559b6843..07c964994e01 100644 --- a/games/d2x/Makefile +++ b/games/d2x/Makefile @@ -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 + +OPENGL_CONFIGURE_WITH= opengl +OPENGL_CXXFLAGS= -I${LOCALBASE}/include +OPENGL_LDFLAGS= -L${LOCALBASE}/lib -NO_STAGE= yes -pre-everything:: -.ifndef(WITH_OPENGL) - @${ECHO_MSG} "" - @${ECHO_MSG} "Define WITH_OPENGL to use OpenGL for 3D graphics" - @${ECHO_MSG} "" +.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> |