diff --git a/devel/py-p4python/Makefile b/devel/py-p4python/Makefile index b59f5a593e60..8485381c426e 100644 --- a/devel/py-p4python/Makefile +++ b/devel/py-p4python/Makefile @@ -1,24 +1,24 @@ PORTNAME= p4python -PORTVERSION= 2024.1.2645203 +PORTVERSION= 2024.2.2682690 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/manuals/p4python/Content/P4Python/Home-p4python.html LICENSE= BSD2CLAUSE LICENSE_FILE= ${WRKSRC}/LICENSE.txt BUILD_DEPENDS+= ${LOCALBASE}/lib/perforce/libclient.a:devel/p4api RUN_DEPENDS:= ${BUILD_DEPENDS} USES= dos2unix python ssl USE_PYTHON= distutils autoplist PYDISTUTILS_BUILDARGS= --ssl ${OPENSSLLIB} post-patch: @${REINPLACE_CMD} -e 's:%%LOCALBASE%%:${LOCALBASE}:' ${WRKSRC}/setup.py .include diff --git a/devel/py-p4python/distinfo b/devel/py-p4python/distinfo index ffe1424b6723..8bde5e16aa23 100644 --- a/devel/py-p4python/distinfo +++ b/devel/py-p4python/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1731550319 -SHA256 (p4python-2024.1.2645203.tar.gz) = 49be8597c6469d8ecfd087a779874722a3fd08e6d93277a5ecea37a9b272527f -SIZE (p4python-2024.1.2645203.tar.gz) = 85474 +TIMESTAMP = 1735417252 +SHA256 (p4python-2024.2.2682690.tar.gz) = 4206dd31bf77e8ec7e41d19367363dd749b96864e463e0e028fedd607988de6f +SIZE (p4python-2024.2.2682690.tar.gz) = 85503 diff --git a/devel/py-p4python/files/patch-P4API.cpp b/devel/py-p4python/files/patch-P4API.cpp index 87fccebddb99..54c391b0f08a 100644 --- a/devel/py-p4python/files/patch-P4API.cpp +++ b/devel/py-p4python/files/patch-P4API.cpp @@ -1,20 +1,20 @@ ---- P4API.cpp.orig 2020-07-15 12:24:50 UTC +--- P4API.cpp.orig 2024-12-28 20:29:18 UTC +++ P4API.cpp -@@ -337,7 +337,7 @@ static PyObject * P4API_dvcs_init(P4Adapter * self, Py +@@ -338,7 +338,7 @@ static PyObject * P4API_dvcs_init(P4Adapter * self, Py return NULL; - auto_ptr personalServer( create_server(user, client, directory, &ui) ); + unique_ptr personalServer( create_server(user, client, directory, &ui) ); if( personalServer.get() == NULL) return NULL; -@@ -399,7 +399,7 @@ static PyObject * P4API_dvcs_clone(P4Adapter * self, P +@@ -400,7 +400,7 @@ static PyObject * P4API_dvcs_clone(P4Adapter * self, P &progress)) return NULL; - auto_ptr personalServer( create_server(user, client, directory, &ui) ); + unique_ptr personalServer( create_server(user, client, directory, &ui) ); if( personalServer.get() == NULL) return NULL; diff --git a/devel/py-p4python/files/patch-setup.py b/devel/py-p4python/files/patch-setup.py index 20229a81115d..cf207601a273 100644 --- a/devel/py-p4python/files/patch-setup.py +++ b/devel/py-p4python/files/patch-setup.py @@ -1,59 +1,75 @@ ---- setup.py.orig 2023-04-04 23:31:58 UTC +--- setup.py.orig 2024-12-30 02:45:50 UTC +++ setup.py -@@ -243,7 +243,7 @@ class p4build_ext(build_ext_module): +@@ -245,7 +245,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): +@@ -277,23 +277,10 @@ 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): +- # we only support 1.0.2 or 1.1.1 using 2019.1 p4api +- if not (("1.0.2" in ssl_ver) or ("1.1.1" in ssl_ver) or ("3.0" in ssl_ver)): +- self.ssl = "" +- +- if not self.ssl: +- # try downloading and building ssl +- if self.is_super(): +- (self.ssl, ssl_src, ssl_tarball, loaded_ssl_from_ftp) = self.build_ssl_lib(ssl_ver) +- p4_ssl_dir = self.ssl +- p4_ssl_ver = ssl_ver +- else: +- print("must be root to build and install SSL") +- + if not self.ssl: + print("***********************************************", file=sys.stderr) + print("** Cannot build P4Python without SSL support **", file=sys.stderr) +@@ -315,7 +302,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): +@@ -336,9 +323,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") + + inc_path = [p4_api_dir, inc_dir] + lib_path = [p4_api_dir, lib_dir] + + # 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): +@@ -471,7 +467,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 = ""