8000 changes · olymk2/python-for-android@c06b57f · GitHub
[go: up one dir, main page]

Skip to content
8000

Commit c06b57f

Browse files
committed
changes
2 parents cf68547 + 6106eaf commit c06b57f

File tree

3 files changed

+47
-14
lines changed

3 files changed

+47
-14
lines changed

recipes/freetype/recipe.sh

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
#!/bin/bash
22

33
VERSION_freetype=${VERSION_freetype:-2.5.5}
4-
#DEPS_freetype=(python)
4+
DEPS_freetype=(harfbuzz)
55
URL_freetype=http://download.savannah.gnu.org/releases/freetype/freetype-2.5.5.tar.gz
6-
#MD5_freetype=4ba105e2d8535496fd633889396b20b7
6+
MD5_freetype=7448edfbd40c7aa5088684b0a3edb2b8
77
BUILD_freetype=$BUILD_PATH/freetype/$(get_directory $URL_freetype)
88
RECIPE_freetype=$RECIPES_PATH/freetype
99

@@ -23,7 +23,10 @@ function build_freetype() {
2323
cd $BUILD_freetype
2424

2525
push_arm
26-
26+
export LDFLAGS="$LDFLAGS -L$BUILD_harfbuzz/src/.libs/"
27+
echo $SRC_PATH
28+
echo $BUILD_harfbuzz
29+
#return
2730
#~ export CC="$CC -I$BUILD_libfreetype/include"
2831
#~ export LDFLAGS="$LDFLAGS -L$LIBS_PATH"
2932
#~ export LDSHARED="$LIBLINK"
@@ -33,13 +36,10 @@ function build_freetype() {
3336

3437

3538
#try sh autogen.sh
36-
try ./configure --build=i686-pc-linux-gnu --host=arm-linux-androideabi --prefix="$BUILD_PATH/python-install& 10000 quot; --without-zlib --with-png=no --without-harfbuzz --enable-shared
37-
#try ./configure --build=i686-pc-linux-gnu --host=arm-eabi OPT=$OFLAG --enable-shared --disable-toolbox-glue --disable-framework --without-zlib --with-png=no
39+
try ./configure --build=i686-pc-linux-gnu --host=arm-linux-androideabi --prefix="$BUILD_PATH/python-install" --without-zlib --with-png=no --enable-shared
3840
try make -j5
39-
#try make -k CROSS_COMPILE_TARGET=yes INSTSONAME=libfreetype.so#-j4
4041
pop_arm
4142
echo 'finished'
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
}

recipes/harfbuzz/recipe.sh

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
#!/bin/bash
2+
3+
VERSION_harfbuzz=${VERSION_harfbuzz:-2.5.5}
4+
URL_harfbuzz=http://www.freedesktop.org/software/harfbuzz/release/harfbuzz-0.9.40.tar.bz2
5+
MD5_harfbuzz=0e27e531f4c4acff601ebff0957755c2
6+
BUILD_harfbuzz=$BUILD_PATH/harfbuzz/$(get_directory $URL_harfbuzz)
7+
RECIPE_harfbuzz=$RECIPES_PATH/harfbuzz
8+
9+
# function called for preparing source code if needed
10+
# (you can apply patch etc here.)
11+
function prebuild_harfbuzz() {
12+
true
13+
}
14+
15+
function shouldbuild_harfbuzz() {
16+
if [ -f "$BUILD_harfbuzz/src/.libs/libharfbuzz.so" ]; then
17+
DO_BUILD=0
18+
fi
19+
}
20+
21+
function build_harfbuzz() {
22+
cd $BUILD_harfbuzz
23+
24+
push_arm
25+
try ./configure --build=i686-pc-linux-gnu --host=arm-linux-androideabi --prefix="$BUILD_PATH/python-install" --enable-shared --without-freetype --without-glib
26+
try make -j5
27+
pop_arm
28+
try cp -L $BUILD_harfbuzz/src/.libs/libharfbuzz.so $LIBS_PATH
29+
}
30+
31+
# function called after all the compile have been done
32+
function postbuild_harfbuzz() {
33+
true
34+
}
35+
Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,21 @@
11
--- 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 @@
2+
+++ Python-2.7.2/Lib/ctypes/util.py 2015-03-26 13:45:33.322172603 +0000
3+
@@ -83,7 +83,17 @@
4+
except ValueError:
45
continue
56
return None
6-
7+
-
78
+elif os.name == "posix" and sys.platform == "linux3":
8-
+ print sys.path
99
+ def find_library(name):
1010
+ """ hack to find librarys for kivy and android
1111
+ split the path and get the first parts which will give us
1212
+ the app path something like /data/data/org.app.foo/"""
1313
+ app_root = os.path.abspath('./').split(os.path.sep)[0:4]
14-
+ lib_search = os.path.sep.join(app_root) + os.path.sep + 'files'
14+
+ lib_search = os.path.sep.join(app_root) + os.path.sep + 'lib'
1515
+ for filename in os.listdir(lib_search):
16-
+ print filename
1716
+ if filename.endswith('.so') and name in filename:
1817
+ return lib_search + os.path.sep + filename
1918
+ return None
20-
+
2119
elif os.name == "posix":
2220
# Andreas Degert's find functions, using gcc, /sbin/ldconfig, objdump
2321
import re, tempfile, errno

0 commit comments

Comments
 (0)
0