@@ -9,36 +9,33 @@ class LXMLRecipe(Recipe):
99
1010 def should_build (self , arch ):
1111 super (LXMLRecipe , self ).should_build (arch )
12+ return True
1213 return not exists (join (self .ctx .get_libs_dir (arch .arch ), 'liblxml.so' ))
1314
1415 def build_arch (self , arch ):
15- super (LXMLRecipe , self ).build_arch (arch )
1616 env = self .get_recipe_env (arch )
1717 with current_directory (self .get_build_dir (arch .arch )):
18- #chmod +x $BUILD_libxslt/xslt-config
19- bash = sh .Command ('bash' )
20- shprint (bash , 'configure' , '--enable-minimal' , '--disable-soname-versions' , '--host=arm-linux-androideabi' , '--enable-shared' , _env = env )
21- shprint (sh .make , _env = env )
22- shutil .copyfile ('src/liblxml/.libs/libsodium.so' , join (self .ctx .get_libs_dir (arch .arch ), 'libsodium.so' ))
23-
18+ hostpython = sh .Command (self .ctx .hostpython )
19+ shprint (hostpython ,
20+ 'setup.py' ,
21+ 'build_ext' ,
22+ "-p%s" % arch .arch ,
23+ "-I/home/zgoldberg/.local/share/python-for-android/dists/peggo-python/python-install/include/python2.7/pyconfig.h" ,
24+ "-I/home/zgoldberg/.local/share/python-for-android/build/other_builds/libxml2/armeabi/libxml2/include" ,
25+ "-I/home/zgoldberg/.local/share/python-for-android/build/other_builds/libxslt/armeabi/libxslt"
2426
25- """ try $HOSTPYTHON setup.py build_ext -I$BUILD_libxml2/include -I$BUILD_libxslt
26- try find . -iname '*.pyx' -exec $CYTHON {} \;
27- try $HOSTPYTHON setup.py build_ext -v
28- try find build/lib.* -name "*.o" -exec $STRIP {} \;
27+ , _env = env )
2928
30- export PYTHONPATH=$BUILD_hostpython/Lib/site-packages
31- try $BUILD_hostpython/hostpython setup.py install -O2 --root=$BUILD_PATH/python-install --install-lib=lib/python2.7/site-packages
32-
33- unset LDSHARED
34- pop_arm"""
29+ super (LXMLRecipe , self ).build_arch (arch )
3530
3631 def get_recipe_env (self , arch ):
37- env = super (LibsodiumRecipe , self ).get_recipe_env (arch )
38- env ['CC' ] += "-I$BUILD_libxml2/include -I$BUILD_libxslt"
39- env ['LDFLAGS' ] = "-L$BUILD_libxslt/libxslt/.libs -L$BUILD_libxslt/libexslt/.libs -L$BUILD_libxml2/.libs -L$BUILD_libxslt/libxslt -L$BUILD_libxslt/libexslt -L$BUILD_libxml2/ " + env ['LDFLAGS' ]
32+ env = super (LXMLRecipe , self ).get_recipe_env (arch )
33+ bxml = "/home/zgoldberg/.local/share/python-for-android/build/other_builds/libxml2/armeabi/libxml2/"
34+ bxsl = "/home/zgoldberg/.local/share/python-for-android/build/other_builds/libxslt/armeabi/libxslt"
35+ env ['CC' ] += " -I%s/include -I%s" % (bxml , bxsl )
36+ env ['LDFLAGS' ] = (" -L%s/libxslt/.libs -L%s/libexslt/.libs -L%s/.libs -L%s/libxslt -L%s/libexslt -L%s/ " % (bxsl , bxsl , bxml , bxsl , bxsl , bxml )) + env ['LDFLAGS' ]
4037 env ['LDSHARED' ] = "$LIBLINK"
41- env ['PATH' ] += ":$BUILD_libxslt"
38+ env ['PATH' ] += ":%s" % bxsl
4239 env ['CFLAGS' ] += ' -Os'
4340 return env
4441
0 commit comments