Skip to content

Commit 58636ba

Browse files
committed
Libxml2 now builds successfully FOR ARM
1 parent c97da18 commit 58636ba

1 file changed

Lines changed: 5 additions & 16 deletions

File tree

pythonforandroid/recipes/libxml2/__init__.py

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -17,22 +17,14 @@ def build_arch(self, arch):
1717
super(Libxml2Recipe, self).build_arch(arch)
1818
env = self.get_recipe_env(arch)
1919
with current_directory(self.get_build_dir(arch.arch)):
20-
# First we need to build glob.c because its not avail
21-
# in android ndk
22-
23-
24-
shprint(sh.Command(env['CC'].split(" ")[0]), env['CC'].split(" ")[1], "-c", "-I.", "glob.c")
25-
shprint(sh.Command("chmod"), "+x", "glob.o")
26-
27-
env['LIBS'] = "./glob.o"
28-
29-
# If the build is done with /bin/sh things blow up,
30-
# try really hard to use bash
31-
sed = sh.Command('sed')
20+
env['CC'] += " -I%s" % self.get_build_dir(arch.arch)
3221
shprint(sh.Command('./configure'), '--host=arm-linux-eabi',
3322
'--without-modules', '--without-legacy', '--without-hfinistory', '--without-debug', '--without-docbook', '--without-python', '--without-threads', '--without-iconv',
3423
_env=env)
35-
shprint(sh.make, _env=env)
24+
25+
# Ensure we only build libxml2.la as if we do everything
26+
# we'll need the glob dependency which is a big headache
27+
shprint(sh.make, "libxml2.la", _env=env)
3628
shutil.copyfile('.libs/libxml2.a', join(self.ctx.get_libs_dir(arch.arch), 'libxml2.a'))
3729

3830

@@ -41,9 +33,6 @@ def get_recipe_env(self, arch):
4133
env['CONFIG_SHELL'] = '/bin/bash'
4234
env['SHELL'] = '/bin/bash'
4335
env['CC'] = '/usr/bin/ccache arm-linux-androideabi-gcc -DANDROID -mandroid -fomit-frame-pointer'
44-
env['CCC'] = '/usr/bin/ccache arm-linux-androideabi-g++ -DANDROID -mandroid -fomit-frame-pointer'
45-
#--sysroot /opt/android-sdks/ndk-bundle/platforms/android-16/arch-arm -I/home/zgoldberg/.local/share/python-for-android/build/other_builds/libxml2/armeabi/libxml2//include -I/home/zgoldberg/.local/share/python-for-android/build/other_builds/libxslt/armeabi/libxslt -I/home/zgoldberg/.local/share/python-for-android/build/python-installs/peggo-python/include/python2.7
46-
4736
return env
4837

4938
recipe = Libxml2Recipe()

0 commit comments

Comments
 (0)