aboutsummaryrefslogtreecommitdiff
path: root/games/whichwayisup
diff options
context:
space:
mode:
authorRene Ladan <rene@FreeBSD.org>2013-02-22 11:44:20 +0000
committerRene Ladan <rene@FreeBSD.org>2013-02-22 11:44:20 +0000
commit50409904bb84dbff8e3ae40e8c37a1271b299fcb (patch)
treee9acf10408668423ad220739304665a1d10c36f5 /games/whichwayisup
parent13eb0486a681f42a390e2d236b118ac2ca949781 (diff)
downloadports-50409904bb84dbff8e3ae40e8c37a1271b299fcb.tar.gz
ports-50409904bb84dbff8e3ae40e8c37a1271b299fcb.zip
- Convert Makefile header
- Update pkg-descr - Update MASTER_SITES - Add license - Add desktop entry and install icon - Some cleanups - Bump PORTREVISION - Pass maintainership to submitter PR: ports/172934 Submitted by: nemysis@gmx.ch
Notes
Notes: svn path=/head/; revision=312762
Diffstat (limited to 'games/whichwayisup')
-rw-r--r--games/whichwayisup/Makefile60
-rw-r--r--games/whichwayisup/distinfo6
-rw-r--r--games/whichwayisup/files/patch-lib-game.py52
-rw-r--r--games/whichwayisup/pkg-descr2
-rw-r--r--games/whichwayisup/pkg-plist3
5 files changed, 98 insertions, 25 deletions
diff --git a/games/whichwayisup/Makefile b/games/whichwayisup/Makefile
index f058ac1ce0da..7b32e94a9d96 100644
--- a/games/whichwayisup/Makefile
+++ b/games/whichwayisup/Makefile
@@ -1,48 +1,64 @@
-# New ports collection makefile for: whichwayisup
-# Date created: 14 August 2007
-# Whom: Andrew Pantyukhin <infofarmer@FreeBSD.org>
-#
+# Created by: Andrew Pantyukhin <infofarmer@FreeBSD.org>
# $FreeBSD$
-#
PORTNAME= whichwayisup
PORTVERSION= 0.7.9
-PORTREVISION= 3
-DISTVERSION= ${PORTVERSION:S/.//g}
-CATEGORIES= games
-MASTER_SITES= http://www.hectigo.net/games/whichwayisup/
-DISTNAME= ${PORTNAME}_b${DISTVERSION}
+PORTREVISION= 4
+CATEGORIES= games python
+MASTER_SITES= http://www.oletus.fi/static/whichwayisup/ \
+ SF/nemysisfreebsdp/:icons
+DISTFILES= ${PORTNAME}_b${DISTVERSION:S/.//g}${EXTRACT_SUFX} \
+ ${PORTNAME}.png:icons
+DIST_SUBDIR= python
+EXTRACT_ONLY= ${PORTNAME}_b${DISTVERSION:S/.//g}${EXTRACT_SUFX}
-MAINTAINER= ports@FreeBSD.org
+MAINTAINER= nemysis@gmx.ch
COMMENT= Platformer game with rotational twist
-RUN_DEPENDS= py*-game>=1.7.1:${PORTSDIR}/devel/py-game
+LICENSE= GPLv2
+
+RUN_DEPENDS= ${PYGAME}
+
+WRKSRC= ${WRKDIR}/${PORTNAME}
USE_PYTHON= yes
USE_ZIP= yes
+USE_GNOME= desktopfileutils
+INSTALLS_ICONS= yes
+USE_DOS2UNIX= *.py *.txt
+
PORTDOCS= README.txt changelog.txt
-WRKSRC= ${WRKDIR}/${PORTNAME}
+DESKTOP_ENTRIES="Which Way Is Up" "${COMMENT}" \
+ "${PREFIX}/share/pixmaps/${PORTNAME}.png" \
+ "${PORTNAME}" "Game;ArcadeGame;" false
+
+.include <bsd.port.options.mk>
post-patch:
@${REINPLACE_CMD} -e '/libdir =/s|=.*|= "${PYTHONPREFIX_SITELIBDIR}/${PORTNAME}"|'\
${WRKSRC}/run_game.py
@${REINPLACE_CMD} -e '/data_dir =/s|data_py.*data.|"${DATADIR}"|'\
${WRKSRC}/lib/data.py
- @${RM} ${WRKSRC}/lib/data.py.bak
+ @${FIND} ${WRKSRC} -name "*.bak" -delete -or -name "*.orig" -delete
do-build:
- @${PYTHON_CMD} ${PYTHON_LIBDIR}/compileall.py ${WRKSRC}/lib/
- @${PYTHON_CMD} -O ${PYTHON_LIBDIR}/compileall.py ${WRKSRC}/lib/
+ @${PYTHON_CMD} -m compileall ${WRKSRC}
+ @${PYTHON_CMD} -O -m compileall ${WRKSRC}
@${TOUCH} ${WRKSRC}/data/music/.keep_me
do-install:
- @cd ${WRKSRC}/data/&&${COPYTREE_SHARE} . ${DATADIR}/
- @cd ${WRKSRC}/lib/&&${COPYTREE_SHARE} . ${PYTHONPREFIX_SITELIBDIR}/${PORTNAME}/
- @${INSTALL_SCRIPT} ${WRKSRC}/run_game.py ${PREFIX}/bin/${PORTNAME}
-.ifndef NOPORTDOCS
- @${INSTALL} -d ${DOCSDIR}/
- @cd ${WRKSRC}/&&${INSTALL_DATA} ${PORTDOCS} ${DOCSDIR}/
+ ${INSTALL_SCRIPT} ${WRKSRC}/run_game.py ${PREFIX}/bin/${PORTNAME}
+ @(cd ${WRKSRC}/data && ${COPYTREE_SHARE} . ${DATADIR})
+ @(cd ${WRKSRC}/lib && ${COPYTREE_SHARE} . ${PYTHONPREFIX_SITELIBDIR}/${PORTNAME})
+ ${INSTALL_DATA} ${_DISTDIR}/${PORTNAME}.png ${PREFIX}/share/pixmaps/
+
+.if ${PORT_OPTIONS:MDOCS}
+ ${MKDIR} ${DOCSDIR}
+ ${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} ${DOCSDIR}
.endif
+post-install:
+ @-update-desktop-database
+
.include <bsd.port.mk>
diff --git a/games/whichwayisup/distinfo b/games/whichwayisup/distinfo
index 9648b681e6cd..48aae7ff484f 100644
--- a/games/whichwayisup/distinfo
+++ b/games/whichwayisup/distinfo
@@ -1,2 +1,4 @@
-SHA256 (whichwayisup_b079.zip) = bcc2b7fc8719a8e055969c8eac099b7c40b9d68f36ba1f83d690216bdcdd51f6
-SIZE (whichwayisup_b079.zip) = 1001890
+SHA256 (python/whichwayisup_b079.zip) = bcc2b7fc8719a8e055969c8eac099b7c40b9d68f36ba1f83d690216bdcdd51f6
+SIZE (python/whichwayisup_b079.zip) = 1001890
+SHA256 (python/whichwayisup.png) = 1e4853723f76ed6cbbb8726508d64322b8887b7211bf98de03fc0ff589f73161
+SIZE (python/whichwayisup.png) = 984
diff --git a/games/whichwayisup/files/patch-lib-game.py b/games/whichwayisup/files/patch-lib-game.py
new file mode 100644
index 000000000000..908c341e8b6a
--- /dev/null
+++ b/games/whichwayisup/files/patch-lib-game.py
@@ -0,0 +1,52 @@
+--- lib/game.py.orig 2012-10-21 13:48:24.000000000 +0200
++++ lib/game.py 2012-10-21 14:20:03.000000000 +0200
+@@ -140,15 +140,15 @@
+
+ if joystick != None: # Parse joystick input
+
+- axis0 = joystick.get_axis(0)
++# axis0 = joystick.get_axis(0)
+
+- if axis0 < -0.1:
+- inputs["LEFT"] = True
+- inputs["ANALOG"] = -axis0
+-
+- if axis0 > 0.1:
+- inputs["RIGHT"] = True
+- inputs["ANALOG"] = axis0
++# if axis0 < -0.1:
++# inputs["LEFT"] = True
++# inputs["ANALOG"] = -axis0
++
++# if axis0 > 0.1:
++# inputs["RIGHT"] = True
++# inputs["ANALOG"] = axis0
+
+ if joystick.get_numbuttons() > 1:
+ if joystick.get_button(0):
+@@ -165,16 +165,16 @@
+ keys_released["J_B1"] = False
+ else:
+ keys_released["J_B1"] = True
+- else:
+- axis1 = joystick.get_axis(1)
++# else:
++# axis1 = joystick.get_axis(1)
+
+- if axis1 < -0.1:
+- inputs["UP"] = True
+- if keys_released["J_A1U"]:
+- inputs["JUMP"] = True
+- keys_released["J_A1U"] = False
+- else:
+- keys_released["J_A1U"] = True
++# if axis1 < -0.1:
++# inputs["UP"] = True
++# if keys_released["J_A1U"]:
++# inputs["JUMP"] = True
++# keys_released["J_A1U"] = False
++# else:
++# keys_released["J_A1U"] = True
+
+ if axis1 > 0.1:
+ if keys_released["J_A1D"]:
diff --git a/games/whichwayisup/pkg-descr b/games/whichwayisup/pkg-descr
index 40d6a15723e4..376ac1374c57 100644
--- a/games/whichwayisup/pkg-descr
+++ b/games/whichwayisup/pkg-descr
@@ -3,4 +3,4 @@ with a slight rotational twist. Help a mysterious big-eared salaryman
named Guy find his keys in a labyrinth of dangers and bad dialogue.
Author: Olli "Hectigo" Etuaho <admin[at]hectigo.net>
-WWW: http://www.hectigo.net/games/whichwayisup/
+WWW: http://www.oletus.fi/static/whichwayisup/
diff --git a/games/whichwayisup/pkg-plist b/games/whichwayisup/pkg-plist
index a12e7b70a080..3214f4a8a4cf 100644
--- a/games/whichwayisup/pkg-plist
+++ b/games/whichwayisup/pkg-plist
@@ -196,6 +196,7 @@ bin/whichwayisup
%%DATADIR%%/sounds/kling.ogg
%%DATADIR%%/sounds/nextlevel.ogg
%%DATADIR%%/sounds/woosh.ogg
+share/pixmaps/whichwayisup.png
@dirrm %%PYTHON_SITELIBDIR%%/whichwayisup
@dirrm %%DATADIR%%/levels
@dirrm %%DATADIR%%/misc
@@ -203,3 +204,5 @@ bin/whichwayisup
@dirrm %%DATADIR%%/pictures
@dirrm %%DATADIR%%/sounds
@dirrm %%DATADIR%%
+@exec %%LOCALBASE%%/bin/update-desktop-database -q || /usr/bin/true
+@unexec %%LOCALBASE%%/bin/update-desktop-database -q || /usr/bin/true