8000 adjusted the patch file to try a new build · kivy/python-for-android@c0d6eb6 · GitHub
[go: up one dir, main page]

Skip to content

Commit c0d6eb6

Browse files
author
Oliver Marks
committed
adjusted the patch file to try a new build
1 parent 82e8921 commit c0d6eb6

File tree

2 files changed

+57
-4
lines changed

2 files changed

+57
-4
lines changed

recipes/python/patches/Python-2.7.2-ctypes-disable-wchar.patch

Lines changed: 56 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
diff -uNr Python-2.7.2.orig/Lib/ctypes/__init__.py Python-2.7.2/Lib/ctypes/__init__.py
2-
--- Python-2.7.2.orig/Lib/ctypes/__init__.py 2011-06-11 17:46:24.000000000 +0200
3-
+++ Python-2.7.2/Lib/ctypes/__init__.py 2012-08-30 13:40:38.837698797 +0200
1+
diff -ur '--exclude=*~' Python-2.7.2.orig/Lib/ctypes/__init__.py Python-2.7.2/Lib/ctypes/__init__.py
2+
--- Python-2.7.2.orig/Lib/ctypes/__init__.py 2011-06-11 16:46:24.000000000 +0100
3+
+++ Python-2.7.2/Lib/ctypes/__init__.py 2015-03-19 12:32:45.747723687 +0000
44
@@ -272,31 +272,34 @@
55
else:
66
set_conversion_mode("ascii", "strict")
@@ -61,3 +61,56 @@ diff -uNr Python-2.7.2.orig/Lib/ctypes/__init__.py Python-2.7.2/Lib/ctypes/__ini
6161

6262
POINTER(c_char).from_param = c_char_p.from_param #_SimpleCData.c_char_p_from_param
6363

64+
diff -ur '--exclude=*~' Python-2.7.2.orig/Modules/_ctypes/callproc.c Python-2.7.2/Modules/_ctypes/callproc.c
65+
--- Python-2.7.2.orig/Modules/_ctypes/callproc.c 2015-03-19 11:56:40.668159317 +0000
66+
+++ Python-2.7.2/Modules/_ctypes/callproc.c 2015-03-19 11:45:45.898288000 +0000
67+
@@ -1423,7 +1423,7 @@
68+
mode |= RTLD_NOW;
69+
handle = ctypes_dlopen(name, mode);
70+
if (!handle) {
71+
- char *errmsg = ctypes_dlerror();
72+
+ const char *errmsg = ctypes_dlerror();
73+
if (!errmsg)
74+
errmsg = "dlopen() error";
75+
PyErr_SetString(PyExc_OSError,
76+
diff -ur '--exclude=*~' Python-2.7.2.orig/Modules/_ctypes/libffi/src/dlmalloc.c Python-2.7.2/Modules/_ctypes/libffi/src/dlmalloc.c
77+
--- Python-2.7.2.orig/Modules/_ctypes/libffi/src/dlmalloc.c 2015-03-19 13:26:58.928438829 +0000
78+
+++ Python-2.7.2/Modules/_ctypes/libffi/src/dlmalloc.c 2015-03-19 15:32:19.042396376 +0000
79+
@@ -614,18 +614,6 @@
80+
#include "/usr/include/malloc.h"
81+
#else /* HAVE_USR_INCLUDE_MALLOC_H */
82+
83+
-struct mallinfo {
84+
- MALLINFO_FIELD_TYPE arena; /* non-mmapped space allocated from system */
85+
- MALLINFO_FIELD_TYPE ordblks; /* number of free chunks */
86+
- MALLINFO_FIELD_TYPE smblks; /* always 0 */
87+
- MALLINFO_FIELD_TYPE hblks; /* always 0 */
88+
- MALLINFO_FIELD_TYPE hblkhd; /* space in mmapped regions */
89+
- MALLINFO_FIELD_TYPE usmblks; /* maximum total allocated space */
90+
- MALLINFO_FIELD_TYPE fsmblks; /* always 0 */
91+
- MALLINFO_FIELD_TYPE uordblks; /* total allocated space */
92+
- MALLINFO_FIELD_TYPE fordblks; /* total free space */
93+
- MALLINFO_FIELD_TYPE keepcost; /* releasable (via malloc_trim) space */
94+
-};
95+
96+
#endif /* HAVE_USR_INCLUDE_MALLOC_H */
97+
#endif /* NO_MALLINFO */
98+
@@ -966,7 +954,7 @@
99+
p = malloc(n);
100+
assert(malloc_usable_size(p) >= 256);
101+
*/
102+
-size_t dlmalloc_usable_size(void*);
103+
+size_t dlmalloc_usable_size(const void*);
104+
105+
/*
106+
malloc_stats();
107+
@@ -4384,7 +4372,7 @@
108+
internal_malloc_stats(gm);
109+
}
110+
111+
-size_t dlmalloc_usable_size(void* mem) {
112+
+size_t dlmalloc_usable_size(const void* mem) {
113+
if (mem != 0) {
114+
mchunkptr p = mem2chunk(mem);
115+
if (cinuse(p))
116+

recipes/python/recipe.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ function build_python() {
9494
fi
9595

9696
# CFLAGS for python ctypes library
97-
export CFLAGS="$CFLAGS -DNO_MALLINFO"
97+
#export CFLAGS="$CFLAGS -DNO_MALLINFO"
9898
export BUILDARCH=x86_64-linux-gnu
9999
export HOSTARCH=arm-eabi
100100

0 commit comments

Comments
 (0)
0