public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/proj/libressl:master commit in: dev-python/m2crypto/, dev-python/m2crypto/files/
@ 2019-02-21  1:32 Aaron Bauman
  0 siblings, 0 replies; 2+ messages in thread
From: Aaron Bauman @ 2019-02-21  1:32 UTC (permalink / raw
  To: gentoo-commits

commit:     055f92ada00d62aa15f46f20749e2866a04107b5
Author:     Aaron Bauman <bman <AT> gentoo <DOT> org>
AuthorDate: Thu Feb 21 01:32:19 2019 +0000
Commit:     Aaron Bauman <bman <AT> gentoo <DOT> org>
CommitDate: Thu Feb 21 01:32:19 2019 +0000
URL:        https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=055f92ad

dev-python/*: drop as patches are upstream in gentoo.git

Signed-off-by: Aaron Bauman <bman <AT> gentoo.org>

 dev-python/m2crypto/Manifest                    |   1 -
 dev-python/m2crypto/files/0.26.4-libressl.patch | 245 ------------------------
 dev-python/m2crypto/m2crypto-0.27.0.ebuild      |  56 ------
 dev-python/m2crypto/metadata.xml                |  12 --
 4 files changed, 314 deletions(-)

diff --git a/dev-python/m2crypto/Manifest b/dev-python/m2crypto/Manifest
deleted file mode 100644
index bb56a61..0000000
--- a/dev-python/m2crypto/Manifest
+++ /dev/null
@@ -1 +0,0 @@
-DIST M2Crypto-0.27.0.tar.gz 1119288 SHA256 82317459d653322d6b37f122ce916dc91ddcd9d1b814847497ac796c4549dd68 SHA512 df0f6b16f7d00a19fafbb5da5a3ececff6b4627accd00ca65e0d6f9e752a97f41016d0072c8e681475fe1d87c89b7474067068c0bfce6c68a30baddeb31bfac2 WHIRLPOOL 678f19d7bcd0663b704761a78b8e2d39a1c62450f99d5b0aa513e8b8af717ef1935b274eef99d4e027e8e5992887806bd270fcba02fd3e650f086f8b87f5adc7

diff --git a/dev-python/m2crypto/files/0.26.4-libressl.patch b/dev-python/m2crypto/files/0.26.4-libressl.patch
deleted file mode 100644
index 4db1bff..0000000
--- a/dev-python/m2crypto/files/0.26.4-libressl.patch
+++ /dev/null
@@ -1,245 +0,0 @@
-diff -Naur M2Crypto-0.26.4.orig/SWIG/_bio.i M2Crypto-0.26.4/SWIG/_bio.i
---- M2Crypto-0.26.4.orig/SWIG/_bio.i	2017-10-17 18:22:17.157602333 -0700
-+++ M2Crypto-0.26.4/SWIG/_bio.i	2017-10-17 18:31:52.799592024 -0700
-@@ -63,14 +63,14 @@
- 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
- }
-@@ -298,7 +298,7 @@
-     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
-diff -Naur M2Crypto-0.26.4.orig/SWIG/_evp.i M2Crypto-0.26.4/SWIG/_evp.i
---- M2Crypto-0.26.4.orig/SWIG/_evp.i	2017-10-17 18:22:17.157602333 -0700
-+++ M2Crypto-0.26.4/SWIG/_evp.i	2017-10-17 18:32:48.379591029 -0700
-@@ -19,7 +19,7 @@
- #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));
-diff -Naur M2Crypto-0.26.4.orig/SWIG/_lib.i M2Crypto-0.26.4/SWIG/_lib.i
---- M2Crypto-0.26.4.orig/SWIG/_lib.i	2017-10-17 18:22:17.157602333 -0700
-+++ M2Crypto-0.26.4/SWIG/_lib.i	2017-10-17 18:33:13.535590578 -0700
-@@ -487,7 +487,7 @@
- %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
-diff -Naur M2Crypto-0.26.4.orig/SWIG/_lib11_compat.i M2Crypto-0.26.4/SWIG/_lib11_compat.i
---- M2Crypto-0.26.4.orig/SWIG/_lib11_compat.i	2017-10-17 18:22:17.156602333 -0700
-+++ M2Crypto-0.26.4/SWIG/_lib11_compat.i	2017-10-17 18:34:12.117589529 -0700
-@@ -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>
-@@ -454,5 +454,5 @@
-     return 1;
- }
- 
--#endif /* OPENSSL_VERSION_NUMBER */
-+#endif /* OPENSSL_VERSION_NUMBER || LIBRESSL_VERSION_NUMBER */
- %}
-diff -Naur M2Crypto-0.26.4.orig/SWIG/_m2crypto_wrap.c M2Crypto-0.26.4/SWIG/_m2crypto_wrap.c
---- M2Crypto-0.26.4.orig/SWIG/_m2crypto_wrap.c	2017-10-17 18:22:17.156602333 -0700
-+++ M2Crypto-0.26.4/SWIG/_m2crypto_wrap.c	2017-10-17 18:40:03.847583230 -0700
-@@ -3764,7 +3764,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()];
-@@ -3772,7 +3772,7 @@
- #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]++;
-@@ -3784,7 +3784,7 @@
- }
- 
- 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;
-@@ -3793,7 +3793,7 @@
- 
- 
- 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++) {
-@@ -3808,7 +3808,7 @@
- }
- 
- 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);
-@@ -3834,7 +3834,7 @@
- #include <ceval.h>
- 
- 
--#if OPENSSL_VERSION_NUMBER < 0x10100000L
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
- 
- #include <string.h>
- #include <openssl/engine.h>
-@@ -4745,7 +4745,7 @@
- 
- 
- 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
-@@ -5038,14 +5038,14 @@
- 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
- }
-@@ -5268,7 +5268,7 @@
-     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
-@@ -5749,7 +5749,7 @@
- #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));
-diff -Naur M2Crypto-0.26.4.orig/SWIG/_ssl.i M2Crypto-0.26.4/SWIG/_ssl.i
---- M2Crypto-0.26.4.orig/SWIG/_ssl.i	2017-10-17 18:22:17.157602333 -0700
-+++ M2Crypto-0.26.4/SWIG/_ssl.i	2017-10-17 18:41:25.205581773 -0700
-@@ -29,7 +29,7 @@
- #endif
- %}
- 
--#if OPENSSL_VERSION_NUMBER >= 0x10100005L
-+#if OPENSSL_VERSION_NUMBER >= 0x10100005L && !defined(LIBRESSL_VERSION_NUMBER)
- %include <openssl/safestack.h>
- #endif
- 
-diff -Naur M2Crypto-0.26.4.orig/SWIG/_threads.i M2Crypto-0.26.4/SWIG/_threads.i
---- M2Crypto-0.26.4.orig/SWIG/_threads.i	2017-10-17 18:22:17.157602333 -0700
-+++ M2Crypto-0.26.4/SWIG/_threads.i	2017-10-17 18:42:10.303580966 -0700
-@@ -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 @@
- #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 @@
- }
- 
- 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 @@
- 
- %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_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);
-diff -Naur M2Crypto-0.26.4.orig/SWIG/libcrypto-compat.h M2Crypto-0.26.4/SWIG/libcrypto-compat.h
---- M2Crypto-0.26.4.orig/SWIG/libcrypto-compat.h	2017-10-17 18:22:17.157602333 -0700
-+++ M2Crypto-0.26.4/SWIG/libcrypto-compat.h	2017-10-17 18:42:49.654580261 -0700
-@@ -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.27.0.ebuild b/dev-python/m2crypto/m2crypto-0.27.0.ebuild
deleted file mode 100644
index 4d813e0..0000000
--- a/dev-python/m2crypto/m2crypto-0.27.0.ebuild
+++ /dev/null
@@ -1,56 +0,0 @@
-# Copyright 1999-2017 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.python.org/pypi/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 ~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= )
-	dev-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}"/0.26.4-libressl.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/metadata.xml b/dev-python/m2crypto/metadata.xml
deleted file mode 100644
index ed10818..0000000
--- a/dev-python/m2crypto/metadata.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-<?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>


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-commits] repo/proj/libressl:master commit in: dev-python/m2crypto/, dev-python/m2crypto/files/
@ 2024-11-24  2:26 orbea
  0 siblings, 0 replies; 2+ messages in thread
From: orbea @ 2024-11-24  2:26 UTC (permalink / raw
  To: gentoo-commits

commit:     93857ffd0a60c06f8b234843f39b40fe99094186
Author:     orbea <orbea <AT> riseup <DOT> net>
AuthorDate: Sun Nov 24 02:20:17 2024 +0000
Commit:     orbea <orbea <AT> riseup <DOT> net>
CommitDate: Sun Nov 24 02:20:41 2024 +0000
URL:        https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=93857ffd

dev-python/m2crypto: drop 0.42.0

Signed-off-by: orbea <orbea <AT> riseup.net>

 dev-python/m2crypto/Manifest                       |   1 -
 .../m2crypto/files/m2crypto-libressl-0.42.0.patch  | 166 ---------------------
 dev-python/m2crypto/m2crypto-0.42.0.ebuild         |  74 ---------
 3 files changed, 241 deletions(-)

diff --git a/dev-python/m2crypto/Manifest b/dev-python/m2crypto/Manifest
index 478d208..8fff43b 100644
--- a/dev-python/m2crypto/Manifest
+++ b/dev-python/m2crypto/Manifest
@@ -1,2 +1 @@
-DIST m2crypto-0.42.0.tar.gz 240072 BLAKE2B 86b9f340eb90a8fc94b09faa20a676a3a63c0c64a0902a6729face72b602a2f55941c156ecb3d522a823457d2514e96b147585264200674e11dfaba3d19790de SHA512 b36fb6d1ca401de9741118ab8d43113511bf27d32f45d2257ed70ea8d3b8a3beaf811731dbbece00a6b990366c43096c6b5f5b12d4649ae923bff98c5fc8e674
 DIST m2crypto-0.43.0.tar.gz 366785 BLAKE2B 611daee57c5605246c0a505604e54ec7e029301194ed75bcb7c02ec04f0246a3dc05e13c8c00f1cc15496495a81c098b203cf69a75ce5a65ea3c7a1c0445e5d3 SHA512 c5232956a88de51bd3a1e02859b7a308eabb4e055cc0c8aac2d8d34a60c60a4a4c7160db4060ec07f559134a04eb41c6ab116a194ec3f7441d342e6d38f9add9

diff --git a/dev-python/m2crypto/files/m2crypto-libressl-0.42.0.patch b/dev-python/m2crypto/files/m2crypto-libressl-0.42.0.patch
deleted file mode 100644
index b6ae9c5..0000000
--- a/dev-python/m2crypto/files/m2crypto-libressl-0.42.0.patch
+++ /dev/null
@@ -1,166 +0,0 @@
-$OpenBSD: patch-src_M2Crypto_BIO_py,v 1.1 2021/07/24 20:02:04 sthen Exp $
-
-Partially revert https://gitlab.com/m2crypto/m2crypto/commit/738cd0bf3dc2ee619f598290d5bf4c2190987f16:
-
- * Fix BIO.File ... return type of BIO.readline() and close properly.
-   That is, flush BIO.File() before closing and close also underlying
-   system file.
-
-For Python 2 this results in:
-
-python2 -c "import M2Crypto; M2Crypto.BIO.openfile('/etc/ssl/cert.pem')"
-Traceback (most recent call last):
-  File "<string>", line 1, in <module>
-  File "/usr/local/lib/python2.7/site-packages/M2Crypto/BIO.py", line 284, in openfile
-    return File(f)
-  File "/usr/local/lib/python2.7/site-packages/M2Crypto/BIO.py", line 239, in __init__
-    pyfile.flush()
-IOError: [Errno 9] Bad file descriptor
-
-https://gitlab.com/m2crypto/m2crypto/issues/211
-
---- a/src/M2Crypto/BIO.py
-+++ b/src/M2Crypto/BIO.py
-@@ -235,8 +235,9 @@ class File(BIO):
-         #
-         #  https://docs.python.org/3.3/c-api/file.html
-         #
--        pyfile.flush()
--        self.fname = pyfile.name
-+        if six.PY3:
-+            pyfile.flush()
-+            self.fname = pyfile.name
-         self.pyfile = pyfile
-         # Be wary of https://github.com/openssl/openssl/pull/1925
-         # BIO_new_fd is NEVER to be used before OpenSSL 1.1.1
-@@ -246,7 +247,8 @@ class File(BIO):
-             self.bio = m2.bio_new_pyfile(pyfile, m2.bio_noclose)
- 
-         self.close_pyfile = close_pyfile
--        self.closed = False
-+        if six.PY3:
-+            self.closed = False
- 
-     def flush(self):
-         # type: () -> None
-@@ -255,8 +257,9 @@ class File(BIO):
- 
-     def close(self):
-         # type: () -> None
--        self.flush()
--        super(File, self).close()
-+        if six.PY3:
-+            self.flush()
-+            super(File, self).close()
-         if self.close_pyfile:
-             self.pyfile.close()
- 
---- a/src/SWIG/_bio.i
-+++ b/src/SWIG/_bio.i
-@@ -307,8 +307,12 @@ int bio_should_write(BIO* a) {
- }
- 
- /* Macros for things not defined before 1.1.0 */
--#if OPENSSL_VERSION_NUMBER < 0x10100000L
--static BIO_METHOD *
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L || (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x3050000fL)
-+
-+#if !defined(LIBRESSL_VERSION_NUMBER)
-+static
-+#endif
-+BIO_METHOD *
- BIO_meth_new( int type, const char *name )
- {
-     BIO_METHOD *method = malloc( sizeof(BIO_METHOD) );
-@@ -320,7 +324,10 @@ BIO_meth_new( int type, const char *name )
-     return method;
- }
- 
--static void
-+#if !defined(LIBRESSL_VERSION_NUMBER)
-+static
-+#endif
-+void
- BIO_meth_free( BIO_METHOD *meth )
- {
-     if ( meth == NULL ) {
---- a/src/SWIG/_lib11_compat.i
-+++ b/src/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>
-@@ -24,6 +24,8 @@ static void *CRYPTO_zalloc(size_t num, const char *file, int line)
-       return ret;
- }
- 
-+#endif
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L
- #include <openssl/bn.h>
- 
- #ifndef BN_F_BN_GENCB_NEW
---- a/src/SWIG/_threads.i
-+++ b/src/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/src/SWIG/_x509.i
-+++ b/src/SWIG/_x509.i
-@@ -108,8 +108,10 @@ extern int X509_cmp_current_time(ASN1_TIME *);
- 
- %rename(x509_check_purpose) X509_check_purpose;
- extern int X509_check_purpose(X509 *, int, int);
-+#if !defined(LIBRESSL_VERSION_NUMBER) || LIBRESSL_VERSION_NUMBER < 0x4000000fL
- %rename(x509_check_trust) X509_check_trust;
- extern int X509_check_trust(X509 *, int, int);
-+#endif
- 
- %rename(x509_write_pem) PEM_write_bio_X509;
- %threadallow PEM_write_bio_X509;

diff --git a/dev-python/m2crypto/m2crypto-0.42.0.ebuild b/dev-python/m2crypto/m2crypto-0.42.0.ebuild
deleted file mode 100644
index 18a7fb5..0000000
--- a/dev-python/m2crypto/m2crypto-0.42.0.ebuild
+++ /dev/null
@@ -1,74 +0,0 @@
-# Copyright 2018-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-DISTUTILS_EXT=1
-DISTUTILS_USE_PEP517=setuptools
-PYTHON_COMPAT=( python3_{10..12} )
-PYPI_PN="M2Crypto"
-PYTHON_REQ_USE="threads(+)"
-
-inherit distutils-r1 toolchain-funcs pypi
-
-DESCRIPTION="A Python crypto and SSL toolkit"
-HOMEPAGE="
-	https://gitlab.com/m2crypto/m2crypto/
-	https://pypi.org/project/M2Crypto/
-"
-
-# openssl via src/SWIG/_lib11_compat.i
-LICENSE="MIT openssl"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~x64-macos"
-IUSE="abi_mips_n32 abi_mips_n64 abi_mips_o32"
-
-DEPEND="
-	dev-libs/openssl:=
-"
-RDEPEND="
-	${DEPEND}
-"
-BDEPEND="
-	>=dev-lang/swig-2.0.9
-"
-
-PATCHES=(
-	"${FILESDIR}"/${PN}-libressl-0.42.0.patch
-)
-
-swig_define() {
-	local x
-	for x; do
-		if tc-cpp-is-true "defined(${x})"; then
-			SWIG_FEATURES+=" -D${x}"
-		fi
-	done
-}
-
-src_prepare() {
-	# relies on very exact clock behavior which apparently fails
-	# with inconvenient CONFIG_HZ*
-	sed -e 's:test_server_simple_timeouts:_&:' \
-		-i tests/test_ssl.py || die
-	distutils-r1_src_prepare
-}
-
-python_compile() {
-	# setup.py looks at platform.machine() to determine swig options.
-	# For exotic ABIs, we need to give swig a hint.
-	local -x SWIG_FEATURES=
-
-	# https://bugs.gentoo.org/617946
-	swig_define __ILP32__
-
-	# https://bugs.gentoo.org/674112
-	swig_define __ARM_PCS_VFP
-
-	distutils-r1_python_compile
-}
-
-python_test() {
-	"${EPYTHON}" -m unittest -b -v tests.alltests.suite ||
-		die "Tests failed for ${EPYTHON}"
-}


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-11-24  2:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-02-21  1:32 [gentoo-commits] repo/proj/libressl:master commit in: dev-python/m2crypto/, dev-python/m2crypto/files/ Aaron Bauman
  -- strict thread matches above, loose matches on Subject: below --
2024-11-24  2:26 orbea

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox