git: e742e9fc52dc - main - security/py-argon2-cffi-bindings: Add py-argon2-cffi-bindings 21.2.0

From: Po-Chuan Hsieh <sunpoet_at_FreeBSD.org>
Date: Fri, 13 May 2022 11:44:24 UTC
The branch main has been updated by sunpoet:

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

commit e742e9fc52dcc50a9d48bfd7c8689f6617c7471a
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2022-05-13 11:27:25 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2022-05-13 11:39:10 +0000

    security/py-argon2-cffi-bindings: Add py-argon2-cffi-bindings 21.2.0
    
    argon2-cffi-bindings provides low-level CFFI bindings to the Argon2 password
    hashing algorithm including a vendored version of them.
    
    WWW: https://github.com/hynek/argon2-cffi-bindings
---
 security/Makefile                          |  1 +
 security/py-argon2-cffi-bindings/Makefile  | 36 ++++++++++++++++++++++++++++++
 security/py-argon2-cffi-bindings/distinfo  |  3 +++
 security/py-argon2-cffi-bindings/pkg-descr |  4 ++++
 4 files changed, 44 insertions(+)

diff --git a/security/Makefile b/security/Makefile
index 0bbae56783c1..43213c26d58f 100644
--- a/security/Makefile
+++ b/security/Makefile
@@ -822,6 +822,7 @@
     SUBDIR += py-ailment
     SUBDIR += py-angr
     SUBDIR += py-argon2-cffi
+    SUBDIR += py-argon2-cffi-bindings
     SUBDIR += py-artifacts
     SUBDIR += py-asyncssh
     SUBDIR += py-authlib
diff --git a/security/py-argon2-cffi-bindings/Makefile b/security/py-argon2-cffi-bindings/Makefile
new file mode 100644
index 000000000000..97f9eab6f125
--- /dev/null
+++ b/security/py-argon2-cffi-bindings/Makefile
@@ -0,0 +1,36 @@
+# Created by: Po-Chuan Hsieh <sunpoet@FreeBSD.org>
+
+PORTNAME=	argon2-cffi-bindings
+PORTVERSION=	21.2.0
+CATEGORIES=	security python
+MASTER_SITES=	CHEESESHOP
+PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
+
+MAINTAINER=	sunpoet@FreeBSD.org
+COMMENT=	Low-level CFFI bindings for Argon2
+
+LICENSE=	MIT
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+BUILD_DEPENDS=	${PYTHON_PKGNAMEPREFIX}cffi>=1.0.1:devel/py-cffi@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}setuptools_scm>=6.2:devel/py-setuptools_scm@${PY_FLAVOR}
+LIB_DEPENDS=	libargon2.so:security/libargon2
+RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}cffi>=1.0.1:devel/py-cffi@${PY_FLAVOR}
+TEST_DEPENDS=	${PYTHON_PKGNAMEPREFIX}pytest>=0,1:devel/py-pytest@${PY_FLAVOR}
+
+USES=		localbase python:3.6+
+USE_PYTHON=	autoplist concurrent distutils
+
+MAKE_ENV=	ARGON2_CFFI_USE_SYSTEM=1
+
+post-patch:
+# Clean up bundled libraries
+	@${RM} -r ${WRKSRC}/extras/
+
+post-install:
+	${FIND} ${STAGEDIR}${PYTHON_SITELIBDIR} -name '*.so' -exec ${STRIP_CMD} {} +
+
+do-test:
+	cd ${WRKSRC} && ${SETENV} PYTHONPATH=${STAGEDIR}${PYTHON_SITELIBDIR} ${PYTHON_CMD} -m pytest -rs -v
+
+.include <bsd.port.mk>
diff --git a/security/py-argon2-cffi-bindings/distinfo b/security/py-argon2-cffi-bindings/distinfo
new file mode 100644
index 000000000000..e8e1573db616
--- /dev/null
+++ b/security/py-argon2-cffi-bindings/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1652122533
+SHA256 (argon2-cffi-bindings-21.2.0.tar.gz) = bb89ceffa6c791807d1305ceb77dbfacc5aa499891d2c55661c6459651fc39e3
+SIZE (argon2-cffi-bindings-21.2.0.tar.gz) = 1779911
diff --git a/security/py-argon2-cffi-bindings/pkg-descr b/security/py-argon2-cffi-bindings/pkg-descr
new file mode 100644
index 000000000000..8ebdf73c3aa5
--- /dev/null
+++ b/security/py-argon2-cffi-bindings/pkg-descr
@@ -0,0 +1,4 @@
+argon2-cffi-bindings provides low-level CFFI bindings to the Argon2 password
+hashing algorithm including a vendored version of them.
+
+WWW: https://github.com/hynek/argon2-cffi-bindings