Ejemplo n.º 1
0
    def do_install(self, buildscript):
        buildscript.set_action('Installing', self)
        # do nothing for now
    do_install.depends = [PHASE_BUILD]

    def xml_tag_and_attrs(self):
        return 'msvc', [('id', 'name', None)]

def collect_args(instance, node, argtype):
    if node.hasAttribute(argtype):
        args = node.getAttribute(argtype)
    else:
        args = ''

    for child in node.childNodes:
        if child.nodeType == child.ELEMENT_NODE and child.nodeName == argtype:
            if not child.hasAttribute('value'):
                raise FatalError("<%s/> tag must contain value=''" % argtype)
            args += ' ' + child.getAttribute('value')

    return instance.eval_args(args)

def parse_msvc(node, config, uri, repositories, default_repo):
    instance = MSVCModule.parse_from_xml(node, config, uri, repositories, default_repo)

    instance.msvcargs = collect_args(instance, node, 'msvcargs')

    return instance

register_module_type('msvc', parse_msvc)
Ejemplo n.º 2
0
    autogenargs = autogenargs.replace('--enable-maintainer-mode', '')

    dependencies, after, suggests, systemdependencies = get_dependencies(node)

    from autotools import AutogenModule
    from icbuild.versioncontrol.tarball import TarballBranch, TarballRepository

    # create a fake TarballRepository, and give it the moduleset uri
    repo = TarballRepository(config, None, None)
    repo.moduleset_uri = uri

    branch = TarballBranch(repo, source_url, version, checkoutdir,
            source_size, source_hash, None)
    branch.patches = patches

    instance = AutogenModule(name, branch,
                             autogenargs, makeargs, makeinstallargs,
                             supports_non_srcdir_builds = supports_non_srcdir_builds,
                             skip_autogen = False, autogen_sh = 'configure',
                             makefile = makefile)
    instance.dependencies = dependencies
    instance.after = after
    instance.suggests = suggests
    instance.systemdependencies = systemdependencies
    instance.pkg_config = find_first_child_node_content(node, 'pkg-config')
    instance.config = config

    return instance

register_module_type('tarball', parse_tarball)