Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 15 Dec 2012 10:49:05 +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: r308943 - head/games/pysolfc
Message-ID:  <201212151049.qBFAn5qv040761@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mva
Date: Sat Dec 15 10:49:04 2012
New Revision: 308943
URL: http://svnweb.freebsd.org/changeset/ports/308943

Log:
  - Add support for additional cardsets
  - Add LICENSE
  - Convert to OptionsNG
  - Trim Makefile headers
  
  PR:		ports/174258
  Submitted by:	nemysis <nemysis@gmx.ch>

Modified:
  head/games/pysolfc/Makefile   (contents, props changed)
  head/games/pysolfc/distinfo   (contents, props changed)
  head/games/pysolfc/pkg-plist   (contents, props changed)

Modified: head/games/pysolfc/Makefile
==============================================================================
--- head/games/pysolfc/Makefile	Sat Dec 15 10:11:39 2012	(r308942)
+++ head/games/pysolfc/Makefile	Sat Dec 15 10:49:04 2012	(r308943)
@@ -1,20 +1,20 @@
-# New ports collection makefile for:	pysolfc
-# Date created:		2009-03-13
-# Whom:			Marcus von Appen
-#
+# Created by: Marcus von Appen
 # $FreeBSD$
-#
 
 PORTNAME=	pysolfc
 PORTVERSION=	2.0
-PORTREVISION=	2
-CATEGORIES=	games
-MASTER_SITES=	SF/${PORTNAME}/PySolFC/PySolFC-${PORTVERSION}
-DISTNAME=	PySolFC-${PORTVERSION}
+PORTREVISION=	3
+CATEGORIES=	games python
+MASTER_SITES=	SF/${PORTNAME}/PySolFC/PySolFC-${PORTVERSION} \
+		SF/${PORTNAME}/PySolFC-Cardsets/PySolFC-Cardsets-${PORTVERSION}:cardsets
+DISTFILES=	PySolFC-${DISTVERSION}${EXTRACT_SUFX}
+DIST_SUBDIR=	${PORTNAME}
 
 MAINTAINER=	mva@FreeBSD.org
 COMMENT=	Solitaire game, written in Python and the successor of PySol
 
+LICENSE=	GPLv3
+
 RUN_DEPENDS=	${PYTHON_SITELIBDIR}/_tkinter.so:${PORTSDIR}/x11-toolkits/py-tkinter \
 		${PYTHON_SITELIBDIR}/PIL/__init__.py:${PORTSDIR}/graphics/py-imaging
 
@@ -24,14 +24,27 @@ USE_PYDISTUTILS=yes
 PYDISTUTILS_PKGNAME=	PySolFC
 
 DATADIR=	${PREFIX}/share/PySolFC
-WRKSRC=		${WRKDIR}/${DISTNAME}
+WRKSRC=		${WRKDIR}/PySolFC-${PORTVERSION}
 PORTDOCS=	README
 
-OPTIONS=	NLS	"Native language support" on
+CARDSET_DUPS=	2000 crystal-mahjongg dashavatara-ganjifa dondorf \
+		gnome-mahjongg-1 hexadeck kintengu matrix mughal-ganjifa \
+		oxymoron standard tuxedo vienna-2k
+
+OPTIONS_DEFINE=	CARDSETS DOCS NLS
+CARDSETS_DESC=	Install additional cardsets
+
+
+.include <bsd.port.options.mk>
 
-.include <bsd.port.pre.mk>
+.if ${PORT_OPTIONS:MCARDSETS}
+DISTFILES+=	PySolFC-Cardsets-${DISTVERSION}${EXTRACT_SUFX}:cardsets
+PLIST_SUB+=	CARDSETS=""
+.else
+PLIST_SUB+=	CARDSETS="@comment "
+.endif
 
-.if !defined(WITHOUT_NLS)
+.if ${PORT_OPTIONS:MNLS}
 USE_GETTEXT=	yes
 PLIST_SUB+=	NLS=""
 .else
@@ -41,14 +54,37 @@ PLIST_SUB+=	NLS="@comment "
 post-patch:
 	@${MV} ${WRKSRC}/pysol.py ${WRKSRC}/pysolfc
 	@${REINPLACE_CMD} -e 's|pysol.py|pysolfc|' ${WRKSRC}/setup.py
-.if defined(WITHOUT_NLS)
-	@${REINPLACE_CMD} -e "s|for l in ('ru', 'ru_RU')|for l in ()|" ${WRKSRC}/setup.py
+	@${REINPLACE_CMD} -e 's|^Icon.*|Icon=${PORTNAME}|' \
+		-e 's|^Exec.*|Exec=${PORTNAME}|' \
+		${WRKSRC}/data/pysol.desktop
+.if ! ${PORT_OPTIONS:MNLS}
+	@${REINPLACE_CMD} -e "s|for l in ('ru', 'ru_RU')|for l in ()|" \
+		${WRKSRC}/setup.py
 .endif
+	@${FIND} ${WRKDIR} -name .thumbnails -or -name .xvpics | \
+		${XARGS} ${RM} -rf
+	@${FIND} ${WRKSRC} -name "*.bak" -delete
+
 
-.if !defined(NOPORTDOCS)
 post-install:
+	${LN} -sf ${PREFIX}/share/icons/pysol01.png \
+		${PREFIX}/share/pixmaps/${PORTNAME}.png
+.if ${PORT_OPTIONS:MCARDSETS}
+.for cdir in ${CARDSET_DUPS}
+	@${RM} -rf ${WRKDIR}/PySolFC-Cardsets-${PORTVERSION}/cardset-${cdir}
+.endfor
+	@cd ${WRKDIR}/PySolFC-Cardsets-${PORTVERSION} && \
+		${COPYTREE_SHARE} \* ${DATADIR}
+	@cd ${WRKDIR}/PySolFC-Cardsets-${PORTVERSION} && \
+		${FIND} . -type f | ${SED} -e 's|^./|${DATADIR_REL}/|' >> ${TMPPLIST}
+	@cd ${WRKDIR}/PySolFC-Cardsets-${PORTVERSION} && \
+		${FIND} . -type d -mindepth 1 | ${SORT} -r | \
+		${SED} -e 's|^./|@dirrm ${DATADIR_REL}/|' >> ${TMPPLIST}
+.endif
+	@${ECHO} '@dirrm ${DATADIR_REL}' >> ${TMPPLIST}
+.if ${PORT_OPTIONS:MDOCS}
 	@${INSTALL} -d ${DOCSDIR}/
 	@cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${DOCSDIR}/
 .endif
 
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>

Modified: head/games/pysolfc/distinfo
==============================================================================
--- head/games/pysolfc/distinfo	Sat Dec 15 10:11:39 2012	(r308942)
+++ head/games/pysolfc/distinfo	Sat Dec 15 10:49:04 2012	(r308943)
@@ -1,2 +1,4 @@
-SHA256 (PySolFC-2.0.tar.bz2) = dbcb8e7e6d0479c230745a2be91c0c9b9e8524407cd2075f2dae144e5d441b6c
-SIZE (PySolFC-2.0.tar.bz2) = 4208776
+SHA256 (pysolfc/PySolFC-2.0.tar.bz2) = dbcb8e7e6d0479c230745a2be91c0c9b9e8524407cd2075f2dae144e5d441b6c
+SIZE (pysolfc/PySolFC-2.0.tar.bz2) = 4208776
+SHA256 (pysolfc/PySolFC-Cardsets-2.0.tar.bz2) = c388d6360191b3b7e463d84e5a64260c4e3ed36e791a85227d7e8923f3f47ca7
+SIZE (pysolfc/PySolFC-Cardsets-2.0.tar.bz2) = 30687905

Modified: head/games/pysolfc/pkg-plist
==============================================================================
--- head/games/pysolfc/pkg-plist	Sat Dec 15 10:11:39 2012	(r308942)
+++ head/games/pysolfc/pkg-plist	Sat Dec 15 10:49:04 2012	(r308943)
@@ -2923,6 +2923,7 @@ bin/pysolfc
 %%DATADIR%%/tiles/stretch/Sunset.gif
 %%NLS%%share/locale/ru/LC_MESSAGES/pysol.mo
 %%NLS%%share/locale/ru_RU/LC_MESSAGES/pysol.mo
+share/pixmaps/pysolfc.png
 share/pixmaps/pysol.xbm
 share/pixmaps/pysol.xpm
 share/applications/pysol.desktop
@@ -2990,7 +2991,6 @@ share/icons/pysol02.png
 @dirrm %%DATADIR%%/cardset-dashavatara-ganjifa
 @dirrm %%DATADIR%%/cardset-crystal-mahjongg
 @dirrm %%DATADIR%%/cardset-2000
-@dirrm %%DATADIR%%
 @dirrm %%PYTHON_SITELIBDIR%%/pysollib/winsystems
 @dirrm %%PYTHON_SITELIBDIR%%/pysollib/tk
 @dirrm %%PYTHON_SITELIBDIR%%/pysollib/tile



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