view gub/specs/expat.py @ 5457:f65d6e563f9f

/GUB: slew of bootstrap/root fixes.
author Jan Nieuwenhuizen <janneke@gnu.org>
date Thu, 13 Aug 2009 14:59:39 +0200
parents 3baa15448cb6
children 9d90cca4c2a6
line wrap: on
line source

from gub import misc
from gub import target
from gub import tools

class Expat (target.AutoBuild):
    source = 'http://surfnet.dl.sourceforge.net/sourceforge/expat/expat-2.0.1.tar.gz'
    patches = ['expat-2.0.1-mingw.patch']
    def _get_build_dependencies (self):
        return ['libtool', 'tools::expat']
    def patch (self):
        target.AutoBuild.patch (self)
        #FIXME: should have configure.ac/in vs configure timestamp test
        self.system ("rm %(srcdir)s/configure")
        self.system ("touch %(srcdir)s/tests/xmltest.sh.in")
    def makeflags (self):
        return misc.join_lines ('''
SHELL=%(tools_prefix)s/bin/bash
CFLAGS="-O2 -DHAVE_EXPAT_CONFIG_H"
EXEEXT=
RUN_FC_CACHE_TEST=false
''')

class Expat__mingw (Expat):
    def configure_command (self):
        # mingw's expat libtool build breaks with DASH
        return (Expat.configure_command (self)
                .replace ('SHELL=', 'XSHELL='))

class Expat__linux__arm__vfp (Expat):
    patches = []
    source = 'http://surfnet.dl.sourceforge.net/sourceforge/expat/expat-2.0.0.tar.gz'
    def patch (self):
        self.system ("touch %(srcdir)s/tests/xmltest.sh.in")
        target.AutoBuild.patch (self)

class Expat__tools (tools.AutoBuild, Expat):
    def _get_build_dependencies (self):
        return ['libtool']