summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Turner <mattst88@gentoo.org>2018-04-05 22:13:50 -0700
committerMatt Turner <mattst88@gentoo.org>2018-04-05 22:22:48 -0700
commit0d16531e438828335a8e7616c0ee33b9a32bc1cf (patch)
treecb0cd7af32576b73ec4095613089c563182952df /dev-python/gmpy
parentx11-misc/menulibre: Old. (diff)
downloadgentoo-0d16531e438828335a8e7616c0ee33b9a32bc1cf.tar.gz
gentoo-0d16531e438828335a8e7616c0ee33b9a32bc1cf.tar.bz2
gentoo-0d16531e438828335a8e7616c0ee33b9a32bc1cf.zip
dev-python/gmpy: Add patch to fix mpir types on mips/n32
Committed with floppym's blessing. Closes: https://bugs.gentoo.org/608496
Diffstat (limited to 'dev-python/gmpy')
-rw-r--r--dev-python/gmpy/files/gmpy-2.0.8-fix-mpir-types.patch17
-rw-r--r--dev-python/gmpy/gmpy-2.0.8.ebuild4
2 files changed, 21 insertions, 0 deletions
diff --git a/dev-python/gmpy/files/gmpy-2.0.8-fix-mpir-types.patch b/dev-python/gmpy/files/gmpy-2.0.8-fix-mpir-types.patch
new file mode 100644
index 000000000000..d21e5a55510d
--- /dev/null
+++ b/dev-python/gmpy/files/gmpy-2.0.8-fix-mpir-types.patch
@@ -0,0 +1,17 @@
+diff -ur gmpy2-2.0.8.orig/src/gmpy.h gmpy2-2.0.8/src/gmpy.h
+--- gmpy2-2.0.8.orig/src/gmpy.h 2018-04-03 22:44:35.494621951 -0700
++++ gmpy2-2.0.8/src/gmpy.h 2018-04-03 22:45:33.580835296 -0700
+@@ -129,8 +129,13 @@
+ #ifndef BITS_PER_UI
+ /* Assume we are NOT using MPIR > 2.5. */
+ #define BITS_PER_UI BITS_PER_ULONG
++#if defined(__mips__) && (_MIPS_SIM == _ABIN32)
++typedef unsigned long long mpir_ui;
++typedef long long mpir_si;
++#else
+ typedef unsigned long mpir_ui;
+ typedef long mpir_si;
++#endif
+ #define mpz_fits_si_p mpz_fits_slong_p
+ #define mpz_fits_ui_p mpz_fits_ulong_p
+ #endif
diff --git a/dev-python/gmpy/gmpy-2.0.8.ebuild b/dev-python/gmpy/gmpy-2.0.8.ebuild
index 1d39738f918a..41e247051af1 100644
--- a/dev-python/gmpy/gmpy-2.0.8.ebuild
+++ b/dev-python/gmpy/gmpy-2.0.8.ebuild
@@ -30,6 +30,10 @@ DEPEND="${RDEPEND}
S="${WORKDIR}"/${MY_P}
+PATCHES=(
+ "${FILESDIR}"/${P}-fix-mpir-types.patch
+)
+
python_prepare_all() {
# rm non std test file
rm test*/gmpy_test_thr.py || die