git: da0f8f33a857 - main - security/py-m2crypto: Update to 0.46.0

From: Po-Chuan Hsieh <sunpoet_at_FreeBSD.org>
Date: Sun, 19 Oct 2025 00:04:08 UTC
The branch main has been updated by sunpoet:

URL: https://cgit.FreeBSD.org/ports/commit/?id=da0f8f33a857c7b031323aacb74afcecc124409d

commit da0f8f33a857c7b031323aacb74afcecc124409d
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2025-10-18 23:54:12 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2025-10-18 23:54:12 +0000

    security/py-m2crypto: Update to 0.46.0
    
    Changes:        https://gitlab.com/m2crypto/m2crypto/-/tags
                    https://gitlab.com/m2crypto/m2crypto/-/blob/master/CHANGES
---
 security/py-m2crypto/Makefile                   |  4 +--
 security/py-m2crypto/distinfo                   |  6 ++---
 security/py-m2crypto/files/patch-pyproject.toml | 11 ++++++++
 security/py-m2crypto/files/patch-setup.py       | 34 +++++++++++--------------
 4 files changed, 31 insertions(+), 24 deletions(-)

diff --git a/security/py-m2crypto/Makefile b/security/py-m2crypto/Makefile
index 066692c320b9..ea09719db6bb 100644
--- a/security/py-m2crypto/Makefile
+++ b/security/py-m2crypto/Makefile
@@ -1,5 +1,5 @@
 PORTNAME=	m2crypto
-PORTVERSION=	0.45.1
+PORTVERSION=	0.46.0
 CATEGORIES=	security python
 MASTER_SITES=	PYPI
 PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
@@ -11,7 +11,7 @@ WWW=		https://m2crypto.readthedocs.io/en/latest/ \
 
 LICENSE=	BSD2CLAUSE
 
-BUILD_DEPENDS=	${PYTHON_PKGNAMEPREFIX}setuptools>=0:devel/py-setuptools@${PY_FLAVOR} \
+BUILD_DEPENDS=	${PYTHON_PKGNAMEPREFIX}setuptools>=61.0.0:devel/py-setuptools@${PY_FLAVOR} \
 		${PYTHON_PKGNAMEPREFIX}wheel>=0:devel/py-wheel@${PY_FLAVOR} \
 		swig>=4.0:devel/swig
 
diff --git a/security/py-m2crypto/distinfo b/security/py-m2crypto/distinfo
index 44832090c634..c0506e020a78 100644
--- a/security/py-m2crypto/distinfo
+++ b/security/py-m2crypto/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1745936216
-SHA256 (m2crypto-0.45.1.tar.gz) = d0fc81a8828edbf4308432b3040bf06bb26bad95abb9e7d4690b6118551e76ec
-SIZE (m2crypto-0.45.1.tar.gz) = 363721
+TIMESTAMP = 1759774713
+SHA256 (m2crypto-0.46.0.tar.gz) = 5de32576c3bfc84fc2972ba703305dcba35dfb40383273e9552a7e17175dcb72
+SIZE (m2crypto-0.46.0.tar.gz) = 500661
diff --git a/security/py-m2crypto/files/patch-pyproject.toml b/security/py-m2crypto/files/patch-pyproject.toml
new file mode 100644
index 000000000000..a89876004cad
--- /dev/null
+++ b/security/py-m2crypto/files/patch-pyproject.toml
@@ -0,0 +1,11 @@
+--- pyproject.toml.orig	2025-10-01 22:01:37 UTC
++++ pyproject.toml
+@@ -1,7 +1,7 @@ requires = [
+ [build-system]
+ requires = [
+     "setuptools>=43.0.0; python_version<='3.6'",
+-    "setuptools>=75.8.1; python_version>='3.9'",
++    "setuptools>=61.0.0; python_version>='3.9'",
+     "wheel"
+ ]
+ build-backend = "setuptools.build_meta"
diff --git a/security/py-m2crypto/files/patch-setup.py b/security/py-m2crypto/files/patch-setup.py
index 6e2719d77feb..df3db2ca45ac 100644
--- a/security/py-m2crypto/files/patch-setup.py
+++ b/security/py-m2crypto/files/patch-setup.py
@@ -1,35 +1,31 @@
---- setup.py.orig	2024-10-09 22:15:33 UTC
+--- setup.py.orig	2025-10-01 23:07:58 UTC
 +++ setup.py
-@@ -164,11 +164,6 @@ class _M2CryptoBuildExt(build_ext.build_ext):
-         log.debug('self.openssl_path = %s', self.openssl_path)
-         log.debug('self.bundledlls = %s', self.bundledlls)
+@@ -168,9 +168,6 @@ class _M2CryptoBuildExt(build_ext.build_ext):
+         log.debug("self.openssl_path = %s", self.openssl_path)
+         log.debug("self.bundledlls = %s", self.bundledlls)
  
 -        # swig seems to need the default header file directories
--        self.swig_opts.extend(
--            ['-I%s' % i for i in _get_additional_includes()]
--        )
+-        self.swig_opts.extend(["-I%s" % i for i in _get_additional_includes()])
 -
-         log.debug('self.include_dirs = %s', self.include_dirs)
-         log.debug('self.library_dirs = %s', self.library_dirs)
+         log.debug("self.include_dirs = %s", self.include_dirs)
+         log.debug("self.library_dirs = %s", self.library_dirs)
  
-@@ -238,6 +233,11 @@ class _M2CryptoBuildExt(build_ext.build_ext):
+@@ -237,6 +234,9 @@ class _M2CryptoBuildExt(build_ext.build_ext):
                          f"gcc -E ended with return code {pid.returncode}"
                      )
  
 +        # swig seems to need the default header file directories
-+        self.swig_opts.extend(
-+            ['-I%s' % i for i in _get_additional_includes()]
-+        )
++        self.swig_opts.extend(["-I%s" % i for i in _get_additional_includes()])
 +
          # Some Linux distributor has added the following line in
          # /usr/include/openssl/opensslconf.h:
          #
 @@ -257,7 +257,7 @@ class _M2CryptoBuildExt(build_ext.build_ext):
-                 '-I' + os.path.join(openssl_include_dir, 'openssl')
-             )
+         if platform.system() == "Darwin":
+             self.swig_opts.append("-cpperraswarn")
  
--        self.swig_opts.append('-includeall')
-+        #self.swig_opts.append('-includeall')
-         self.swig_opts.append('-builtin')
+-        self.swig_opts.append("-includeall")
++        #self.swig_opts.append("-includeall")
+         self.swig_opts.append("-builtin")
  
-         build_dir = os.path.join(self.build_lib, 'M2Crypto')
+         build_dir = os.path.join(self.build_lib, "M2Crypto")