From owner-dev-commits-ports-all@freebsd.org Wed Jun 30 08:58:34 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 7683465FEFE; Wed, 30 Jun 2021 08:58:34 +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 4GFFcp2vW9z4pDx; Wed, 30 Jun 2021 08:58:34 +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 47F761C6C; Wed, 30 Jun 2021 08:58:34 +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 15U8wYNl003863; Wed, 30 Jun 2021 08:58:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15U8wYpf003862; Wed, 30 Jun 2021 08:58:34 GMT (envelope-from git) Date: Wed, 30 Jun 2021 08:58:34 GMT Message-Id: <202106300858.15U8wYpf003862@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-branches@FreeBSD.org From: Kai Knoblich Subject: git: cb3b365038fc - 2021Q2 - games/pysolfc: Fix runtime issues with Python 3.8+ 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/2021Q2 X-Git-Reftype: branch X-Git-Commit: cb3b365038fcaee997eb9e4006a7e2bfed6e5ab0 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, 30 Jun 2021 08:58:34 -0000 The branch 2021Q2 has been updated by kai: URL: https://cgit.FreeBSD.org/ports/commit/?id=cb3b365038fcaee997eb9e4006a7e2bfed6e5ab0 commit cb3b365038fcaee997eb9e4006a7e2bfed6e5ab0 Author: Kai Knoblich AuthorDate: 2021-06-30 08:31:41 +0000 Commit: Kai Knoblich CommitDate: 2021-06-30 08:56:01 +0000 games/pysolfc: Fix runtime issues with Python 3.8+ * The deprecated function "time.clock()" has been removed in Python 3.8 and "time.perf_counter()" should be used instead. Because updating to a newer version of PySolFC requires a bit more work, use a backport for now to remedy the runtime issues. * Bump PORTREVISION due changed package contents. PR: 256504 Reported by: MFH: 2021Q2 (cherry picked from commit 91cf30435554dda6bf71dc566f91352dd469d816) --- games/pysolfc/Makefile | 2 +- games/pysolfc/files/patch-pysollib_mfxutil.py | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/games/pysolfc/Makefile b/games/pysolfc/Makefile index 8a26d7761010..7d564b06430d 100644 --- a/games/pysolfc/Makefile +++ b/games/pysolfc/Makefile @@ -1,7 +1,7 @@ PORTNAME= pysolfc DISTVERSION= 2.6.4 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= games python MASTER_SITES= SF/${PORTNAME}/PySolFC/${PYSOLFCDIR} \ SF/${PORTNAME}/PySolFC-Cardsets/${CARDSETDIR}:cardsets diff --git a/games/pysolfc/files/patch-pysollib_mfxutil.py b/games/pysolfc/files/patch-pysollib_mfxutil.py new file mode 100644 index 000000000000..a76d320c68ae --- /dev/null +++ b/games/pysolfc/files/patch-pysollib_mfxutil.py @@ -0,0 +1,21 @@ +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