From owner-dev-commits-ports-all@freebsd.org Wed Sep 1 18:50:36 2021 Return-Path: Delivered-To: dev-commits-ports-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 89D3866F8F2; Wed, 1 Sep 2021 18:50:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4H0Cmr3ZSvz4mHl; Wed, 1 Sep 2021 18:50:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 631B72253; Wed, 1 Sep 2021 18:50:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 181IoaXb081651; Wed, 1 Sep 2021 18:50:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 181IoaqK081650; Wed, 1 Sep 2021 18:50:36 GMT (envelope-from git) Date: Wed, 1 Sep 2021 18:50:36 GMT Message-Id: <202109011850.181IoaqK081650@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Kai Knoblich Subject: git: f5fc27fb0878 - main - games/pysolfc: Update to 2.12.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kai X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f5fc27fb0878ad6c90a7f5e9936616b624e30783 Auto-Submitted: auto-generated X-BeenThere: dev-commits-ports-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the ports repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Sep 2021 18:50:36 -0000 The branch main has been updated by kai: URL: https://cgit.FreeBSD.org/ports/commit/?id=f5fc27fb0878ad6c90a7f5e9936616b624e30783 commit f5fc27fb0878ad6c90a7f5e9936616b624e30783 Author: Kai Knoblich AuthorDate: 2021-09-01 18:37:17 +0000 Commit: Kai Knoblich CommitDate: 2021-09-01 18:37:17 +0000 games/pysolfc: Update to 2.12.0 * Make the port less restrictive and thus distributable again by using a reduced collection of cardsets, which contains clearly defined licenses. It's also bundled by upstream for the distributed binary packages of PySolFC. * Introduce PILLOW/SOUND options which enables sound and enhanced graphics support. Changelog since 2.6.2: https://github.com/shlomif/PySolFC/blob/pysolfc-2.12.0/NEWS.asciidoc --- games/pysolfc/Makefile | 83 +++++++++++---------------- games/pysolfc/distinfo | 12 ++-- games/pysolfc/files/patch-pysollib_mfxutil.py | 21 ------- games/pysolfc/files/patch-setup.py | 36 ++++++++++++ games/pysolfc/pkg-message | 25 ++++++++ 5 files changed, 103 insertions(+), 74 deletions(-) diff --git a/games/pysolfc/Makefile b/games/pysolfc/Makefile index 0042d7fb1168..a85fd57669a8 100644 --- a/games/pysolfc/Makefile +++ b/games/pysolfc/Makefile @@ -1,59 +1,32 @@ PORTNAME= pysolfc -DISTVERSION= 2.6.4 -PORTREVISION= 2 +DISTVERSION= 2.12.0 CATEGORIES= games python MASTER_SITES= SF/${PORTNAME}/PySolFC/${PYSOLFCDIR} \ - SF/${PORTNAME}/PySolFC-Cardsets/${CARDSETDIR}:cardsets + SF/${PORTNAME}/PySolFC-Cardsets/minimal/:cardsets \ + SF/${PORTNAME}/PySol-Music/${MUSICDIR}/:music DISTFILES= ${PYSOLFCDIST} \ - ${CARDSETDIST}:cardsets + ${CARDSETDIST}:cardsets \ + ${MUSICDIST}:music DIST_SUBDIR= ${PORTNAME} MAINTAINER= kai@FreeBSD.org COMMENT= Solitaire game, written in Python and the successor of PySol -LICENSE= GPLv2+ GPLv3+ MIT PCW PD UCP UCJ ULG +LICENSE= GPLv2+ GPLv3+ LICENSE_COMB= multi -RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}random2>=0:math/py-random2@${PY_FLAVOR} \ +RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}attrs>0:devel/py-attrs@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}configobj>0:devel/py-configobj@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}game>0:devel/py-game@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}pysol-cards>0:games/py-pysol-cards@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}random2>=0:math/py-random2@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}six>0:devel/py-six@${PY_FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}tkinter>0:x11-toolkits/py-tkinter@${PY_FLAVOR} \ - ${PY_PILLOW} + ${PYTHON_PKGNAMEPREFIX}tkinter>0:x11-toolkits/py-tkinter@${PY_FLAVOR} LICENSE_FILE_GPLv3+ = ${WRKSRC}/COPYING LICENSE_DISTFILES_GPLv3+ = ${PYSOLFCDIST} - -LICENSE_FILE_MIT= ${WRKDIR}/${CARDSETDIR}/cardset-spider/COPYRIGHT -LICENSE_DISTFILES_MIT= ${CARDSETDIST} - -# This applies also to following cardsets: -# - ${WRKDIR}/${CARDSETDIR}/cardset-rangoon-e/COPYRIGHT -# - ${WRKDIR}/${CARDSETDIR}/cardset-rangoon-r/COPYRIGHT -LICENSE_FILE_PCW= ${WRKDIR}/${CARDSETDIR}/cardset-rangoon-d/COPYRIGHT -LICENSE_NAME_PCW= Postcardware -LICENSE_PERMS_PCW= dist-mirror no-dist-sell pkg-mirror no-pkg-sell auto-accept -LICENSE_DISTFILES_PCW= ${CARDSETDIST} - -LICENSE_FILE_PD= ${WRKDIR}/${CARDSETDIR}/cardset-tksol/COPYRIGHT -LICENSE_DISTFILES_PD= ${CARDSETDIST} - -LICENSE_FILE_UCP= ${WRKDIR}/${CARDSETDIR}/cardset-patience/COPYRIGHT -LICENSE_NAME_UCP= Unknown Copyright / Cardset "Patience" -LICENSE_PERMS_UCP= no-dist-mirror no-dist-sell no-pkg-mirror no-pkg-sell auto-accept -LICENSE_DISTFILES_UCP= ${CARDSETDIST} - -LICENSE_FILE_UCJ= ${WRKDIR}/${CARDSETDIR}/cardset-jacoby/COPYRIGHT -LICENSE_NAME_UCJ= Unknown Copyright / Cardset "Jacoby" -LICENSE_PERMS_UCJ= no-dist-mirror no-dist-sell no-pkg-mirror no-pkg-sell auto-accept -LICENSE_DISTFILES_UCJ= ${CARDSETDIST} - -LICENSE_FILE_ULG= ${WRKDIR}/${CARDSETDIR}/cardset-greywyvern/COPYRIGHT -LICENSE_NAME_ULG= Unknown License / Cardset "Greywyvern" -LICENSE_PERMS_ULG= no-dist-mirror no-dist-sell no-pkg-mirror no-pkg-sell auto-accept -LICENSE_DISTFILES_ULG= ${CARDSETDIST} - -# The rest of the cardsets are licensed with the GPLv+2 -LICENSE_FILE_GPLv2+ = ${WRKDIR}/${CARDSETDIR}/cardset-1567/COPYRIGHT -LICENSE_DISTFILES_GPLv2+ = ${CARDSETDIST} +LICENSE_FILE_GPLv2+ = ${WRKDIR}/${CARDSETDIR}/cardset-2000/COPYRIGHT +LICENSE_DISTFILES_GPLv2+ = ${CARDSETDIST} ${MUSICDIST} USES= python:3.6+ shebangfix tar:xz USE_PYTHON= distutils noflavors autoplist @@ -64,14 +37,23 @@ PLIST_FILES= share/pixmaps/pysolfc.png DATADIR= ${PREFIX}/share/PySolFC WRKSRC= ${WRKDIR}/${PYSOLFCDIR} -OPTIONS_DEFINE= NLS +OPTIONS_DEFINE= NLS PILLOW SOUND +OPTIONS_DEFAULT= PILLOW SOUND OPTIONS_SUB= yes + +PILLOW_DESC= Enhanced graphics support + NLS_USES= gettext +PILLOW_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pillow>0:graphics/py-pillow@${PY_FLAVOR} +SOUND_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}game>0:devel/py-game@${PY_FLAVOR} + PYSOLFCDIR= PySolFC-${DISTVERSION} PYSOLFCDIST= ${PYSOLFCDIR}${EXTRACT_SUFX} -CARDSETDIR= PySolFC-Cardsets-2.0 -CARDSETDIST= ${CARDSETDIR}.tar.bz2 +CARDSETDIR= PySolFC-Cardsets--Minimal-2.0.2 +CARDSETDIST= ${CARDSETDIR}.tar.xz +MUSICDIR= PySol-Music-4.50 +MUSICDIST= ${MUSICDIR:tl}.tar.xz post-patch: @${MV} ${WRKSRC}/pysol.py ${WRKSRC}/pysolfc @@ -83,16 +65,21 @@ post-patch: ${XARGS} ${RM} -r @${FIND} ${WRKSRC} -name "*.bak" -delete -post-patch-NLS-off: - @${REINPLACE_CMD} -e "s|for l in ('ru', 'ru_RU')|for l in ()|" \ - ${WRKSRC}/setup.py +post-patch-NLS-on: + @${REINPLACE_CMD} -e 's|^#%%NLS%%||' ${WRKSRC}/setup.py post-install: - ${RLN} ${STAGEDIR}${PREFIX}/share/icons/pysol01.png \ + ${RLN} ${STAGEDIR}${PREFIX}/share/icons/hicolor/48x48/apps/pysol.png \ ${STAGEDIR}${PREFIX}/share/pixmaps/${PORTNAME}.png (cd ${WRKDIR}/${CARDSETDIR} && \ ${COPYTREE_SHARE} \* ${STAGEDIR}${DATADIR}) (cd ${WRKDIR}/${CARDSETDIR} && \ ${FIND} . -type f | ${SED} -e 's|^./|${DATADIR_REL}/|' >> ${TMPPLIST}) +post-install-SOUND-on: + (cd ${WRKDIR}/${MUSICDIR:tl}/data && \ + ${COPYTREE_SHARE} \* ${STAGEDIR}${DATADIR}) + (cd ${WRKDIR}/${MUSICDIR:tl}/data && \ + ${FIND} . -type f | ${SED} -e 's|^./|${DATADIR_REL}/|' >> ${TMPPLIST}) + .include diff --git a/games/pysolfc/distinfo b/games/pysolfc/distinfo index f7e409aee63f..c9a1076173a3 100644 --- a/games/pysolfc/distinfo +++ b/games/pysolfc/distinfo @@ -1,5 +1,7 @@ -TIMESTAMP = 1556530733 -SHA256 (pysolfc/PySolFC-2.6.4.tar.xz) = 4dab3579531530136fb629c045d4b8389f410962e6cf77494f18c61c9de6ea78 -SIZE (pysolfc/PySolFC-2.6.4.tar.xz) = 3761108 -SHA256 (pysolfc/PySolFC-Cardsets-2.0.tar.bz2) = c388d6360191b3b7e463d84e5a64260c4e3ed36e791a85227d7e8923f3f47ca7 -SIZE (pysolfc/PySolFC-Cardsets-2.0.tar.bz2) = 30687905 +TIMESTAMP = 1630237290 +SHA256 (pysolfc/PySolFC-2.12.0.tar.xz) = 244dec417234397e104f2552667be4f8a11c9818059c03bbf0ae8febd25592ef +SIZE (pysolfc/PySolFC-2.12.0.tar.xz) = 3816376 +SHA256 (pysolfc/PySolFC-Cardsets--Minimal-2.0.2.tar.xz) = c0577472bde4d293d8d1440d824a031b3e973219e313e8682d70b8042a9b34f2 +SIZE (pysolfc/PySolFC-Cardsets--Minimal-2.0.2.tar.xz) = 6969096 +SHA256 (pysolfc/pysol-music-4.50.tar.xz) = 3cfade86db88c1d97589c50441808ee082e68256be788012503818c42728783d +SIZE (pysolfc/pysol-music-4.50.tar.xz) = 2144764 diff --git a/games/pysolfc/files/patch-pysollib_mfxutil.py b/games/pysolfc/files/patch-pysollib_mfxutil.py deleted file mode 100644 index a76d320c68ae..000000000000 --- a/games/pysolfc/files/patch-pysollib_mfxutil.py +++ /dev/null @@ -1,21 +0,0 @@ -Fix runtime errors with Python 3.8+ because the function time.clock() has been -removed in Python 3.8, after having been deprecated since Python 3.3. - -Obtained from: -https://github.com/shlomif/PySolFC/commit/0961401105850a18ff129e2c25cfffae45a81752 - ---- pysollib/mfxutil.py.orig 2021-06-09 18:23:28 UTC -+++ pysollib/mfxutil.py -@@ -143,7 +143,11 @@ def getprefdir(package): - - - # high resolution clock() and sleep() --uclock = time.clock -+try: -+ uclock = time.perf_counter -+except Exception: -+ uclock = time.clock -+ - usleep = time.sleep - if os.name == "posix": - uclock = time.time diff --git a/games/pysolfc/files/patch-setup.py b/games/pysolfc/files/patch-setup.py new file mode 100644 index 000000000000..e7e56762412c --- /dev/null +++ b/games/pysolfc/files/patch-setup.py @@ -0,0 +1,36 @@ +* Avoid staging issues by skipping directories that only contain + subdirectories. + +* Skip locale files if NLS is disabled (otherwise enable it via + post-patch target). + +* The pycotap package is only required for testing. + +--- setup.py.orig 2021-06-13 03:25:15 UTC ++++ setup.py +@@ -14,6 +14,8 @@ def get_data_files(source, destination): + destination using the data_files keyword of setuptools.setup.""" + for path, _, files in os.walk(source): + files = [os.path.join(path, f) for f in files] ++ if (len(files) == 0): ++ continue + path = path.replace(source, destination, 1) + yield (path, files) + +@@ -44,7 +46,7 @@ for d in ddirs: + data_files += get_data_files(os.path.join('data', d), + os.path.join(data_dir, d)) + +-data_files += get_data_files('locale', locale_dir) ++#%%NLS%%data_files += get_data_files('locale', locale_dir) + + if os.name == 'posix': + for size in os.listdir('data/images/icons'): +@@ -74,7 +76,6 @@ kw = { + 'install_requires': [ + 'attrs', + 'configobj', +- 'pycotap', + 'pysol_cards', + 'random2', + 'six', diff --git a/games/pysolfc/pkg-message b/games/pysolfc/pkg-message new file mode 100644 index 000000000000..f3a3ef4ecafe --- /dev/null +++ b/games/pysolfc/pkg-message @@ -0,0 +1,25 @@ +[ +{ type: install + message: <