Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 24 Dec 2012 09:28:11 +0000 (UTC)
From:      Marcus von Appen <mva@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r309452 - in head/games/pyawale: . files
Message-ID:  <201212240928.qBO9SBp1077164@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mva
Date: Mon Dec 24 09:28:10 2012
New Revision: 309452
URL: http://svnweb.freebsd.org/changeset/ports/309452

Log:
  - Convert to OptionsNG framework
  - Trim Makefile headers
  - Pass maintainership to submitter
  
  PR:		ports/172679
  Submitted by:	nemysis <nemysis@gmx.ch>

Added:
  head/games/pyawale/files/
  head/games/pyawale/files/pyawale.in   (contents, props changed)
Deleted:
  head/games/pyawale/pkg-plist
Modified:
  head/games/pyawale/Makefile   (contents, props changed)
  head/games/pyawale/pkg-descr   (contents, props changed)

Modified: head/games/pyawale/Makefile
==============================================================================
--- head/games/pyawale/Makefile	Mon Dec 24 05:24:44 2012	(r309451)
+++ head/games/pyawale/Makefile	Mon Dec 24 09:28:10 2012	(r309452)
@@ -1,53 +1,60 @@
-# New ports collection makefile for:	pyawale
-# Date created:		14 August 2007
-# Whom:			Andrew Pantyukhin <infofarmer@FreeBSD.org>
-#
+# Created by: Andrew Pantyukhin <infofarmer@FreeBSD.org>
 # $FreeBSD$
-#
 
 PORTNAME=	pyawale
 PORTVERSION=	0.4.0
-PORTREVISION=	2
-CATEGORIES=	games
+PORTREVISION=	3
+CATEGORIES=	games python
 MASTER_SITES=	http://download.gna.org/pyawale/
 
-MAINTAINER=	ports@FreeBSD.org
+MAINTAINER=	nemysis@gmx.ch
 COMMENT=	African board game
 
 LICENSE=	GPLv2
 
-RUN_DEPENDS=	py*-game>=1.7.1:${PORTSDIR}/devel/py-game
+RUN_DEPENDS=	${PYGAME}
 
 USE_PYTHON=	yes
 
+PLIST_FILES=	bin/${PORTNAME} \
+		share/applications/${PORTNAME}.desktop \
+		share/pixmaps/${PORTNAME}.png
+PLIST_DIRSTRY=	share/applications
+
+PORTDATA=	*
+PORTDOCS=	*
+
+DOCSRCDIR1=	${WRKSRC}
+DOC_FILES1=	AUTHORS ChangeLog LISEZMOI NEWS README
+
+DOCSRCDIR2=	${WRKSRC}/docs
+DOCSDIR2=	${DOCSDIR}/docs
+DOC_FILES2=	*.rest *.html *.jpg
+
+SUB_FILES=	${PORTNAME}
+
+.include <bsd.port.options.mk>
+
+post-patch:
+	@${FIND} ${WRKSRC} -name '*.py' | ${XARGS} \
+		${REINPLACE_CMD} -e 's|/usr/bin/python|${PYTHON_CMD}|'
+	@${FIND} ${WRKSRC} -name "*.bak" -delete
+
 do-build:
-	@${PYTHON_CMD} ${PYTHON_LIBDIR}/compileall.py ${WRKSRC}/src
-	@${PYTHON_CMD} -O ${PYTHON_LIBDIR}/compileall.py ${WRKSRC}/src
-	@${ECHO_CMD} "#!/bin/sh" > ${WRKSRC}/${PORTNAME}
-	@${ECHO_CMD} "exec ${PYTHON_CMD} \
-		${PYTHONPREFIX_SITELIBDIR}/pyAwale/${PORTNAME}.py" \
-		>> ${WRKSRC}/${PORTNAME}
+	@${PYTHON_CMD} -m compileall ${WRKSRC}
+	@${PYTHON_CMD} -O -m compileall ${WRKSRC}
 
 do-install:
-	${INSTALL_SCRIPT} ${WRKSRC}/${PORTNAME} ${PREFIX}/bin
-	@${MKDIR} ${PYTHONPREFIX_SITELIBDIR}/pyAwale
-	@(cd ${WRKSRC}/src \
-		&& ${COPYTREE_SHARE} . ${PYTHONPREFIX_SITELIBDIR}/pyAwale)
-	@${MKDIR} ${PREFIX}/share/applications
-	${INSTALL_DATA} ${WRKSRC}/docs/${PORTNAME}.desktop \
-		${PREFIX}/share/applications
-	@${MKDIR} ${PREFIX}/share/pixmaps
-	${INSTALL_DATA} ${WRKSRC}/docs/${PORTNAME}.png \
-		${PREFIX}/share/pixmaps
-.if !defined(NOPORTDOCS)
-	@${MKDIR} ${DOCSDIR}
-.for i in AUTHORS ChangeLog NEWS README
-	${INSTALL_DATA} ${WRKSRC}/${i} ${DOCSDIR}
-.endfor
-	@${MKDIR} ${DOCSDIR}/docs
-	${INSTALL_DATA} ${WRKSRC}/docs/*.jpg ${DOCSDIR}/docs
-	${INSTALL_DATA} ${WRKSRC}/docs/*.html ${DOCSDIR}/docs
-	${INSTALL_DATA} ${WRKSRC}/docs/*.rest ${DOCSDIR}/docs
+	${INSTALL_SCRIPT} ${WRKDIR}/${PORTNAME} ${PREFIX}/bin
+	${MKDIR} ${DATADIR}
+	@(cd ${WRKSRC}/src && ${COPYTREE_SHARE} \* ${DATADIR})
+	${INSTALL_DATA} ${WRKSRC}/docs/${PORTNAME}.png ${PREFIX}/share/pixmaps
+	${MKDIR} ${PREFIX}/share/applications
+	${INSTALL_DATA} ${WRKSRC}/docs/${PORTNAME}.desktop ${PREFIX}/share/applications
+.if ${PORT_OPTIONS:MDOCS}
+	${MKDIR} ${DOCSDIR}
+	${INSTALL_DATA} ${DOC_FILES1:S|^|${DOCSRCDIR1}/|} ${DOCSDIR}
+	${MKDIR} ${DOCSDIR2}
+	${INSTALL_DATA} ${DOC_FILES2:S|^|${DOCSRCDIR2}/|} ${DOCSDIR2}
 .endif
-
 .include <bsd.port.mk>

Added: head/games/pyawale/files/pyawale.in
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/games/pyawale/files/pyawale.in	Mon Dec 24 09:28:10 2012	(r309452)
@@ -0,0 +1,7 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+cd "%%DATADIR%%"
+exec /usr/bin/env python ./pyawale.py

Modified: head/games/pyawale/pkg-descr
==============================================================================
--- head/games/pyawale/pkg-descr	Mon Dec 24 05:24:44 2012	(r309451)
+++ head/games/pyawale/pkg-descr	Mon Dec 24 09:28:10 2012	(r309452)
@@ -1,5 +1,13 @@
 Awale or Oware is a game of great antiquity, and has been played around
-the world in various forms for millenia.  Currently it is the official
-board game of Africa. Wikipedia: Oware
+the world in various forms for millenia. Currently it is the official
+board game of Africa.
+
+Wikipedia Oware
+
+Member of the Mancala family of board games. There are many variants
+to the rules of this game, which is for two players. This version is
+between a player and the computer.
+
+Wikipedia Mancala
 
 WWW: https://gna.org/projects/pyawale/



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