Skip to content

Commit 7c75fe8

Browse files
committed
Merge branch 'feature/freetype' of github.com:olymk2/python-for-android into feature/freetype
2 parents 6132785 + 610953a commit 7c75fe8

4 files changed

Lines changed: 26 additions & 1 deletion

File tree

build.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
diff -ur Python-2.7.2.orig/Lib/ctypes/util.py Python-2.7.2/Lib/ctypes/util.py > ctypes-find-library.diff

recipes/freetype/recipe.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ function build_freetype() {
3939
#try make -k CROSS_COMPILE_TARGET=yes INSTSONAME=libfreetype.so#-j4
4040
pop_arm
4141
echo 'finished'
42-
try cp -L $BUILD_freetype/objs/.libs/libfreetype.so $LIBS_PATH/libfreetype.so.6
42+
#try cp -L $BUILD_freetype/objs/.libs/libfreetype.so $LIBS_PATH/libfreetype.so.6
4343
try cp -L $BUILD_freetype/objs/.libs/libfreetype.so $LIBS_PATH
4444

4545
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
--- Python-2.7.2.orig/Lib/ctypes/util.py 2011-06-11 16:46:24.000000000 +0100
2+
+++ Python-2.7.2/Lib/ctypes/util.py 2015-03-25 19:39:15.617933144 +0000
3+
@@ -84,6 +84,20 @@
4+
continue
5+
return None
6+
7+
+elif os.name == "posix" and sys.platform == "linux3":
8+
+ print sys.path
9+
+ def find_library(name):
10+
+ """ hack to find librarys for kivy and android
11+
+ split the path and get the first parts which will give us
12+
+ the app path something like /data/data/org.app.foo/"""
13+
+ app_root = os.path.abspath('./').split(os.path.sep)[0:4]
14+
+ lib_search = os.path.sep.join(app_root) + os.path.sep + 'files'
15+
+ for filename in os.listdir(lib_search):
16+
+ print filename
17+
+ if filename.endswith('.so') and name in filename:
18+
+ return lib_search + os.path.sep + filename
19+
+ return None
20+
+
21+
elif os.name == "posix":
22+
# Andreas Degert's find functions, using gcc, /sbin/ldconfig, objdump
23+
import re, tempfile, errno

recipes/python/recipe.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ function prebuild_python() {
3232
try patch -p1 < $RECIPE_python/patches/fix-remove-corefoundation.patch
3333
try patch -p1 < $RECIPE_python/patches/fix-dynamic-lookup.patch
3434
try patch -p1 < $RECIPE_python/patches/fix-dlfcn.patch
35+
try patch -p1 < $RECIPE_python/patches/ctypes-find-library.diff
3536

3637
system=$(uname -s)
3738
if [ "X$system" == "XDarwin" ]; then

0 commit comments

Comments
 (0)