diff options
author | adam <adam@pkgsrc.org> | 2018-03-08 08:13:03 +0000 |
---|---|---|
committer | adam <adam@pkgsrc.org> | 2018-03-08 08:13:03 +0000 |
commit | c9234689eccc11f4dca69c6b40404fe5e3e8b55c (patch) | |
tree | b109c84f34ec11573afeaf8ccca6d257828b96bb /security | |
parent | 2df0dbc432c8d20154fde417c8a4134c3a46a58c (diff) | |
download | pkgsrc-c9234689eccc11f4dca69c6b40404fe5e3e8b55c.tar.gz |
py-libnacl: added version 1.6.1
This library is used to gain direct access to the functions exposed by Daniel
J. Bernstein's nacl library via libsodium. It has been constructed to maintain
extensive documentation on how to use nacl as well as being completely
portable. The file in libnacl/__init__.py can be pulled out and placed directly
in any project to give a single file binding to all of nacl.
Diffstat (limited to 'security')
-rw-r--r-- | security/Makefile | 3 | ||||
-rw-r--r-- | security/py-libnacl/DESCR | 5 | ||||
-rw-r--r-- | security/py-libnacl/Makefile | 23 | ||||
-rw-r--r-- | security/py-libnacl/PLIST | 41 | ||||
-rw-r--r-- | security/py-libnacl/distinfo | 7 | ||||
-rw-r--r-- | security/py-libnacl/patches/patch-libnacl_____init____.py | 26 |
6 files changed, 104 insertions, 1 deletions
diff --git a/security/Makefile b/security/Makefile index 36e893bd434..8db9bba2b31 100644 --- a/security/Makefile +++ b/security/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.671 2018/02/20 14:08:29 fhajny Exp $ +# $NetBSD: Makefile,v 1.672 2018/03/08 08:13:03 adam Exp $ # COMMENT= Security tools @@ -417,6 +417,7 @@ SUBDIR+= py-kerberos SUBDIR+= py-keyring SUBDIR+= py-keyrings.alt SUBDIR+= py-lasso +SUBDIR+= py-libnacl SUBDIR+= py-libtaxii SUBDIR+= py-m2crypto SUBDIR+= py-mcrypt diff --git a/security/py-libnacl/DESCR b/security/py-libnacl/DESCR new file mode 100644 index 00000000000..c35441d8451 --- /dev/null +++ b/security/py-libnacl/DESCR @@ -0,0 +1,5 @@ +This library is used to gain direct access to the functions exposed by Daniel +J. Bernstein's nacl library via libsodium. It has been constructed to maintain +extensive documentation on how to use nacl as well as being completely +portable. The file in libnacl/__init__.py can be pulled out and placed directly +in any project to give a single file binding to all of nacl. diff --git a/security/py-libnacl/Makefile b/security/py-libnacl/Makefile new file mode 100644 index 00000000000..ed7e3e16632 --- /dev/null +++ b/security/py-libnacl/Makefile @@ -0,0 +1,23 @@ +# $NetBSD: Makefile,v 1.1 2018/03/08 08:13:03 adam Exp $ + +DISTNAME= libnacl-1.6.1 +PKGNAME= ${PYPKGPREFIX}-${DISTNAME} +CATEGORIES= security python +MASTER_SITES= ${MASTER_SITE_PYPI:=l/libnacl/} + +MAINTAINER= pkgsrc-users@NetBSD.org +HOMEPAGE= https://github.com/saltstack/libnacl +COMMENT= Python bindings for libsodium based on ctypes +LICENSE= apache-2.0 + +USE_LANGUAGES= # none + +SUBST_CLASSES+= prefix +SUBST_STAGE.prefix= pre-configure +SUBST_MESSAGE.prefix= Setting PREFIX. +SUBST_FILES.prefix= libnacl/__init__.py +SUBST_VARS.prefix= PREFIX + +.include "../../security/libsodium/buildlink3.mk" +.include "../../lang/python/egg.mk" +.include "../../mk/bsd.pkg.mk" diff --git a/security/py-libnacl/PLIST b/security/py-libnacl/PLIST new file mode 100644 index 00000000000..df05fd79ed9 --- /dev/null +++ b/security/py-libnacl/PLIST @@ -0,0 +1,41 @@ +@comment $NetBSD: PLIST,v 1.1 2018/03/08 08:13:03 adam Exp $ +${PYSITELIB}/${EGG_INFODIR}/PKG-INFO +${PYSITELIB}/${EGG_INFODIR}/SOURCES.txt +${PYSITELIB}/${EGG_INFODIR}/dependency_links.txt +${PYSITELIB}/${EGG_INFODIR}/top_level.txt +${PYSITELIB}/libnacl/__init__.py +${PYSITELIB}/libnacl/__init__.pyc +${PYSITELIB}/libnacl/__init__.pyo +${PYSITELIB}/libnacl/aead.py +${PYSITELIB}/libnacl/aead.pyc +${PYSITELIB}/libnacl/aead.pyo +${PYSITELIB}/libnacl/base.py +${PYSITELIB}/libnacl/base.pyc +${PYSITELIB}/libnacl/base.pyo +${PYSITELIB}/libnacl/blake.py +${PYSITELIB}/libnacl/blake.pyc +${PYSITELIB}/libnacl/blake.pyo +${PYSITELIB}/libnacl/dual.py +${PYSITELIB}/libnacl/dual.pyc +${PYSITELIB}/libnacl/dual.pyo +${PYSITELIB}/libnacl/encode.py +${PYSITELIB}/libnacl/encode.pyc +${PYSITELIB}/libnacl/encode.pyo +${PYSITELIB}/libnacl/public.py +${PYSITELIB}/libnacl/public.pyc +${PYSITELIB}/libnacl/public.pyo +${PYSITELIB}/libnacl/sealed.py +${PYSITELIB}/libnacl/sealed.pyc +${PYSITELIB}/libnacl/sealed.pyo +${PYSITELIB}/libnacl/secret.py +${PYSITELIB}/libnacl/secret.pyc +${PYSITELIB}/libnacl/secret.pyo +${PYSITELIB}/libnacl/sign.py +${PYSITELIB}/libnacl/sign.pyc +${PYSITELIB}/libnacl/sign.pyo +${PYSITELIB}/libnacl/utils.py +${PYSITELIB}/libnacl/utils.pyc +${PYSITELIB}/libnacl/utils.pyo +${PYSITELIB}/libnacl/version.py +${PYSITELIB}/libnacl/version.pyc +${PYSITELIB}/libnacl/version.pyo diff --git a/security/py-libnacl/distinfo b/security/py-libnacl/distinfo new file mode 100644 index 00000000000..398883e78ff --- /dev/null +++ b/security/py-libnacl/distinfo @@ -0,0 +1,7 @@ +$NetBSD: distinfo,v 1.1 2018/03/08 08:13:03 adam Exp $ + +SHA1 (libnacl-1.6.1.tar.gz) = cdd7336110af0d7a2951c2b0a298f88f8c6dcaf5 +RMD160 (libnacl-1.6.1.tar.gz) = 5b5743ef2a48026aff7bf153b17c2f61af8a19d9 +SHA512 (libnacl-1.6.1.tar.gz) = 167029675fc81758e105821c835b840be55daefa26e59987413091f54927bb390015ac054809d5be142554a8fc1b8a82a76148bceed4a7ddcc3cb93569f56811 +Size (libnacl-1.6.1.tar.gz) = 65443 bytes +SHA1 (patch-libnacl_____init____.py) = 7ef54e0fe6535738c2d20077779aab6a88267ba0 diff --git a/security/py-libnacl/patches/patch-libnacl_____init____.py b/security/py-libnacl/patches/patch-libnacl_____init____.py new file mode 100644 index 00000000000..08b4b46ef5a --- /dev/null +++ b/security/py-libnacl/patches/patch-libnacl_____init____.py @@ -0,0 +1,26 @@ +$NetBSD: patch-libnacl_____init____.py,v 1.1 2018/03/08 08:13:04 adam Exp $ + +Use correct path to load libsodium. + +--- libnacl/__init__.py.orig 2018-03-06 14:26:45.000000000 +0000 ++++ libnacl/__init__.py +@@ -38,6 +38,10 @@ def _get_nacl(): + except OSError: + pass + try: ++ return ctypes.cdll.LoadLibrary('@PREFIX@/lib/libsodium.dylib') ++ except OSError: ++ pass ++ try: + libidx = __file__.find('lib') + if libidx > 0: + libpath = __file__[0:libidx+3] + '/libsodium.dylib' +@@ -51,7 +55,7 @@ def _get_nacl(): + except OSError: + pass + try: +- return ctypes.cdll.LoadLibrary('/usr/local/lib/libsodium.so') ++ return ctypes.cdll.LoadLibrary('@PREFIX@/lib/libsodium.so') + except OSError: + pass + try: |