aboutsummaryrefslogtreecommitdiff
path: root/games/mirrormagic/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'games/mirrormagic/Makefile')
-rw-r--r--games/mirrormagic/Makefile33
1 files changed, 19 insertions, 14 deletions
diff --git a/games/mirrormagic/Makefile b/games/mirrormagic/Makefile
index 880009b62a56..bdb261d5f91b 100644
--- a/games/mirrormagic/Makefile
+++ b/games/mirrormagic/Makefile
@@ -13,16 +13,23 @@ COMMENT= Arcade style game with stereo sound for X Window System
LICENSE= GPLv2
-USE_GMAKE= yes
+USES= gmake
MAKE_ARGS= CC="${CC}" MAKE="${GMAKE}" OPTIONS="${CFLAGS}" \
RO_GAME_DIR="${DATADIR}" RW_GAME_DIR="${DATADIR}/scores" \
X11_PATH="${LOCALBASE}"
-WANT_SDL= yes
+USE_GCC= any # doesn't start otherwise (UB?)
+
+PORTDATA= *
+PORTDOCS= *
+
+SCOREDIR= /var/games/${PORTNAME}
+
+SUB_FILES= pkg-deinstall pkg-install
+SUB_LIST= SCOREDIR="${SCOREDIR}"
OPTIONS_DEFINE= SDL
-OPTIONS_DEFAULT= SDL
+OPTIONS_DEFAULT=SDL
-NO_STAGE= yes
.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MSDL}
@@ -43,17 +50,15 @@ post-patch:
@${REINPLACE_CMD} -e 's|inline||' ${WRKSRC}/src/libgame/*.[ch]
do-install:
- ${INSTALL_PROGRAM} ${WRKSRC}/mirrormagic ${PREFIX}/bin
- @${MKDIR} ${DATADIR}
- ${TAR} -C ${WRKSRC} -cf - graphics levels music scores sounds | \
- ${TAR} -C ${DATADIR} -xf -
- @${CHOWN} -R ${SHAREOWN}:${SHAREGRP} ${DATADIR}
- @${CHMOD} 777 ${DATADIR}/scores
-.if ${PORT_OPTIONS:MDOCS}
- @${MKDIR} ${DOCSDIR}
+ ${INSTALL_PROGRAM} ${WRKSRC}/mirrormagic ${STAGEDIR}${PREFIX}/bin
+ @${MKDIR} ${STAGEDIR}${DATADIR}
+ cd ${WRKSRC} && ${COPYTREE_SHARE} "graphics levels music scores sounds" \
+ ${STAGEDIR}${DATADIR}
+ ${RMDIR} ${STAGEDIR}${DATADIR}/scores
+ ${LN} -s ${SCOREDIR} ${STAGEDIR}${DATADIR}/scores
+ @${MKDIR} ${STAGEDIR}${DOCSDIR}
.for file in CHANGES CREDITS README
- ${INSTALL_DATA} ${WRKSRC}/${file} ${DOCSDIR}
+ ${INSTALL_DATA} ${WRKSRC}/${file} ${STAGEDIR}${DOCSDIR}
.endfor
-.endif
.include <bsd.port.mk>