# -*- Mode: Python -*- vi:si:et:sw=4:sts=4:ts=4:syntax=python class Recipe(recipe.Recipe): name = 'libxml2' version = '2.9.2' stype = SourceType.TARBALL url = 'http://xmlsoft.org/sources/libxml2-2.9.2.tar.gz' licenses = [License.MIT] deps = [ 'zlib' ] autoreconf = True patches = ['libxml2/0001-Enable-windows-cross-compilation.patch', 'libxml2/0002-makefiles-disable-tests.patch', 'libxml2/0003-configure-fix-python-dir-prefix.patch', 'libxml2/0004-Fix-build-without-lzma.patch', 'libxml2/0005-configure.ac-Don-t-overwrite-LDFLAGS.patch', ] files_libs = ['libxml2'] files_devel = ['include/libxml2', 'lib/xml2Conf.sh', 'bin/xml2-config', 'lib/pkgconfig/libxml-2.0.pc', 'bin/xmllint%(bext)s'] def prepare(self): if self.config.target_platform == Platform.WINDOWS: self.configure_options = '--without-threads' elif self.config.target_platform == Platform.ANDROID: self.configure_options = '--with-python=no' elif self.config.target_platform == Platform.IOS: self.configure_options = '--with-python=no' elif self.config.target_platform == Platform.LINUX: if Architecture.is_arm(self.config.target_arch): self.configure_options = '--with-python=no'