Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 21 Oct 2012 17:55:49 +0200
From:      nemysis <nemysis@gmx.ch>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/172934: [PATCH] games/whichwayisup: Makefile changed, OptionsNG, take maintainership
Message-ID:  <20121021160527.A4D34BCB@hub.freebsd.org>
Resent-Message-ID: <201210211610.q9LGA0eb035722@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         172934
>Category:       ports
>Synopsis:       [PATCH] games/whichwayisup: Makefile changed, OptionsNG, take maintainership
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun Oct 21 16:10:00 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     nemysis
>Release:        FreeBSD 9.0-RELEASE amd64
>Organization:
>Environment:
System: FreeBSD FreeBSD_Ports 9.0-RELEASE FreeBSD 9.0-RELEASE #0: Tue Jan  3 07:46:30 UTC
>Description:

- 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/

>Fix:

--- whichwayisup-0.7.9_4.patch begins here ---
diff -ruN --exclude=CVS /usr/ports/games/whichwayisup/Makefile ./Makefile
--- /usr/ports/games/whichwayisup/Makefile	2012-06-01 07:19:28.000000000 +0200
+++ ./Makefile	2012-10-21 17:45:54.000000000 +0200
@@ -7,42 +7,58 @@
 
 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/
+DISTNAME=	${PORTNAME}_b${PORTVERSION:S/.//g}
+DIST_SUBDIR=	python
 
-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}
+BUILD_DEPENDS=	winicontoppm:${PORTSDIR}/graphics/netpbm
+
+WRKSRC=		${WRKDIR}/${PORTNAME}
 
 USE_PYTHON=	yes
 USE_ZIP=	yes
+USE_DOS2UNIX=	*.py *.txt
+
 PORTDOCS=	README.txt changelog.txt
 
-WRKSRC=		${WRKDIR}/${PORTNAME}
+DESKTOP_ENTRIES="Which Way Is Up" "${COMMENT}" "${PORTNAME}" \
+		"${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
 
+post-build:
+	@(cd ${WRKSRC}/lib && ${LOCALBASE}/bin/winicontoppm -allicons whichway.ico ../whichwayisup)
+	@(cd ${WRKSRC} && ${LOCALBASE}/bin/pnmtopng whichwayisup_1.ppm > ${PORTNAME}.png)
+
 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} ${WRKSRC}/${PORTNAME}.png ${PREFIX}/share/pixmaps
+
+.if ${PORT_OPTIONS:MDOCS}
+	${MKDIR} ${DOCSDIR}
+	${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} ${DOCSDIR}
 .endif
 
 .include <bsd.port.mk>
diff -ruN --exclude=CVS /usr/ports/games/whichwayisup/distinfo ./distinfo
--- /usr/ports/games/whichwayisup/distinfo	2011-07-03 16:25:14.000000000 +0200
+++ ./distinfo	2012-10-21 03:30:27.000000000 +0200
@@ -1,2 +1,2 @@
-SHA256 (whichwayisup_b079.zip) = bcc2b7fc8719a8e055969c8eac099b7c40b9d68f36ba1f83d690216bdcdd51f6
-SIZE (whichwayisup_b079.zip) = 1001890
+SHA256 (python/whichwayisup_b079.zip) = bcc2b7fc8719a8e055969c8eac099b7c40b9d68f36ba1f83d690216bdcdd51f6
+SIZE (python/whichwayisup_b079.zip) = 1001890
diff -ruN --exclude=CVS /usr/ports/games/whichwayisup/files/patch-lib-game.py ./files/patch-lib-game.py
--- /usr/ports/games/whichwayisup/files/patch-lib-game.py	1970-01-01 01:00:00.000000000 +0100
+++ ./files/patch-lib-game.py	2012-10-21 14:21:24.000000000 +0200
@@ -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 -ruN --exclude=CVS /usr/ports/games/whichwayisup/pkg-descr ./pkg-descr
--- /usr/ports/games/whichwayisup/pkg-descr	2011-10-24 11:10:05.000000000 +0200
+++ ./pkg-descr	2012-10-21 02:14:07.000000000 +0200
@@ -3,4 +3,4 @@
 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 -ruN --exclude=CVS /usr/ports/games/whichwayisup/pkg-plist ./pkg-plist
--- /usr/ports/games/whichwayisup/pkg-plist	2008-12-01 22:14:38.000000000 +0100
+++ ./pkg-plist	2012-10-21 02:49:37.000000000 +0200
@@ -196,6 +196,7 @@
 %%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
--- whichwayisup-0.7.9_4.patch ends here ---

>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20121021160527.A4D34BCB>