aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAric Belsito <lluixhi@gmail.com>2016-03-30 12:45:57 -0700
committerAric Belsito <lluixhi@gmail.com>2016-03-30 13:01:25 -0700
commit39e01123aeb21536085902d918360c2e1c22bc7d (patch)
tree6bac501280f7bb1681b4062f94971597d5b35fcd /dev-python
parentMerge pull request #138 from lluixhi/master (diff)
downloadlibressl-39e01123aeb21536085902d918360c2e1c22bc7d.tar.gz
libressl-39e01123aeb21536085902d918360c2e1c22bc7d.tar.bz2
libressl-39e01123aeb21536085902d918360c2e1c22bc7d.zip
Add cryptography. Patch already merged upstream.
Fixes #130.
Diffstat (limited to 'dev-python')
-rw-r--r--dev-python/cryptography/Manifest1
-rw-r--r--dev-python/cryptography/cryptography-1.3.ebuild50
-rw-r--r--dev-python/cryptography/files/cryptography-1.3-libressl.patch30
-rw-r--r--dev-python/cryptography/metadata.xml12
4 files changed, 93 insertions, 0 deletions
diff --git a/dev-python/cryptography/Manifest b/dev-python/cryptography/Manifest
new file mode 100644
index 0000000..fce21f0
--- /dev/null
+++ b/dev-python/cryptography/Manifest
@@ -0,0 +1 @@
+DIST cryptography-1.3.tar.gz 383651 SHA256 5dcc8d0ba790db6b36067c0db0fa9076de58bec5f9bc6d1c4f2fec8f06dcf0f4 SHA512 60753e5a222b169b01239ed79333cbb5eecc4ade66e53303c06ed413c2b964d1f76cfe40cabff9ca563c71626eec7302ef62e4bb1855bdc509af844684a23fcf WHIRLPOOL bcd53cb46e7644995455c65c3612b3831123c553240d555405682da3539247f76a50978f9af7d467c5701b0634f72e357cf8cd4d806a399bf13b0a881e8cea09
diff --git a/dev-python/cryptography/cryptography-1.3.ebuild b/dev-python/cryptography/cryptography-1.3.ebuild
new file mode 100644
index 0000000..aa9ac40
--- /dev/null
+++ b/dev-python/cryptography/cryptography-1.3.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+PYTHON_COMPAT=( python2_7 python3_{3,4,5} pypy )
+PYTHON_REQ_USE="threads(+)"
+
+inherit distutils-r1
+
+DESCRIPTION="Library providing cryptographic recipes and primitives"
+HOMEPAGE="https://github.com/pyca/cryptography/ https://pypi.python.org/pypi/cryptography/"
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+
+LICENSE="|| ( Apache-2.0 BSD )"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux"
+IUSE="libressl test"
+
+RDEPEND="
+ !libressl? ( dev-libs/openssl:0= )
+ libressl? ( dev-libs/libressl )
+ $(python_gen_cond_dep '>=dev-python/cffi-1.4.1:=[${PYTHON_USEDEP}]' 'python*')
+ $(python_gen_cond_dep 'dev-python/enum34[${PYTHON_USEDEP}]' python2_7 python3_3 pypy)
+ >=dev-python/idna-2.0[${PYTHON_USEDEP}]
+ >=dev-python/pyasn1-0.1.8[${PYTHON_USEDEP}]
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ >=dev-python/six-1.4.1[${PYTHON_USEDEP}]
+ $(python_gen_cond_dep '>=virtual/pypy-2.6.0' pypy )
+ virtual/python-ipaddress[${PYTHON_USEDEP}]
+ "
+DEPEND="${RDEPEND}
+ >=dev-python/setuptools-1.0[${PYTHON_USEDEP}]
+ test? (
+ ~dev-python/cryptography-vectors-${PV}[${PYTHON_USEDEP}]
+ dev-python/hypothesis[${PYTHON_USEDEP}]
+ dev-python/iso8601[${PYTHON_USEDEP}]
+ dev-python/pretend[${PYTHON_USEDEP}]
+ dev-python/pyasn1-modules[${PYTHON_USEDEP}]
+ dev-python/pytest[${PYTHON_USEDEP}]
+ )"
+
+DOCS=( AUTHORS.rst CONTRIBUTING.rst README.rst )
+
+PATCHES=( "${FILESDIR}/${P}-libressl.patch" )
+
+python_test() {
+ py.test -v -v -x || die "Tests fail with ${EPYTHON}"
+}
diff --git a/dev-python/cryptography/files/cryptography-1.3-libressl.patch b/dev-python/cryptography/files/cryptography-1.3-libressl.patch
new file mode 100644
index 0000000..e2a6e8b
--- /dev/null
+++ b/dev-python/cryptography/files/cryptography-1.3-libressl.patch
@@ -0,0 +1,30 @@
+From 1e88d741f6e15d9170466a08dfe85f28b12c7623 Mon Sep 17 00:00:00 2001
+From: Paul Kehrer <paul.l.kehrer@gmail.com>
+Date: Mon, 28 Mar 2016 22:00:00 -0400
+Subject: [PATCH] fix libressl breakage reported in #2858
+
+---
+ src/_cffi_src/build_openssl.py | 9 ++++++++-
+ 1 file changed, 8 insertions(+), 1 deletion(-)
+
+diff --git a/src/_cffi_src/build_openssl.py b/src/_cffi_src/build_openssl.py
+index 2ff28d7..3f92529 100644
+--- a/src/_cffi_src/build_openssl.py
++++ b/src/_cffi_src/build_openssl.py
+@@ -38,8 +38,15 @@ def _osx_libraries(build_static):
+
+
+ _PRE_INCLUDE = """
++#include <openssl/opensslv.h>
++/*
++ LibreSSL removed e_os2.h from the public headers so we'll only include it
++ if we're using vanilla OpenSSL.
++*/
++#if !defined(LIBRESSL_VERSION_NUMBER)
+ #include <openssl/e_os2.h>
+-#if defined(OPENSSL_SYS_WINDOWS)
++#endif
++#if defined(OPENSSL_SYS_WINDOWS) || defined(_WIN32)
+ #include <windows.h>
+ #endif
+ """
diff --git a/dev-python/cryptography/metadata.xml b/dev-python/cryptography/metadata.xml
new file mode 100644
index 0000000..2dfa57b
--- /dev/null
+++ b/dev-python/cryptography/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>python@gentoo.org</email>
+ <name>Python</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="pypi">cryptography</remote-id>
+ <remote-id type="github">pyca/cryptography</remote-id>
+ </upstream>
+</pkgmetadata>