1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-25 00:51:21 +00:00
freebsd-ports/games/frogatto/Makefile
Alexey Dokuchaev 8fc09c9b75 Update to version 1.3.1 and stagify (slightly less intrusive patch committed
compared to the one in the PR).

PR:	190513
2014-07-15 17:18:18 +00:00

63 lines
2.1 KiB
Makefile

# Created by: Alexey Dokuchaev <danfe@FreeBSD.org>
# $FreeBSD$
PORTNAME= frogatto
PORTVERSION= 1.3.1
CATEGORIES= games
MAINTAINER= fiziologus@gmail.com
COMMENT= Old-school 2D classic adventure platformer game
LIB_DEPENDS= libboost_thread.so:${PORTSDIR}/devel/boost-libs \
libpng15.so:${PORTSDIR}/graphics/png
NO_PACKAGE= Package will be 144M, set FORCE_PACKAGE if you really want it
USE_GITHUB= yes
GH_ACCOUNT= frogatto
GH_TAGNAME= ${PORTVERSION}
GH_COMMIT= 58bd7c6
USES= gmake pkgconfig
ALL_TARGET= game server
USE_GL= glew
USE_SDL= image mixer ttf
PLIST_FILES= bin/${PORTNAME} bin/${PORTNAME}-server
post-patch:
@${ECHO_CMD} >> ${WRKSRC}/src/difficulty.hpp
@${REINPLACE_CMD} -e 's,%lu,%u,' ${WRKSRC}/src/server.cpp
@${REINPLACE_CMD} -e 's,__linux__,__${OPSYS}__,' \
${WRKSRC}/src/clipboard.cpp
# Point to the right location where to look for resources on FreeBSD
@${REINPLACE_CMD} -e 's,HAVE_CONFIG_H,__FreeBSD__,' \
-e 's,DATADIR,"${DATADIR}",' ${WRKSRC}/src/filesystem.cpp
@${REINPLACE_CMD} -e 's,itor->second,"${DATADIR}/" + &,' \
${WRKSRC}/src/sound.cpp
@${REINPLACE_CMD} -e '/\/locale\//s,\.,${PREFIX}/share,' \
${WRKSRC}/src/i18n.cpp
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/game ${STAGEDIR}${PREFIX}/bin/${PORTNAME}
${INSTALL_PROGRAM} ${WRKSRC}/server \
${STAGEDIR}${PREFIX}/bin/${PORTNAME}-server
cd ${WRKSRC}/modules/frogatto/locale && \
${MV} hu_HU hu && ${MV} ms_MY ms
cd ${WRKSRC}/modules/frogatto && ${COPYTREE_SHARE} \
locale ${STAGEDIR}${PREFIX}/share
cd ${WRKSRC} && ${COPYTREE_SHARE} "data images music modules utils" \
${STAGEDIR}${DATADIR}
cd ${WRKSRC} && ${INSTALL_DATA} *.ttf *.cfg ${STAGEDIR}${DATADIR}
# Dynamically generate part of the PLIST for NLS files and game resources
# (really lots of them)
@${FIND} ${STAGEDIR}${PREFIX}/share/locale -name ${PORTNAME}.mo | \
${SED} 's,^${STAGEDIR}${PREFIX}/,,' | ${SORT} >> ${TMPPLIST}
@${FIND} ${STAGEDIR}${DATADIR} -not -type d | \
${SED} 's,^${STAGEDIR}${PREFIX}/,,' | ${SORT} >> ${TMPPLIST}
@${FIND} ${STAGEDIR}${DATADIR} -type d | \
${SED} 's,^${STAGEDIR}${PREFIX}/,@dirrm ,' | \
${SORT} -r >> ${TMPPLIST}
.include <bsd.port.mk>