diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2018-07-14 21:03:06 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2018-07-14 21:03:06 +0100 |
commit | 8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch) | |
tree | 7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /dev-python/m2crypto | |
parent | 30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff) |
gentoo resync : 14.07.2018
Diffstat (limited to 'dev-python/m2crypto')
-rw-r--r-- | dev-python/m2crypto/Manifest | 7 | ||||
-rw-r--r-- | dev-python/m2crypto/files/m2crypto-libressl-version-check.patch | 154 | ||||
-rw-r--r-- | dev-python/m2crypto/m2crypto-0.24.0.ebuild | 38 | ||||
-rw-r--r-- | dev-python/m2crypto/m2crypto-0.27.0-r2.ebuild | 56 | ||||
-rw-r--r-- | dev-python/m2crypto/m2crypto-0.27.0.ebuild | 52 | ||||
-rw-r--r-- | dev-python/m2crypto/metadata.xml | 12 |
6 files changed, 319 insertions, 0 deletions
diff --git a/dev-python/m2crypto/Manifest b/dev-python/m2crypto/Manifest new file mode 100644 index 000000000000..c5f4e37a8933 --- /dev/null +++ b/dev-python/m2crypto/Manifest @@ -0,0 +1,7 @@ +AUX m2crypto-libressl-version-check.patch 5125 BLAKE2B 969595234bc845f5a5c31f0fbe8bfb69f9eb41dd99f4053757ddcb0fcbd3a9a6e3b725dc1eb3d73108a69c496cbfc66bd52a3eefe0763e27e2f7b82b9f8c9a38 SHA512 36fc26175591bd731de80bea08887d76d3cedd2049d17c838001eb75bea2762d5b93eaa6fe7aa45d3d156dc93ddfd73c1a58a548d6325408960e08dc54bf233a +DIST M2Crypto-0.24.0.tar.gz 184457 BLAKE2B 15a11dc1b13359041875e8321d0159a1a393b7f85dfbd38d650721d8a2eaed2cc2199859c3e1e3c890033711e0b137f4c78b90f04681ff44a3356558b9f55aea SHA512 c23ae0f8ac790d4ef108a217a44e994341f6bbe4e12a7fef2518d8def82331246a145e19a2504b82b790a3ad4b467d2facc8a73bb7f1190b56441d8482c66aca +DIST M2Crypto-0.27.0.tar.gz 1119288 BLAKE2B 90e227aef9a5b4c7f5ab9bd62fbe506ea0931a6c338c530adbeb1a8303a31cc7755d13003532fe0ee4005f1997db23bed2d03cd54224dc7d89a6f23882197800 SHA512 df0f6b16f7d00a19fafbb5da5a3ececff6b4627accd00ca65e0d6f9e752a97f41016d0072c8e681475fe1d87c89b7474067068c0bfce6c68a30baddeb31bfac2 +EBUILD m2crypto-0.24.0.ebuild 935 BLAKE2B d15257bc6f02af9dce4514f19e7b2e1ba29eb3e1091acb8f03caf2db32164fc87548f5b55e37e8d616b1fb3ddd19a43cd899aa248ef9300a910af644ab6b2e4b SHA512 39c75d9af3ed016a8c3e363350a4f37ef7c31b8867684f66189652127494f4a53aea5edf451005a3c6b901241797556ab237521f80f6ca9860b6b2a4a97b7dcf +EBUILD m2crypto-0.27.0-r2.ebuild 1361 BLAKE2B 85800c96f50f5f080eee9aa96523dae8f6ace906568b6fbfb1d04bfceedce813bd24eb315364909c0bdae164a4856e369fa64dd4b01f2f2e65eda6e5696b0833 SHA512 777df5b5eddf9cf1e4db99c680b3bf08a3a99c3100b701dc41b1c7943fdc8f6da5b212a9668ae3e3cf820c39cab24b5e034d8546c0a360351a51cefc1b841320 +EBUILD m2crypto-0.27.0.ebuild 1298 BLAKE2B 97104e95a890d7dd30a9ccbbe4328e09e3d99ab86736aa68dbafb3e2334174e9f2a64964351f7cee426b2433bb008b5bd816a454c30714aafc9ef0d8bbd8cb6a SHA512 a4ed82f6f69fa6edb4ac6449c4472f76c7ffd438711376cfe616b0cb0b3a06639d7f1ea31dfbdceef8d17847982997b0ed722df3d53193ad2471553b2bb3bb7a +MISC metadata.xml 380 BLAKE2B 99a1c8e8202bed7c6d0ff8cdff3f17b664791405b082be2b7d72b3fe2b77bf89c886666d9bdce6a96c540b9518042b9d49b9af926ca10ab4c5b3b416182de01c SHA512 f2e3b4228c45471f0132b3bb412f017f4006eb82bd63e187db3efdfd3f412c1db19bdb79d37630bb059f75ef69f110687b8924d22c2aef0101cb40eb3486f1e6 diff --git a/dev-python/m2crypto/files/m2crypto-libressl-version-check.patch b/dev-python/m2crypto/files/m2crypto-libressl-version-check.patch new file mode 100644 index 000000000000..770c49f42782 --- /dev/null +++ b/dev-python/m2crypto/files/m2crypto-libressl-version-check.patch @@ -0,0 +1,154 @@ +--- a/SWIG/_bio.i ++++ b/SWIG/_bio.i +@@ -63,14 +63,14 @@ extern BIO *BIO_pop(BIO *); + static PyObject *_bio_err; + + +-#if OPENSSL_VERSION_NUMBER >= 0x10100000L ++#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER) + void pyfd_init(void); + #endif + + void bio_init(PyObject *bio_err) { + Py_INCREF(bio_err); + _bio_err = bio_err; +-#if OPENSSL_VERSION_NUMBER >= 0x10100000L ++#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER) + pyfd_init(); + #endif + } +@@ -299,7 +299,7 @@ int bio_should_write(BIO* a) { + return BIO_should_write(a); + } + +-#if OPENSSL_VERSION_NUMBER >= 0x10100000L ++#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER) + /* implment custom BIO_s_pyfd */ + + #ifdef WIN32 + +--- a/SWIG/_evp.i ++++ b/SWIG/_evp.i +@@ -19,7 +19,7 @@ Copyright (c) 2009-2010 Heikki Toivonen. All rights reserved. + #include <openssl/rsa.h> + #include <openssl/opensslv.h> + +-#if OPENSSL_VERSION_NUMBER < 0x10100000L ++#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER) + + HMAC_CTX *HMAC_CTX_new(void) { + HMAC_CTX *ret = PyMem_Malloc(sizeof(HMAC_CTX)); + +--- a/SWIG/_lib.i ++++ b/SWIG/_lib.i +@@ -18,7 +18,7 @@ + + %{ + /* OpenSSL 1.0.2 copmatbility shim */ +-#if OPENSSL_VERSION_NUMBER < 0x10002000L ++#if OPENSSL_VERSION_NUMBER < 0x10002000L || defined(LIBRESSL_VERSION_NUMBER) + typedef void (*OPENSSL_sk_freefunc)(void *); + typedef void *(*OPENSSL_sk_copyfunc)(const void *); + typedef struct stack_st OPENSSL_STACK; +@@ -501,7 +501,7 @@ int passphrase_callback(char *buf, int num, int v, void *arg) { + %inline %{ + + void lib_init() { +-#if OPENSSL_VERSION_NUMBER < 0x10100000L ++#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER) + SSLeay_add_all_algorithms(); + ERR_load_ERR_strings(); + #endif + +--- a/SWIG/_lib11_compat.i ++++ b/SWIG/_lib11_compat.i +@@ -8,7 +8,7 @@ + */ + + %{ +-#if OPENSSL_VERSION_NUMBER < 0x10100000L ++#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER) + + #include <string.h> + #include <openssl/engine.h> + +--- a/SWIG/_ssl.i ++++ b/SWIG/_ssl.i +@@ -268,7 +268,7 @@ void ssl_init(PyObject *ssl_err, PyObject *ssl_timeout_err) { + + #ifndef OPENSSL_NO_SSL3 + const SSL_METHOD *sslv3_method(void) { +-#if OPENSSL_VERSION_NUMBER >= 0x10100000L ++#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER) + PyErr_WarnEx(PyExc_DeprecationWarning, + "Function SSLv3_method has been deprecated.", 1); + #endif +@@ -277,7 +277,7 @@ const SSL_METHOD *sslv3_method(void) { + #endif + + const SSL_METHOD *tlsv1_method(void) { +-#if OPENSSL_VERSION_NUMBER >= 0x10100000L ++#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER) + PyErr_WarnEx(PyExc_DeprecationWarning, + "Function TLSv1_method has been deprecated.", 1); + #endif + +--- a/SWIG/_threads.i ++++ b/SWIG/_threads.i +@@ -5,7 +5,7 @@ + #include <pythread.h> + #include <openssl/crypto.h> + +-#if defined(THREADING) && OPENSSL_VERSION_NUMBER < 0x10100000L ++#if defined(THREADING) && OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER) + #define CRYPTO_num_locks() (CRYPTO_NUM_LOCKS) + static PyThread_type_lock lock_cs[CRYPTO_num_locks()]; + static long lock_count[CRYPTO_num_locks()]; +@@ -13,7 +13,7 @@ static int thread_mode = 0; + #endif + + void threading_locking_callback(int mode, int type, const char *file, int line) { +-#if defined(THREADING) && OPENSSL_VERSION_NUMBER < 0x10100000L ++#if defined(THREADING) && OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER) + if (mode & CRYPTO_LOCK) { + PyThread_acquire_lock(lock_cs[type], WAIT_LOCK); + lock_count[type]++; +@@ -25,7 +25,7 @@ void threading_locking_callback(int mode, int type, const char *file, int line) + } + + unsigned long threading_id_callback(void) { +-#if defined(THREADING) && OPENSSL_VERSION_NUMBER < 0x10100000L ++#if defined(THREADING) && OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER) + return (unsigned long)PyThread_get_thread_ident(); + #else + return (unsigned long)0; +@@ -35,7 +35,7 @@ unsigned long threading_id_callback(void) { + + %inline %{ + void threading_init(void) { +-#if defined(THREADING) && OPENSSL_VERSION_NUMBER < 0x10100000L ++#if defined(THREADING) && OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER) + int i; + if (!thread_mode) { + for (i=0; i<CRYPTO_num_locks(); i++) { +@@ -50,7 +50,7 @@ void threading_init(void) { + } + + void threading_cleanup(void) { +-#if defined(THREADING) && OPENSSL_VERSION_NUMBER < 0x10100000L ++#if defined(THREADING) && OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER) + int i; + if (thread_mode) { + CRYPTO_set_locking_callback(NULL); + +--- a/SWIG/libcrypto-compat.h ++++ b/SWIG/libcrypto-compat.h +@@ -1,7 +1,7 @@ + #ifndef LIBCRYPTO_COMPAT_H + #define LIBCRYPTO_COMPAT_H + +-#if OPENSSL_VERSION_NUMBER < 0x10100000L ++#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER) + + #include <openssl/rsa.h> + #include <openssl/dsa.h> diff --git a/dev-python/m2crypto/m2crypto-0.24.0.ebuild b/dev-python/m2crypto/m2crypto-0.24.0.ebuild new file mode 100644 index 000000000000..07d6f143b4f6 --- /dev/null +++ b/dev-python/m2crypto/m2crypto-0.24.0.ebuild @@ -0,0 +1,38 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +PYTHON_COMPAT=( python2_7 ) +PYTHON_REQ_USE="threads(+)" + +inherit distutils-r1 + +MY_PN="M2Crypto" + +DESCRIPTION="M2Crypto: A Python crypto and SSL toolkit" +HOMEPAGE="https://gitlab.com/m2crypto/m2crypto https://pypi.org/project/M2Crypto/" +SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_PN}-${PV}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos" +IUSE="libressl" + +RDEPEND=" + !libressl? ( >=dev-libs/openssl-0.9.8:0= ) + libressl? ( dev-libs/libressl:= ) +" +DEPEND="${RDEPEND} + >=dev-lang/swig-1.3.28:0 + dev-python/setuptools[${PYTHON_USEDEP}] +" + +S="${WORKDIR}/${MY_PN}-${PV}" + +# Tests access network, and fail randomly. Bug #431458. +RESTRICT=test + +python_test() { + esetup.py test +} diff --git a/dev-python/m2crypto/m2crypto-0.27.0-r2.ebuild b/dev-python/m2crypto/m2crypto-0.27.0-r2.ebuild new file mode 100644 index 000000000000..84bdf24cfb7d --- /dev/null +++ b/dev-python/m2crypto/m2crypto-0.27.0-r2.ebuild @@ -0,0 +1,56 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +PYTHON_COMPAT=( python2_7 ) +PYTHON_REQ_USE="threads(+)" + +inherit distutils-r1 + +MY_PN="M2Crypto" + +DESCRIPTION="M2Crypto: A Python crypto and SSL toolkit" +HOMEPAGE="https://gitlab.com/m2crypto/m2crypto https://pypi.org/project/M2Crypto/" +SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_PN}-${PV}.tar.gz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos" + +IUSE="libressl" + +RDEPEND=" + !libressl? ( >=dev-libs/openssl-0.9.8:0=[-bindist(-)] ) + libressl? ( dev-libs/libressl:0= ) + virtual/python-typing[${PYTHON_USEDEP}] +" +DEPEND="${RDEPEND} + >=dev-lang/swig-1.3.28:0 + dev-python/setuptools[${PYTHON_USEDEP}] +" + +S="${WORKDIR}/${MY_PN}-${PV}" + +# Tests access network, and fail randomly. Bug #431458. +RESTRICT=test + +PATCHES=( + "${FILESDIR}/${PN}-libressl-version-check.patch" +) + +python_compile() { + # setup.py looks at platform.machine() to determine swig options. + # For exotic ABIs, we need to give swig a hint. + # https://bugs.gentoo.org/617946 + # TODO: Fix cross-compiles + local -x SWIG_FEATURES= + case ${ABI} in + x32) SWIG_FEATURES="-D__ILP32__" ;; + esac + distutils-r1_python_compile --openssl="${EPREFIX}"/usr +} + +python_test() { + esetup.py test +} diff --git a/dev-python/m2crypto/m2crypto-0.27.0.ebuild b/dev-python/m2crypto/m2crypto-0.27.0.ebuild new file mode 100644 index 000000000000..e1df10b50d73 --- /dev/null +++ b/dev-python/m2crypto/m2crypto-0.27.0.ebuild @@ -0,0 +1,52 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +PYTHON_COMPAT=( python2_7 ) +PYTHON_REQ_USE="threads(+)" + +inherit distutils-r1 + +MY_PN="M2Crypto" + +DESCRIPTION="M2Crypto: A Python crypto and SSL toolkit" +HOMEPAGE="https://gitlab.com/m2crypto/m2crypto https://pypi.org/project/M2Crypto/" +SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_PN}-${PV}.tar.gz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos" + +IUSE="libressl" + +RDEPEND=" + !libressl? ( >=dev-libs/openssl-0.9.8:0=[-bindist(-)] ) + libressl? ( dev-libs/libressl:0= ) + virtual/python-typing[${PYTHON_USEDEP}] +" +DEPEND="${RDEPEND} + >=dev-lang/swig-1.3.28:0 + dev-python/setuptools[${PYTHON_USEDEP}] +" + +S="${WORKDIR}/${MY_PN}-${PV}" + +# Tests access network, and fail randomly. Bug #431458. +RESTRICT=test + +python_compile() { + # setup.py looks at platform.machine() to determine swig options. + # For exotic ABIs, we need to give swig a hint. + # https://bugs.gentoo.org/617946 + # TODO: Fix cross-compiles + local -x SWIG_FEATURES= + case ${ABI} in + x32) SWIG_FEATURES="-D__ILP32__" ;; + esac + distutils-r1_python_compile --openssl="${EPREFIX}"/usr +} + +python_test() { + esetup.py test +} diff --git a/dev-python/m2crypto/metadata.xml b/dev-python/m2crypto/metadata.xml new file mode 100644 index 000000000000..ed108183e47d --- /dev/null +++ b/dev-python/m2crypto/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">M2Crypto</remote-id> + <remote-id type="gitlab">m2crypto/m2crypto</remote-id> + </upstream> +</pkgmetadata> |