summaryrefslogtreecommitdiff
path: root/dev-python/pycryptodome
diff options
context:
space:
mode:
authorPalica <palica+gitlab@liguros.net>2020-06-23 22:35:08 +0200
committerPalica <palica+gitlab@liguros.net>2020-06-23 22:35:08 +0200
commitecdac123787b96ce6649f0f91da12ea6458cc2b1 (patch)
treeb89c74d9e6fe6e8aebc4c77bcbeb4ab73214127d /dev-python/pycryptodome
parent1be72aa41cf41dedadeecf59dca9f01de6381f5e (diff)
downloadbaldeagleos-repo-ecdac123787b96ce6649f0f91da12ea6458cc2b1.tar.gz
baldeagleos-repo-ecdac123787b96ce6649f0f91da12ea6458cc2b1.tar.xz
baldeagleos-repo-ecdac123787b96ce6649f0f91da12ea6458cc2b1.zip
Updating liguros repo
Diffstat (limited to 'dev-python/pycryptodome')
-rw-r--r--dev-python/pycryptodome/Manifest2
-rw-r--r--dev-python/pycryptodome/files/pycryptodome-3.9.4-parallel-make.patch22
-rw-r--r--dev-python/pycryptodome/files/pycryptodome-3.9.4-tests.patch48
-rw-r--r--dev-python/pycryptodome/metadata.xml12
-rw-r--r--dev-python/pycryptodome/pycryptodome-3.9.4.ebuild46
-rw-r--r--dev-python/pycryptodome/pycryptodome-3.9.7.ebuild41
6 files changed, 171 insertions, 0 deletions
diff --git a/dev-python/pycryptodome/Manifest b/dev-python/pycryptodome/Manifest
new file mode 100644
index 000000000000..23f5c70077db
--- /dev/null
+++ b/dev-python/pycryptodome/Manifest
@@ -0,0 +1,2 @@
+DIST pycryptodome-3.9.4.tar.gz 11575825 BLAKE2B c153fe71179d633a5722480c4c42cc133100f524a8ba9d3cd9380b7e172564c276b70b97ef36437fa3a149c418903802f410c9d1807d5d72345dffb0aa568223 SHA512 d99e4e431d77856ce3ae33526984cadf2fa6aa82b1f692a2ad0ae893f6a1e9538e6d71d281578e6bd733a816664d1683364c64441196cbc6ee1278f9d6eac62c
+DIST pycryptodome-3.9.7.tar.gz 15451558 BLAKE2B dca2cf3500d4011b8c37937c3f844db3e8e4afbec2c421552bcdc08df32ae46d8a2dadfaa2d48aac2356374f30154d439cb9e988e1035c570b0adebc58b259e1 SHA512 2ee8ec1094ca2b3813c25b96c71988db479b23ea2e76937275d0fd6421653efd1ce7a1e279c7a20a9de7edcb59e0927121a42112b85afc052edcd6ab2db74c26
diff --git a/dev-python/pycryptodome/files/pycryptodome-3.9.4-parallel-make.patch b/dev-python/pycryptodome/files/pycryptodome-3.9.4-parallel-make.patch
new file mode 100644
index 000000000000..331333533f10
--- /dev/null
+++ b/dev-python/pycryptodome/files/pycryptodome-3.9.4-parallel-make.patch
@@ -0,0 +1,22 @@
+diff --git a/setup.py b/setup.py
+index 1d70caad..c72f64ff 100644
+--- a/setup.py
++++ b/setup.py
+@@ -364,7 +364,7 @@ ext_modules = [
+ Extension("Crypto.Cipher._raw_eksblowfish",
+ include_dirs=['src/'],
+ define_macros=[('EKS',None),],
+- sources=["src/blowfish.c"]),
++ sources=["src/blowfish_eks.c"]),
+ Extension("Crypto.Cipher._raw_cast",
+ include_dirs=['src/'],
+ sources=["src/CAST.c"]),
+@@ -427,7 +427,7 @@ ext_modules = [
+ # Math
+ Extension("Crypto.Math._modexp",
+ include_dirs=['src/'],
+- sources=['src/modexp.c', 'src/siphash.c', 'src/modexp_utils.c', 'src/mont.c'],
++ sources=['src/modexp.c', 'src/siphash.c', 'src/modexp_utils.c', 'src/mont_math.c'],
+ ),
+ ]
+
diff --git a/dev-python/pycryptodome/files/pycryptodome-3.9.4-tests.patch b/dev-python/pycryptodome/files/pycryptodome-3.9.4-tests.patch
new file mode 100644
index 000000000000..2cfcaec127de
--- /dev/null
+++ b/dev-python/pycryptodome/files/pycryptodome-3.9.4-tests.patch
@@ -0,0 +1,48 @@
+diff --git a/lib/Crypto/SelfTest/Cipher/test_ChaCha20_Poly1305.py b/lib/Crypto/SelfTest/Cipher/test_ChaCha20_Poly1305.py
+index a2109891..44d2e532 100644
+--- a/lib/Crypto/SelfTest/Cipher/test_ChaCha20_Poly1305.py
++++ b/lib/Crypto/SelfTest/Cipher/test_ChaCha20_Poly1305.py
+@@ -626,6 +626,7 @@ class TestVectorsWycheproof(unittest.TestCase):
+ def __init__(self, wycheproof_warnings):
+ unittest.TestCase.__init__(self)
+ self._wycheproof_warnings = wycheproof_warnings
++ self._id = "None"
+
+ def setUp(self):
+ comps = "Crypto.SelfTest.Cipher.test_vectors.wycheproof".split(".")
+diff --git a/lib/Crypto/SelfTest/Cipher/test_EAX.py b/lib/Crypto/SelfTest/Cipher/test_EAX.py
+index cdd0e85a..546186d1 100644
+--- a/lib/Crypto/SelfTest/Cipher/test_EAX.py
++++ b/lib/Crypto/SelfTest/Cipher/test_EAX.py
+@@ -656,6 +656,7 @@ class TestVectorsWycheproof(unittest.TestCase):
+ def __init__(self, wycheproof_warnings):
+ unittest.TestCase.__init__(self)
+ self._wycheproof_warnings = wycheproof_warnings
++ self._id = "None"
+
+ def setUp(self):
+ comps = "Crypto.SelfTest.Cipher.test_vectors.wycheproof".split(".")
+diff --git a/lib/Crypto/SelfTest/Cipher/test_GCM.py b/lib/Crypto/SelfTest/Cipher/test_GCM.py
+index e3a7a3da..71ea0d18 100644
+--- a/lib/Crypto/SelfTest/Cipher/test_GCM.py
++++ b/lib/Crypto/SelfTest/Cipher/test_GCM.py
+@@ -828,6 +828,7 @@ class TestVectorsWycheproof(unittest.TestCase):
+ unittest.TestCase.__init__(self)
+ self._wycheproof_warnings = wycheproof_warnings
+ self._extra_params = extra_params
++ self._id = "None"
+
+ def setUp(self):
+ comps = "Crypto.SelfTest.Cipher.test_vectors.wycheproof".split(".")
+diff --git a/lib/Crypto/SelfTest/Cipher/test_SIV.py b/lib/Crypto/SelfTest/Cipher/test_SIV.py
+index 38341e14..ab588adc 100644
+--- a/lib/Crypto/SelfTest/Cipher/test_SIV.py
++++ b/lib/Crypto/SelfTest/Cipher/test_SIV.py
+@@ -456,6 +456,7 @@ class TestVectorsWycheproof(unittest.TestCase):
+
+ def __init__(self):
+ unittest.TestCase.__init__(self)
++ self._id = "None"
+
+ def setUp(self):
+ comps = "Crypto.SelfTest.Cipher.test_vectors.wycheproof".split(".")
diff --git a/dev-python/pycryptodome/metadata.xml b/dev-python/pycryptodome/metadata.xml
new file mode 100644
index 000000000000..bf3bc891b8ec
--- /dev/null
+++ b/dev-python/pycryptodome/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 project</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">Legrandin/pycryptodome</remote-id>
+ </upstream>
+ <origin>gentoo-staging</origin>
+</pkgmetadata>
diff --git a/dev-python/pycryptodome/pycryptodome-3.9.4.ebuild b/dev-python/pycryptodome/pycryptodome-3.9.4.ebuild
new file mode 100644
index 000000000000..9f5c1a64a108
--- /dev/null
+++ b/dev-python/pycryptodome/pycryptodome-3.9.4.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python2_7 python3_{6,7,8} pypy3 )
+PYTHON_REQ_USE="threads(+)"
+
+inherit distutils-r1
+
+DESCRIPTION="A self-contained cryptographic library for Python"
+HOMEPAGE="https://www.pycryptodome.org https://github.com/Legrandin/pycryptodome https://pypi.org/project/pycryptodome/"
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+
+LICENSE="BSD-2 Unlicense"
+SLOT="0"
+KEYWORDS="~alpha amd64 arm ~arm64 hppa ~ia64 ~mips ppc ppc64 s390 sparc x86 ~ppc-aix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE=""
+
+RDEPEND="dev-libs/gmp:0
+ virtual/python-cffi[${PYTHON_USEDEP}]
+ !dev-python/pycrypto"
+BDEPEND="${RDEPEND}
+ dev-python/setuptools[${PYTHON_USEDEP}]"
+
+PATCHES=(
+ "${FILESDIR}/pycryptodome-3.9.4-parallel-make.patch"
+ # https://github.com/Legrandin/pycryptodome/pull/351
+ "${FILESDIR}/pycryptodome-3.9.4-tests.patch"
+)
+
+python_prepare_all() {
+ # parallel make fixes
+ # Multiple targets were compiling the same file, setuptools doesn't
+ # understand this and you get race conditions where a file gets
+ # overwritten while it's linking. This makes the files look like separate
+ # files so this race won't happen
+ ln src/blowfish.c src/blowfish_eks.c || die
+ ln src/mont.c src/mont_math.c || die
+
+ distutils-r1_python_prepare_all
+}
+
+python_test() {
+ esetup.py test -vv
+}
diff --git a/dev-python/pycryptodome/pycryptodome-3.9.7.ebuild b/dev-python/pycryptodome/pycryptodome-3.9.7.ebuild
new file mode 100644
index 000000000000..43e92f7ffb38
--- /dev/null
+++ b/dev-python/pycryptodome/pycryptodome-3.9.7.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python2_7 python3_{6,7,8,9} pypy3 )
+PYTHON_REQ_USE="threads(+)"
+
+inherit distutils-r1
+
+DESCRIPTION="A self-contained cryptographic library for Python"
+HOMEPAGE="https://www.pycryptodome.org https://github.com/Legrandin/pycryptodome https://pypi.org/project/pycryptodome/"
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+
+LICENSE="BSD-2 Unlicense"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~ppc-aix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE=""
+
+RDEPEND="dev-libs/gmp:0
+ virtual/python-cffi[${PYTHON_USEDEP}]
+ !dev-python/pycrypto"
+BDEPEND="${RDEPEND}"
+
+PATCHES=(
+ "${FILESDIR}/pycryptodome-3.9.4-parallel-make.patch"
+)
+
+distutils_enable_tests setup.py
+
+python_prepare_all() {
+ # parallel make fixes
+ # Multiple targets were compiling the same file, setuptools doesn't
+ # understand this and you get race conditions where a file gets
+ # overwritten while it's linking. This makes the files look like separate
+ # files so this race won't happen
+ ln src/blowfish.c src/blowfish_eks.c || die
+ ln src/mont.c src/mont_math.c || die
+
+ distutils-r1_python_prepare_all
+}