aboutsummaryrefslogtreecommitdiffstats
path: root/games/nelly
diff options
context:
space:
mode:
authornemysis <nemysis@FreeBSD.org>2013-12-08 23:14:04 +0800
committernemysis <nemysis@FreeBSD.org>2013-12-08 23:14:04 +0800
commit63216b7bff7ea7135b0c9e76c123e7cfd38f2435 (patch)
tree7f5b9ab27946a5d311f3e896a74ac7fb52b5168a /games/nelly
parent40023aae83da32043e1381729d63a49edf2c0276 (diff)
downloadfreebsd-ports-gnome-63216b7bff7ea7135b0c9e76c123e7cfd38f2435.tar.gz
freebsd-ports-gnome-63216b7bff7ea7135b0c9e76c123e7cfd38f2435.tar.zst
freebsd-ports-gnome-63216b7bff7ea7135b0c9e76c123e7cfd38f2435.zip
- Change USE_PYTHON_RUN=yes to USE_PYTHON=yes
- Change desktop entry - Remove NO_BUILD=yes, change pkg-plist - Change files/nelly.in Approved by: pawel / wg (mentors, implicit)
Diffstat (limited to 'games/nelly')
-rw-r--r--games/nelly/Makefile25
-rw-r--r--games/nelly/files/nelly.in2
-rw-r--r--games/nelly/pkg-plist8
3 files changed, 25 insertions, 10 deletions
diff --git a/games/nelly/Makefile b/games/nelly/Makefile
index e513f8a04187..71e99edc4284 100644
--- a/games/nelly/Makefile
+++ b/games/nelly/Makefile
@@ -19,36 +19,43 @@ COMMENT= Nelly's Rooftop Garden, physics-based puzzle game
RUN_DEPENDS= ${PYGAME} \
${PYTHON_PKGNAMEPREFIX}opengl>=0:${PORTSDIR}/graphics/py-opengl
-USE_PYTHON_RUN= yes
-NO_BUILD= yes
+USE_PYTHON= yes
PORTDOCS= README
-SUB_FILES= ${PORTNAME}
+OPTIONS_DEFINE= DOCS
-DESKTOP_ENTRIES="Nelly's Rooftop Garden" "${COMMENT}" "${PORTNAME}" \
- "${PORTNAME}" "Game;ArcadeGame;" false
+SUB_FILES= ${PORTNAME}
-OPTIONS_DEFINE= DOCS
+DESKTOP_ENTRIES="Nelly's Rooftop Garden" "" "${PORTNAME}" \
+ "${PORTNAME}" "Game;ArcadeGame;" ""
post-patch:
@${REINPLACE_CMD} -e 's|/usr/bin/python|${PYTHON_CMD}|' \
${WRKSRC}/*.py
@${FIND} ${WRKSRC} -name "*.bak" -delete
+do-build:
+ @${PYTHON_CMD} -m compileall ${WRKSRC}
+ @${PYTHON_CMD} -O -m compileall ${WRKSRC}
+
do-install:
+ @${REINPLACE_CMD} -e 's|%%PYTHON_CMD%%|${PYTHON_CMD}|' \
+ ${WRKDIR}/${PORTNAME}
${INSTALL_SCRIPT} ${WRKDIR}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin/
- @${MKDIR} ${STAGEDIR}${DATADIR}
- ${INSTALL_SCRIPT} ${WRKSRC}/*.py ${STAGEDIR}${DATADIR}
.for d in fonts levels textures
@(cd ${WRKSRC} && ${COPYTREE_SHARE} ${d} ${STAGEDIR}${DATADIR})
.endfor
+.for d in *.py *.pyc *.pyo
+ @(cd ${WRKSRC} ; ${INSTALL_SCRIPT} ${d} ${STAGEDIR}${DATADIR})
+.endfor
+
${INSTALL_DATA} ${_DISTDIR}/${PORTNAME}.png \
${STAGEDIR}${PREFIX}/share/pixmaps/
- ${MKDIR} ${STAGEDIR}${DOCSDIR}
+ @${MKDIR} ${STAGEDIR}${DOCSDIR}
${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} ${STAGEDIR}${DOCSDIR}
.include <bsd.port.mk>
diff --git a/games/nelly/files/nelly.in b/games/nelly/files/nelly.in
index c2f72849b0d7..fcce2d570df4 100644
--- a/games/nelly/files/nelly.in
+++ b/games/nelly/files/nelly.in
@@ -4,4 +4,4 @@
#
cd "%%DATADIR%%"
-exec /usr/bin/env python ./nelly.py "${@}"
+exec %%PYTHON_CMD%% ./nelly.py "${@}"
diff --git a/games/nelly/pkg-plist b/games/nelly/pkg-plist
index f5c03b1f87cf..328c1dc0621b 100644
--- a/games/nelly/pkg-plist
+++ b/games/nelly/pkg-plist
@@ -1,6 +1,10 @@
bin/nelly
%%DATADIR%%/collide.py
+%%DATADIR%%/collide.pyc
+%%DATADIR%%/collide.pyo
%%DATADIR%%/font.py
+%%DATADIR%%/font.pyc
+%%DATADIR%%/font.pyo
%%DATADIR%%/fonts/babelfish.ttf
%%DATADIR%%/levels/level01.lvl
%%DATADIR%%/levels/level02.lvl
@@ -18,7 +22,11 @@ bin/nelly
%%DATADIR%%/levels/level14.lvl
%%DATADIR%%/levels/level15.lvl
%%DATADIR%%/nelly.py
+%%DATADIR%%/nelly.pyc
+%%DATADIR%%/nelly.pyo
%%DATADIR%%/res.py
+%%DATADIR%%/res.pyc
+%%DATADIR%%/res.pyo
%%DATADIR%%/textures/brick.jpg
%%DATADIR%%/textures/dialog.png
%%DATADIR%%/textures/dialog_ok.png