summaryrefslogtreecommitdiff
path: root/security
diff options
context:
space:
mode:
authornia <nia@pkgsrc.org>2022-10-19 13:37:21 +0000
committernia <nia@pkgsrc.org>2022-10-19 13:37:21 +0000
commit1925896895b34e48b044b51e998d91dbf249e781 (patch)
tree34e67f768f58909df10e16b66b295ae00318bb15 /security
parentd92aeed721e978c11bad66c346249f1f16a2a9e9 (diff)
downloadpkgsrc-1925896895b34e48b044b51e998d91dbf249e781.tar.gz
python: Special handling of py-cryptography for versioned_dependencies.mk
Diffstat (limited to 'security')
-rw-r--r--security/py-cryptography/dependency.mk40
1 files changed, 40 insertions, 0 deletions
diff --git a/security/py-cryptography/dependency.mk b/security/py-cryptography/dependency.mk
new file mode 100644
index 00000000000..5d0236900db
--- /dev/null
+++ b/security/py-cryptography/dependency.mk
@@ -0,0 +1,40 @@
+# $NetBSD: dependency.mk,v 1.1 2022/10/19 13:37:21 nia Exp $
+#
+# Not for public use - use through versioned_dependencies.mk.
+#
+# User-settable variables:
+#
+# PYCRYPTOGRAPHY_TYPE
+# Type of py-cryptography implementation used.
+#
+# Possible values: c rust
+# Default: rust on platforms were Rust is supported
+#
+
+.include "../../mk/bsd.fast.prefs.mk"
+
+.include "../../lang/rust/platform.mk"
+.if ${PLATFORM_SUPPORTS_RUST:tl} == "yes" && empty(_PYTHON_VERSION:M2*)
+PYCRYPTOGRAPHY_TYPE?= rust
+.else
+PYCRYPTOGRAPHY_TYPE?= c
+.endif
+
+.include "../../lang/python/pyversion.mk"
+.if ${PYCRYPTOGRAPHY_TYPE:tl} == "rust"
+PYCRYPTOGRAPHY_VERSION?= cryptography>=0
+PYCRYPTOGRAPHY_DIR?= security/py-cryptography
+.else
+PYCRYPTOGRAPHY_VERSION?= cryptography>=0<3.4
+PYCRYPTOGRAPHY_DIR?= security/py27-cryptography
+.endif
+
+.if "${type}" == ":build"
+BUILD_DEPENDS:= ${BUILD_DEPENDS} ${PYPKGPREFIX}-${PYCRYPTOGRAPHY_VERSION}:../../${PYCRYPTOGRAPHY_DIR}
+.elif "${type}" == ":test"
+TEST_DEPENDS:= ${TEST_DEPENDS} ${PYPKGPREFIX}-${PYCRYPTOGRAPHY_VERSION}:../../${PYCRYPTOGRAPHY_DIR}
+.elif "${type}" == ":tool"
+TOOL_DEPENDS:= ${TOOL_DEPENDS} ${PYPKGPREFIX}-${PYCRYPTOGRAPHY_VERSION}:../../${PYCRYPTOGRAPHY_DIR}
+.else
+DEPENDS:= ${DEPENDS} ${PYPKGPREFIX}-${PYCRYPTOGRAPHY_VERSION}:../../${PYCRYPTOGRAPHY_DIR}
+.endif