diff options
author | Ruslan Makhmatkhanov <rm@FreeBSD.org> | 2012-10-17 08:03:42 +0000 |
---|---|---|
committer | Ruslan Makhmatkhanov <rm@FreeBSD.org> | 2012-10-17 08:03:42 +0000 |
commit | 8d11ec6917587dd8ffc26585b42d94fb2c5fcb64 (patch) | |
tree | 99cb895814bc4323dcb0540e5a2f6563708f8cc8 /security/py-pysha3 | |
parent | e33759adb407d90b1d0fbf217c30c9dba727e40b (diff) | |
download | ports-8d11ec6917587dd8ffc26585b42d94fb2c5fcb64.tar.gz ports-8d11ec6917587dd8ffc26585b42d94fb2c5fcb64.zip |
Notes
Diffstat (limited to 'security/py-pysha3')
-rw-r--r-- | security/py-pysha3/Makefile | 31 | ||||
-rw-r--r-- | security/py-pysha3/distinfo | 2 | ||||
-rw-r--r-- | security/py-pysha3/files/py3k-fix-pkg-plist.inc | 14 | ||||
-rw-r--r-- | security/py-pysha3/pkg-descr | 9 |
4 files changed, 56 insertions, 0 deletions
diff --git a/security/py-pysha3/Makefile b/security/py-pysha3/Makefile new file mode 100644 index 000000000000..f716b0f1268e --- /dev/null +++ b/security/py-pysha3/Makefile @@ -0,0 +1,31 @@ +# Created by: Kubilay Kocak <koobs.freebsd@gmail.com> +# $FreeBSD$ + +PORTNAME= pysha3 +PORTVERSION= 0.2.2 +CATEGORIES= security python +MASTER_SITES= CHEESESHOP +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} + +MAINTAINER= koobs.freebsd@gmail.com +COMMENT= SHA-3 (Keccak) for Python + +# Python3 ready +USE_PYTHON= yes +USE_PYDISTUTILS=yes + +PLIST_FILES= %%PYTHON_SITELIBDIR%%/_sha3.so \ + %%PYTHON_SITELIBDIR%%/sha3.py \ + %%PYTHON_SITELIBDIR%%/sha3.pyc \ + %%PYTHON_SITELIBDIR%%/sha3.pyo + +.include <bsd.port.pre.mk> + +.if ${PYTHON_REL} >= 320 +.include "${FILESDIR}/py3k-fix-pkg-plist.inc" +.endif + +regression-test: build + @cd ${WRKSRC} && ${PYTHON_CMD} ${PYSETUP} test + +.include <bsd.port.post.mk> diff --git a/security/py-pysha3/distinfo b/security/py-pysha3/distinfo new file mode 100644 index 000000000000..2ecc2bceaf6b --- /dev/null +++ b/security/py-pysha3/distinfo @@ -0,0 +1,2 @@ +SHA256 (pysha3-0.2.2.tar.gz) = afedc110ad816ec0d08feff62f5d674b9b90a4028209cbc93a3e362e9fd5a05c +SIZE (pysha3-0.2.2.tar.gz) = 46450 diff --git a/security/py-pysha3/files/py3k-fix-pkg-plist.inc b/security/py-pysha3/files/py3k-fix-pkg-plist.inc new file mode 100644 index 000000000000..93acb972e248 --- /dev/null +++ b/security/py-pysha3/files/py3k-fix-pkg-plist.inc @@ -0,0 +1,14 @@ +# When Python version is 3.2+ we rewrite all the filenames +# of TMPPLIST that end with .py[co], so that they conform +# to PEP 3147 (see http://www.python.org/dev/peps/pep-3147/) +PYMAGICTAG= ${PYTHON_CMD} -c 'import imp; print(imp.get_tag())' +add-plist-post: + @${AWK} '\ + /\.py[co]$$/ && !($$0 ~ "/" pc "/") {id = match($$0, /\/[^\/]+\.py[co]$$/); if (id != 0) {d = substr($$0, 1, RSTART - 1); dirs[d] = 1}; sub(/\.py[co]$$/, "." mt "&"); sub(/[^\/]+\.py[co]$$/, pc "/&"); print; next} \ + /^@dirrm / {d = substr($$0, 8); if (d in dirs) {print $$0 "/" pc}; print $$0; next} \ + {print} \ + END {if (sp in dirs) {print "@dirrm " sp "/" pc}} \ + ' \ + pc="__pycache__" mt="$$(${PYMAGICTAG})" sp="${PYTHON_SITELIBDIR:S,${PYTHONBASE}/,,g}" \ + ${TMPPLIST} > ${TMPPLIST}.pyc_tmp + @${MV} ${TMPPLIST}.pyc_tmp ${TMPPLIST} diff --git a/security/py-pysha3/pkg-descr b/security/py-pysha3/pkg-descr new file mode 100644 index 000000000000..2a264c71719f --- /dev/null +++ b/security/py-pysha3/pkg-descr @@ -0,0 +1,9 @@ +sha3 wrapper (keccak) for Python. The package is a wrapper around the +optimized reference implementation from http://keccak.noekeon.org/ . Only +the optimizations for 32 and 64bit platforms are used. The optimized SSE and +ARM assembly variants are ignored for now. + +The module is a standalone version of the SHA-3 implemention of Python 3.4 +(currently under development). + +WWW: http://bitbucket.org/tiran/pykeccak |