@@ -22,6 +22,7 @@ function prebuild_python() {
2222 try patch -p1 < $RECIPE_python /patches/disable-modules.patch
2323 try patch -p1 < $RECIPE_python /patches/fix-locale.patch
2424 try patch -p1 < $RECIPE_python /patches/fix-gethostbyaddr.patch
25+ try patch -p1 < $RECIPE_python /patches/fix-setup-flags.patch
2526 try patch -p1 < $RECIPE_python /patches/custom-loader.patch
2627 try patch -p1 < $RECIPE_python /patches/verbose-compilation.patch
2728
@@ -34,9 +35,8 @@ function build_python() {
3435 cd $BUILD_python
3536
3637 # if the last step have been done, avoid all
37- if [ -f $BUILD_PATH /python-install/bin/python.host ]; then
38+ if [ -f libpython2.7.so ]; then
3839 return
39- # true
4040 fi
4141
4242 # copy same module from host python
@@ -45,14 +45,18 @@ function build_python() {
4545 try cp $BUILD_hostpython /hostpgen .
4646
4747 push_arm
48+
49+ # openssl activated ?
50+ if [ " X$BUILD_openssl " != " X" ]; then
51+ debug " Activate flags for openssl / python"
52+ export CFLAGS=" $CFLAGS -I$BUILD_openssl /include/"
53+ export LDFLAGS=" $LDFLAGS -L$BUILD_openssl /"
54+ fi
55+
4856 try ./configure --host=arm-eabi --prefix=" $BUILD_PATH /python-install" --enable-shared
4957 try $MAKE HOSTPYTHON=$BUILD_python /hostpython HOSTPGEN=$BUILD_python /hostpgen CROSS_COMPILE_TARGET=yes INSTSONAME=libpython2.7.so
5058 cp HOSTPYTHON=$BUILD_python /hostpython python
5159
52- # Try to compile module by ourself
53- # debug 'Try to compile module by ourself'
54- # $BUILD_python/hostpython -E setup.py build -v -f
55-
5660 # FIXME, the first time, we got a error at:
5761 # python$EXE ../../Tools/scripts/h2py.py -i '(u_long)' /usr/include/netinet/in.h
5862 # /home/tito/code/python-for-android/build/python/Python-2.7.2/python: 1: Syntax error: word unexpected (expecting ")")
0 commit comments