10000 add freetype reciepe · olymk2/python-for-android@4a14fd1 · GitHub
[go: up one dir, main page]

Skip to content

Commit 4a14fd1

Browse files
author
Oliver Marks
committed
add freetype reciepe
1 parent c0d6eb6 commit 4a14fd1

File tree

4 files changed

+61
-4
lines changed

4 files changed

+61
-4
lines changed

recipes/freetype/recipe.sh

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
#!/bin/bash
2+
3+
VERSION_freetype=${VERSION_freetype:-2.5.5}
4+
#DEPS_freetype=(python)
5+
URL_freetype=http://download.savannah.gnu.org/releases/freetype/freetype-2.5.5.tar.gz
6+
#MD5_freetype=4ba105e2d8535496fd633889396b20b7
7+
BUILD_freetype=$BUILD_PATH/freetype/$(get_directory $URL_freetype)
8+
RECIPE_freetype=$RECIPES_PATH/freetype
9+
10+
# function called for preparing source code if needed
11+
# (you can apply patch etc here.)
12+
function prebuild_freetype() {
13+
true
14+
}
15+
16+
#~ function shouldbuild_freetype() {
17+
#~ if [ -f "$BUILD_freetype/libfreetype.so" ]; then
18+
#~ DO_BUILD=0
19+
#~ fi
20+
#~ }
21+
22+
function build_freetype() {
23+
cd $BUILD_freetype
24+
25+
push_arm
26+
27+
#~ export CC="$CC -I$BUILD_libfreetype/include"
28+
#~ export LDFLAGS="$LDFLAGS -L$LIBS_PATH"
29+
#~ export LDSHARED="$LIBLINK"
30+
31+
#export LDSHARED="$LIBLINK"
32+
# http://en.wikibooks.org/wiki/OpenGL_Programming/Installation/Android_NDK#FreeType
33+
34+
35+
#try sh autogen.sh
36+
try ./configure --build=i686-pc-linux-gnu --host=arm-linux-androideabi --prefix=$BUILD_freetype --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
38+
try make -j5
39+
#try make -k CROSS_COMPILE_TARGET=yes INSTSONAME=libfreetype.so#-j4
40+
pop_arm
41+
echo 'finished'
42+
try cp -L $BUILD_freetype/objs/.libs/libfreetype.so $LIBS_PATH/libfreetype.so.6
43+
try cp -L $BUILD_freetype/objs/.libs/libfreetype.so $LIBS_PATH
44+
45+
}
46+
47+
# function called after all the compile have been done
48+
function postbuild_freetype() {
49+
true
50+
}
51+

recipes/libxslt/recipe.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ function build_libxslt() {
2626
cd $BUILD_libxslt
2727

2828
push_arm
29-
29+
try sh autogen.sh
3030
try ./configure --build=i686-pc-linux-gnu --host=arm-linux-eabi \
3131
--without-plugins --without-debug --without-python --without-crypto \
3232
--with-libxml-src=$BUILD_libxml2

recipes/libyaml/recipe.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ function build_libyaml() {
2222
push_arm
2323

2424
# using arm-linux-eabi does not create a shared library
25-
try ./configure --build=i686-pc-linux-gnu --host=arm-linux-androideabi
25+
try ./configure --build=i686-pc-linux-gnu --host=arm-linux-androideabi --prefix=$BUILD_libyaml
2626
try make
2727

2828
try cp -L $BUILD_libyaml/src/.libs/libyaml.so $LIBS_PATH

src/src/org/renpy/android/PythonService.java

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,17 @@ public void run(){
8585
System.loadLibrary("python2.7");
8686
System.loadLibrary("application");
8787
System.loadLibrary("sdl_main");
88-
System.loadLibrary("ctypes");
88+
System.loadLibrary("ctypes");
8989

9090
System.load(getFilesDir() + "/lib/python2.7/lib-dynload/_io.so");
9191
System.load(getFilesDir() + "/lib/python2.7/lib-dynload/unicodedata.so");
92-
System.load(getFilesDir() + "/lib/python2.7/lib-dynload/_ctypes.so");
92+
System.load(getFilesDir() + "/lib/python2.7/lib-dynload/_ctypes.so");
93+
94+
try {
95+
System.loadLibrary("freetype");
96+
System.load(getFilesDir() + "/lib/python2.7/lib-dynload/freetype.so");
97+
} catch(UnsatisfiedLinkError e) {
98+
}
9399

94100
try {
95101
System.loadLibrary("sqlite3");

0 commit comments

Comments
 (0)
0