summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Hansen <john@mrhansen.id.au>2022-01-23 21:48:34 +0000
committerSam James <sam@gentoo.org>2022-01-23 21:49:19 +0000
commit344a6e70c77a76a15930e5768c8a6ada5cb0f8e9 (patch)
treeef87b2b4ce9191febedaa0690f67c77db00cf75f /dev-python/m2crypto
parentx11-misc/tint2: Depend on x11-libs/gtk+:3 (diff)
downloadgentoo-344a6e70c77a76a15930e5768c8a6ada5cb0f8e9.tar.gz
gentoo-344a6e70c77a76a15930e5768c8a6ada5cb0f8e9.tar.bz2
gentoo-344a6e70c77a76a15930e5768c8a6ada5cb0f8e9.zip
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>
Diffstat (limited to 'dev-python/m2crypto')
-rw-r--r--dev-python/m2crypto/m2crypto-0.38.0.ebuild13
1 files 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
}