git: 05c9b04e5533 - main - security/py-m2crypto: Update to 0.41.0

From: Po-Chuan Hsieh <sunpoet_at_FreeBSD.org>
Date: Wed, 21 Feb 2024 15:25:10 UTC
The branch main has been updated by sunpoet:

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

commit 05c9b04e5533beba5f57c5335349fdf4df3b81c4
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2024-02-21 14:45:18 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2024-02-21 15:08:00 +0000

    security/py-m2crypto: Update to 0.41.0
    
    - Convert to USE_PYTHON=pep517
    
    Changes:        https://gitlab.com/m2crypto/m2crypto/-/blob/master/CHANGES
---
 security/py-m2crypto/Makefile              | 10 +++++-----
 security/py-m2crypto/distinfo              |  6 +++---
 security/py-m2crypto/files/patch-setup.cfg |  9 +++++++++
 security/py-m2crypto/files/patch-setup.py  | 14 +++++++-------
 4 files changed, 24 insertions(+), 15 deletions(-)

diff --git a/security/py-m2crypto/Makefile b/security/py-m2crypto/Makefile
index f21fb44403fb..c84cb450c451 100644
--- a/security/py-m2crypto/Makefile
+++ b/security/py-m2crypto/Makefile
@@ -1,5 +1,5 @@
 PORTNAME=	m2crypto
-PORTVERSION=	0.40.1
+PORTVERSION=	0.41.0
 CATEGORIES=	security python
 MASTER_SITES=	PYPI
 PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
@@ -12,12 +12,12 @@ WWW=		https://gitlab.com/m2crypto/m2crypto
 LICENSE=	MIT
 LICENSE_FILE=	${WRKSRC}/LICENCE
 
-BUILD_DEPENDS=	swig>=4.0:devel/swig
+BUILD_DEPENDS=	${PYTHON_PKGNAMEPREFIX}setuptools>=0:devel/py-setuptools@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}wheel>=0:devel/py-wheel@${PY_FLAVOR} \
+		swig>=4.0:devel/swig
 
 USES=		cpe python ssl
-USE_PYTHON=	autoplist concurrent distutils
-
-PYDISTUTILS_BUILDARGS=	build_ext --openssl=${OPENSSLBASE} --swig=${LOCALBASE}/bin/swig
+USE_PYTHON=	autoplist concurrent pep517
 
 CPE_VENDOR=	m2crypto_project
 
diff --git a/security/py-m2crypto/distinfo b/security/py-m2crypto/distinfo
index 54e4916ef991..25c7e970d115 100644
--- a/security/py-m2crypto/distinfo
+++ b/security/py-m2crypto/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1698341079
-SHA256 (M2Crypto-0.40.1.tar.gz) = bbfd113ec55708c05816252a4f09e4237df4f3bbfc8171cbbc33057d257bbb30
-SIZE (M2Crypto-0.40.1.tar.gz) = 1266138
+TIMESTAMP = 1708449446
+SHA256 (M2Crypto-0.41.0.tar.gz) = 3a1358c7ee849046d91782a777f1786bf027a1c1d51b5faf8f19435bfc3f1495
+SIZE (M2Crypto-0.41.0.tar.gz) = 1151680
diff --git a/security/py-m2crypto/files/patch-setup.cfg b/security/py-m2crypto/files/patch-setup.cfg
new file mode 100644
index 000000000000..640129e18417
--- /dev/null
+++ b/security/py-m2crypto/files/patch-setup.cfg
@@ -0,0 +1,9 @@
+--- setup.cfg.orig	2024-02-13 22:13:53 UTC
++++ setup.cfg
+@@ -1,5 +1,5 @@
+ [metadata]
+-name = M2Crypto
++name = m2crypto
+ version = 0.41.0
+ author = Ng Pheng Siong
+ author_email = ngps@sandbox.rulemaker.net
diff --git a/security/py-m2crypto/files/patch-setup.py b/security/py-m2crypto/files/patch-setup.py
index c1bab3f7ee14..f2cd2f6482d3 100644
--- a/security/py-m2crypto/files/patch-setup.py
+++ b/security/py-m2crypto/files/patch-setup.py
@@ -1,8 +1,8 @@
---- setup.py.orig	2020-12-08 18:29:38 UTC
+--- setup.py.orig	2024-01-29 18:20:51 UTC
 +++ setup.py
-@@ -151,9 +151,6 @@ class _M2CryptoBuildExt(build_ext.build_ext):
-         if sys.version_info[:1] >= (3,):
-             self.swig_opts.append('-py3')
+@@ -132,9 +132,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()])
@@ -10,7 +10,7 @@
          log.debug('self.include_dirs = %s', self.include_dirs)
          log.debug('self.library_dirs = %s', self.library_dirs)
  
-@@ -186,6 +183,9 @@ class _M2CryptoBuildExt(build_ext.build_ext):
+@@ -169,6 +166,9 @@ class _M2CryptoBuildExt(build_ext.build_ext):
  
          self.swig_opts.extend(['-I%s' % i for i in self.include_dirs])
  
@@ -20,12 +20,12 @@
          # Some Linux distributor has added the following line in
          # /usr/include/openssl/opensslconf.h:
          #
-@@ -204,7 +204,7 @@ class _M2CryptoBuildExt(build_ext.build_ext):
+@@ -187,7 +187,7 @@ class _M2CryptoBuildExt(build_ext.build_ext):
              self.swig_opts.append(
                  '-I' + os.path.join(openssl_include_dir, 'openssl'))
  
 -        self.swig_opts.append('-includeall')
 +        #self.swig_opts.append('-includeall')
-         self.swig_opts.append('-modern')
          self.swig_opts.append('-builtin')
  
+         build_dir = os.path.join(self.build_lib, 'M2Crypto')