11from pythonforandroid .toolchain import Recipe , shprint , shutil , current_directory
2- from os .path import exists , join
2+ from os .path import exists , join , dirname , basename
33import sh
44
55class LibxsltRecipe (Recipe ):
@@ -16,18 +16,21 @@ def build_arch(self, arch):
1616 super (LibxsltRecipe , self ).build_arch (arch )
1717 env = self .get_recipe_env (arch )
1818 with current_directory (self .get_build_dir (arch .arch )):
19- bash = sh .Command ('bash' )
20- shprint (bash , 'configure' ,
19+ # If the build is done with /bin/sh things blow up,
20+ # try really hard to use bash
21+ libxml = dirname (dirname (self .get_build_container_dir (arch .arch ))) + "/libxml2/%s/libxml2" % arch .arch
22+ shprint (sh .Command ('./configure' ),
2123 '--build=i686-pc-linux-gnu' , '--host=arm-linux-eabi' ,
2224 '--without-plugins' , '--without-debug' , '--without-python' , '--without-crypto' ,
23- '--with-libxml-src=../../../libxml2/armeabi/libxml2/' )
25+ '--with-libxml-src=%s' % libxml )
2426 shprint (sh .make , _env = env )
25- shutil .copyfile ('src/ libxslt/.libs/libxslt.a' , join (self .ctx .get_libs_dir (arch .arch ), 'libxslt.a' ))
27+ shutil .copyfile ('libxslt/.libs/libxslt.a' , join (self .ctx .get_libs_dir (arch .arch ), 'libxslt.a' ))
2628
2729
2830 def get_recipe_env (self , arch ):
2931 env = super (LibxsltRecipe , self ).get_recipe_env (arch )
30- env ['CFLAGS' ] += ' -Os'
32+ env ['CONFIG_SHELL' ] = '/bin/bash'
33+ env ['SHELL' ] = '/bin/bash'
3134 return env
3235
3336recipe = LibxsltRecipe ()
0 commit comments