summaryrefslogtreecommitdiff
path: root/dev-python/pycryptodome
diff options
context:
space:
mode:
Diffstat (limited to 'dev-python/pycryptodome')
-rw-r--r--dev-python/pycryptodome/Manifest4
-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/pycryptodome-3.9.4.ebuild46
4 files changed, 120 insertions, 0 deletions
diff --git a/dev-python/pycryptodome/Manifest b/dev-python/pycryptodome/Manifest
index 990ca67e1d4e..1ca48fda04b6 100644
--- a/dev-python/pycryptodome/Manifest
+++ b/dev-python/pycryptodome/Manifest
@@ -1,11 +1,15 @@
+AUX pycryptodome-3.9.4-parallel-make.patch 756 BLAKE2B 06a79eff056ecb983131838287563d4d60896f27e28d5c2534f4ab008e50017694ac9355b43f8f387cc29abfd21ffd648233c3dbae33a06fcedb12a6c7e11e80 SHA512 06b42ea780bd374cf5cb5d6cef3fade5d695c1ee0d765e2659408da7645ad311eef2028f17d8ec0289d49c3a5851b4c63503d7c922de15873dbbf16d0db58b08
+AUX pycryptodome-3.9.4-tests.patch 2201 BLAKE2B 93bad5e716c968c1d1b765c0506f5e46680d3f1b71a89e6b6cc17c73475ca44433f75f03661bb5bb32905a9898c10ab13167e883a5240d08e540c6bf5adcc06a SHA512 8154064bcda7a4d7d9e87be09f1ecfdc1a7553b9fc82d7f9c7c9c12cef216d856d6135925c0cca64708e5f3f8009be27a97405ca7d31945af89248f77a0b8f5f
DIST pycryptodome-3.4.6.tar.gz 6968560 BLAKE2B f066199a9d05bd046303be62c43835908c90a4545caf7681d2c13db78ce345858b8565daa26ccd4a328eb944de469b943cdd0bb3f58591de4e2a09e130f7381f SHA512 40c9ea4cf7fca06bd7cd3a100e1d602e0130fbdcc75544ff1353ced2fae8925d29286200561832f2524a0f3db155a6924bb653d964408d4486aab694bf275cdc
DIST pycryptodome-3.4.7.tar.gz 6483140 BLAKE2B 02368e2af0a12686cf2e635cca8e2c279f7c3b147a66f99e97cf04d829aa66eca5629f7cc8e76420970a4fa5ca5f97e7d2a04438b3a2ac5feb980fa96998b3ff SHA512 a328df1f3b2cfeccbb5984aca4c5cbd59e8a352c817e82411d2876b2494476027f63e61200b0cc87e9420e8b47e91fffe71865fb2c23a66da0276814641eaab0
DIST pycryptodome-3.6.6.tar.gz 7137656 BLAKE2B 72a3dffa22ca4a90a6515ce0bb6939d4c11aab31793ca330523feb08f6529cbfdf3dee01b1caa4577caed1818c0227961e7f25d855b2dcfb09757beb3e0790b4 SHA512 ce03d9940c23ce59e19bcd795c300dbddeddd49756a4bfcc6933da66dfb8b7bedb8d6eaa2b01727c53e72c8e84dfcab2961d1580a188afa9c9451bd2099bdc61
DIST pycryptodome-3.7.3.tar.gz 9285823 BLAKE2B 6f215a3bb0337f5b7469d92bd2d5b5a19ab4e2c6a8f119411c3a5bcdcf93307752d99113866268b5066cceda6470bd0fbe81b1b2f9e30b5e5e569c77ede087f3 SHA512 b5e09c08cd252cad4d76249be84ce29e16a9bba4f2c5e81594c24d9a39df0f3fc67822698497eb9daa4cb6a43311c5d5a2543f187a5d5f801288596c2941f08f
DIST pycryptodome-3.8.2.tar.gz 12441359 BLAKE2B 857b77ce23bafe8a296d6fc2402914491818b51142d2a08aa882a0d4e15899bc2b18a6b69ffa904cad406fb3ce8bf029404ea178532cd4580ce118ec03311cd2 SHA512 361909d479b3478b72f2723f2c94cafd4e9d50c2d4156535d217f0566c534dc27435f64e9ba0cdb8215c2c3d3800ad1e0befde95d9999eed481f33f9ed2ba318
+DIST pycryptodome-3.9.4.tar.gz 11575825 BLAKE2B c153fe71179d633a5722480c4c42cc133100f524a8ba9d3cd9380b7e172564c276b70b97ef36437fa3a149c418903802f410c9d1807d5d72345dffb0aa568223 SHA512 d99e4e431d77856ce3ae33526984cadf2fa6aa82b1f692a2ad0ae893f6a1e9538e6d71d281578e6bd733a816664d1683364c64441196cbc6ee1278f9d6eac62c
EBUILD pycryptodome-3.4.6.ebuild 808 BLAKE2B b38ed83737b71e5a37c127ff797eb6287148c454016889e33251b1db22ed3ece1a72d37f9a4e205e0f7705505b94ad32377f2f235ba139b7432e7ba96837ec3a SHA512 82dfb29667405d80e1e4306d868eb4fbc7da0c5e4102a9f2ce5e350d7ab7fdf2c0b1b7239cb1f99e6abb81648391e81d78a9ce1335b8ef342b5edb93dfd30e07
EBUILD pycryptodome-3.4.7.ebuild 858 BLAKE2B 90de20b7936a5d2802ffba03fc2a1ed9abb9bd5d46a12bca5fa6980e5c06a1f64217a5b493109a97710dfd64e42b9555a3bf675f18aac2e6722ecc608561aebf SHA512 f3ac56d33b51132bae232bebaf9b9c735dfcfbc1c8a3e5ec3609377dd484936d365f7d5d174038a5eb5bb8b4622fafe4062058f18fe1dd823737c68e54b4b9c0
EBUILD pycryptodome-3.6.6.ebuild 891 BLAKE2B d48fa992eb58a2c596de398654e087497ff510b7ee0e4592724debaefa87dd5f78e508770a06432345c0242be9b5cad8ede7be8db6e26b97e64758a6f6ffa8d4 SHA512 c14d9fb1d5bf14ca5fa783db560fbb93a85697b1ff7ddb39a600d687ab0f0953355a0dde026f1523687297cf7e721a76e21f5442d52a3967a7d6cf41680e212b
EBUILD pycryptodome-3.7.3.ebuild 901 BLAKE2B 8841b6eca574b455d87a54328645b3a165c1dc01e78599a5a74fa0e4c2306bd8344fb5d97c58fe4b8a26ede14d290e74f5a60decdda29894f0e352d0b84b3d9c SHA512 e9c7251640d19f618a465d370e028e450108bea8c2f2f58b09f529e74c0fa9b28ffca2e698bcab95755f87877b1c48f0dc08c6393bd0151060410ed96d591e1d
EBUILD pycryptodome-3.8.2.ebuild 901 BLAKE2B 8841b6eca574b455d87a54328645b3a165c1dc01e78599a5a74fa0e4c2306bd8344fb5d97c58fe4b8a26ede14d290e74f5a60decdda29894f0e352d0b84b3d9c SHA512 e9c7251640d19f618a465d370e028e450108bea8c2f2f58b09f529e74c0fa9b28ffca2e698bcab95755f87877b1c48f0dc08c6393bd0151060410ed96d591e1d
+EBUILD pycryptodome-3.9.4.ebuild 1489 BLAKE2B b8ad92fa55e1d7155b46af1370be61c102bb61ae61522a1dfc0b7927b2b893df6136ddc54295a5500bc4f27f7069de6c9e33bd6704588a24b1e6d585f7e3f534 SHA512 80ccdd37620c8e15527344b30d054972f387e74e8575c4eef27a58a920656bf3c57467e5ee059786c641675f1806aaf6efbab5105ff382b6f563bc0f640f946a
MISC metadata.xml 335 BLAKE2B 7e5036b03371769db2f3a8d0cb5d5cd9078f16d4dccc3bd012f0d4f96ba960388c3025df93bb165f3cdbe05d73da05537a373e01b799aac2dc59dcd44e6206b5 SHA512 a94a7c0c45ae597e5c4ac672a5e9151851448371ddae0fdbd9967651476681440f2d4a6071e2cd0c4a1553038a92f4e6649f0554b636d58a025366c57c80e899
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/pycryptodome-3.9.4.ebuild b/dev-python/pycryptodome/pycryptodome-3.9.4.ebuild
new file mode 100644
index 000000000000..00d860e0cd6f
--- /dev/null
+++ b/dev-python/pycryptodome/pycryptodome-3.9.4.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python2_7 python3_{5,6,7,8} pypy{,3} )
+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
+}