From nobody Sun Apr 9 01:31:47 2023 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PvF2C4Rb7z456yd; Sun, 9 Apr 2023 01:31:47 +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 4PvF2C3qZyz3Hqs; Sun, 9 Apr 2023 01:31:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681003907; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sIl3iDrS//ANSigsS11UIms/DLR02vHkYaZJt2YJFu0=; b=tuhwxMZ0jprWG6QGxfPm/qeTWhbl0dmK3D2LEU0AQVgXfY/HBf8UdQ+Ne8a5IqHudn2a4F 3FjizGpNHy6CKy/zukIcp7x0MHNEhGpnJgUOo6LVfGWA0EL31i9CEERNE1wtfEbFR9u7SS anNx8K3dF/PFk8hKAy7ciqmd4SOQmsfBcQChvjerfXKvMgJyok28tDww5Z6+nuCGJrAsu8 mA+rNcF+ja+0MrF4bFMKzVEDiKMK2dcFxDvCnN5sS+tOg6rNC2HjoVp4/3+mQy+dF9b+LJ iSz44HY2zGQ2Gf4PhJspcDdky+e0ILaU3yBvq9xMsBizJVUTchoUglsavvwleA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681003907; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sIl3iDrS//ANSigsS11UIms/DLR02vHkYaZJt2YJFu0=; b=ILsKq3FrPmpSZhBMEOvnv5jI007i4YUT/2mnxosixpHd/RXN9rYT7ViVaKJudGIDW7HYNg BhmZv3Th+BiBlZxvax1GYZNfqE4m2s8t/FHzvBgmURY7yPh4XhwJ8ep2XrNbvT58nwekb2 FlNwSgTTVm8YL/73G3JNleJ/r235STBxke0fj39V86hHQX38fmxROXTLop/voRBdM+NCFQ hysdkz96+OV1OYcv50coN6iE+mwLu/8zf+pcTS2Xi3ghYiLohe3AqBNbvPl6/Ybg1pa9DE q8p/mmTQ1ufeGaHu9UOoEq2Ep2w0NeRb3SSAE4iYyH6tjoMpoj97r73zxSDcgA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681003907; a=rsa-sha256; cv=none; b=W9+z0BNos1odFkhpapRdT/wTLyXNt6itNxZtAxK6DPiTdVp02oRDCzJMhtan0xOzYGxmZQ Es/ybp+SrBKBHXIy8YBxrIbJB0d3zd9uhiiMudrPMCV90F1KJxWNIotouwR21Dl/0ReFYn +mu2pNzby6HXDqTKmW2wB+P31njPzJnGGoj6Cwd07IKJuV3FB/9EOTuP68eEUxEsFqO96K /Cv1LqYCl1RS0mJxvI/AoE44wJKv9bjRJaYPFzYt6e2H8d2r8kzqkmHRMQcn6nv4kc0sMw /FJtm4mQJfkr4tRvYtqBCU7qfvTMujgUIhW6sjzDnp4Ki4ayqjSZV0J76yuu1A== 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 4PvF2C2qMFzpmS; Sun, 9 Apr 2023 01:31:47 +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 3391Vl2l090059; Sun, 9 Apr 2023 01:31:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3391VlSO090058; Sun, 9 Apr 2023 01:31:47 GMT (envelope-from git) Date: Sun, 9 Apr 2023 01:31:47 GMT Message-Id: <202304090131.3391VlSO090058@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Craig Leres Subject: git: 021ceba2e89a - main - devel/py-p4python: Update to 2022.2.2425690 List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: leres X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 021ceba2e89a7da47ed25e982713d9a63a4766c6 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by leres: URL: https://cgit.FreeBSD.org/ports/commit/?id=021ceba2e89a7da47ed25e982713d9a63a4766c6 commit 021ceba2e89a7da47ed25e982713d9a63a4766c6 Author: Craig Leres AuthorDate: 2023-04-09 01:31:00 +0000 Commit: Craig Leres CommitDate: 2023-04-09 01:31:00 +0000 devel/py-p4python: Update to 2022.2.2425690 Remove BROKEN (this version is 7 years newer). Python 2 no longer supported. PR: 270704 Approved by: antonfb@hesiod.org (maintainer) --- devel/py-p4python/Makefile | 7 +- devel/py-p4python/distinfo | 6 +- devel/py-p4python/files/patch-P4PythonDebug.cpp | 10 -- devel/py-p4python/files/patch-setup.py | 126 +++++++++------------ .../py-p4python/files/patch-tools_PlatformInfo.py | 13 +++ 5 files changed, 74 insertions(+), 88 deletions(-) diff --git a/devel/py-p4python/Makefile b/devel/py-p4python/Makefile index 73f0f3160f54..459b600327d9 100644 --- a/devel/py-p4python/Makefile +++ b/devel/py-p4python/Makefile @@ -1,19 +1,16 @@ PORTNAME= p4python -PORTVERSION= 2016.1.1447008 -PORTREVISION= 2 +PORTVERSION= 2022.2.2425690 CATEGORIES= devel python MASTER_SITES= PYPI PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} MAINTAINER= antonfb@hesiod.org COMMENT= Python bindings for the Perforce API -WWW= https://www.perforce.com/perforce/r14.2/manuals/p4script/python.programming.html +WWW= https://www.perforce.com/manuals/p4python/Content/P4Python/Home-p4python.html LICENSE= BSD2CLAUSE LICENSE_FILE= ${WRKSRC}/LICENSE.txt -BROKEN_riscv64= fails to build: TypeError: can only concatenate str (not "NoneType") to str - BUILD_DEPENDS+= ${LOCALBASE}/lib/perforce/libclient.a:devel/p4api RUN_DEPENDS:= ${BUILD_DEPENDS} diff --git a/devel/py-p4python/distinfo b/devel/py-p4python/distinfo index 80f6846c2293..643ecdb71f90 100644 --- a/devel/py-p4python/distinfo +++ b/devel/py-p4python/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1517419395 -SHA256 (p4python-2016.1.1447008.tar.gz) = 1907f3c7ace54763651c1ccf20b92e6e9e72de58b240c591d6291ebb24ef0f1b -SIZE (p4python-2016.1.1447008.tar.gz) = 84231 +TIMESTAMP = 1680624240 +SHA256 (p4python-2022.2.2425690.tar.gz) = 3d2a6135b7cc31226d71a056d14abe7b2e120e683e93a6187e651480d2ad64df +SIZE (p4python-2022.2.2425690.tar.gz) = 83439 diff --git a/devel/py-p4python/files/patch-P4PythonDebug.cpp b/devel/py-p4python/files/patch-P4PythonDebug.cpp deleted file mode 100644 index 9509bb0aaa24..000000000000 --- a/devel/py-p4python/files/patch-P4PythonDebug.cpp +++ /dev/null @@ -1,10 +0,0 @@ ---- P4PythonDebug.cpp.orig 2023-04-01 20:37:16 UTC -+++ P4PythonDebug.cpp -@@ -29,6 +29,7 @@ $Id$ - #include - #include - -+#include - #include - - #include "P4PythonDebug.h" diff --git a/devel/py-p4python/files/patch-setup.py b/devel/py-p4python/files/patch-setup.py index 5d7c2e3daa40..20229a81115d 100644 --- a/devel/py-p4python/files/patch-setup.py +++ b/devel/py-p4python/files/patch-setup.py @@ -1,73 +1,59 @@ ---- setup.py.orig 2018-02-02 16:50:17 UTC +--- setup.py.orig 2023-04-04 23:31:58 UTC +++ setup.py -@@ -102,7 +102,12 @@ class P4APIFtp: - - elif system == "FreeBSD": - platform_str += "freebsd" -- release = uname.release -+ if sys.version_info.major == 3: -+ release = uname.release -+ elif sys.version_info.major == 2: -+ release = uname[2] -+ else: -+ raise Exception("Unknown python version %s" % sys.version) - - value = int(''.join(itertools.takewhile(lambda s: s.isdigit(), release))) - -@@ -217,6 +222,8 @@ class VersionInfo: - verFile = os.path.join(p4ApiDir, "sample", "Version") - if not os.path.exists(verFile): - verFile = os.path.join(p4ApiDir, "Version") -+ if not os.path.exists(verFile): -+ verFile = os.path.join(p4ApiDir, "share", "examples", "p4api", "Version") - input = open(verFile) - for line in input: - for pattern, handler in self.patterns: -@@ -398,9 +405,16 @@ class PlatformInfo: - arch = self.architecture(unameOut[4]) - elif unameOut[0] == 'FreeBSD': - unix = "FREEBSD" -- release = unameOut[2][0] -- if release == '5': -- release += unameOut[2][2] -+ if sys.version_info.major == 3: -+ release = unameOut.release.split(".")[0] -+ if release == '5': -+ release += unameOut.release.split(".")[1] -+ elif sys.version_info.major == 2: -+ release = unameOut[2].split(".")[0] -+ if release == '5': -+ release += unameOut[2].split(".")[1] -+ else: -+ raise Exception("Unknown python version %s" % sys.version) - - arch = self.architecture(unameOut[4]) - elif unameOut[0] == 'CYGWIN_NT-5.1': -@@ -475,8 +489,16 @@ def do_setup(p4_api_dir, ssl): - else: - print ("API Release %s.%s" % (ryear, rversion)) - -- inc_path = [p4_api_dir, os.path.join(p4_api_dir, "include", "p4")] -- lib_path = [p4_api_dir, os.path.join(p4_api_dir, "lib")] -+ inc_dir = os.path.join(p4_api_dir, "include", "p4") -+ if not os.path.exists(inc_dir): -+ inc_dir = os.path.join(p4_api_dir, "include", "perforce") +@@ -243,7 +243,7 @@ class p4build_ext(build_ext_module): + pathToFile = os.path.join(p, "openssl") + if os.path.exists(pathToFile) and os.access(pathToFile, os.X_OK): + entry = subprocess.check_output("ldd {0} | grep libssl".format(pathToFile), +- executable="/bin/bash", shell="True") ++ executable="/bin/sh", shell="True") + if entry is not False: + libpath = os.path.dirname(entry.split()[2]) + +@@ -275,7 +275,7 @@ class p4build_ext(build_ext_module): + + ssl_ver = "" + if not p4_ssl_dir: +- if (not self.ssl) and (sys.platform == "linux" or sys.platform == "linux2"): ++ if (not self.ssl): + # check for a version of SSL already installed via 'openssl version' + self.ssl, ssl_ver = self.check_installed_ssl() # return libpath or None + +@@ -313,7 +313,7 @@ class p4build_ext(build_ext_module): + p4_api_dir = self.apidir + + try: +- apiVersion = VersionInfo(p4_api_dir) ++ apiVersion = VersionInfo(".") + releaseVersion = VersionInfo(".") + except IOError: + print("Cannot find Version file in API dir {0}.".format(p4_api_dir)) +@@ -334,9 +334,18 @@ class p4build_ext(build_ext_module): + #spawn._nt_quote_args = monkey_nt_quote_args + + # add the paths for p4 headers and library +- inc_path = [str(os.path.join(p4_api_dir, "include", "p4"))] +- lib_path = [str(os.path.join(p4_api_dir, "lib")), str(p4_ssl_dir)] ++ inc_dir = os.path.join(p4_api_dir, "include", "p4") ++ if not os.path.exists(inc_dir): ++ inc_dir = os.path.join(p4_api_dir, "include", "perforce") + ++ lib_dir = os.path.join(p4_api_dir, "lib", "perforce") ++ if not os.path.exists(lib_dir): ++ lib_dir = os.path.join(p4_api_dir, "lib") + -+ lib_dir = os.path.join(p4_api_dir, "lib", "perforce") -+ if not os.path.exists(lib_dir): -+ lib_dir = os.path.join(p4_api_dir, "lib") ++ inc_path = [p4_api_dir, inc_dir] ++ lib_path = [p4_api_dir, lib_dir] + -+ inc_path = [p4_api_dir, inc_dir] -+ lib_path = [p4_api_dir, lib_dir] - if ssl: - lib_path.append( ssl ) - -@@ -608,7 +630,7 @@ if __name__ == "__main__": - if os.path.exists(distdir): - shutil.rmtree(distdir, False, force_remove_file) - -- p4_api_dir = get_api_dir() -+ p4_api_dir = "%%LOCALBASE%%" - - ssl = None - if '--ssl' in sys.argv: ++ + # check if the interpreter is mayapy.exe + namedir = os.path.dirname(os.path.dirname(sys.executable)) + if "maya" in namedir.lower(): +@@ -469,7 +478,7 @@ def cleanup_api(api_dir, tarball): + + + # declare some evil globals +-p4_api_dir = "" ++p4_api_dir = "%%LOCALBASE%%" + p4_ssl_dir = "" + p4_ssl_ver = "" + ssl_tarball = "" diff --git a/devel/py-p4python/files/patch-tools_PlatformInfo.py b/devel/py-p4python/files/patch-tools_PlatformInfo.py new file mode 100644 index 000000000000..874fb6339737 --- /dev/null +++ b/devel/py-p4python/files/patch-tools_PlatformInfo.py @@ -0,0 +1,13 @@ +--- tools/PlatformInfo.py.orig 2023-04-05 20:18:00 UTC ++++ tools/PlatformInfo.py +@@ -131,9 +131,7 @@ class PlatformInfo: + arch = self.architecture(unameOut[4]) + elif unameOut[0] == 'FreeBSD': + unix = "FREEBSD" +- release = unameOut[2][0] +- if release == '5': +- release += unameOut[2][2] ++ release = re.match("(\d+.\d)", unameOut[2]).group(1).replace(".","") + + arch = self.architecture(unameOut[4]) + elif unameOut[0] == 'CYGWIN_NT-5.1':