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@mrhansen.id.au>
Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
John Hansen
2022-01-23 21:48:34 +00:00
committed by Sam James
parent bb7a796073
commit 344a6e70c7

View File

@@ -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
}