diff options
author | Steve Wills <swills@FreeBSD.org> | 2019-01-06 04:34:29 +0000 |
---|---|---|
committer | Steve Wills <swills@FreeBSD.org> | 2019-01-06 04:34:29 +0000 |
commit | d285969060ee7ba95a4ecc2c3f3bbaa4b8e9368a (patch) | |
tree | 8bb6f50bf12236f9f32801ade614e820b9f2a055 /security/py-ed25519ll | |
parent | a5ca98a66a0cfd73b49ceed1fa94cd56a3f3487e (diff) | |
download | ports-d285969060ee7ba95a4ecc2c3f3bbaa4b8e9368a.tar.gz ports-d285969060ee7ba95a4ecc2c3f3bbaa4b8e9368a.zip |
security/py-ed25519ll: update to support py3 and flavours
PR: 224582
Submitted by: Shane <FreeBSD@ShaneWare.Biz>
Approved by: maintainer timeout (nivit, >1 year)
Notes
Notes:
svn path=/head/; revision=489438
Diffstat (limited to 'security/py-ed25519ll')
-rw-r--r-- | security/py-ed25519ll/Makefile | 16 | ||||
-rw-r--r-- | security/py-ed25519ll/distinfo | 5 | ||||
-rw-r--r-- | security/py-ed25519ll/files/patch-ed25519ll_djbec.py | 15 |
3 files changed, 31 insertions, 5 deletions
diff --git a/security/py-ed25519ll/Makefile b/security/py-ed25519ll/Makefile index 5bd2f731dc3b..11b99cdc9a01 100644 --- a/security/py-ed25519ll/Makefile +++ b/security/py-ed25519ll/Makefile @@ -3,17 +3,27 @@ PORTNAME= ed25519ll PORTVERSION= 0.6 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= security -MASTER_SITES= CHEESESHOP +#MASTER_SITES= CHEESESHOP +# bitbucket master contains py3 fixes made after last tagged release +MASTER_SITES= https://bitbucket.org/dholth/${PORTNAME}/get/ PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} +DISTNAME= 37719c56b7b6 MAINTAINER= nivit@FreeBSD.org COMMENT= Low-level ctypes wrapper for Ed25519 digital signatures LICENSE= MIT +TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}nose>=0:devel/py-nose@${FLAVOR} + USES= python -USE_PYTHON= distutils autoplist +USE_PYTHON= autoplist distutils flavors + +WRKSRC= ${WRKDIR}/dholth-${PORTNAME}-${DISTNAME} + +do-test: + cd ${WRKSRC} && ${PYTHON_CMD} ${PYSETUP} test .include <bsd.port.mk> diff --git a/security/py-ed25519ll/distinfo b/security/py-ed25519ll/distinfo index 0b64d1b31b74..ad352ed8cac0 100644 --- a/security/py-ed25519ll/distinfo +++ b/security/py-ed25519ll/distinfo @@ -1,2 +1,3 @@ -SHA256 (ed25519ll-0.6.tar.gz) = 7b75b7e6f4c7e7c172229aa78b13436ca9834ef5893598b49c7163d7ba55adf9 -SIZE (ed25519ll-0.6.tar.gz) = 74782 +TIMESTAMP = 1514161132 +SHA256 (37719c56b7b6.tar.gz) = e701e82bd2352c6a947e7b28469ca4491e8924285e730bfff44e18fc6e90a2a8 +SIZE (37719c56b7b6.tar.gz) = 113875 diff --git a/security/py-ed25519ll/files/patch-ed25519ll_djbec.py b/security/py-ed25519ll/files/patch-ed25519ll_djbec.py new file mode 100644 index 000000000000..83ddc881e359 --- /dev/null +++ b/security/py-ed25519ll/files/patch-ed25519ll_djbec.py @@ -0,0 +1,15 @@ +--- ed25519ll/djbec.py.orig 2017-12-25 20:10:10 UTC ++++ ed25519ll/djbec.py +@@ -36,10 +36,8 @@ def H(m): + return hashlib.sha512(m).digest() + + def expmod(b, e, m): +- if e == 0: return 1 +- t = expmod(b, e // 2, m) ** 2 % m +- if e & 1: t = (t * b) % m +- return t ++ # the built-in pow is much faster ++ return pow(b,e,m) + + # Can probably get some extra speedup here by replacing this with + # an extended-euclidean, but performance seems OK without that |