aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAric Belsito <lluixhi@gmail.com>2017-02-01 13:43:34 -0800
committerAric Belsito <lluixhi@gmail.com>2017-02-01 13:43:34 -0800
commita13c5bb7bfa22aaaf5313fae22dd724ab072113e (patch)
treed80503788e50d1ca32d16d03c147c1826883e54e /dev-python
parentMerge pull request #187 from csmk/apache (diff)
downloadlibressl-a13c5bb7bfa22aaaf5313fae22dd724ab072113e.tar.gz
libressl-a13c5bb7bfa22aaaf5313fae22dd724ab072113e.tar.bz2
libressl-a13c5bb7bfa22aaaf5313fae22dd724ab072113e.zip
dev-python/cryptography: Add 1.7.1
1.7.1 is broken with LibreSSL 2.5.1 because 2.5.1 adds some OpenSSL 1.0.2 symbols. Unfortunately, those symbols don't actually do anything, so the patch just prevents a build-time error instead of enabling new functionality.
Diffstat (limited to 'dev-python')
-rw-r--r--dev-python/cryptography/Manifest1
-rw-r--r--dev-python/cryptography/cryptography-1.3.1.ebuild4
-rw-r--r--dev-python/cryptography/cryptography-1.7.1.ebuild53
-rw-r--r--dev-python/cryptography/files/cryptography-1.7.1-libressl251.patch17
4 files changed, 73 insertions, 2 deletions
diff --git a/dev-python/cryptography/Manifest b/dev-python/cryptography/Manifest
index acaf339..0f5af40 100644
--- a/dev-python/cryptography/Manifest
+++ b/dev-python/cryptography/Manifest
@@ -1 +1,2 @@
DIST cryptography-1.3.1.tar.gz 383852 SHA256 b4b36175e0f95ddc88435c26dbe3397edce48e2ff5fe41d504cdb3beddcd53e2 SHA512 8b833619d0aec5e6630c8e069e886f6b708b0b3a4f4ca4e37797a24c69be4cacf162f20c068deaecc3222ee0323583582d384e49fa3dbaeaeefc0d7d8c92918a WHIRLPOOL f9e7c75e910699afdf4adc4fb7257135b97c357c967bbca95f332e1f2ed262716ebba6a648427f86a524e75f6ac46aea7f891fe42100c9d7cf8ffcc317fb7905
+DIST cryptography-1.7.1.tar.gz 420673 SHA256 953fef7d40a49a795f4d955c5ce4338abcec5dea822ed0414ed30348303fdb4c SHA512 fb88b0ee9e314526fcdbb6d35da409b7335c7408a69d2350c58379471d2b9d76021010955629cf776d26312f22d4f8aa3f135955a19dfbff9d602176c9bbfd40 WHIRLPOOL 24b705889b95b568000600662ec82e3f5571582525db3571f3285b99f985b0a21eefd14dccc577700bc082891f7d3c563ac78a8bfd8d810da3ff38914ae5a86d
diff --git a/dev-python/cryptography/cryptography-1.3.1.ebuild b/dev-python/cryptography/cryptography-1.3.1.ebuild
index d8260c4..15c6f5c 100644
--- a/dev-python/cryptography/cryptography-1.3.1.ebuild
+++ b/dev-python/cryptography/cryptography-1.3.1.ebuild
@@ -4,7 +4,7 @@
EAPI="5"
-PYTHON_COMPAT=( python2_7 python3_{3,4,5} pypy )
+PYTHON_COMPAT=( python2_7 python3_{4,5} pypy )
PYTHON_REQ_USE="threads(+)"
inherit distutils-r1
@@ -15,7 +15,7 @@ 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"
+KEYWORDS="alpha amd64 arm arm64 ~hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-linux ~x86-linux"
IUSE="libressl test"
RDEPEND="
diff --git a/dev-python/cryptography/cryptography-1.7.1.ebuild b/dev-python/cryptography/cryptography-1.7.1.ebuild
new file mode 100644
index 0000000..5efffcc
--- /dev/null
+++ b/dev-python/cryptography/cryptography-1.7.1.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 python3_{4,5} pypy{,3} )
+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{,3})
+ >=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-2.9.0[${PYTHON_USEDEP}]
+ dev-python/pytz[${PYTHON_USEDEP}]
+ )"
+
+DOCS=( AUTHORS.rst CONTRIBUTING.rst README.rst )
+
+PATCHES=( "${FILESDIR}"/${P}-libressl251.patch )
+
+python_test() {
+ distutils_install_for_testing
+
+ py.test -v -v -x || die "Tests fail with ${EPYTHON}"
+}
diff --git a/dev-python/cryptography/files/cryptography-1.7.1-libressl251.patch b/dev-python/cryptography/files/cryptography-1.7.1-libressl251.patch
new file mode 100644
index 0000000..a23ed76
--- /dev/null
+++ b/dev-python/cryptography/files/cryptography-1.7.1-libressl251.patch
@@ -0,0 +1,17 @@
+diff -Naur cryptography-1.7.1.orig/src/_cffi_src/openssl/x509_vfy.py cryptography-1.7.1/src/_cffi_src/openssl/x509_vfy.py
+--- cryptography-1.7.1.orig/src/_cffi_src/openssl/x509_vfy.py 2017-02-01 12:29:59.080728417 -0800
++++ cryptography-1.7.1/src/_cffi_src/openssl/x509_vfy.py 2017-02-01 12:31:48.017895844 -0800
+@@ -221,10 +221,13 @@
+ static const long X509_V_ERR_SUITE_B_INVALID_SIGNATURE_ALGORITHM = 0;
+ static const long X509_V_ERR_SUITE_B_LOS_NOT_ALLOWED = 0;
+ static const long X509_V_ERR_SUITE_B_CANNOT_SIGN_P_384_WITH_P_256 = 0;
++#if !CRYPTOGRAPHY_OPENSSL_102BETA2_OR_GREATER || \
++ (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x2050100fL)
+ static const long X509_V_ERR_HOSTNAME_MISMATCH = 0;
+ static const long X509_V_ERR_EMAIL_MISMATCH = 0;
+ static const long X509_V_ERR_IP_ADDRESS_MISMATCH = 0;
++#endif
+ #endif
+
+ /* OpenSSL 1.0.2beta2+ verification parameters */
+ #if CRYPTOGRAPHY_OPENSSL_102BETA2_OR_GREATER && \