コード例 #1
0
ファイル: autotools.py プロジェクト: inducer/jhbuild
def parse_autotools(node, config, repositories, default_repo):
    id = node.getAttribute('id')
    kwargs = {}

    if node.hasAttribute('autogenargs'):
        kwargs["autogenargs"] = node.getAttribute('autogenargs')
    if node.hasAttribute('standardautogen'):
        kwargs["standardautogen"] = node.getAttribute('standardautogen') != 'no'
    if node.hasAttribute('makecommand'):
        kwargs["makecommand"] = node.getAttribute('makecommand')
    kwargs["makeargs"] = config.module_makeargs.get(id, config.makeargs)
    if node.hasAttribute('makeargs'):
        kwargs["makeargs"] = " " + node.getAttribute('makeargs')
    if node.hasAttribute('supports-non-srcdir-builds'):
        kwargs["supports_non_srcdir_builds"] = \
            (node.getAttribute('supports-non-srcdir-builds') != 'no')
    if node.hasAttribute('autogen-sh'):
        kwargs["autogen_sh"] = node.getAttribute('autogen-sh')
    if node.hasAttribute('makefile'):
        kwargs["makefile"] = makefile = node.getAttribute('makefile')
    if node.hasAttribute('alwaysautogen'):
        kwargs["alwaysautogen"] = node.getAttribute('alwaysautogen') != 'no'
    if node.hasAttribute('skipinstall'):
        kwargs["skipinstall"] = node.getAttribute('skipinstall') != 'no'

    dependencies, after = get_dependencies(node)
    branch = get_branch(node, repositories, default_repo)

    return AutogenModule(id, branch, dependencies, after, **kwargs)
コード例 #2
0
def parse_scons(node, config, uri, repositories, default_repo):
    id = node.getAttribute('id')
    sconsargs = ''
    supports_non_srcdir_builds = True
    if node.hasAttribute('sconsargs'):
        autogenargs = node.getAttribute('sconsargs')
    if node.hasAttribute('supports-non-srcdir-builds'):
        supports_non_srcdir_builds = \
            (node.getAttribute('supports-non-srcdir-builds') != 'no')

    # Make some substitutions; do special handling of '${prefix}' and '${libdir}'
    p = re.compile('(\${prefix})')
    sconsargs     = p.sub(config.prefix, sconsargs)
    # I'm not sure the replacement of ${libdir} is necessary for firefox...
    p = re.compile('(\${libdir})')
    libsubdir = '/lib'
    if config.use_lib64:
        libsubdir = '/lib64'
    sconsargs     = p.sub(config.prefix + libsubdir, autogenargs)

    dependencies, after, suggests = get_dependencies(node)
    branch = get_branch(node, repositories, default_repo, config)

    return SconsModule(id, branch, sconsargs=sconsargs,
                         dependencies=dependencies,
                         after=after,
                         suggests=suggests,
                         supports_non_srcdir_builds=supports_non_srcdir_builds)
コード例 #3
0
ファイル: linux.py プロジェクト: faribakafi/esl-bundle
def parse_linux(node, config, uri, repositories, default_repo):
    id = node.getAttribute('id')

    makeargs = ''
    if node.hasAttribute('makeargs'):
        makeargs = node.getAttribute('makeargs')
        makeargs = makeargs.replace('${prefix}', config.prefix)

    branch = get_branch(node, repositories, default_repo, config)
    kconfigs = get_kconfigs(node, repositories, default_repo)

    return LinuxModule(id, branch, kconfigs, makeargs)
コード例 #4
0
ファイル: waf.py プロジェクト: ylatuya/jhbuild
def parse_waf(node, config, uri, repositories, default_repo):
    module_id = node.getAttribute('id')
    waf_cmd = './waf'
    if node.hasAttribute('waf-command'):
        waf_cmd = node.getAttribute('waf-command')

    # override revision tag if requested.
    dependencies, after, suggests = get_dependencies(node)
    branch = get_branch(node, repositories, default_repo, config)

    return WafModule(module_id, branch, dependencies=dependencies, after=after,
            suggests=suggests, waf_cmd=waf_cmd)
コード例 #5
0
def parse_testmodule(node, config, uri, repositories, default_repo):
    id = node.getAttribute('id')
    test_type = node.getAttribute('type')
    if test_type not in __test_types__:
        # FIXME: create an error here
        pass

    dependencies, after, suggests = get_dependencies(node)
    branch = get_branch(node, repositories, default_repo, config)
    tested_pkgs = get_tested_packages(node)
    return TestModule(id, branch, test_type, dependencies=dependencies,
            after=after, tested_pkgs=tested_pkgs)
コード例 #6
0
ファイル: distutils.py プロジェクト: inducer/jhbuild
def parse_distutils(node, config, repositories, default_repo):
    id = node.getAttribute('id')
    supports_non_srcdir_builds = True

    if node.hasAttribute('supports-non-srcdir-builds'):
        supports_non_srcdir_builds = \
            (node.getAttribute('supports-non-srcdir-builds') != 'no')
    dependencies, after = get_dependencies(node)
    branch = get_branch(node, repositories, default_repo)

    return DistutilsModule(id, branch,
                           dependencies=dependencies, after=after,
                           supports_non_srcdir_builds=supports_non_srcdir_builds)
コード例 #7
0
ファイル: ant.py プロジェクト: ylatuya/jhbuild
def parse_ant(node, config, uri, repositories, default_repo):
    id = node.getAttribute('id')
    supports_non_srcdir_builds = False

    if node.hasAttribute('supports-non-srcdir-builds'):
        supports_non_srcdir_builds = \
            (node.getAttribute('supports-non-srcdir-builds') != 'no')
    dependencies, after, suggests = get_dependencies(node)
    branch = get_branch(node, repositories, default_repo)

    return AntModule(id, branch,
                           dependencies=dependencies, after=after,
                           supports_non_srcdir_builds=supports_non_srcdir_builds)
コード例 #8
0
ファイル: mesa.py プロジェクト: inducer/jhbuild
def parse_mesa(node, config, repositories, default_repo):
    id = node.getAttribute('id')
    makeargs = ''
    if node.hasAttribute('makeargs'):
        makeargs = node.getAttribute('makeargs')

    # override revision tag if requested.
    makeargs += ' ' + config.module_makeargs.get(id, config.makeargs)

    dependencies, after = get_dependencies(node)
    branch = get_branch(node, repositories, default_repo)

    return MesaModule(id, branch, makeargs,
                         dependencies=dependencies, after=after)
コード例 #9
0
ファイル: cmake.py プロジェクト: rpavlik/jhbuild-vrjuggler
def parse_cmake(node, config, uri, repositories, default_repo):
    id = node.getAttribute('id')
    cmakeargs = ''
    makeargs = ''
    if node.hasAttribute('cmakeargs'):
        cmakeargs = node.getAttribute('cmakeargs')
    if node.hasAttribute('makeargs'):
        makeargs = node.getAttribute('makeargs')

    dependencies, after, suggests = get_dependencies(node)
    branch = get_branch(node, repositories, default_repo, config)

    return CMakeModule(id, branch, cmakeargs, makeargs,
                       dependencies = dependencies, after = after,
                       suggests = suggests)
コード例 #10
0
ファイル: waf.py プロジェクト: ylatuya/jhbuild
def parse_waf(node, config, uri, repositories, default_repo):
    module_id = node.getAttribute('id')
    waf_cmd = './waf'
    if node.hasAttribute('waf-command'):
        waf_cmd = node.getAttribute('waf-command')

    # override revision tag if requested.
    dependencies, after, suggests = get_dependencies(node)
    branch = get_branch(node, repositories, default_repo, config)

    return WafModule(module_id,
                     branch,
                     dependencies=dependencies,
                     after=after,
                     suggests=suggests,
                     waf_cmd=waf_cmd)
コード例 #11
0
def parse_perl(node, config, uri, repositories, default_repo):
    id = node.getAttribute('id')
    makeargs = ''
    if node.hasAttribute('makeargs'):
        makeargs = node.getAttribute('makeargs')

    # Make some substitutions; do special handling of '${prefix}'
    p = re.compile('(\${prefix})')
    makeargs = p.sub(config.prefix, makeargs)
    
    dependencies, after, suggests = get_dependencies(node)
    branch = get_branch(node, repositories, default_repo, config)

    return PerlModule(id, branch, makeargs,
            dependencies=dependencies, after=after,
            suggests=suggests)
コード例 #12
0
ファイル: tarball.py プロジェクト: mujin/jhbuild
 def branch_from_xml(self, name, branchnode, repositories, default_repo):
     try:
         branch = Repository.branch_from_xml(self, name, branchnode, repositories, default_repo)
     except TypeError:
         raise FatalError(_('branch for %s is not correct, check the moduleset file.') % name)
     # patches represented as children of the branch node
     for childnode in branchnode.childNodes:
         if childnode.nodeType != childnode.ELEMENT_NODE: continue
         if childnode.nodeName == 'patch':
             patchfile = childnode.getAttribute('file')
             if childnode.hasAttribute('strip'):
                 patchstrip = int(childnode.getAttribute('strip'))
             else:
                 patchstrip = 0
             branch.patches.append((patchfile, patchstrip))
         elif childnode.nodeName == 'quilt':
             branch.quilt = get_branch(childnode, repositories, default_repo)
     return branch
コード例 #13
0
def parse_cmake(node, config, uri, repositories, default_repo):
    id = node.getAttribute('id')
    cmakeargs = ''
    makeargs = ''
    if node.hasAttribute('cmakeargs'):
        cmakeargs = node.getAttribute('cmakeargs')
    if node.hasAttribute('makeargs'):
        makeargs = node.getAttribute('makeargs')

    dependencies, after, suggests = get_dependencies(node)
    branch = get_branch(node, repositories, default_repo, config)

    return CMakeModule(id,
                       branch,
                       cmakeargs,
                       makeargs,
                       dependencies=dependencies,
                       after=after,
                       suggests=suggests)
コード例 #14
0
ファイル: tarball.py プロジェクト: ylatuya/jhbuild
 def branch_from_xml(self, name, branchnode, repositories, default_repo):
     try:
         branch = Repository.branch_from_xml(self, name, branchnode,
                                             repositories, default_repo)
     except TypeError:
         raise FatalError(
             _('branch for %s is not correct, check the moduleset file.') %
             name)
     # patches represented as children of the branch node
     for childnode in branchnode.childNodes:
         if childnode.nodeType != childnode.ELEMENT_NODE: continue
         if childnode.nodeName == 'patch':
             patchfile = childnode.getAttribute('file')
             if childnode.hasAttribute('strip'):
                 patchstrip = int(childnode.getAttribute('strip'))
             else:
                 patchstrip = 0
             branch.patches.append((patchfile, patchstrip))
         elif childnode.nodeName == 'quilt':
             branch.quilt = get_branch(childnode, repositories,
                                       default_repo)
     return branch
コード例 #15
0
def parse_autotools(node, config, uri, repositories, default_repo):
    id = node.getAttribute('id')
    autogenargs = ''
    makeargs = ''
    makeinstallargs = ''
    supports_non_srcdir_builds = True
    autogen_sh = None
    skip_autogen = False
    check_target = True
    makefile = 'Makefile'
    autogen_template = None
    if node.hasAttribute('autogenargs'):
        autogenargs = node.getAttribute('autogenargs')
    if node.hasAttribute('makeargs'):
        makeargs = node.getAttribute('makeargs')
    if node.hasAttribute('makeinstallargs'):
        makeinstallargs = node.getAttribute('makeinstallargs')
    if node.hasAttribute('supports-non-srcdir-builds'):
        supports_non_srcdir_builds = \
            (node.getAttribute('supports-non-srcdir-builds') != 'no')
    if node.hasAttribute('skip-autogen'):
        skip_autogen = node.getAttribute('skip-autogen')
        if skip_autogen == 'true':
            skip_autogen = True
        elif skip_autogen == 'never':
            skip_autogen = 'never'
        else:
            skip_autogen = False
    if node.hasAttribute('check-target'):
        check_target = (node.getAttribute('check-target') == 'true')
    if node.hasAttribute('autogen-sh'):
        autogen_sh = node.getAttribute('autogen-sh')
    if node.hasAttribute('makefile'):
        makefile = node.getAttribute('makefile')
    if node.hasAttribute('autogen-template'):
        autogen_template = node.getAttribute('autogen-template')

    # Make some substitutions; do special handling of '${prefix}' and '${libdir}'
    p = re.compile('(\${prefix})')
    autogenargs     = p.sub(config.prefix, autogenargs)
    makeargs        = p.sub(config.prefix, makeargs)
    makeinstallargs = p.sub(config.prefix, makeinstallargs)
    # I'm not sure the replacement of ${libdir} is necessary for firefox...
    p = re.compile('(\${libdir})')
    libsubdir = '/lib'
    if config.use_lib64:
        libsubdir = '/lib64'
    autogenargs     = p.sub(config.prefix + libsubdir, autogenargs)
    makeargs        = p.sub(config.prefix + libsubdir, makeargs)
    makeinstallargs = p.sub(config.prefix + libsubdir, makeinstallargs)

    dependencies, after, suggests = get_dependencies(node)
    branch = get_branch(node, repositories, default_repo, config)

    from jhbuild.versioncontrol.tarball import TarballBranch
    if isinstance(branch, TarballBranch):
        # in tarballs, force autogen-sh to be configure, unless autogen-sh is
        # already set
        if autogen_sh is None:
            autogen_sh = 'configure'
    elif not autogen_sh:
        autogen_sh = 'autogen.sh'

    return AutogenModule(id, branch, autogenargs, makeargs,
                         makeinstallargs=makeinstallargs,
                         dependencies=dependencies,
                         after=after,
                         suggests=suggests,
                         supports_non_srcdir_builds=supports_non_srcdir_builds,
                         skip_autogen=skip_autogen,
                         autogen_sh=autogen_sh,
                         makefile=makefile,
                         autogen_template=autogen_template,
                         check_target=check_target)
コード例 #16
0
def parse_autotools(node, config, uri, repositories, default_repo):
    id = node.getAttribute('id')
    autogenargs = ''
    makeargs = ''
    makeinstallargs = ''
    supports_non_srcdir_builds = True
    autogen_sh = None
    skip_autogen = False
    check_target = True
    makefile = 'Makefile'
    autogen_template = None
    if node.hasAttribute('autogenargs'):
        autogenargs = node.getAttribute('autogenargs')
    if node.hasAttribute('makeargs'):
        makeargs = node.getAttribute('makeargs')
    if node.hasAttribute('makeinstallargs'):
        makeinstallargs = node.getAttribute('makeinstallargs')
    if node.hasAttribute('supports-non-srcdir-builds'):
        supports_non_srcdir_builds = \
            (node.getAttribute('supports-non-srcdir-builds') != 'no')
    if node.hasAttribute('skip-autogen'):
        skip_autogen = node.getAttribute('skip-autogen')
        if skip_autogen == 'true':
            skip_autogen = True
        elif skip_autogen == 'never':
            skip_autogen = 'never'
        else:
            skip_autogen = False
    if node.hasAttribute('check-target'):
        check_target = (node.getAttribute('check-target') == 'true')
    if node.hasAttribute('autogen-sh'):
        autogen_sh = node.getAttribute('autogen-sh')
    if node.hasAttribute('makefile'):
        makefile = node.getAttribute('makefile')
    if node.hasAttribute('autogen-template'):
        autogen_template = node.getAttribute('autogen-template')

    # Make some substitutions; do special handling of '${prefix}' and '${libdir}'
    p = re.compile('(\${prefix})')
    autogenargs = p.sub(config.prefix, autogenargs)
    makeargs = p.sub(config.prefix, makeargs)
    makeinstallargs = p.sub(config.prefix, makeinstallargs)
    # I'm not sure the replacement of ${libdir} is necessary for firefox...
    p = re.compile('(\${libdir})')
    libsubdir = '/lib'
    if config.use_lib64:
        libsubdir = '/lib64'
    autogenargs = p.sub(config.prefix + libsubdir, autogenargs)
    makeargs = p.sub(config.prefix + libsubdir, makeargs)
    makeinstallargs = p.sub(config.prefix + libsubdir, makeinstallargs)

    dependencies, after, suggests = get_dependencies(node)
    branch = get_branch(node, repositories, default_repo, config)

    from jhbuild.versioncontrol.tarball import TarballBranch
    if isinstance(branch, TarballBranch):
        # in tarballs, force autogen-sh to be configure, unless autogen-sh is
        # already set
        if autogen_sh is None:
            autogen_sh = 'configure'
    elif not autogen_sh:
        autogen_sh = 'autogen.sh'

    return AutogenModule(id,
                         branch,
                         autogenargs,
                         makeargs,
                         makeinstallargs=makeinstallargs,
                         dependencies=dependencies,
                         after=after,
                         suggests=suggests,
                         supports_non_srcdir_builds=supports_non_srcdir_builds,
                         skip_autogen=skip_autogen,
                         autogen_sh=autogen_sh,
                         makefile=makefile,
                         autogen_template=autogen_template,
                         check_target=check_target)