1 |
commit: 0d16531e438828335a8e7616c0ee33b9a32bc1cf |
2 |
Author: Matt Turner <mattst88 <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Apr 6 05:13:50 2018 +0000 |
4 |
Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Apr 6 05:22:48 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0d16531e |
7 |
|
8 |
dev-python/gmpy: Add patch to fix mpir types on mips/n32 |
9 |
|
10 |
Committed with floppym's blessing. |
11 |
|
12 |
Closes: https://bugs.gentoo.org/608496 |
13 |
|
14 |
dev-python/gmpy/files/gmpy-2.0.8-fix-mpir-types.patch | 17 +++++++++++++++++ |
15 |
dev-python/gmpy/gmpy-2.0.8.ebuild | 4 ++++ |
16 |
2 files changed, 21 insertions(+) |
17 |
|
18 |
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 |
19 |
new file mode 100644 |
20 |
index 00000000000..d21e5a55510 |
21 |
--- /dev/null |
22 |
+++ b/dev-python/gmpy/files/gmpy-2.0.8-fix-mpir-types.patch |
23 |
@@ -0,0 +1,17 @@ |
24 |
+diff -ur gmpy2-2.0.8.orig/src/gmpy.h gmpy2-2.0.8/src/gmpy.h |
25 |
+--- gmpy2-2.0.8.orig/src/gmpy.h 2018-04-03 22:44:35.494621951 -0700 |
26 |
++++ gmpy2-2.0.8/src/gmpy.h 2018-04-03 22:45:33.580835296 -0700 |
27 |
+@@ -129,8 +129,13 @@ |
28 |
+ #ifndef BITS_PER_UI |
29 |
+ /* Assume we are NOT using MPIR > 2.5. */ |
30 |
+ #define BITS_PER_UI BITS_PER_ULONG |
31 |
++#if defined(__mips__) && (_MIPS_SIM == _ABIN32) |
32 |
++typedef unsigned long long mpir_ui; |
33 |
++typedef long long mpir_si; |
34 |
++#else |
35 |
+ typedef unsigned long mpir_ui; |
36 |
+ typedef long mpir_si; |
37 |
++#endif |
38 |
+ #define mpz_fits_si_p mpz_fits_slong_p |
39 |
+ #define mpz_fits_ui_p mpz_fits_ulong_p |
40 |
+ #endif |
41 |
|
42 |
diff --git a/dev-python/gmpy/gmpy-2.0.8.ebuild b/dev-python/gmpy/gmpy-2.0.8.ebuild |
43 |
index 1d39738f918..41e247051af 100644 |
44 |
--- a/dev-python/gmpy/gmpy-2.0.8.ebuild |
45 |
+++ b/dev-python/gmpy/gmpy-2.0.8.ebuild |
46 |
@@ -30,6 +30,10 @@ DEPEND="${RDEPEND} |
47 |
|
48 |
S="${WORKDIR}"/${MY_P} |
49 |
|
50 |
+PATCHES=( |
51 |
+ "${FILESDIR}"/${P}-fix-mpir-types.patch |
52 |
+) |
53 |
+ |
54 |
python_prepare_all() { |
55 |
# rm non std test file |
56 |
rm test*/gmpy_test_thr.py || die |