Bug 172934 - [PATCH] games/whichwayisup: Makefile changed, OptionsNG, take maintainership
Summary: [PATCH] games/whichwayisup: Makefile changed, OptionsNG, take maintainership
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Rene Ladan
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-21 17:10 UTC by nemysis
Modified: 2013-02-22 11:50 UTC (History)
0 users

See Also:


Attachments
whichwayisup-0.7.9_4.patch (5.69 KB, patch)
2012-10-21 17:10 UTC, nemysis
no flags Details | Diff
whichwayisup.diff (6.14 KB, patch)
2013-02-15 13:55 UTC, nemysis
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description nemysis 2012-10-21 17:10:00 UTC
- Take maintainership

Added file(s):
- files/patch-lib-game.py

Makefile changed:

+MASTER_SITES=	http://www.oletus.fi/static/whichwayisup/
+LICENSE=	GPLv2
+RUN_DEPENDS=	${PYGAME}
+BUILD_DEPENDS=	winicontoppm:${PORTSDIR}/graphics/netpbm
+USE_DOS2UNIX=	*.py *.txt
+.include <bsd.port.options.mk>
+DESKTOP_ENTRIES=
+post-build:

pkg-descr changed:
+WWW: http://www.oletus.fi/static/whichwayisup/

Generated and tested manually, tested with port test and with RedPorts (all RELEASES, CLANG), sent with FreeBSD Port Tools 0.99_6 (mode: change, diff: ports)

How-To-Repeat: 
portlint -A
WARN: Makefile: [14]: possible direct use of command "python" found. use ${PYTHON_CMD} instead.
WARN: Makefile: for new port, make $FreeBSD$ tag in comment section empty, to make SVN happy.
WARN: Makefile: new ports should not set PORTREVISION.
WARN: Makefile: only one MASTER_SITE configured.  Consider adding additional mirrors.
0 fatal errors and 4 warnings found.

WARN: Makefile: [14]: because is used

DIST_SUBDIR=    python


port test: clean


Build log

https://redports.org/buildarchive/20121021135447-2238/
Comment 1 nemysis 2013-02-15 13:55:16 UTC
Removed
BUILD_DEPENDS= winicontoppm:${PORTSDIR}/graphics/netpbm

Added in Makefile
SF/nemysisfreebsdp/:icons
${PORTNAME}.png:icons
USE_GNOME=      desktopfileutils
INSTALLS_ICONS= yes
@-update-desktop-database

in pkg-plist
@exec %%LOCALBASE%%/bin/update-desktop-database -q || /usr/bin/true
@unexec %%LOCALBASE%%/bin/update-desktop-database -q || /usr/bin/true
Comment 2 Rene Ladan freebsd_committer freebsd_triage 2013-02-21 13:34:50 UTC
Responsible Changed
From-To: freebsd-ports-bugs->rene

Take
Comment 3 Rene Ladan freebsd_committer freebsd_triage 2013-02-22 11:44:24 UTC
State Changed
From-To: open->closed

Committed with new Makefile header, thanks
Comment 4 dfilter service freebsd_committer freebsd_triage 2013-02-22 11:44:28 UTC
Author: rene
Date: Fri Feb 22 11:44:20 2013
New Revision: 312762
URL: http://svnweb.freebsd.org/changeset/ports/312762

Log:
  - 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

Added:
  head/games/whichwayisup/files/
  head/games/whichwayisup/files/patch-lib-game.py   (contents, props changed)
Modified:
  head/games/whichwayisup/Makefile   (contents, props changed)
  head/games/whichwayisup/distinfo   (contents, props changed)
  head/games/whichwayisup/pkg-descr   (contents, props changed)
  head/games/whichwayisup/pkg-plist   (contents, props changed)

Modified: head/games/whichwayisup/Makefile
==============================================================================
--- head/games/whichwayisup/Makefile	Fri Feb 22 10:58:15 2013	(r312761)
+++ head/games/whichwayisup/Makefile	Fri Feb 22 11:44:20 2013	(r312762)
@@ -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>

Modified: head/games/whichwayisup/distinfo
==============================================================================
--- head/games/whichwayisup/distinfo	Fri Feb 22 10:58:15 2013	(r312761)
+++ head/games/whichwayisup/distinfo	Fri Feb 22 11:44:20 2013	(r312762)
@@ -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

Added: head/games/whichwayisup/files/patch-lib-game.py
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/games/whichwayisup/files/patch-lib-game.py	Fri Feb 22 11:44:20 2013	(r312762)
@@ -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"]:

Modified: head/games/whichwayisup/pkg-descr
==============================================================================
--- head/games/whichwayisup/pkg-descr	Fri Feb 22 10:58:15 2013	(r312761)
+++ head/games/whichwayisup/pkg-descr	Fri Feb 22 11:44:20 2013	(r312762)
@@ -3,4 +3,4 @@ with a slight rotational twist. Help a m
 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/

Modified: head/games/whichwayisup/pkg-plist
==============================================================================
--- head/games/whichwayisup/pkg-plist	Fri Feb 22 10:58:15 2013	(r312761)
+++ head/games/whichwayisup/pkg-plist	Fri Feb 22 11:44:20 2013	(r312762)
@@ -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
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"