示例#1
0
 def freetype_libs(self):
     base_config_cmd = self.settings.expand(
         '%(tools_prefix)s/bin/freetype-config')
     cmd = base_config_cmd + ' --libs'
     logging.command('pipe %s\n' % cmd)
     # return misc.read_pipe (cmd).strip ()
     return '-lfreetype -lz'
示例#2
0
文件: fontconfig.py 项目: epronk/gub
 def freetype_cflags (self):
     # this is shady: we're using the flags from the tools version
     # of freetype.
     base_config_cmd = self.settings.expand ('%(tools_prefix)s/bin/freetype-config')
     cmd =  base_config_cmd + ' --cflags'
     logging.command ('pipe %s\n' % cmd)
     # ugh, this is utterly broken.  we're reading from the
     # filesystem init time, when freetype-config does not exist
     # yet.
     # return misc.read_pipe (cmd).strip ()
     return '-I%(system_prefix)s/include/freetype2'
示例#3
0
 def freetype_cflags(self):
     # this is shady: we're using the flags from the tools version
     # of freetype.
     base_config_cmd = self.settings.expand(
         '%(tools_prefix)s/bin/freetype-config')
     cmd = base_config_cmd + ' --cflags'
     logging.command('pipe %s\n' % cmd)
     # ugh, this is utterly broken.  we're reading from the
     # filesystem init time, when freetype-config does not exist
     # yet.
     # return misc.read_pipe (cmd).strip ()
     return '-I%(system_prefix)s/include/freetype2'
示例#4
0
文件: gup.py 项目: alepharchives/gub
    def install_tarball(self, ball, name, prefix_dir):
        logging.action('untarring: %(ball)s\n' % locals())

        _z = misc.compression_flag(ball)
        _v = ''  # self.os_interface.verbose_flag ()
        lst = loggedos.read_pipe(logging.default_logger,
                                 'tar -t%(_z)s -f "%(ball)s"' %
                                 locals()).split('\n')
        conflicts = False
        installed_files = self.installed_files()
        installed_files_string = ':'.join([''] + installed_files + [''])
        misc.timing()
        for f in lst:
            if (':' + f + ':' in installed_files_string
                    and not os.path.isdir(os.path.join(self.root, f))):
                package = self._file_package_db[f]
                logging.error('already have file %(f)s: %(package)s\n' %
                              locals())
                conflicts = True
        logging.command('GUP: for f in lst:' + misc.timing() + '\n')
        if conflicts and not self.is_distro:
            raise Exception('Duplicate files found.')
        root = self.root
        loggedos.system(
            logging.default_logger,
            # cd %(root)s to avoid open(2) of cwd, see
            # http://lists.gnu.org/archive/html/lilypond-devel/2009-03/msg00304.html
            'cd %(root)s && tar -C %(root)s -p -x%(_z)s%(_v)s -f %(ball)s' %
            locals())
        for f in lst:
            if f.endswith('.la'):
                self.libtool_la_fixup(root, f)
            if f.endswith('.pc'):
                self.pkgconfig_pc_fixup(root, f, prefix_dir)

        self._package_file_db[name] = '\n'.join(lst)
        for f in lst:
            # ignore directories.
            if not f.endswith('/'):
                self._file_package_db[f] = name

        if os.path.exists('%(root)s/usr/etc/postinstall/%(name)s' % locals()):
            loggedos.system(
                logging.default_logger,
                'PATH=%(root)s/usr/bin:$PATH %(root)s/usr/etc/postinstall/%(name)s && mv %(root)s/usr/etc/postinstall/%(name)s %(root)s/usr/etc/postinstall/%(name)s.done || :'
                % locals())
示例#5
0
文件: gup.py 项目: alepharchives/gub
    def install_tarball (self, ball, name, prefix_dir):
        logging.action ('untarring: %(ball)s\n' % locals ())

        _z = misc.compression_flag (ball)
        _v = '' # self.os_interface.verbose_flag ()
        lst = loggedos.read_pipe (logging.default_logger,
                                  'tar -t%(_z)s -f "%(ball)s"'
                                  % locals ()).split ('\n')
        conflicts = False
        installed_files = self.installed_files ()
        installed_files_string = ':'.join ([''] + installed_files + [''])
        misc.timing ()
        for f in lst:
            if (':' + f + ':' in installed_files_string
                and not os.path.isdir (os.path.join (self.root, f))):
                package = self._file_package_db[f]
                logging.error ('already have file %(f)s: %(package)s\n'
                               % locals ())
                conflicts = True
        logging.command ('GUP: for f in lst:' + misc.timing () + '\n')
        if conflicts and not self.is_distro:
            raise Exception ('Duplicate files found.')
        root = self.root
        loggedos.system (logging.default_logger,
                         # cd %(root)s to avoid open(2) of cwd, see
                         # http://lists.gnu.org/archive/html/lilypond-devel/2009-03/msg00304.html
                         'cd %(root)s && tar -C %(root)s -p -x%(_z)s%(_v)s -f %(ball)s'
                         % locals ())
        for f in lst:
            if f.endswith ('.la'):
                self.libtool_la_fixup (root, f)
            if f.endswith ('.pc'):
                self.pkgconfig_pc_fixup (root, f, prefix_dir)

        self._package_file_db[name] = '\n'.join (lst)
        for f in lst:
            # ignore directories.
            if not f.endswith ('/'):
                self._file_package_db[f] = name

        if os.path.exists ('%(root)s/usr/etc/postinstall/%(name)s' % locals ()):
            loggedos.system (logging.default_logger,
                             'PATH=%(root)s/usr/bin:$PATH %(root)s/usr/etc/postinstall/%(name)s && mv %(root)s/usr/etc/postinstall/%(name)s %(root)s/usr/etc/postinstall/%(name)s.done || :' % locals ())
示例#6
0
文件: fontconfig.py 项目: epronk/gub
 def freetype_libs (self):
     base_config_cmd = self.settings.expand ('%(tools_prefix)s/bin/freetype-config')
     cmd =  base_config_cmd + ' --libs'
     logging.command ('pipe %s\n' % cmd)
     # return misc.read_pipe (cmd).strip ()
     return '-lfreetype -lz'