コード例 #1
0
ファイル: build.py プロジェクト: marnen/gub
def libtool_disable_install_not_into_dot_libs_test(logger, file):
    '''libtool: install: error: cannot install `libexslt.la' to a directory not ending in /home/janneke/vc/gub/target/mingw/build/libxslt-1.1.24/libexslt/.libs'''
    loggedos.file_sub(
        logger, [(r'if test "\$inst_prefix_dir" = "\$destdir"; then',
                  'if false && test "$inst_prefix_dir" = "$destdir"; then'),
                 (r'  test "\$inst_prefix_dir" = "\$destdir" &&',
                  '  false && test "$inst_prefix_dir" = "$destdir" &&')], file)
コード例 #2
0
ファイル: libpcre.py プロジェクト: PhilHolmes/gub
 def fix_allow_undefined (logger, file):
     loggedos.file_sub (logger,
                        [
             # libtool: link: warning: undefined symbols not allowed in i686-pc-mingw32 shared  libraries
             ('^(allow_undefined_flag=.*)unsupported', '\\1'),
             # libtool: install: error: cannot install `libexslt.la' to a directory not ending in /home/janneke/vc/gub/target/mingw/build/libxslt-1.1.24/libexslt/.libs
             (r'if test "\$inst_prefix_dir" = "\$destdir";', 'if false;'),],
                        file)
コード例 #3
0
ファイル: build.py プロジェクト: PhilHolmes/gub
def libtool_disable_install_not_into_dot_libs_test (logger, file):
    '''libtool: install: error: cannot install `libexslt.la' to a directory not ending in /home/janneke/vc/gub/target/mingw/build/libxslt-1.1.24/libexslt/.libs'''
    loggedos.file_sub (logger, [
            (r'if test "\$inst_prefix_dir" = "\$destdir"; then',
             'if false && test "$inst_prefix_dir" = "$destdir"; then'),
            (r'  test "\$inst_prefix_dir" = "\$destdir" &&',
             '  false && test "$inst_prefix_dir" = "$destdir" &&')],
                       file)
コード例 #4
0
ファイル: build.py プロジェクト: PhilHolmes/gub
def libtool_force_infer_tag (logger, tag, file):
    ''' libtool: compile: unable to infer tagged configuration '''
    loggedos.file_sub (logger, [('^func_infer_tag ', '''func_infer_tag ()
{
    tagname=%(tag)s
}

old_func_infer_tag ''' % locals ())], file)
コード例 #5
0
ファイル: build.py プロジェクト: marnen/gub
def libtool_force_infer_tag(logger, tag, file):
    ''' libtool: compile: unable to infer tagged configuration '''
    loggedos.file_sub(logger, [('^func_infer_tag ', '''func_infer_tag ()
{
    tagname=%(tag)s
}

old_func_infer_tag ''' % locals())], file)
コード例 #6
0
 def add_CFLAGS_LDFLAGS_already(logger, file):
     loggedos.file_sub(logger,
                       [('-L(NONE|no_x_libraries|/usr/lib)',
                         self.expand('-L%(system_prefix)s/lib')),
                        ('-I(NONE|no_x_includes|/usr/include)',
                         self.expand('-I%(system_prefix)s/include')),
                        ('(LD_LIBRARY_PATH=.*)',
                         self.expand(r'\1:%(system_prefix)s/lib'))],
                       file)
コード例 #7
0
 def fix_allow_undefined(logger, file):
     loggedos.file_sub(
         logger,
         [
             # libtool: link: warning: undefined symbols not allowed in i686-pc-mingw32 shared  libraries
             ('^(allow_undefined_flag=.*)unsupported', '\\1'),
             # libtool: install: error: cannot install `libexslt.la' to a directory not ending in /home/janneke/vc/gub/target/mingw/build/libxslt-1.1.24/libexslt/.libs
             (r'if test "\$inst_prefix_dir" = "\$destdir";', 'if false;'
              ),
         ],
         file)
コード例 #8
0
ファイル: gup.py プロジェクト: jbenham2015/gub
 def pkgconfig_pc_fixup(self, root, file, prefix_dir):
     # avoid using libs from build platform, by adding
     # %(system_root)s
     if file.startswith('./'):
         file = file[2:]
     dir = os.path.dirname(file)
     if '%' in prefix_dir or not prefix_dir:
         barf
     loggedos.file_sub(gub_log.default_logger, [
         ('(-I|-L) */usr', '''\\1%(root)s%(prefix_dir)s''' % locals()),
     ], '%(root)s/%(file)s' % locals())
コード例 #9
0
def libtool_disable_rpath(logger, libtool, rpath, file):
    # Must also keep -rpath $libdir, because when build_arch ==
    # target_arch we may run build-time executables.  Either that, or
    # set LD_LIBRARY_PATH somewhere.
    loggedos.file_sub(
        logger,
        [(
            '^(hardcode_libdir_flag_spec)=".+"',
            # r'\1'
            (r'hardcode_libdir_flag_spec="' + '-Wl,-rpath -Wl,\$libdir' +
             (' %(rpath)s' % locals()).replace('\\$$', "'$'") + '"'))],
        file)
コード例 #10
0
        def fixup(logger, file):
            file = file.strip()
            if not file:
                return
            dir = os.path.split(file)[0]
            suffix = '/.libs'
            if re.search('\\.libs$', dir):
                suffix = ''

            loggedos.file_sub(logger, [
                ("libdir='/usr/lib'",
                 self.expand("libdir='%(dir)s%(suffix)s'", env=locals())),
            ], file)
コード例 #11
0
ファイル: target.py プロジェクト: epronk/gub
def libtool_disable_rpath (logger, libtool, rpath, file):
    # Must also keep -rpath $libdir, because when build_arch ==
    # target_arch we may run build-time executables.  Either that, or
    # set LD_LIBRARY_PATH somewhere.
    loggedos.file_sub (logger,
                       [('^(hardcode_libdir_flag_spec)=".+"',
                         # r'\1'
                         (r'hardcode_libdir_flag_spec="'
                          + '-Wl,-rpath -Wl,\$libdir'
                          + (' %(rpath)s' % locals ()).replace ('\\$$', "'$'")
                          + '"')
                          )],
                       file)
コード例 #12
0
ファイル: gup.py プロジェクト: alepharchives/gub
 def pkgconfig_pc_fixup (self, root, file, prefix_dir):
     # avoid using libs from build platform, by adding
     # %(system_root)s
     if file.startswith ('./'):
         file = file[2:]
     dir = os.path.dirname (file)
     if '%' in prefix_dir or not prefix_dir:
         barf
     loggedos.file_sub (logging.default_logger,
                        [('(-I|-L) */usr',
                          '''\\1%(root)s%(prefix_dir)s''' % locals ()
                          ),],
                        '%(root)s/%(file)s' % locals ())
コード例 #13
0
ファイル: gup.py プロジェクト: epronk/gub
 def libtool_la_fixup (self, root, file):
     # avoid using libs from build platform, by adding
     # %(system_root)s
     if file.startswith ('./'):
         file = file[2:]
     dir = os.path.dirname (file)
     loggedos.file_sub (logging.default_logger,
                        [('^libdir=.*',
                          """libdir='%(root)s/%(dir)s'""" % locals ()
                          ),],
                        '%(root)s/%(file)s' % locals (),
                        must_succeed=('tools/root' not in self.root
                                      and 'cross' not in dir
                                      and '/GUB' not in self.root))
コード例 #14
0
ファイル: gup.py プロジェクト: jbenham2015/gub
 def libtool_la_fixup(self, root, file):
     # avoid using libs from build platform, by adding
     # %(system_root)s
     if file.startswith('./'):
         file = file[2:]
     dir = os.path.dirname(file)
     loggedos.file_sub(gub_log.default_logger, [
         ('^libdir=.*', """libdir='%(root)s/%(dir)s'""" % locals()),
     ],
                       '%(root)s/%(file)s' % locals(),
                       must_succeed=('tools/root' not in self.root
                                     and 'tools32/root' not in self.root
                                     and 'cross' not in dir
                                     and '/GUB' not in self.root))
コード例 #15
0
ファイル: target.py プロジェクト: epronk/gub
 def fixup (logger, file):
     file = file.strip ()
     if not file:
         return
     dir = os.path.split (file)[0]
     suffix = '/.libs'
     if re.search ('\\.libs$', dir):
         suffix = ''
     
     loggedos.file_sub (logger,
                        [("libdir='/usr/lib'",
                          self.expand ("libdir='%(dir)s%(suffix)s'",
                                      env=locals ())),
                         ], file)
コード例 #16
0
ファイル: build.py プロジェクト: PhilHolmes/gub
        def installed_la_fixup (logger, la):
            (dir, base) = os.path.split (la)
            base = base[3:-3]
            dir = re.sub (r"^\./", "/", dir)

            loggedos.file_sub (logger, [(''' *-L *[^\"\' ][^\"\' ]*''', ''),
                    (self.expand ('''( |=|\')(/[^ ]*usr/lib|%(targetdir)s.*)/lib([^ \'/]*)\.(a|la|so)[^ \']*'''),
                    '\\1-l\\3 '),
                    ('^old_library=.*',
                     self.expand ("""old_library='lib%(base)s.a'""", env=locals ())),
                    ],
                   la)
            if self.settings.platform.startswith ('mingw'):

                loggedos.file_sub (logger, [('library_names=.*',
                                 self.expand ("library_names='lib%(base)s.dll.a'", env=locals ()))],
                               la)
コード例 #17
0
ファイル: build.py プロジェクト: epronk/gub
def libtool_force_infer_tag(logger, tag, file):
    """ libtool: compile: unable to infer tagged configuration """
    loggedos.file_sub(
        logger,
        [
            (
                "^func_infer_tag ",
                """func_infer_tag ()
{
    tagname=%(tag)s
}

old_func_infer_tag """
                % locals(),
            )
        ],
        file,
    )
コード例 #18
0
ファイル: build.py プロジェクト: marnen/gub
        def installed_la_fixup(logger, la):
            (dir, base) = os.path.split(la)
            base = base[3:-3]
            dir = re.sub(r"^\./", "/", dir)

            loggedos.file_sub(logger, [
                (''' *-L *[^\"\' ][^\"\' ]*''', ''),
                (self.expand(
                    '''( |=|\')(/[^ ]*usr/lib|%(targetdir)s.*)/lib([^ \'/]*)\.(a|la|so)[^ \']*'''
                ), '\\1-l\\3 '),
                ('^old_library=.*',
                 self.expand("""old_library='lib%(base)s.a'""", env=locals())),
            ], la)
            if self.settings.platform.startswith('mingw'):

                loggedos.file_sub(
                    logger, [('library_names=.*',
                              self.expand("library_names='lib%(base)s.dll.a'",
                                          env=locals()))], la)
コード例 #19
0
ファイル: lilypond.py プロジェクト: Jahrme/gub
 def asciify(logger, name):
     loggedos.file_sub(logger, [('\r*\n', '\r\n')], name)
コード例 #20
0
ファイル: pango.py プロジェクト: imace/gub
 def fix_prefix (logger, file_name):
     loggedos.file_sub (logger, [('/' + prefix + '/', '$PANGO_PREFIX/')],
                        file_name)
コード例 #21
0
ファイル: target.py プロジェクト: epronk/gub
 def defer (logger, file):
     loggedos.file_sub (logger, [
             (' (/etc/ld.so.conf)',
              self.expand (r'%(system_prefix)s/\1'))], file)
コード例 #22
0
ファイル: target.py プロジェクト: epronk/gub
 def defer (logger):
     if os.path.exists (self.expand ('%(configure_binary)s')):
         loggedos.file_sub (logger, [('cross_compiling=(maybe|no|yes)',
                                      'cross_compiling=yes')],
                            self.expand ('%(configure_binary)s'))
コード例 #23
0
ファイル: openoffice.py プロジェクト: PhilHolmes/gub
 def add_CFLAGS_LDFLAGS_already (logger, file):
     loggedos.file_sub (logger, [
             ('-L(NONE|no_x_libraries|/usr/lib)', self.expand ('-L%(system_prefix)s/lib')),
             ('-I(NONE|no_x_includes|/usr/include)', self.expand ('-I%(system_prefix)s/include')),
             ('(LD_LIBRARY_PATH=.*)', self.expand (r'\1:%(system_prefix)s/lib'))
             ], file)
コード例 #24
0
 def defer(logger):
     if os.path.exists(self.expand('%(configure_binary)s')):
         loggedos.file_sub(logger, [
             ('cross_compiling=(maybe|no|yes)', 'cross_compiling=yes')
         ], self.expand('%(configure_binary)s'))
コード例 #25
0
 def escape2(logger, full_name):
     loggedos.file_sub(logger,
                       [(r'(^|[^#])(#)(t|f)( |$)', r'\1\2\2\3\4')],
                       full_name)
コード例 #26
0
 def defer(logger, file):
     loggedos.file_sub(logger,
                       [(' (/etc/ld.so.conf)',
                         self.expand(r'%(system_prefix)s/\1'))],
                       file)
コード例 #27
0
 def defer(logger, i):
     loggedos.file_sub(logger, [
         ('ac_compile_t1lib=1', 'ac_compile_t1lib=0'),
         ('-lpng ', '-lpng12 '),
         ('-lpng"', '-lpng12"'),
     ], i)
コード例 #28
0
ファイル: w32.py プロジェクト: marnen/gub
def libtool_disable_relink(logger, file):
    loggedos.file_sub(logger, [('need_relink=yes', 'need_relink=no')], file)
コード例 #29
0
ファイル: lilypond-ancient.py プロジェクト: PhilHolmes/gub
 def escape2 (logger, full_name):
     loggedos.file_sub (logger,
                        [(r'(^|[^#])(#)(t|f)( |$)',r'\1\2\2\3\4')],
                        full_name)
コード例 #30
0
    def execute(self, logger):
        (re_pairs, name) = self.args

        loggedos.file_sub(logger, re_pairs, name, **self.kwargs)
コード例 #31
0
ファイル: commands.py プロジェクト: epronk/gub
    def execute (self, logger):
        (re_pairs, name) = self.args

        loggedos.file_sub (logger, re_pairs, name, **self.kwargs)
コード例 #32
0
ファイル: texlive.py プロジェクト: PhilHolmes/gub
 def defer (logger, i):
     loggedos.file_sub (logger, [
             ('ac_compile_t1lib=1', 'ac_compile_t1lib=0'),
             ('-lpng ', '-lpng12 '),
             ('-lpng"', '-lpng12"'),
             ], i)
コード例 #33
0
ファイル: lilypond.py プロジェクト: imace/gub
 def asciify (logger, name):
     loggedos.file_sub (logger, [('\r*\n', '\r\n')], name)
コード例 #34
0
ファイル: w32.py プロジェクト: marnen/gub
def libtool_fix_allow_undefined(logger, file):
    '''libtool: link: warning: undefined symbols not allowed in i686-pc-mingw32 shared  libraries'''
    loggedos.file_sub(logger,
                      [('^(allow_undefined_flag=.*)unsupported', r'\1')], file)
コード例 #35
0
ファイル: build.py プロジェクト: marnen/gub
def libtool_update_preserve_CC(logger, libtool, file):
    CC_re = '^CC="([^"]*)"'
    orig_CC = re.search('(?m)' + CC_re, open(file).read()).group(0)
    libtool_update(logger, libtool, file)
    loggedos.file_sub(logger, [(CC_re, orig_CC)], file)
コード例 #36
0
 def fix_prefix(logger, file_name):
     loggedos.file_sub(logger, [('/' + prefix + '/', '$PANGO_PREFIX/')],
                       file_name)
コード例 #37
0
ファイル: w32.py プロジェクト: nizvoo/gub
def libtool_fix_allow_undefined(logger, file):
    """libtool: link: warning: undefined symbols not allowed in i686-pc-mingw32 shared  libraries"""
    loggedos.file_sub(logger, [("^(allow_undefined_flag=.*)unsupported", r"\1")], file)
コード例 #38
0
ファイル: lilypond-ancient.py プロジェクト: PhilHolmes/gub
 def escape (logger, full_name):
     loggedos.file_sub (logger,
                        [(r'(^|[^\\])([\\])(a|b|c|e|f|o)',r'\1\2\2\3')],
                        full_name)
コード例 #39
0
ファイル: w32.py プロジェクト: nizvoo/gub
def libtool_disable_relink(logger, file):
    loggedos.file_sub(logger, [("need_relink=yes", "need_relink=no")], file)
コード例 #40
0
ファイル: build.py プロジェクト: PhilHolmes/gub
def libtool_update_preserve_CC (logger, libtool, file):
    CC_re = '^CC="([^"]*)"'
    orig_CC = re.search ('(?m)' + CC_re, open (file).read ()).group (0)
    libtool_update (logger, libtool, file)
    loggedos.file_sub (logger, [(CC_re, orig_CC)], file)
コード例 #41
0
 def escape(logger, full_name):
     loggedos.file_sub(logger,
                       [(r'(^|[^\\])([\\])(a|b|c|e|f|o)', r'\1\2\2\3')],
                       full_name)