From 344a6e70c77a76a15930e5768c8a6ada5cb0f8e9 Mon Sep 17 00:00:00 2001 From: John Hansen Date: Sun, 23 Jan 2022 21:48:34 +0000 Subject: [PATCH] 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 Signed-off-by: Sam James --- 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 b6170a252e6ba..f6c277a5522a0 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 }