commit: 344a6e70c77a76a15930e5768c8a6ada5cb0f8e9
Author: John Hansen <john <AT> mrhansen <DOT> id <DOT> au>
AuthorDate: Sun Jan 23 21:48:34 2022 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Jan 23 21:49:19 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=344a6e70
dev-python/m2crypto: fix build on MIPS
Fixes errors like:
```
/usr/include/openssl/opensslconf.h:16: Error: CPP #error ""abi_mips_n32 not
supported by the package."". Use the -cpperraswarn option to continue swig
processing.
```
Signed-off-by: John Hansen <john <AT> mrhansen.id.au>
Signed-off-by: Sam James <sam <AT> gentoo.org>
dev-python/m2crypto/m2crypto-0.38.0.ebuild | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/dev-python/m2crypto/m2crypto-0.38.0.ebuild
b/dev-python/m2crypto/m2crypto-0.38.0.ebuild
index b6170a252e6b..f6c277a5522a 100644
--- a/dev-python/m2crypto/m2crypto-0.38.0.ebuild
+++ b/dev-python/m2crypto/m2crypto-0.38.0.ebuild
@@ -1,4 +1,4 @@
-# Copyright 2018-2021 Gentoo Authors
+# Copyright 2018-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -17,7 +17,7 @@ S="${WORKDIR}/${MY_PN}-${PV}"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~mips ppc ppc64 ~riscv ~s390
sparc x86 ~amd64-linux ~x86-linux ~x64-macos"
-IUSE="test"
+IUSE="test abi_mips_n32 abi_mips_n64 abi_mips_o32"
RESTRICT="!test? ( test )"
BDEPEND="
@@ -59,5 +59,14 @@ python_compile() {
# https://bugs.gentoo.org/674112
swig_define __ARM_PCS_VFP
+ # Avoid similar errors to bug #688668 for MIPS
+ if use abi_mips_n32; then
+ swig_define _MIPS_SIM = _ABIN32
+ elif use abi_mips_n64; then
+ swig_define _MIPS_SIM = _ABI64
+ elif use abi_mips_o32; then
+ swig_define _MIPS_SIM = _ABIO32
+ fi
+
distutils-r1_python_compile --openssl="${ESYSROOT}"/usr
}