Example #1
0
File: target.py Project: epronk/gub
 def __init__ (self, settings, source):
     build.AutoBuild.__init__ (self, settings, source)
     if 'stat' in misc.librestrict ():
         self.configure_variables += ' SHELL=%(tools_prefix)s/bin/sh'
         # configure [gettext, flex] blindly look for /USR/include/libi*
         self.configure_flags += (' --without-libiconv-prefix'
                                  + ' --without-libintl-prefix')
Example #2
0
 def __init__(self, settings, source):
     build.AutoBuild.__init__(self, settings, source)
     if 'stat' in misc.librestrict():
         self.configure_variables += ' SHELL=%(tools_prefix)s/bin/sh'
         # configure [gettext, flex] blindly look for /USR/include/libi*
         self.configure_flags += (' --without-libiconv-prefix' +
                                  ' --without-libintl-prefix')
Example #3
0
 def __init__ (self, settings, source):
     target.AutoBuild.__init__ (self, settings, source)
     # Freetype stats /sbin, /usr/sbin and /hurd to determine if
     # build system is unix??
     # build.append_dict (self, {'LIBRESTRICT_ALLOW': '/sbin:/usr/sbin:/hurd'})
     if 'stat' in misc.librestrict ():
         build.add_dict (self, {'LIBRESTRICT_ALLOW': '/sbin:/usr/sbin:/hurd:${LIBRESTRICT_ALLOW-/foo}'})
Example #4
0
 def __init__(self, settings, source):
     target.AutoBuild.__init__(self, settings, source)
     self.CROSS_ROOT = '%(targetdir)s'
     if 'stat' in misc.librestrict():
         self.install_command = (
             'LIBRESTRICT_ALLOW=/usr/lib/python2.4/lib-dynload:${LIBRESTRICT_ALLOW-/foo} '
             + target.AutoBuild.install_command)
Example #5
0
class Glib(target.AutoBuild):
    source = 'http://ftp.gnome.org/pub/GNOME/platform/2.27/2.27.91/sources/glib-2.21.5.tar.gz'
    ##source = 'http://ftp.gnome.org/pub/GNOME/platform/2.25/2.25.5/sources/glib-2.19.5.tar.gz'
    dependencies = ['tools::glib', 'tools::libtool', 'gettext-devel']
    config_cache_overrides = target.AutoBuild.config_cache_overrides + '''
glib_cv_stack_grows=${glib_cv_stack_grows=no}
'''
    if 'stat' in misc.librestrict():  # stats for /USR/include/glib/...
        install_flags = (
            target.AutoBuild.install_flags +
            ' LD_PRELOAD=%(tools_prefix)s/lib/librestrict-open.so')

    def patch(self):
        target.AutoBuild.patch(self)
        self.file_sub([('GIO_MODULE_DIR', 'getenv ("GIO_MODULE_DIR")')],
                      '%(srcdir)s/gio/giomodule.c',
                      must_succeed=True)

    def update_libtool(self):  # linux-x86, linux-ppc, freebsd-x86
        target.AutoBuild.update_libtool(self)
        self.map_locate(w32.libtool_disable_relink, '%(builddir)s', 'libtool')
        #URGME, 2.19.5: relinking libgio is broken, /usr/lib is inserted
        '''root/usr/lib/usr/lib -L/usr/lib -lgobject-2.0 -L/home/janneke/vc/gub/target/linux-ppc/install/glib-2.19.5-root/usr/lib/home/janneke/vc/gub/target/linux-ppc/build/glib-2.19.5/gmodule/.libs -lgmodule-2.0 -ldl -lglib-2.0    -Wl,-soname -Wl,libgio-2.0.so.0 -Wl,-version-script -Wl,.libs/libgio-2.0.ver -o .libs/libgio-2.0.so.0.1905.0
/home/janneke/vc/gub/target/linux-ppc/root/usr/cross/bin/powerpc-linux-ld: skipping incompatible /usr/lib/libgobject-2.0.so when searching for -lgobject-2.0
/home/janneke/vc/gub/target/linux-ppc/root/usr/cross/bin/powerpc-linux-ld: skipping incompatible /usr/lib/libgobject-2.0.a when searching for -lgobject-2.0
/home/janneke/vc/gub/target/linux-ppc/root/usr/cross/bin/powerpc-linux-ld: cannot find -lgobject-2.0
collect2: ld returned 1 exit status
libtool: install: error: relink `libgio-2.0.la' with the above command before installing it
make[5]: *** [install-libLTLIBRARIES] Error 1
'''

    def install(self):
        target.AutoBuild.install(self)
        self.system('rm -f %(install_prefix)s/lib/charset.alias')
Example #6
0
File: gmp.py Project: jrioux/gub
 def __init__(self, settings, source):
     target.AutoBuild.__init__(self, settings, source)
     if not self.settings.platform.startswith('darwin'):
         self.target_architecture = re.sub('i[0-9]86-', 'i386-',
                                           settings.target_architecture)
     if 'stat' in misc.librestrict():
         build.add_dict(self,
                        {'LIBRESTRICT_IGNORE': '%(tools_prefix)s/bin/bash'})
Example #7
0
 def __init__(self, settings, source):
     target.AutoBuild.__init__(self, settings, source)
     if 'stat' in misc.librestrict():
         build.add_dict(
             self, {
                 'LIBRESTRICT_IGNORE':
                 '%(tools_prefix)s/bin/bash:%(tools_prefix)s/bin/make'
             })
Example #8
0
 def __init__ (self, settings, source):
     tools.AutoBuild.__init__ (self, settings, source)
     if 'x86_64-linux' in self.settings.build_architecture:
         self.dependencies += ['linux-x86::glibc']
         cross.change_target_package_x86 (self, self.add_mingw_env ())
     if 'stat' in misc.librestrict ():
         self.compile_command = ('LIBRESTRICT_IGNORE=%(tools_prefix)s/bin/python '
                                 + tools.SConsBuild.compile_command)
Example #9
0
class Libtool(target.AutoBuild):
    source = 'http://ftp.gnu.org/pub/gnu/libtool/libtool-2.2.6a.tar.gz'
    #source = 'git://git.sv.gnu.org/libtool.git?branch=master&revision=77e114998457cb6170ad84b360cb5b9be90f2191'
    dependencies = ['tools::libtool']
    configure_variables = (target.AutoBuild.configure_variables.replace(
        'SHELL=', 'CONFIG_SHELL='))
    if 'stat' in misc.librestrict():
        configure_command = (
            'CONFIG_SHELL=%(tools_prefix)s/bin/bash '
            'LD_PRELOAD=%(tools_prefix)s/lib/librestrict-open.so ' +
            target.AutoBuild.configure_command.replace('/sh', '/bash').replace(
                'SHELL=', 'CONFIG_SHELL='))

    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']

    def autoupdate(self):
        # automagic works, but takes forever
        if isinstance(self.source, repository.Git):
            self.system('cd %(srcdir)s && reconfdirs=". libltdl" ./bootstrap')


#        target.AutoBuild.autoupdate (self)

    @staticmethod
    def set_sover(self):
        # FIXME: how to automate this?
        self.so_version = '3'
        if self.source._version in ('2.2.4', '2.2.6.a', '2.2.7'):
            self.so_version = '7'

    subpackage_names = ['devel', 'doc', 'runtime', '']

    def get_subpackage_definitions(self):
        d = target.AutoBuild.get_subpackage_definitions(self)
        d['devel'].append(self.settings.prefix_dir + '/bin/libtool*')
        d['devel'].append(self.settings.prefix_dir + '/share/libltdl')
        return d

    def update_libtool(self):
        pass

    config_cache_overrides = (target.AutoBuild.config_cache_overrides + '''
ac_cv_prog_F77=${ac_cv_prog_F77=no}
ac_cv_prog_FC=${ac_cv_prog_FC=no}
ac_cv_prog_GCJ=${ac_cv_prog_GCJ=no}
''')
Example #10
0
File: tools.py Project: epronk/gub
    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 "
Example #11
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 ')
Example #12
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):
         source.version = misc.bind_method (LilyPond.version_from_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
Example #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):
         source.version = misc.bind_method (LilyPond.version_from_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
Example #14
0
File: target.py Project: epronk/gub
    def get_substitution_dict (self, env={}):
        dict = {
            'AR': '%(toolchain_prefix)sar',
            'AS': '%(toolchain_prefix)sas',
            'BUILD_CC': 'C_INCLUDE_PATH= CPATH= CPPFLAGS= LIBRARY_PATH= cc',
            'CC': '%(toolchain_prefix)sgcc %(target_gcc_flags)s',
            'CC_FOR_BUILD': 'C_INCLUDE_PATH= CPATH= CPPFLAGS= LIBRARY_PATH= cc',
            'CCLD_FOR_BUILD': 'C_INCLUDE_PATH= CPATH= CPPFLAGS= LIBRARY_PATH= cc',
            'LDFLAGS_FOR_BUILD': '',
            'C_INCLUDE_PATH': '',
            'CPATH': '',
            'CPLUS_INCLUDE_PATH': '',
            'CXX':'%(toolchain_prefix)sg++ %(target_gcc_flags)s',
            'LIBRARY_PATH': '',
            'LDFLAGS': '',
            'LD': '%(toolchain_prefix)sld',
            'NM': '%(toolchain_prefix)snm',
            'PKG_CONFIG_PATH': '%(system_prefix)s/lib/pkgconfig',
            'PATH': '%(cross_prefix)s/bin:%(tools_prefix)s/bin:%(tools_cross_prefix)s/bin:' + os.environ['PATH'],
            'PERL5LIB': 'foo:%(tools_prefix)s/lib/perl5/5.10.0'
            + ':%(tools_prefix)s/lib/perl5/5.10.0/%(build_architecture)s'
            + ':%(tools_prefix)s/share/autoconf'
            + misc.append_path (os.environ.get ('PERL5LIB', '')),
            'PKG_CONFIG': '''pkg-config \
--define-variable prefix=%(system_prefix)s \
--define-variable includedir=%(system_prefix)s/include \
--define-variable libdir=%(system_prefix)s/lib \
''',
            'RANLIB': '%(toolchain_prefix)sranlib',
            'SED': 'sed', # libtool (expat mingw) fixup
            }

        if 'stat' in misc.librestrict ():
            dict['PATH'] = '%(cross_prefix)s/bin:%(tools_prefix)s/bin:%(tools_cross_prefix)s/bin:%(cross_prefix)s/%(target_architecture)s/bin'
            dict['CC_FOR_BUILD'] = 'C_INCLUDE_PATH= CPATH= CPPFLAGS= LIBRARY_PATH= PATH=/usr/bin:$PATH cc'
            dict['CCLD_FOR_BUILD'] = 'C_INCLUDE_PATH= CPATH= CPPFLAGS= LIBRARY_PATH=/usr/bin:$PATH cc'

        # FIXME: usr/bin and w32api belongs to mingw/cygwin; but overriding is broken
        # FIXME: how to move this to cygwin.py/mingw.py?
        # Hmm, better to make wrappers for gcc/c++/g++ that add options;
        # see (gub-samco branch) linux-arm-vfp.py?
        if self.settings.platform in ('cygwin', 'mingw'):
            dict['LDFLAGS'] += '-L%(system_prefix)s/lib -L%(system_prefix)s/bin -L%(system_prefix)s/lib/w32api'

        #FIXME: how to move this to arm.py?
        if self.settings.target_architecture == 'armv5te-softfloat-linux':
            dict['CFLAGS'] = '-O'

        dict.update (env)
        d = build.AutoBuild.get_substitution_dict (self, dict).copy ()
        return d
Example #15
0
    def compile (self):
        # help fontconfig cross compiling a bit, all CC/LD
        # flags are wrong, set to the target's root
        ## we want native freetype-config flags here. 
        cflags = '-I%(srcdir)s -I%(srcdir)s/src %(freetype_cflags)s' 
        libs = '%(freetype_libs)s'
        relax = ''
        if 'stat' in misc.librestrict ():
            relax = 'LIBRESTRICT_IGNORE=%(tools_prefix)s/bin/bash:%(tools_prefix)s/bin/make '
        for i in ('fc-case', 'fc-lang', 'fc-glyphname', 'fc-arch'):
            self.system ('''
cd %(builddir)s/%(i)s && %(relax)s make "CFLAGS=%(cflags)s" "LIBS=%(libs)s" CPPFLAGS= LD_LIBRARY_PATH=%(tools_prefix)s/lib LDFLAGS=-L%(tools_prefix)s/lib INCLUDES=
''', locals ())
        target.AutoBuild.compile (self)
Example #16
0
    def compile (self):
        # help fontconfig cross compiling a bit, all CC/LD
        # flags are wrong, set to the target's root
        ## we want native freetype-config flags here. 
        cflags = '-I%(srcdir)s -I%(srcdir)s/src %(freetype_cflags)s' 
        libs = '%(freetype_libs)s'
        relax = ''
        if 'stat' in misc.librestrict ():
            relax = 'LIBRESTRICT_IGNORE=%(tools_prefix)s/bin/bash:%(tools_prefix)s/bin/make '
        for i in ('fc-case', 'fc-lang', 'fc-glyphname'):
            self.system ('''
cd %(builddir)s/%(i)s && %(relax)s make "CFLAGS=%(cflags)s" "LIBS=%(libs)s" CPPFLAGS= LD_LIBRARY_PATH=%(tools_prefix)s/lib LDFLAGS=-L%(tools_prefix)s/lib INCLUDES=
''', locals ())
        target.AutoBuild.compile (self)
Example #17
0
File: target.py Project: epronk/gub
 def autoupdate (self):
     build.AutoBuild.autoupdate (self)
     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'))
     self.func (defer)
     if 'stat' in misc.librestrict ():
         def defer (logger, file):
             loggedos.file_sub (logger, [
                     (' (/etc/ld.so.conf)',
                      self.expand (r'%(system_prefix)s/\1'))], file)
         self.map_find_files (defer, '%(srcdir)s', '^configure$')
Example #18
0
class LilyPond__smart (LilyPond__simple):
    configure_binary = '%(srcdir)s/smart-configure.sh'
    if 'stat' in misc.librestrict ():
        def patch (self):
            LilyPond__simple.patch (self)
            # How weird is this?  With LIBRESTRICT=open:stat [see
            # TODO] the set -eux carry over into autoconf and
            # configure runs.
            for i in ('smart-autogen.sh', 'smart-configure.sh'):
                self.file_sub ([
                        ('^([$][{]?srcdir[}]?/.*$)', r'(set +eux; \1) || exit 1'),
                        ], '%(srcdir)s/' + i)
    def autoupdate (self):
        self.system ('cd %(srcdir)s && ./smart-autogen.sh --noconfigure') 
Example #19
0
class Gettext(target.AutoBuild):
    # 0.16.1 makes gcc barf on ICE.
    source = 'http://ftp.gnu.org/pub/gnu/gettext/gettext-0.15.tar.gz'
    dependencies = ['libtool']
    config_cache_overrides = (target.AutoBuild.config_cache_overrides + '''
ac_cv_prog_YACC=${ac_cv_prog_YACC=no}
ac_cv_prog_INTLBISON=${ac_cv_prog_INTLBISON=no}
ac_cv_prog_F77=${ac_cv_prog_F77=no}
ac_cv_prog_FC=${ac_cv_prog_FC=no}
ac_cv_prog_GCJ=${ac_cv_prog_GCJ=no}
ac_cv_prog_GC=${ac_cv_prog_GC=no}
ac_cv_prog_HAVE_GCJ_IN_PATH=${ac_cv_prog_HAVE_GCJ_IN_PATH=no}
ac_cv_prog_HAVE_JAVAC_IN_PATH=${ac_cv_prog_HAVE_JAVAC_IN_PATH=no}
ac_cv_prog_HAVE_JIKES_IN_PATH=${ac_cv_prog_HAVE_JIKES_IN_PATH=no}
''')
    configure_flags = (target.AutoBuild.configure_flags +
                       ' --disable-threads' + ' --disable-csharp' +
                       ' --disable-java')
    #    if 'stat' in misc.librestrict (): # too broken to fix
    #        def LD_PRELOAD (self):
    #            return '%(tools_prefix)s/lib/librestrict-open.so'
    if 'stat' in misc.librestrict():  # OPENs /USR/include/libexpat.la

        def LD_PRELOAD(self):
            return ''


#
#    if 'stat' in misc.librestrict (): # too broken to fix
#        # configure [gettext, flex] blindly look for /USR/include/libi*
#        configure_variables = (target.configure_variables
#                               + ' --without-libiconv-prefix'
#                               + ' --without-libintl-prefix')
#    def autoupdate (self):
#        target.AutoBuild.autoupdate (self)
#        if 'stat' in misc.librestrict ():
#            def defer (logger, file):
#                loggedos.file_sub (logger, [
#                        # blindly stats /USR/share/locale/fr*
#                        # /USR/lib/jdk -- never mind --disable-java
#                        (' /usr(/share/locale|/lib/jdk)',
#                         self.expand (r'%(system_prefix)s/\1'))], file)
#            self.map_find_files (defer, '%(srcdir)s', '^configure$')

    def configure(self):
        target.AutoBuild.configure(self)
        self.file_sub([
            ('(SUBDIRS *=.*)examples', r'\1 '),
        ], '%(builddir)s/gettext-tools/Makefile')
Example #20
0
class Libgd(target.AutoBuild):
    source = 'http://www.libgd.org/releases/gd-2.0.36RC1.tar.gz'
    dependencies = [
        'tools::libtool',
        'fontconfig',
        'freetype',
        'libjpeg',
        'libpng',
        'zlib',
    ]
    configure_flags = (target.AutoBuild.configure_flags +
                       ' --with-fontconfig' + ' --with-freetype' +
                       ' --with-jpeg' + ' --with-png' + ' --without-xpm' +
                       ' --x-includes=' + ' --x-libraries=')
    if 'stat' in misc.librestrict():

        def LD_PRELOAD(self):
            return '%(tools_prefix)s/lib/librestrict-open.so'
Example #21
0
File: expat.py Project: jrioux/gub
class Expat(target.AutoBuild):
    source = 'http://surfnet.dl.sourceforge.net/sourceforge/expat/expat-2.0.1.tar.gz'
    patches = ['expat-2.0.1-mingw.patch']
    dependencies = ['libtool', 'tools::expat']
    make_flags = misc.join_lines('''
CFLAGS='-O2 -DHAVE_EXPAT_CONFIG_H'
EXEEXT=
RUN_FC_CACHE_TEST=false
''')
    if 'stat' in misc.librestrict(
    ):  # 40 lines of sh code from 1993 implementing `mkdir -p', statting components of DESTDIR: /home, ...
        make_flags = make_flags + ''' 'mkinstalldirs=mkdir -p' '''

    def patch(self):
        target.AutoBuild.patch(self)
        #FIXME: should have configure.ac/in vs configure timestamp test
        self.system('rm %(srcdir)s/configure')
        self.system('touch %(srcdir)s/tests/xmltest.sh.in')
Example #22
0
class Libtool__tools(tools.AutoBuild, Libtool):
    def __init__(self, settings, source):
        tools.AutoBuild.__init__(self, settings, source)
        Libtool.set_sover(self)

    update_libtool = tools.AutoBuild.nop

    def install(self):
        tools.AutoBuild.install(self)
        # FIXME: urg.  Are we doing something wrong?  Why does libtool
        # ignore [have /usr prevail over] --prefix ?
        self.file_sub(
            [(' (/usr/lib/*[" ])', r' %(system_prefix)s/lib \1'),
             ('((-L| )/usr/lib/../lib/* )', r'\2%(system_prefix)s/lib \1')],
            '%(install_prefix)s/bin/libtool')

    if 'stat' in misc.librestrict():
        configure_command = ('SHELL=/bin/bash CONFIG_SHELL=/bin/bash ' +
                             tools.AutoBuild.configure_command)
Example #23
0
    def autoupdate(self):
        build.AutoBuild.autoupdate(self)

        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'))

        self.func(defer)
        if 'stat' in misc.librestrict():

            def defer(logger, file):
                loggedos.file_sub(logger,
                                  [(' (/etc/ld.so.conf)',
                                    self.expand(r'%(system_prefix)s/\1'))],
                                  file)

            self.map_find_files(defer, '%(srcdir)s', '^configure$')
Example #24
0
File: libt1.py Project: marnen/gub
class Libt1(target.AutoBuild):
    source = 'ftp://sunsite.unc.edu/pub/Linux/libs/graphics/t1lib-5.1.2.tar.gz'
    parallel_build_broken = True
    srcdir_build_broken = True
    dependencies = [
        'tools::libtool',
    ]
    make_flags = ''' without_doc 'VPATH:=$(srcdir)' '''
    configure_flags = (target.AutoBuild.configure_flags + ' --without-athena' +
                       ' --without-x' + ' --x-includes=' + ' --x-libraries=')
    if 'stat' in misc.librestrict():

        def autoupdate(self):
            target.AutoBuild.autoupdate(self)
            # Cross ...WHAT?
            self.file_sub([(' (/usr|/opt)', r' %(system_prefix)s\1')],
                          '%(srcdir)s/configure')

        def LD_PRELOAD(self):
            return '%(tools_prefix)s/lib/librestrict-open.so'
Example #25
0
class Ncurses(target.AutoBuild):
    source = 'http://ftp.gnu.org/pub/gnu/ncurses/ncurses-5.5.tar.gz'
    patches = ['ncurses-5.5-mkhashsize.sh.patch']
    dependencies = [
        #            'system::g++'
        'tools::ncurses',
        'tools::gawk',
    ]
    configure_flags = (target.AutoBuild.configure_flags + ' --without-normal' +
                       ' --with-shared')
    license_files = ['%(srcdir)s/README']

    if 'stat' in misc.librestrict():

        def autoupdate(self):
            target.AutoBuild.autoupdate(self)
            # Cross ...WHAT?
            self.file_sub(
                [(' (/etc|/opt|/usr|/var)', r' %(system_prefix)s\1')],
                '%(srcdir)s/configure')

        def LD_PRELOAD(self):
            return '%(tools_prefix)s/lib/librestrict-open.so'
Example #26
0
class LilyPond__simple(target.AutoBuild):
    '''A program for printing sheet music
LilyPond lets you create music notation.  It produces beautiful
sheet music from a high-level description file.'''

    source = 'git://git.sv.gnu.org/lilypond.git'
    #    source = url () # for release builds
    branch = 'master'
    subpackage_names = ['']
    dependencies = [
        'cross/gcc-c++-runtime',
        'flex',
        'fontconfig-devel',
        'freetype-devel',
        'gettext-devel',
        'ghostscript',
        'guile-devel',
        'pango-devel',
        'python-devel',
        'tools::fonts-texgyre',
        'tools::fonts-urw-core35',
        'tools::autoconf',
        'tools::bison',
        'tools::flex',
        'tools::fontforge',
        'tools::gettext',  # AM_GNU_GETTEXT
        'tools::pkg-config',
        'tools::t1utils',
        'tools::texi2html',
        'tools::texinfo',
        'tools::ghostscript',
        'tools::extractpdfmark',
        #'tools::texlive',
        'system::mf',
        'system::mpost',
        'system::xetex',
        'system::xelatex',
    ]
    if 'stat' in misc.librestrict():
        dependencies = [
            x
            for x in dependencies if x not in ['system::mf', 'system::mpost']
        ] + ['tools::texlive']
    configure_flags = (
        target.AutoBuild.configure_flags + ' --enable-relocation' +
        ' --enable-rpath' + ' --disable-documentation' +
        ' --with-texgyre-dir=%(tools_prefix)s/share/fonts/opentype/texgyre' +
        ' --with-urwotf-dir=%(tools_prefix)s/share/fonts/opentype/urw-core35')
    make_flags = ' TARGET_PYTHON=/usr/bin/python'

    if 'stat' in misc.librestrict():
        home = os.environ['HOME']
        make_flags = (
            make_flags +
            ' LIBRESTRICT_ALLOW=%(home)s/.texlive2009/:%(home)s/texmf/' %
            locals())

    @staticmethod
    def version_from_VERSION(self):
        return self.version_from_shell_script(
            'VERSION', 'MAJOR_VERSION',
            '%(MAJOR_VERSION)s.%(MINOR_VERSION)s.%(PATCH_LEVEL)s')

    @staticmethod
    def bind_version(self):
        self.version = misc.bind_method(LilyPond.version_from_VERSION, self)

    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

    def get_conflict_dict(self):
        return {'': ['lilypondcairo']}

    def build_version(self):
        v = self.source.version()
        self.runner.info('LILYPOND-VERSION: %(v)s\n' % locals())
        return v

    def install(self):
        target.AutoBuild.install(self)
        self.system(
            'cp %(tools_prefix)s/share/doc/texgyre/GUST-FONT-LICENSE.txt %(install_root)s/license/fonts-texgyre'
        )
        self.system(
            'cp %(tools_prefix)s/share/doc/urw-core35/LICENSE %(install_root)s/license/fonts-urw-core35'
        )
        # FIXME: This should not be in generic package, for installers only.
        self.installer_install_stuff()

    def installer_install_stuff(self):
        # FIXME: is it really the installer version that we need here,
        # or do we need the version of lilypond?
        installer_version = self.build_version()
        # WTF, current.
        self.system(
            'cd %(install_prefix)s/share/lilypond && mv %(installer_version)s current',
            locals())

        self.system(
            'cd %(install_prefix)s/lib/lilypond && mv %(installer_version)s current',
            locals())

        self.system('mkdir -p %(install_prefix)s/etc/fonts/')
        self.dump(
            '''\
<fontconfig>
  <cachedir>~/.lilypond-fonts.cache-2</cachedir>
</fontconfig>
''', '%(install_prefix)s/etc/fonts/local.conf', 'w', locals())
Example #27
0
# GNU make
# GNU tar --strip-component
# /usr/bin/install: coreutils
# SVN
bootstrap_names = [
    'system::gcc',
    'tools::librestrict',
    #    'tools::binutils',
    #    'tools::gcc',
    'tools::make',
    'tools::libtool',
    'tools::file',
    'tools::zlib',
]

if 'stat' in misc.librestrict():
    bootstrap_names += [
        'tools::bash',
        'tools::coreutils',
        'tools::diff',
        'tools::findutils',
        'tools::gawk',
        'tools::grep',
        #        'tools::gub-utils',
        'tools::sed',
    ]


def set_cross_dependencies(package_object_dict):
    packs = list(package_object_dict.values())
Example #28
0
 def librestrict_flavours (self):
     return misc.librestrict ()
Example #29
0
 def __init__ (self, settings, source):
     target.AutoBuild.__init__ (self, settings, source)
     if 'stat' in misc.librestrict ():
         build.add_dict (self, {'LIBRESTRICT_IGNORE': '%(tools_prefix)s/bin/bash:%(tools_prefix)s/bin/make'})
Example #30
0
 def librestrict_flavours (self):
     return misc.librestrict ()
Example #31
0
File: make.py Project: gperciva/gub
 def librestrict_name (self):
     return 'librestrict-' + '-'.join (misc.librestrict ())
Example #32
0
    def get_substitution_dict(self, env={}):
        dict = {
            'AR':
            '%(toolchain_prefix)sar',
            'AS':
            '%(toolchain_prefix)sas',
            'BUILD_CC':
            'C_INCLUDE_PATH= CPATH= CPPFLAGS= LIBRARY_PATH= cc',
            'CC':
            '%(toolchain_prefix)sgcc %(target_gcc_flags)s',
            'CC_FOR_BUILD':
            'C_INCLUDE_PATH= CPATH= CPPFLAGS= LIBRARY_PATH= cc',
            'CCLD_FOR_BUILD':
            'C_INCLUDE_PATH= CPATH= CPPFLAGS= LIBRARY_PATH= cc',
            'LDFLAGS_FOR_BUILD':
            '',
            'C_INCLUDE_PATH':
            '',
            'CPATH':
            '',
            'CPLUS_INCLUDE_PATH':
            '',
            'CXX':
            '%(toolchain_prefix)sg++ %(target_gcc_flags)s',
            'LIBRARY_PATH':
            '',
            'LDFLAGS':
            '',
            'LD':
            '%(toolchain_prefix)sld',
            'NM':
            '%(toolchain_prefix)snm',
            'PKG_CONFIG_PATH':
            '%(system_prefix)s/lib/pkgconfig',
            'PATH':
            '%(cross_prefix)s/bin:%(tools_archmatch_prefix)s/bin:%(tools_prefix)s/bin:%(tools_cross_prefix)s/bin:'
            + os.environ['PATH'],
            'PERL5LIB':
            'foo:%(tools_prefix)s/lib/perl5/5.10.0' +
            ':%(tools_prefix)s/lib/perl5/5.10.0/%(build_architecture)s' +
            ':%(tools_prefix)s/share/autoconf' +
            misc.append_path(os.environ.get('PERL5LIB', '')),
            'PKG_CONFIG':
            '''pkg-config \
--define-variable prefix=%(system_prefix)s \
--define-variable includedir=%(system_prefix)s/include \
--define-variable libdir=%(system_prefix)s/lib \
''',
            'RANLIB':
            '%(toolchain_prefix)sranlib',
            'SED':
            'sed',  # libtool (expat mingw) fixup
        }

        if 'stat' in misc.librestrict():
            dict[
                'PATH'] = '%(cross_prefix)s/bin:%(tools_prefix)s/bin:%(tools_cross_prefix)s/bin:%(cross_prefix)s/%(target_architecture)s/bin'
            dict[
                'CC_FOR_BUILD'] = 'C_INCLUDE_PATH= CPATH= CPPFLAGS= LIBRARY_PATH= PATH=/usr/bin:$PATH cc'
            dict[
                'CCLD_FOR_BUILD'] = 'C_INCLUDE_PATH= CPATH= CPPFLAGS= LIBRARY_PATH=/usr/bin:$PATH cc'

        # FIXME: usr/bin and w32api belongs to mingw/cygwin; but overriding is broken
        # FIXME: how to move this to cygwin.py/mingw.py?
        # Hmm, better to make wrappers for gcc/c++/g++ that add options;
        # see (gub-samco branch) linux-arm-vfp.py?
        if self.settings.platform in ('cygwin', 'mingw'):
            dict[
                'LDFLAGS'] += '-L%(system_prefix)s/lib -L%(system_prefix)s/bin -L%(system_prefix)s/lib/w32api'

        #FIXME: how to move this to arm.py?
        if self.settings.target_architecture == 'armv5te-softfloat-linux':
            dict['CFLAGS'] = '-O'

        dict.update(env)
        d = build.AutoBuild.get_substitution_dict(self, dict).copy()
        return d
Example #33
0
File: python.py Project: cneira/gub
 def __init__ (self, settings, source):
     target.AutoBuild.__init__ (self, settings, source)
     self.CROSS_ROOT = '%(targetdir)s'
     if 'stat' in misc.librestrict ():
         self.install_command = ('LIBRESTRICT_ALLOW=/usr/lib/python2.4/lib-dynload:${LIBRESTRICT_ALLOW-/foo} '
             + target.AutoBuild.install_command)
Example #34
0
class Texlive(target.AutoBuild):
    '''The TeX Live text formatting system
The TeX Live software distribution offers a complete TeX system.
It  encompasses programs for editing, typesetting, previewing and printing
of TeX documents in many different languages, and a large collection
of TeX macros and font libraries.

The distribution also includes extensive general documentation about
TeX, as well as the documentation accompanying the included software
packages.'''

    #    source = texlive_svn + '&branch=trunk&branchmodule=Build/source&revision=HEAD'
    source = 'http://lilypond.org/download/gub-sources/texlive/texlive-15644.tar.gz'
    config_cache_flag_broken = True
    parallel_build_broken = True
    dependencies = [
        'tools::automake',
        'tools::texlive',
        'tools::t1utils',
        'tools::rsync',
        'libtool',
        #?            'fontconfig',
        'freetype',
        'libgd',
        'libpng',
        'libtiff',
        'libt1',
        'ncurses',
        'zlib',
    ]
    ##--with-system-kpathsea
    common_configure_flags = misc.join_lines('''
--disable-cjkutils
--disable-dvi2tty
--disable-dvipdfmx
--disable-dvipng
--disable-lcdf-typetools
--disable-multiplatform
--disable-native-texlive-build
--disable-psutils
--disable-t1utils
--disable-texinfo
--disable-xdvipdfmx
--disable-xetex
--enable-ipc
--enable-omega
--enable-oxdvik
--enable-pdflatex
--enable-pdftex
--enable-shared
--enable-web2c
--with-dialog
--with-etex
--with-freetype2-include=%(system_prefix)s/include/freetype2
--with-pnglib-include=%(system_prefix)s/include/libpng12
--with-system-freetype2
--with-system-gd
--with-system-ncurses
--with-system-pnglib
--with-system-t1lib
--with-system-tifflib
--with-system-zlib
--without-freetype
--without-icu
--without-sam2p
--without-system-freetype
--without-texi2html
--without-ttf2pk
--without-xdvipdfmx
--without-xetex
''')
    LDFLAGS = '-L%(system_prefix)s/lib %(rpath)s %(libs)s'
    # PROMOTEME: LDFLAGS should be set in target.py just like tools.py?
    configure_variables = (target.AutoBuild.configure_variables +
                           ''' LDFLAGS='%(rpath)s %(libs)s' ''')
    #    configure_command = ('export TEXMF=%(tools_prefix)s/share/texmf;'
    #                         + target.AutoBuild.configure_command)
    configure_flags = (target.AutoBuild.configure_flags +
                       '%(common_configure_flags)s' + misc.join_lines('''
--with-x
--with-mf-x-toolkit=xaw
--with-xdvi-x-toolkit=xaw
--x-includes=%(system_prefix)s/X11R6/include
--x-libraries=%(system_prefix)s/X11R6/lib
'''))
    configure_flags = (
        target.AutoBuild.configure_flags +
        (common_configure_flags.replace('--with-mf-x-toolkit=xaw', '').replace(
            '--with-xdvi-x-toolkit=xaw', '')) +
        ' CPPFLAGS=-I%(system_prefix)s/include' + ' --x-includes=' +
        ' --x-libraries=' + ' --disable-xdvik' + ' --disable-xdvipdfmx' +
        ' --disable-mf' + ' --disable-pdfopen')
    #    destdir_install_broken = True
    make_flags = ' SHELL=/bin/bash'  # web2c forces `/bin/sh libtool', use bash
    common_install_flags = (
        ''' 'btdocdir=$(datadir)/texmf/doc/bibtex8' ''' +
        ''' 'cmapdatadir=$(datadir)/texmf/fonts/cmap/dvipdfmx' ''' +
        ''' 'configdatadir=$(datadir)/texmf/dvipdfmx' ''' +
        ''' 'csfdir=$(datadir)/texmf-dist/bibtex/csf/base' ''' +
        ''' 'encdir=$(datadir)/texmf-dist/fonts/enc/dvips/base' ''' +
        ''' 'glyphlistdatadir=$(datadir)/texmf-dist/fonts/map/glyphlist' ''' +
        ''' 'glyphlistdir=$(datadir)/texmf-dist/fonts/map/glyphlist' ''' +
        ''' 'gsftopkpsheaderdir=$(datadir)/texmf/dvips/gsftopk' ''' +
        ''' 'infodir=$(datadir)/info' ''' + ''' 'mandir=$(datadir)/man' ''' +
        ''' 'mapdatadir=$(datadir)/texmf/fonts/map/dvipdfm/dvipdfmx' ''' +
        ''' 'prologdir=$(datadir)/texmf/dvips/base' ''' +
        ''' 'scriptdir=$(datadir)/texmf-dist/scripts' ''' +
        ''' 'scriptxdir=$(datadir)/texmf/scripts' ''' +
        ''' 'tetexdocdir=$(datadir)/texmf/doc/tetex' ''' +
        ''' 'tex4htdir=$(datadir)/$(tex4ht_subdir)' ''' +
        ''' 'texconfigdir=$(datadir)/texmf/texconfig' ''' +
        ''' 'web2cdir=$(datadir)/texmf/web2c' ''')
    install_flags = (tools.AutoBuild.install_flags + common_install_flags)
    license_files = ['%(srcdir)s/LICENSE.TL']
    ##subpackage_names = ['doc', 'devel', 'base', 'runtime', 'bin', '']
    subpackage_names = ['']

    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')))

    def __init__(self, settings, source):
        target.AutoBuild.__init__(self, settings, source)
        self.init_repos()

    if 'stat' in misc.librestrict():

        def LD_PRELOAD(self):
            return '%(tools_prefix)s/lib/librestrict-open.so'

    def version(self):
        return '2009'

    def get_subpackage_definitions(self):
        d = target.AutoBuild.get_subpackage_definitions(self)
        d['doc'] += [self.settings.prefix_dir + '/share/texmf/doc']
        d['doc'] += [self.settings.prefix_dir + '/share/texmf-dist/doc']
        d['base'] = [self.settings.prefix_dir + '/share/texmf']
        d['base'] = [self.settings.prefix_dir + '/share/texmf-dist']
        d['bin'] = ['/etc', self.settings.prefix_dir]
        return d

    def connect_command_runner(self, runner):
        printf('FIXME: deferred workaround: should support multiple sources')
        if (runner):
            self.texmf_repo.connect_logger(runner.logger)
            self.texmf_dist_repo.connect_logger(runner.logger)
        return target.AutoBuild.connect_command_runner(self, runner)

    def download(self):
        target.AutoBuild.download(self)
        self.texmf_repo.download()
        if texmf_dist:
            self.texmf_dist_repo.download()

    def untar(self):
        target.AutoBuild.untar(self)

        def defer(logger):
            self.texmf_repo.update_workdir(self.expand('%(srcdir)s/texmf'))
            if texmf_dist:
                self.texmf_dist_repo.update_workdir(
                    self.expand('%(srcdir)s/texmf-dist'))
            # ugh.
            if self.source.have_client():
                loggedos.download_url(logging.default_logger, license_url,
                                      self.expand('%(srcdir)s'))

        self.func(defer)

    def common_patch(self):
        self.file_sub([
            (' REL=[.][.] ', ' REL=../share'),
        ], '%(srcdir)s/texk/texlive/linked_scripts/Makefile.in')
        self.file_sub(
            [
                #                ('[{]/share', '{%(prefix_dir)s/share'),
                (' [$]SELFAUTOPARENT/texmf-var',
                 ' $SELFAUTOPARENT/var/lib/texmf'),
                (' [$]SELFAUTOPARENT/texmf-config', ' $SELFAUTODIR/etc/texmf'),
                (' [$]SELFAUTOPARENT/texmf-dist',
                 ' $SELFAUTODIR/share/texmf-dist'),
                (' [$]SELFAUTOPARENT/texmf', ' $SELFAUTODIR/share/texmf'),
            ],
            '%(srcdir)s/texk/kpathsea/texmf.cnf')

    def patch(self):
        target.AutoBuild.patch(self)
        self.common_patch()

    def common_install(self):
        self.system('''
mkdir -p %(install_prefix)s/share/
(cd %(install_prefix)s && tar -cf- texmf* | tar -C share -xf-)
rm -rf %(install_prefix)s/texmf*
rsync -v -a %(srcdir)s/texmf %(install_prefix)s/share/
rsync -v -a %(srcdir)s/texmf-dist %(install_prefix)s/share/ || :
(cd %(install_prefix)s/bin && ln -s pdftex latex)
(cd %(install_prefix)s/bin && ln -s pdftex pdflatex)
rm -f %(install_prefix)s/bin/man
''')
        self.dump('''#! /bin/sh
texconfig-sys rehash
texconfig-sys confall
texconfig-sys rehash
texconfig-sys init
texconfig-sys dvips printcmd -
''',
                  '%(install_prefix)s/etc/postinstall/texlive',
                  permissions=octal.o755)

    def install(self):
        target.AutoBuild.install(self)
        self.common_install()

    # FIXME: shared for all vc packages
    def srcdir(self):
        return '%(allsrcdir)s/%(name)s-%(version)s'

    # FIXME: shared for all vc packages
    def builddir(self):
        return '%(targetdir)s/build/%(name)s-%(version)s'

    def name_version(self):
        # whugh
        import os
        if os.path.exists(self.srcdir()):
            d = misc.grok_sh_variables(self.expand('%(srcdir)s/VERSION'))
            return 'texlive-%(VERSION)s' % d
        return 'texlive-3.0'
Example #35
0
File: gmp.py Project: gperciva/gub
 def __init__ (self, settings, source):
     target.AutoBuild.__init__ (self, settings, source)
     if not self.settings.platform.startswith ('darwin'):
         self.target_architecture = re.sub ('i[0-9]86-', 'i386-', settings.target_architecture)
     if 'stat' in misc.librestrict ():
         build.add_dict (self, {'LIBRESTRICT_IGNORE': '%(tools_prefix)s/bin/bash'})
Example #36
0
File: cross.py Project: cneira/gub
# GNU make
# GNU tar --strip-component
# /usr/bin/install: coreutils
# SVN
bootstrap_names = [
    'system::gcc',
    'tools::librestrict',
#    'tools::binutils',
#    'tools::gcc',
    'tools::make',
    'tools::libtool',
    'tools::file',
    'tools::zlib',
    ]

if 'stat' in misc.librestrict ():
    bootstrap_names += [
        'tools::bash',
        'tools::coreutils',
        'tools::diff',
        'tools::findutils',
        'tools::gawk',
        'tools::grep',
#        'tools::gub-utils',
        'tools::sed',
        ]

def set_cross_dependencies (package_object_dict):
    packs = list (package_object_dict.values ())

    cross_packs = [p for p in packs if isinstance (p, AutoBuild)]
Example #37
0
File: make.py Project: jrioux/gub
 def librestrict_name(self):
     return 'librestrict-' + '-'.join(misc.librestrict())