aboutsummaryrefslogtreecommitdiff
path: root/games/pysolfc
diff options
context:
space:
mode:
authorMarcus von Appen <mva@FreeBSD.org>2012-12-15 10:49:04 +0000
committerMarcus von Appen <mva@FreeBSD.org>2012-12-15 10:49:04 +0000
commit02dd326734ac072cbf9bd97043e3814bc036437b (patch)
tree750303adc0503e9e3a6b135f664d859dfceb9165 /games/pysolfc
parent73f1be227797291c39fa0deb70854e01031aec52 (diff)
downloadports-02dd326734ac072cbf9bd97043e3814bc036437b.tar.gz
ports-02dd326734ac072cbf9bd97043e3814bc036437b.zip
Notes
Diffstat (limited to 'games/pysolfc')
-rw-r--r--games/pysolfc/Makefile70
-rw-r--r--games/pysolfc/distinfo6
-rw-r--r--games/pysolfc/pkg-plist2
3 files changed, 58 insertions, 20 deletions
diff --git a/games/pysolfc/Makefile b/games/pysolfc/Makefile
index 90dde415f58d..858b0f3daf54 100644
--- a/games/pysolfc/Makefile
+++ b/games/pysolfc/Makefile
@@ -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>
diff --git a/games/pysolfc/distinfo b/games/pysolfc/distinfo
index 077504d78ce2..d9e0356200b9 100644
--- a/games/pysolfc/distinfo
+++ b/games/pysolfc/distinfo
@@ -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
diff --git a/games/pysolfc/pkg-plist b/games/pysolfc/pkg-plist
index 2f5566d1b67a..09f29fb64211 100644
--- a/games/pysolfc/pkg-plist
+++ b/games/pysolfc/pkg-plist
@@ -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