Exemple #1
0
 def __init__ (self, settings, source):
     target.AutoBuild.__init__ (self, settings, source)
     if isinstance (source, repository.Subversion):
         source.version = misc.bind_method (lambda x: repository.Repository.version_from_pc_in (x, 'portaudio-2.0.pc.in'), source)
     if 'snapshot' in Portaudio.source:
         # version_from_* does not work with tar ball, hardcode for now
         source.version = misc.bind_method (lambda x: '19', source)
Exemple #2
0
 def __init__ (self, settings, source):
     target.AutoBuild.__init__ (self, settings, source)
     if isinstance (source, repository.Subversion):
         source.version = misc.bind_method (lambda x: repository.Repository.version_from_pc_in (x, 'portaudio-2.0.pc.in'), source)
     if 'snapshot' in Portaudio.source:
         # version_from_* does not work with tar ball, hardcode for now
         source.version = misc.bind_method (lambda x: '19', source)
Exemple #3
0
 def __init__ (self, settings, source):
     target.AutoBuild.__init__ (self, settings, source)
     if (isinstance (source, repository.Repository)
         and not isinstance (source, repository.TarBall)):
         source.version = misc.bind_method (Ghostscript__freebsd__x86.version_from_VERSION, source)
     else:
         source.version = misc.bind_method (Ghostscript__freebsd__x86.static_version, source)
Exemple #4
0
 def __init__ (self, settings, source):
     target.AutoBuild.__init__ (self, settings, source)
     if (isinstance (source, repository.Repository)
         and not isinstance (source, repository.TarBall)):
         source.version = misc.bind_method (Ghostscript__freebsd__x86.version_from_VERSION, source)
     else:
         source.version = misc.bind_method (Ghostscript__freebsd__x86.static_version, source)
Exemple #5
0
def get_debian_package (settings, description):
    s = description[:description.find ('\nDescription')]
    d = dict ([line.split (': ', 1) for line in list (map (''.strip, s.split ('\n')))])
    # FIXME: should blacklist toplevel bin/gub argument iso lilypond
    blacklist = [
        'binutils',
        'cpp',
        'gcc-3.3',
        'cpp-3.3',
        'gcc',
        'gcc-3.4',
        'libgcc1',
        'libgcc1-3.4',
        'lilypond',
        'libstdc++6',
        'libstdc++-dev',
        'libtool',
        'perl',
        'perl-modules',
        'perl-base',
#        'pkg-config',
        ]
    if d['Package'] in blacklist:
        d['Package'] += '::blacklisted'
    package_class = new.classobj (d['Package'], (build.BinaryBuild,), {})
    from gub import repository
    source = repository.DebianPackage (settings.downloads + '/Debian/' + settings.debian_branch,
                                       os.path.join (mirror, d['Filename']),
                                       d['Version'])
    package = package_class (settings, source)
    package.name_dependencies = []
    if 'Depends' in d:
        deps = list (map (''.strip,
                    re.sub ('\([^\)]*\)', '', d['Depends']).split (', ')))
        # FIXME: BARF, ignore choices
        deps = [x for x in deps if x.find ('|') == -1]
        # FIXME: how to handle Provides: ?
        # FIXME: BARF, fixup libc Provides
        deps = [re.sub ('libc($|-)', 'libc6\\1', x) for x in deps]
        deps = [re.sub ('liba52-dev', 'liba52-0.7.4-dev', x) for x in deps]
        deps = [re.sub ('libpng12-0-dev', 'libpng12-dev', x) for x in deps]
        # FIXME: ugh, skip some
        deps = [x for x in deps if x not in blacklist]
        package.name_dependencies = deps

    def get_build_dependencies (self):
        return self.name_dependencies
    package.get_build_dependencies = misc.bind_method (get_build_dependencies,
                                                       package)
    pkg_name = d['Package']
    @context.subst_method
    def name (self):
        return pkg_name
    message = 'FIXME: enter .name into package_class; see cygwin.py'
    printf (message)
    raise Exception (message)
    package.name = misc.bind_method (name, package)
    context.subst_method (package.name)
    return package
Exemple #6
0
 def __init__ (self, settings, source):
     target.AutoBuild.__init__ (self, settings, source)
     if (isinstance (source, repository.Repository)
         and not isinstance (source, repository.TarBall)):
         source.version = misc.bind_method (Ghostscript.version_from_VERSION, source)
     else:
         source.version = misc.bind_method (Ghostscript.static_version, source)
     if 'powerpc' in self.settings.target_architecture:
         self.configure_flags = self.configure_flags.replace('--enable-little-endian', '--enable-big-endian')
Exemple #7
0
 def __init__ (self, settings, source):
     target.AutoBuild.__init__ (self, settings, source)
     if (isinstance (source, repository.Repository)
         and not isinstance (source, repository.TarBall)):
         source.version = misc.bind_method (Ghostscript.version_from_VERSION, source)
     else:
         source.version = misc.bind_method (Ghostscript.static_version, source)
     if 'powerpc' in self.settings.target_architecture:
         self.configure_flags = self.configure_flags.replace('--enable-little-endian', '--enable-big-endian')
Exemple #8
0
 def __init__ (self, settings, source):
     target.AutoBuild.__init__ (self, settings, source)
     source.source = source.source.replace (self.name (), 'lilypond')
     source.dir = source.dir.replace (self.name (), 'lilypond')
     source.url_dir = source.url_dir.replace (self.name (), 'lilypond')
     source.version = misc.bind_method (LilyPond.version_from_VERSION, source)
     source.is_tracking = misc.bind_method (lambda x: True, source)
     source.is_downloaded = misc.bind_method (lambda x: True, source)
     source.update_workdir = misc.bind_method (lambda x: True, source)
     self.dependencies = (self.__class__.dependencies
                          + [settings.build_platform + '::'
                             + source.source + '?branch=' + source.branch])
Exemple #9
0
 def __init__ (self, settings, source):
     target.AutoBuild.__init__ (self, settings, source)
     if isinstance (source, repository.Git):
         source.source = source.source.replace (self.name (), 'lilypond')
         source.dir = source.dir.replace (self.name (), 'lilypond')
         source.url_dir = source.url_dir.replace (self.name (), 'lilypond')
         source.version = misc.bind_method (LilyPond.version_from_VERSION, source)
         source.is_tracking = misc.bind_method (lambda x: True, source)
         source.is_downloaded = misc.bind_method (lambda x: True, source)
         source.update_workdir = misc.bind_method (lambda x: True, source)
         self.dependencies = (self.__class__.dependencies
                              + [self.settings.target_platform + '::'
                                 + source.source + '?branch=' + source.branch])
Exemple #10
0
 def __init__(self, settings, source):
     target.AutoBuild.__init__(self, settings, source)
     build.add_dict(
         self, {
             'ACLOCAL_FLAGS': ' -I '.join([''] + self.aclocal_path()),
         })
     source.is_tracking = misc.bind_method(lambda x: True, source)
Exemple #11
0
 def __init__(self, settings, source):
     target.AutoBuild.__init__(self, settings, source)
     if isinstance(source, repository.Git):
         ##source.version = lambda: '1.8.6'
         source.version = misc.bind_method(Guile.version_from_VERSION,
                                           source)
     self.so_version = '17'
Exemple #12
0
    def init_repos(self):
        if isinstance(self.source, repository.Subversion):

            def fixed_version(self):
                return '2009'

            self.source.version = misc.bind_method(fixed_version, self.source)
            self.texmf_repo = repository.Subversion(
                dir=self.get_repodir() + '-texmf',
                source=texlive_svn,
                branch='trunk',
                branchmodule='Master/texmf',
                revision='HEAD')
            self.texmf_dist_repo = repository.Subversion(
                dir=self.get_repodir() + '-texmf-dist',
                source=texlive_svn,
                branch='trunk',
                branchmodule='Master/texmf-dist',
                revision='HEAD')
        else:
            self.texmf_repo = repository.get_repository_proxy(
                self.get_repodir().replace('texlive', 'texlive-texmf-tiny'),
                (Texlive.source.replace('texlive',
                                        'texlive-texmf-tiny').replace(
                                            '.tar.gz', '.1.tar.gz')))
            self.texmf_dist_repo = repository.get_repository_proxy(
                self.get_repodir().replace('texlive',
                                           'texlive-texmf-dist-tiny'),
                (Texlive.source.replace('texlive',
                                        'texlive-texmf-dist-tiny').replace(
                                            '.tar.gz', '.1.tar.gz')))
Exemple #13
0
 def __init__ (self, settings, source):
     target.AutoBuild.__init__ (self, settings, source)
     # FIXME: should add to C_INCLUDE_PATH
     builddir = self.builddir ()
     # FIXME: remove after both 2.12.3, 2.13.4 (or 2.14.0) are released.
     srcdir = self.srcdir ()
     self.target_gcc_flags = (settings.target_gcc_flags
                              + ' -I%(builddir)s' % locals ()
                              + ' -I%(srcdir)s/lily/out' % locals ())
     if isinstance (source, repository.Git):
         if source.is_downloaded ():
             source.version = misc.bind_method (LilyPond.version_from_VERSION, source)
         else:
             source.post_download_hook = misc.bind_method (LilyPond.bind_version, source)
     if 'stat' in misc.librestrict () and not 'tools::texlive' in self.dependencies:
         build.append_dict (self, {'PATH': os.environ['PATH']}) # need mf, mpost from system
Exemple #14
0
 def module_repo (self, module):
     repo = repository.get_repository_proxy (self.settings.downloads + '/openoffice-tools',
                                             OpenOffice__tools.source.replace ('depth=files', 'branchmodule=' + module))
     def tracking (self):
         return True
     repo.is_tracking = misc.bind_method (tracking, repo)
     return repo
Exemple #15
0
 def __init__ (self, settings, source):
     target.AutoBuild.__init__ (self, settings, source)
     # FIXME: should add to C_INCLUDE_PATH
     builddir = self.builddir ()
     # FIXME: remove after both 2.12.3, 2.13.4 (or 2.14.0) are released.
     srcdir = self.srcdir ()
     self.target_gcc_flags = (settings.target_gcc_flags
                              + ' -I%(builddir)s' % locals ()
                              + ' -I%(srcdir)s/lily/out' % locals ())
     if isinstance (source, repository.Git):
         if source.is_downloaded ():
             source.version = misc.bind_method (LilyPond.version_from_VERSION, source)
         else:
             source.post_download_hook = misc.bind_method (LilyPond.bind_version, source)
     if 'stat' in misc.librestrict () and not 'tools::texlive' in self.dependencies:
         build.append_dict (self, {'PATH': os.environ['PATH']}) # need mf, mpost from system
Exemple #16
0
 def init_repos (self):
     if isinstance (self.source, repository.Subversion):
         def fixed_version (self):
             return '2009'
         self.source.version = misc.bind_method (fixed_version, self.source)
         self.texmf_repo = repository.Subversion (
             dir=self.get_repodir () + '-texmf',
             source=texlive_svn,
             branch='trunk',
             branchmodule='Master/texmf',
             revision='HEAD')
         self.texmf_dist_repo = repository.Subversion (
             dir=self.get_repodir () + '-texmf-dist',
             source=texlive_svn,
             branch='trunk',
             branchmodule='Master/texmf-dist',
             revision='HEAD')
     else:
         self.texmf_repo = repository.get_repository_proxy (self.get_repodir ().replace ('texlive', 'texlive-texmf-tiny'),
                                                            (Texlive.source
                                                             .replace ('texlive', 'texlive-texmf-tiny')
                                                             .replace ('.tar.gz', '.1.tar.gz')
                                                            ))
         self.texmf_dist_repo = repository.get_repository_proxy (self.get_repodir ().replace ('texlive', 'texlive-texmf-dist-tiny'),
                                                                 (Texlive.source
                                                                  .replace ('texlive', 'texlive-texmf-dist-tiny')
                                                                  .replace ('.tar.gz', '.1.tar.gz')
                                                                  ))
Exemple #17
0
 def __init__ (self, settings, source):
     target.AutoBuild.__init__ (self, settings, source)
     if isinstance (source, repository.Git):
         ##source.version = lambda: '1.8.6'
         source.version = misc.bind_method (Guile.version_from_VERSION,
                                            source)
     self.so_version = '17'
Exemple #18
0
 def __init__ (self, settings, source):
     # Ugh, mingw::openoffice install complains about this...
     os.environ['DISPLAY'] = 'localhost:0.0'
     target.AutoBuild.__init__ (self, settings, source)
     # let's keep source tree around
     def tracking (self):
         return True
     self.source.is_tracking = misc.bind_method (tracking, self.source)
Exemple #19
0
 def compile_native (self):
     target.AutoBuild.compile_native (self)
     def rm (logger, file):
         loggedos.system (logger, 'rm -f %(file)s' % locals ())
     # ugh, should add misc.find () as map_find () to context interface
     # self.map_locate (rm, '%(builddir)s', '*.so.*')
     # self.map_locate (rm, '%(builddir)s', '*.so')
     self.map_locate (rm, '%(builddir)s', '*.o')
     self.get_substitution_dict = misc.bind_method (target.AutoBuild.get_substitution_dict, self)
Exemple #20
0
 def __init__ (self, settings, source):
     tools.AutoBuild.__init__ (self, settings, source)
     # Let's keep source tree around
     def tracking (self):
         return True
     self.source.is_tracking = misc.bind_method (tracking, self.source)
     self.source.dir = self.settings.downloads + '/openoffice-tools'
     if not os.path.isdir (self.source.dir):
         os.system ('mkdir -p ' + self.source.dir)
Exemple #21
0
    def __init__(self, settings, source):
        # Ugh, mingw::openoffice install complains about this...
        os.environ['DISPLAY'] = 'localhost:0.0'
        target.AutoBuild.__init__(self, settings, source)

        # let's keep source tree around
        def tracking(self):
            return True

        self.source.is_tracking = misc.bind_method(tracking, self.source)
Exemple #22
0
    def __init__(self, settings, source):
        build.AutoBuild.__init__(self, settings, source)
        if self.config_cache_settings():
            self.configure_flags += " --cache-file=config.cache"
        if "stat" in misc.librestrict():
            self.LD_PRELOAD = misc.bind_method(build.AutoBuild.LD_PRELOAD, self)
            from gub.cross import bootstrap_names

            if self.platform_name() not in bootstrap_names + ["tools::git", "tools::gettext", "tools::tar"]:
                self.configure_variables = self.configure_variables + " SHELL=%(tools_prefix)s/bin/sh "
Exemple #23
0
 def __init__ (self, settings, source):
     target.PythonBuild.__init__ (self, settings, source)
     if isinstance (source, repository.Git):
         def version_from_NEWS (self, file_name='NEWS', default_version='0.0.0'):
             try:
                 news = self.read_file (file_name)
                 return re.match ('^RELEASE v(([0-9]+[.]){2}[0-9]+)', news).group (1)
             except:
                 return default_version
         source.version = misc.bind_method (version_from_NEWS, source)
Exemple #24
0
    def __init__(self, settings, source):
        tools.AutoBuild.__init__(self, settings, source)

        # Let's keep source tree around
        def tracking(self):
            return True

        self.source.is_tracking = misc.bind_method(tracking, self.source)
        self.source.dir = self.settings.downloads + '/openoffice-tools'
        if not os.path.isdir(self.source.dir):
            os.system('mkdir -p ' + self.source.dir)
Exemple #25
0
    def module_repo(self, module):
        repo = repository.get_repository_proxy(
            self.settings.downloads + '/openoffice-tools',
            OpenOffice__tools.source.replace('depth=files',
                                             'branchmodule=' + module))

        def tracking(self):
            return True

        repo.is_tracking = misc.bind_method(tracking, repo)
        return repo
Exemple #26
0
 def __init__ (self, settings, source):
     target.AutoBuild.__init__ (self, settings, source)
     # repository patched in method.
     def version_from_VERSION (self):
         return '2.2.7'
     if isinstance (source, repository.Git):
         source.version = misc.bind_method (version_from_VERSION, source)
         source._version = '2.2.7'
     Libtool.set_sover (self)
     if isinstance (self.source, repository.Git):
         self.dependencies += ['tools::libtool', 'tools::automake']
Exemple #27
0
    def compile_native(self):
        target.AutoBuild.compile_native(self)

        def rm(logger, file):
            loggedos.system(logger, 'rm -f %(file)s' % locals())

        # ugh, should add misc.find () as map_find () to context interface
        # self.map_locate (rm, '%(builddir)s', '*.so.*')
        # self.map_locate (rm, '%(builddir)s', '*.so')
        self.map_locate(rm, '%(builddir)s', '*.o')
        self.get_substitution_dict = misc.bind_method(
            target.AutoBuild.get_substitution_dict, self)
Exemple #28
0
    def __init__(self, settings, source):
        target.AutoBuild.__init__(self, settings, source)

        # repository patched in method.
        def version_from_VERSION(self):
            return '2.2.7'

        if isinstance(source, repository.Git):
            source.version = misc.bind_method(version_from_VERSION, source)
            source._version = '2.2.7'
        Libtool.set_sover(self)
        if isinstance(self.source, repository.Git):
            self.dependencies += ['tools::libtool', 'tools::automake']
Exemple #29
0
 def __init__(self, settings, source):
     build.AutoBuild.__init__(self, settings, source)
     if self.config_cache_settings():
         self.configure_flags += ' --cache-file=config.cache'
     if 'stat' in misc.librestrict():
         self.LD_PRELOAD = misc.bind_method(build.AutoBuild.LD_PRELOAD,
                                            self)
         from gub.cross import bootstrap_names
         if self.platform_name() not in bootstrap_names + [
                 'tools::git', 'tools::gettext', 'tools::tar'
         ]:
             self.configure_variables = (self.configure_variables +
                                         ' SHELL=%(tools_prefix)s/bin/sh ')
Exemple #30
0
 def __init__(self, settings, source):
     target.AutoBuild.__init__(self, settings, source)
     if isinstance(source, repository.Git):
         source.version = misc.bind_method(repository.Repository.version_from_configure_in, source)
Exemple #31
0
 def __init__(self, settings, source):
     target.AutoBuild.__init__(self, settings, source)
     source.is_tracking = misc.bind_method(lambda x: True, source)
     source.is_downloaded = misc.bind_method(lambda x: True, source)
     source.update_workdir = misc.bind_method(lambda x: True, source)
Exemple #32
0
 def set_substitution_dict_native(self):
     save = self.get_substitution_dict
     self.get_substitution_dict = misc.bind_method(
         self.get_substitution_dict_native(), self)
     return save
Exemple #33
0
 def bind_version (self):
     self.version = misc.bind_method (LilyPond.version_from_VERSION, self)
Exemple #34
0
 def __init__(self, settings, source):
     target.AutoBuild.__init__(self, settings, source)
     if isinstance(source, repository.Git):
         source.version = misc.bind_method(
             repository.Repository.version_from_configure_in, source)
Exemple #35
0
 def __init__ (self, settings, source):
     target.AutoBuild.__init__ (self, settings, source)
     build.add_dict (self,
                     {'ACLOCAL_FLAGS': ' -I '.join ([''] + self.aclocal_path ()), })
     source.is_tracking = misc.bind_method (lambda x: True, source)
Exemple #36
0
def get_debian_package(settings, description):
    s = description[:description.find('\nDescription')]
    d = dict(
        [line.split(': ', 1) for line in list(map(''.strip, s.split('\n')))])
    # FIXME: should blacklist toplevel bin/gub argument iso lilypond
    blacklist = [
        'binutils',
        'cpp',
        'gcc-3.3',
        'cpp-3.3',
        'gcc',
        'gcc-3.4',
        'libgcc1',
        'libgcc1-3.4',
        'lilypond',
        'libstdc++6',
        'libstdc++-dev',
        'libtool',
        'perl',
        'perl-modules',
        'perl-base',
        #        'pkg-config',
    ]
    if d['Package'] in blacklist:
        d['Package'] += '::blacklisted'
    package_class = new.classobj(d['Package'], (build.BinaryBuild, ), {})
    from gub import repository
    source = repository.DebianPackage(
        settings.downloads + '/Debian/' + settings.debian_branch,
        os.path.join(mirror, d['Filename']), d['Version'])
    package = package_class(settings, source)
    package.name_dependencies = []
    if 'Depends' in d:
        deps = list(
            map(''.strip,
                re.sub('\([^\)]*\)', '', d['Depends']).split(', ')))
        # FIXME: BARF, ignore choices
        deps = [x for x in deps if x.find('|') == -1]
        # FIXME: how to handle Provides: ?
        # FIXME: BARF, fixup libc Provides
        deps = [re.sub('libc($|-)', 'libc6\\1', x) for x in deps]
        deps = [re.sub('liba52-dev', 'liba52-0.7.4-dev', x) for x in deps]
        deps = [re.sub('libpng12-0-dev', 'libpng12-dev', x) for x in deps]
        # FIXME: ugh, skip some
        deps = [x for x in deps if x not in blacklist]
        package.name_dependencies = deps

    def get_build_dependencies(self):
        return self.name_dependencies

    package.get_build_dependencies = misc.bind_method(get_build_dependencies,
                                                      package)
    pkg_name = d['Package']

    @context.subst_method
    def name(self):
        return pkg_name

    message = 'FIXME: enter .name into package_class; see cygwin.py'
    printf(message)
    raise Exception(message)
    package.name = misc.bind_method(name, package)
    context.subst_method(package.name)
    return package
Exemple #37
0
 def __init__(self, settings, source):
     target.AutoBuild.__init__(self, settings, source)
     if isinstance(source, repository.Repository) and not isinstance(source, repository.TarBall):
         source.version = misc.bind_method(Ghostscript.version_from_VERSION, source)
Exemple #38
0
 def set_substitution_dict_native (self):
     save = self.get_substitution_dict
     self.get_substitution_dict = misc.bind_method (self.get_substitution_dict_native (), self)
     return save
Exemple #39
0
 def __init__ (self, settings, source):
     target.AutoBuild.__init__ (self, settings, source)
     source.is_tracking = misc.bind_method (lambda x: True, source)
     source.is_downloaded = misc.bind_method (lambda x: True, source)
     source.update_workdir = misc.bind_method (lambda x: True, source)
Exemple #40
0
 def bind_version(self):
     self.version = misc.bind_method(LilyPond.version_from_VERSION, self)