Example #1
0
class Binutils(cross.AutoBuild):
    source = 'http://ftp.gnu.org/pub/gnu/binutils/binutils-2.25.tar.bz2'
    patches = []
    dependencies = [
        'tools::zlib',
        'tools::texinfo',
    ]
    # Block usage of libz.so during configure, which may not be
    # available in the library path.
    config_cache_overrides = cross.AutoBuild.config_cache_overrides + '''
ac_cv_search_zlibVersion=
'''
    configure_flags = (cross.AutoBuild.configure_flags + ' --disable-werror' +
                       ' --cache-file=%(builddir)s/config.cache')
    configure_variables = (cross.AutoBuild.configure_variables +
                           misc.join_lines('''
LDFLAGS='-L%(tools_prefix)s/lib %(rpath)s %(libs)s'
'''))
    #CC='gcc -L%(tools_prefix)s/lib %(rpath)s %(libs)s'
    #LD_LIBRARY_PATH=%(tools_prefix)s/lib
    # binutils' makefile uses:
    #     MULTIOSDIR = `$(CC) $(LIBCFLAGS) -print-multi-os-directory`
    # which differs on each system.  Setting it avoids inconsistencies.
    make_flags = misc.join_lines('''
MULTIOSDIR=../../lib
''')

    #CCLD='$(CC) -L%(tools_prefix)s/lib %(rpath)s'
    def install(self):
        cross.AutoBuild.install(self)
        binutils.install_missing_plain_binaries(self)
        binutils.install_librestrict_stat_helpers(self)
        binutils.remove_fedora9_untwanted_but_mysteriously_built_libiberies(
            self)
        remove_fedora17_untwanted_but_mysteriously_built_libiberies(self)
Example #2
0
class Python3(target.AutoBuild):
    source = PYTHON_SRC
    dependencies = ['tools::python3']

    python_configure_flags = misc.join_lines('''
--disable-shared
--enable-static
--without-ensurepip
''')
    configure_flags = (target.AutoBuild.configure_flags +
                       python_configure_flags + misc.join_lines('''
--disable-ipv6
PYTHON_FOR_BUILD=%(tools_prefix)s/bin/python3
'''))

    # Adding --disable-ipv6 is a simple "fix" for Python 3.7.4 complaining:
    #    checking getaddrinfo bug... yes
    #    Fatal: You must get working getaddrinfo() function.
    #           or you can specify "--disable-ipv6".
    # This might be because our glibc is too old. As we don't do network, this
    # shouldn't be too bad...

    def patch(self):
        # Make setup.py work with tools::python3 as PYTHON_FOR_BUILD.
        self.file_sub([('srcdir = sysconfig.*', 'srcdir = \'%(srcdir)s\'')],
                      '%(srcdir)s/setup.py')
        target.AutoBuild.patch(self)
Example #3
0
class Gcc__freebsd(cross_gcc.Gcc):
    configure_flags = (cross_gcc.Gcc.configure_flags + misc.join_lines('''
--program-prefix=%(toolchain_prefix)s
--disable-libcilkrts
--disable-__cxa_atexit
'''))
    configure_variables = (cross_gcc.Gcc.configure_variables +
                           misc.join_lines('''
MAKEINFO=no
'''))
Example #4
0
class Python3(target.AutoBuild):
    source = PYTHON_SRC
    dependencies = ['tools::python3']

    python_configure_flags = misc.join_lines('''
--disable-shared
--enable-static
--without-ensurepip
''')
    configure_flags = (target.AutoBuild.configure_flags +
                       python_configure_flags + misc.join_lines('''
--disable-ipv6
'''))
Example #5
0
class Redland__mingw (Redland):
    patches = ['redland-1.0.8-mingw.patch']
    def patch (self):
        Redland.patch (self)
        self.file_sub ([
                ('#define HAVE_BDB_HASH 1', '/* undef HAVE_BDB_HASH */'),
                ('#define HAVE_MYSQL 1', '/* undef HAVE_MYSQL */'),
                ('#define STORAGE_MYSQL 1', '/* undef STORAGE_MYSQL */'),
                ], '%(srcdir)s/librdf/win32_rdf_config.h')
        '''
i686-mingw32-gcc -mwindows -mms-bitfields -DLIBRDF_INTERNAL=1 -g -O2 -DLIBRDF_INTERNAL=1 -g -O2 -o .libs/redland-db-upgrade.exe db_upgrade.o  -L/home/janneke/vc/gub/target/mingw/root/usr/lib -L/home/janneke/vc/gub/target/mingw/root/usr/bin -L/home/janneke/vc/gub/target/mingw/root/usr/lib/w32api ../librdf/.libs/librdf.dll.a /home/janneke/vc/gub/target/mingw/root/usr/lib/librasqal.dll.a /home/janneke/vc/gub/target/mingw/root/usr/lib/libpcre.dll.a /home/janneke/vc/gub/target/mingw/root/usr/lib/libgmp.dll.a /home/janneke/vc/gub/target/mingw/root/usr/lib/libraptor.dll.a /home/janneke/vc/gub/target/mingw/root/usr/lib/libcurl.dll.a -lwldap32 /home/janneke/vc/gub/target/mingw/root/usr/lib/libxslt.dll.a /home/janneke/vc/gub/target/mingw/root/usr/lib/libxml2.dll.a -lws2_32 /home/janneke/vc/gub/target/mingw/root/usr/lib/libsqlite3.dll.a  -L/home/janneke/vc/gub/target/mingw/root/usr/lib
db_upgrade.o: In function `main':
/home/janneke/vc/gub/target/mingw/src/redland-1.0.8/utils/db_upgrade.c:59: undefined reference to `_librdf_heuristic_gen_name'
collect2: ld returned 1 exit status
make[1]: *** [redland-db-upgrade.exe] Fout 1
make[1]: *** Wachten op onvoltooide taken...
i686-mingw32-gcc -mwindows -mms-bitfields -DLIBRDF_INTERNAL=1 -g -O2 -DLIBRDF_INTERNAL=1 -g -O2 -o .libs/rdfproc.exe rdfproc.o  -L/home/janneke/vc/gub/target/mingw/root/usr/lib -L/home/janneke/vc/gub/target/mingw/root/usr/bin -L/home/janneke/vc/gub/target/mingw/root/usr/lib/w32api ../librdf/.libs/librdf.dll.a /home/janneke/vc/gub/target/mingw/root/usr/lib/librasqal.dll.a /home/janneke/vc/gub/target/mingw/root/usr/lib/libpcre.dll.a /home/janneke/vc/gub/target/mingw/root/usr/lib/libgmp.dll.a /home/janneke/vc/gub/target/mingw/root/usr/lib/libraptor.dll.a /home/janneke/vc/gub/target/mingw/root/usr/lib/libcurl.dll.a -lwldap32 /home/janneke/vc/gub/target/mingw/root/usr/lib/libxslt.dll.a /home/janneke/vc/gub/target/mingw/root/usr/lib/libxml2.dll.a -lws2_32 /home/janneke/vc/gub/target/mingw/root/usr/lib/libsqlite3.dll.a  -L/home/janneke/vc/gub/target/mingw/root/usr/lib
Info: resolving _librdf_version_string by linking to __imp__librdf_version_string (auto-import)
Info: resolving _librdf_short_copyright_string by linking to __imp__librdf_short_copyright_string (auto-importrdfproc.o: In function `main':
/home/janneke/vc/gub/target/mingw/src/redland-1.0.8/utils/rdfproc.c:302: undefined reference to `_librdf_new_hash'
/home/janneke/vc/gub/target/mingw/src/redland-1.0.8/utils/rdfproc.c:303: undefined reference to `_librdf_hash_open'
/home/janneke/vc/gub/target/mingw/src/redland-1.0.8/utils/rdfproc.c:617: undefined reference to `_librdf_hash_from_string'
/home/janneke/vc/gub/target/mingw/src/redland-1.0.8/utils/rdfproc.c:447: undefined reference to `_librdf_get_storage_factory'
/home/janneke/vc/gub/target/mingw/src/redland-1.0.8/utils/rdfproc.c:1186: undefined reference to `_librdf_heuristic_is_blank_node'
/home/janneke/vc/gub/target/mingw/src/redland-1.0.8/utils/rdfproc.c:1187: undefined reference to `_librdf_heuristic_get_blank_node'
'''
        self.file_sub ([('^(SUBDIRS =.*) utils ', r'\1 ')],
                       '%(srcdir)s/Makefile.am')
        self.file_sub ([('^(SUBDIRS =.*) utils ', r'\1 ')],
                       '%(srcdir)s/Makefile.in')
    configure_flags = (Redland.configure_flags
                # without wsock32.dll, no libdb*.la/dll, no shared redland
                + misc.join_lines ('''
 --disable-shared
'''))
Example #6
0
class Glibc_core(glibc.Glibc):
    source = 'http://lilypond.org/download/gub-sources/glibc-2.3-20070416.tar.bz2'
    patches = glibc.Glibc.patches + ['glibc-2.3-core-install.patch']
    dependencies = ['cross/gcc-core', 'linux-headers', 'tools::bison']
    configure_flags = (glibc.Glibc.configure_flags + misc.join_lines('''
--without-tls
--without-__thread
'''))
    make_flags = (
        glibc.Glibc.make_flags
        # avoid -lgcc_eh, which gcc-core does not have
        + ' gnulib=-lgcc')
    compile_flags = glibc.Glibc.compile_flags + ' lib'
    install_flags = (glibc.Glibc.install_flags.replace(
        ' install ', ' install-lib-all install-headers '))
    subpackage_names = ['']

    def get_conflict_dict(self):
        return {'': ['glibc', 'glibc-devel', 'glibc-doc', 'glibc-runtime']}

    def get_add_ons(self):
        return ('linuxthreads', )

    def install(self):
        glibc.Glibc.install(self)
        self.system('''
mkdir -p %(install_prefix)s/include/gnu
touch %(install_prefix)s/include/gnu/stubs.h
cp %(srcdir)s/include/features.h %(install_prefix)s/include
mkdir -p %(install_prefix)s/include/bits
cp %(builddir)s/bits/stdio_lim.h %(install_prefix)s/include/bits
''')
Example #7
0
File: perl.py Project: marnen/gub
class Perl__tools(tools.AutoBuild):
    source = 'http://www.cpan.org/src/5.0/perl-5.10.0.tar.gz'
    srcdir_build_broken = True

    def patch(self):
        tools.AutoBuild.patch(self)
        self.file_sub([('-c (/dev/null)', r'-e \1')], '%(srcdir)s/Configure')

    configure_binary = '%(autodir)s/configure.gnu'
    # -Dcc=%(CC)s
    # -Dprefix=%(prefix_dir)s -- BOOTSTRAP
    configure_command = misc.join_lines('''%(configure_binary)s
 -Dprefix=%(system_prefix)s
 -Dcc='%(toolchain_prefix)sgcc %(target_gcc_flags)s'
 -Dtargetarch=%(target_architecture)s
 -Dusrinc=%(system_prefix)s/include
 -Dincpth=/
 -Dlibpth=%(system_prefix)s/lib
 -Dsitelib=%(system_prefix)s/lib/perl5/5.10.0
 -Dsitearch=%(system_prefix)s/lib/perl5/5.10.0
 -Dusedl
 -Duseshrplib
 -Dlibperl=libperl.so
 -Dcccdlflags=-fPIC
 -Dlocallibpth=/
 -Aldflags='%(rpath)s'
 -Alibs='-lm -lrt -ldl'
''')

    def configure(self):
        tools.AutoBuild.configure(self)
        for i in ['%(builddir)s/makefile', '%(builddir)s/x2p/makefile']:
            # Ugh, missing some command?
            self.file_sub([('^0$', '')], i)
Example #8
0
class Libjpeg__tools(tools.AutoBuild, Libjpeg):
    def __init__(self, settings, source):
        tools.AutoBuild.__init__(self, settings, source)
        source._version = 'v6b'

    dependencies = ['libtool']
    force_autoupdate = False

    def srcdir(self):
        return re.sub(r'src\.v', '-', tools.AutoBuild.srcdir(self))
        '''libtoolize: `configure.ac' does not exist'''

    def update_libtool(self):
        pass

    def configure(self):
        self.update_config_guess_config_sub()
        tools.AutoBuild.configure(self)
        self.file_sub([
            (r'(\(INSTALL_[A-Z]+\).*) (\$[^ ]+)$', r'\1 $(DESTDIR)\2'),
        ], '%(builddir)s/Makefile')

    install_command = misc.join_lines('''
mkdir -p %(install_prefix)s/bin %(install_prefix)s/include %(install_prefix)s/lib 
&& make DESTDIR=%(install_root)s install-headers install-lib
''')
Example #9
0
class Binutils__freebsd (cross_binutils.Binutils):
        # Add --program-prefix, otherwise we get
        # i686-freebsd-FOO iso i686-freebsd4-FOO.
    configure_flags = (cross_binutils.Binutils.configure_flags
                + misc.join_lines ('''
--program-prefix=%(toolchain_prefix)s
'''))
Example #10
0
class BjamBuild_v1(target.MakeBuild):
    @context.subst_method
    def CFLAGS(self):
        return ''

    compile_command = misc.join_lines('''
bjam
-q
'-sTOOLS=gcc'
'-sGCC=%(toolchain_prefix)sgcc -fPIC -DBOOST_PLATFORM_CONFIG=\\"boost/config/platform/linux.hpp\\"'
'-sGXX=%(toolchain_prefix)sg++ -fPIC -DBOOST_PLATFORM_CONFIG=\\"boost/config/platform/linux.hpp\\"'
'-sBUILD=release <optimization>space <inlining>on <debug-symbols>off <runtime-link>static'
'-sPYTHON_VERSION=2.4'
'-scxxflags=-fPIC'
--layout=system
--builddir=%(builddir)s
--prefix=%(prefix_dir)s
--exec-prefix=%(prefix_dir)s
--libdir=%(prefix_dir)s/lib
--includedir=%(prefix_dir)s/include
--verbose
''')
    install_command = (
        compile_command.replace('=%(prefix_dir)s', '=%(install_prefix)s') +
        ' install')
Example #11
0
class Boost_jam(tools.ShBuild):
    source = 'http://surfnet.dl.sourceforge.net/sourceforge/boost/boost-jam-3.1.11.tgz'
    make_flags = ' gcc --symbols'
    install_command = misc.join_lines('''
install -d %(install_prefix)s/bin
&& install -m755 bin.*/bjam  %(install_prefix)s/bin
''')
Example #12
0
class Sysvinit(target.MakeBuild):
    source = 'ftp://ftp.cistron.nl/pub/people/miquels/sysvinit/sysvinit-2.86.tar.gz'
    subpackage_names = ['']
    make_flags = 'CC=%(toolchain_prefix)sgcc ROOT=%(install_root)s'
    compile_command = 'cd %(builddir)s/src && make %(make_flags)s'

    def install(self):
        fakeroot_cache = self.builddir() + '/fakeroot.cache'
        self.fakeroot(self.expand(self.settings.fakeroot, locals()))
        target.AutoBuild.install(self)
        from gub import misc
        # FIXME: cannot do these as self.system () in install () as
        # install will rm -rf %(install_root)s as first command
        # install_clean/install_install?

    install_command = misc.join_lines('''
mkdir -p %(install_root)s/bin &&
mkdir -p %(install_root)s/sbin &&
mkdir -p %(install_prefix)s/bin &&
mkdir -p %(install_prefix)s/include &&
mkdir -p %(install_prefix)s/share/man/man1 &&
mkdir -p %(install_prefix)s/share/man/man5 &&
mkdir -p %(install_prefix)s/share/man/man8 &&
cd %(builddir)s/src && fakeroot make install %(make_flags)s &&
find %(install_root)s/bin %(install_root)s/sbin %(install_prefix)s/bin -type f -o -type l | grep -Ev 'sbin/(tel|)init$' | xargs -I'{}' mv '{}' '{}'.sysvinit
''')
    license_files = ['%(srcdir)s/doc/Install']
Example #13
0
class Pthreads_w32(target.MakeBuild):
    source = 'ftp://sourceware.org/pub/pthreads-win32/pthreads-w32-2-8-0-release.tar.gz'
    make_flags = 'GC CROSS=%(toolchain_prefix)s'
    install_command = misc.join_lines('''
install -d %(install_prefix)s/bin
install -d %(install_prefix)s/include
install -d %(install_prefix)s/lib
&& install -m644 pthread.h sched.h %(install_prefix)s/include
&& install -m755 pthreadGC2.dll %(install_prefix)s/bin
&& install -m755 libpthreadGC2.a %(install_prefix)s/lib
&& install -m755 pthreadGC2.dll %(install_prefix)s/bin/pthread.dll
&& install -m755 libpthreadGC2.a %(install_prefix)s/lib/libpthread.a
''')

    def install(self):
        for file in ['pthread.h', 'sched.h']:
            self.file_sub([('#undef PTW32_LEVEL\s', ''' 
#ifndef _POSIX_SOURCE
#define _POSIX_SOURCE
#undef _POSIX_C_SOURCE
#define _POSIX_C_SOURCE 199000
/*URG*/
#define pid_t int
#endif

#undef PTW32_LEVEL
''')],
                          '%(builddir)s/%(file)s',
                          env=locals())
        self.system('''
rm -rf %(install_root)s
cd %(builddir)s && %(install_command)s
''')
        self.install_license()
        self.libtool_installed_la_fixups()
Example #14
0
class ImageMagick__tools(tools.AutoBuild):
    source = 'http://www.imagemagick.org/download/releases/ImageMagick-6.5.7-9.tar.xz'
    dependencies = [
        'automake',
        'bzip2',
        'fontconfig',
        'ghostscript',
        'libpng',
        'libjpeg',
        'libtiff',
        'libxml2',
        'libtool',
        'perl',
        'zlib',
        'tools::xzutils',
    ]
    configure_flags = (tools.AutoBuild.configure_flags + misc.join_lines('''
--without-magick-plus-plus
--without-perl
'''))
    # Setting `CFLAGS' is not sufficient since ImageMagick's `configure'
    # script prepends stuff for libraries like libpng to `CFLAGS'.  We thus
    # explicitly set `INCLUDES' (as documented in the automake info file) to
    # ensure that the path to gub's header files comes first.
    #
    # However, there seems to be a bug (or a feature) in at least gcc 4.8.5:
    # Directories in the environment variable `C_INCLUDE_PATH' are processed
    # similar to `-isystem' arguments, this is, they are handled after `-I'
    # options but before standard system directories.  Alas, if a directory
    # `foo' appears in both `C_INCLUDE_PATH' and as an argument to `-I', the
    # latter is obviously ignored.  For this reason we have to unset
    # `C_INCLUDE_PATH' (which is set by gub) to really get gub's C header
    # directory first.
    make_flags = (tools.AutoBuild.make_flags +
                  ' INCLUDES=-I%(tools_prefix)s/include ' + ' C_INCLUDE_PATH=')
Example #15
0
File: guile.py Project: jrioux/gub
class Guile__tools (tools.AutoBuild, Guile):
    dependencies = (Guile.dependencies
                    + ['autoconf', 'automake', 'gettext', 'flex', 'libtool'])
    make_flags = Guile.make_flags
    # Doing make gen-scmconfig, guile starts a configure recheck:
    #    cd .. && make  am--refresh
    #    /bin/sh ./config.status --recheck
    # leading to
    #    checking size of char... 0
    # Great idea, let's re-check!  You never know... :-)
    compile_flags_native = misc.join_lines ('''
LD_LIBRARY_PATH=%(system_prefix)s/lib
CFLAGS='-O2 -I%(system_prefix)s/include'
LDFLAGS='-L%(system_prefix)s/lib %(rpath)s'
''')
    configure_command = ('LD_LIBRARY_PATH=%(system_prefix)s/lib:${LD_LIBRARY_PATH-/foe} '
                         + tools.AutoBuild.configure_command
                         + Guile.guile_configure_flags)
    # FIXME: when configuring, guile runs binaries linked against
    # libltdl.
    # FIXME: when not x-building, guile runs gen_scmconfig, guile without
    # setting the proper LD_LIBRARY_PATH.
    compile_command = ('export LD_LIBRARY_PATH=%(builddir)s/libguile/.libs:%(system_prefix)s/lib:${LD_LIBRARY_PATH-/foe};'
                + Guile.compile_command)
    def patch (self):
        tools.AutoBuild.patch (self)
        #Guile.autopatch (self)
    def install (self):
        tools.AutoBuild.install (self)
        self.system ('cd %(install_root)s%(packaging_suffix_dir)s%(prefix_dir)s/bin && cp guile guile-1.8')
        self.file_sub ([('[(]string-join other-flags[)]', '(string-join (filter (lambda (x) (not (equal? x "-L/usr/lib"))) other-flags))')],
                       '%(install_root)s%(packaging_suffix_dir)s%(prefix_dir)s/bin/guile-config',
                       must_succeed=True)
Example #16
0
File: gcc.py Project: jrioux/gub
class above_is_okay_now_cygwin_has_switched_Gcc__cygwin (cross_gcc.Gcc):
    source = 'http://ftp.gnu.org/pub/gnu/gcc/gcc-3.4.4/gcc-3.4.4.tar.bz2'
    patches = ['gcc-3.4.4-cygwin-3.patch']
    dependencies = (cross_gcc.Gcc.dependencies
                    + ['cygwin', 'w32api-in-usr-lib'])
    # We must use --with-newlib, otherwise configure fails:
    # No support for this host/target combination.
    # [configure-target-libstdc++-v3]
    configure_flags = (cross_gcc.Gcc.configure_flags
                + misc.join_lines ('''
--with-newlib
--verbose
--enable-nls
--without-included-gettext
--enable-version-specific-runtime-libs
--without-x
--enable-libgcj
--with-system-zlib
--enable-interpreter
--disable-libgcj-debug
--enable-threads=posix
--disable-win32-registry
--enable-sjlj-exceptions
--enable-hash-synchronization
--enable-libstdcxx-debug
'''))
Example #17
0
class Python3__darwin(Python3):
    patches = Python3.patches + ['python-3.7.4-configure.ac-darwin.patch']
    force_autoupdate = True
    configure_flags = Python3.configure_flags + misc.join_lines('''
READELF=/usr/bin/readelf
MACOSX_DEPLOYMENT_TARGET=10.3
''')
Example #18
0
class Libicu__mingw(Libicu):
    patches = Libicu.patches + [
        'libicu-3.8.1-uintptr-t.patch', 'libicu-3.8.1-cross-mingw.patch',
        'libicu-3.8.1-mingw.patch'
    ]
    configure_flags = (Libicu.configure_flags + misc.join_lines('''
--disable-threads
'''))

    def configure(self):
        Libicu.configure(self)
        self.dump('''
#define S_IROTH S_IREAD
#define S_IXOTH S_IXUSR
''',
                  '%(builddir)s/common/unicode/platform.h',
                  mode='a')

    def compile_native(self):
        Libicu.compile_native(self)
        self.system('cd %(builddir)s/bin-native && mv pkgdata pkgdata.bin')
        self.dump('''\
#! /bin/sh
dir=$(dirname $0)
if test "$dir" = "."; then
   dir=$(dirname $(which $0))
fi
$dir/$(basename $0).bin "$@" | sed -e 's/lib$(LIBNAME).so/$(LIBNAME).dll/g'
''',
                  '%(builddir)s/bin-native/pkgdata',
                  permissions=octal.o755)
Example #19
0
class Guile__tools(tools.AutoBuild, Guile):
    dependencies = (Guile.dependencies +
                    ['autoconf', 'automake', 'gettext', 'flex', 'libtool'])
    make_flags = Guile.make_flags
    # Doing make gen-scmconfig, guile starts a configure recheck:
    #    cd .. && make  am--refresh
    #    /bin/sh ./config.status --recheck
    # leading to
    #    checking size of char... 0
    # Great idea, let's re-check!  You never know... :-)
    compile_flags_native = misc.join_lines('''
CFLAGS='-O2 -I%(system_prefix)s/include'
LDFLAGS='-L%(system_prefix)s/lib %(rpath)s'
''')
    configure_command = (tools.AutoBuild.configure_command +
                         Guile.guile_configure_flags +
                         Guile.guile_configure_variables)

    def install(self):
        tools.AutoBuild.install(self)
        self.system(
            'cd %(install_root)s%(packaging_suffix_dir)s%(prefix_dir)s/bin && cp guile guile-1.8'
        )
        self.file_sub(
            [('[(]string-join other-flags[)]',
              '(string-join (filter (lambda (x) (not (equal? x "-L/usr/lib"))) other-flags))'
              )],
            '%(install_root)s%(packaging_suffix_dir)s%(prefix_dir)s/bin/guile-config',
            must_succeed=True)
Example #20
0
class Guile__mingw (Guile):
    def __init__ (self, settings, source):
        Guile.__init__ (self, settings, source)
        # Configure (compile) without -mwindows for console
        self.target_gcc_flags = '-mms-bitfields'
    dependencies = Guile.dependencies +  ['regex-devel']
    configure_flags = (Guile.configure_flags
                       + ' --without-threads')
    configure_variables = (Guile.configure_variables
                           .replace ("':'", "';'")
                + misc.join_lines ('''
CFLAGS='-O2 -DHAVE_CONFIG_H=1 -I%(builddir)s'
'''))
    config_cache_overrides = Guile.config_cache_overrides + '''
scm_cv_struct_timespec=${scm_cv_struct_timespec=no}
guile_cv_func_usleep_declared=${guile_cv_func_usleep_declared=yes}
guile_cv_exeext=${guile_cv_exeext=}
libltdl_cv_sys_search_path=${libltdl_cv_sys_search_path="%(system_prefix)s/lib"}
'''
    def configure (self):
        self.file_sub ([('''^#(LIBOBJS=".*fileblocks.*)''', r'\1')],
                       '%(srcdir)s/configure')
        Guile.configure (self)
        for libtool in ['%(builddir)s/libtool']: # readline patched-out: '%(builddir)s/guile-readline/libtool']:
            self.file_sub ([('-mwindows', '')], libtool)
    def compile (self):
        ## Why the !?#@$ is .EXE only for guile_filter_doc_snarfage?
        self.system ('''cd %(builddir)s/libguile &&make %(compile_flags_native)sgen-scmconfig guile_filter_doc_snarfage.exe''')
        self.system ('cd %(builddir)s/libguile && cp guile_filter_doc_snarfage.exe guile_filter_doc_snarfage')
        Guile.compile (self)
    def install (self):
        Guile.install (self)
        # dlopen-able .la files go in BIN dir, BIN OR LIB package
        self.system ('''mv %(install_prefix)s/lib/lib*[0-9].la %(install_prefix)s/bin''')
        self.system ('''cd %(install_prefix)s/bin && cp guile.exe guile-windows.exe''')
Example #21
0
class Librestrict_nomake__tools (Librestrict_make__tools):
    @context.subst_method
    def compile_command (self):
        # URG, must *not* have U __stack_chk_fail@@GLIBC_2.4
        # because glibc-[core-]2.3 will not install with LD_PRELOAD
        CFLAGS = '-fno-stack-protector'
        compile = 'gcc -W -Wall %(CFLAGS)s -I. -fPIC -shared -o lib%(name)s.so %(name)s.c'
        sources = ' '.join (['restrict-%s.c' % name for name in self.librestrict_flavours ()])
        b = 'cd %(builddir)s && '
        command = b + 'cat %(sources)s > restrict-all.c\n' % locals ()
        def updated (d, e):
            c = d.copy ()
            c.update (e)
            return c
        for f in self.flavours () + ['all']:
            name = 'restrict-' + f
            command += (b
                        + compile % locals ()
                        + ' || '
                        + compile % updated (locals (), {'CFLAGS':''})
                        + '\n')
        command += b + 'mv librestrict-all.so librestrict.so'
        return command
    install_command = (misc.join_lines ('''
mkdir -p %(install_prefix)s/lib
&& cp -p librestrict*.so %(install_prefix)s/lib
'''))
Example #22
0
File: raptor.py Project: jrioux/gub
class Raptor__mingw(Raptor):
    #        return '''CFLAGS='-Dstrtok_r\(s,d,p\)=strtok\(s,d\)' '''
    make_flags = '''CFLAGS="-D'strtok_r(s,d,p)=strtok(s,d)'" '''
    configure_flags = (target.AutoBuild.configure_flags + misc.join_lines('''
--enable-maintainer-mode
--enable-parsers="grddl rdfxml ntriples turtle trig guess rss-tag-soup rdfa n3"
'''))
Example #23
0
class Jade__tools(tools.AutoBuild):
    source = 'ftp://ftp.jclark.com/pub/jade/jade-1.2.1.tar.gz'
    srcdir_build_broken = True
    dependencies = ['tools::autoconf', 'tools::libtool']

    def autoupdate(self):
        self.system('cd %(srcdir)s && cp -f config/configure.in .')
        self.system('cd %(srcdir)s && libtoolize --force --copy || :')
        self.runner._execute(commands.ForcedAutogenMagic(self))

    configure_variables = (build.AutoBuild.configure_variables +
                           misc.join_lines('''
CFLAGS=-I%(system_prefix)s/include
LDFLAGS=-L%(system_prefix)s/lib
LD_LIBRARY_PATH=%(system_prefix)s/lib
'''))
    configure_binary = '%(builddir)s/configure'

    def configure(self):
        tools.AutoBuild.configure(self)
        self.system(
            'cd %(builddir)s; for i in $(ls -1dF * |grep /); do make -C $i -f ../Makefile.lib Makefile.lt; done || :'
        )

    make_flags = 'top_builddir=%(builddir)s'
Example #24
0
class BjamBuild_v2(MakeBuild):
    dependencies = ['boost-jam']

    def patch(self):
        MakeBuild.patch(self)

    compile_command = misc.join_lines('''
bjam
-q
--layout=system
--builddir=%(builddir)s
--prefix=%(system_prefix)s
--exec-prefix=%(system_prefix)s
--libdir=%(system_prefix)s/lib
--includedir=%(system_prefix)s/include
--verbose
cxxflags=-fPIC
toolset=gcc
debug-symbols=off
link=shared
runtime-link=shared
threading=multi
release
''')
    install_command = (
        compile_command.replace('=%(system_prefix)s', '=%(install_prefix)s') +
        ' install')
Example #25
0
    def configure (self):
        Ghostscript.configure (self)
        if dynamic: # Dynamic is a configure cross-compile disaster area,
            # it uses BUILD's uname to determine HOST libraries.
            self.file_sub ([('^(EXTRALIBS *=.*)(-ldl )', r'\1'),
                            ('^(EXTRALIBS *=.*)(-rdynamic )', r'\1')],
                           '%(builddir)s/Makefile')
        self.file_sub ([('^(EXTRALIBS *=.*)', r'\1 -lwinspool -lcomdlg32 -lz')],
                       '%(builddir)s/Makefile')
        self.file_sub ([('^unix__=.*', misc.join_lines ('''unix__=
$(GLOBJ)gp_mswin.$(OBJ)
$(GLOBJ)gp_wgetv.$(OBJ)
$(GLOBJ)gp_stdia.$(OBJ)
$(GLOBJ)gp_ntfs.$(OBJ)
$(GLOBJ)gp_win32.$(OBJ)
$(GLOBJ)gp_upapr.$(OBJ) 
'''))],
               '%(srcdir)s/base/unix-aux.mak')        
        self.dump ('''
GLCCWIN=$(CC) $(CFLAGS) -I$(GLOBJDIR)
PSCCWIN=$(CC) $(CFLAGS) -I$(GLOBJDIR)

include $(GLSRCDIR)/winplat.mak
''',
             '%(builddir)s/Makefile',
             mode='a')
Example #26
0
    def configure(self):
        Ghostscript.configure(self)
        if 'linux' in self.settings.build_architecture:
            self.file_sub([('^(AUXEXTRALIBS *=.*)(-liconv )', r'\1')],
                          '%(builddir)s/Makefile')
        if shared:  # Shared is a configure cross-compile disaster area,
            # it uses BUILD's uname to determine HOST libraries.
            self.file_sub([('^(EXTRALIBS *=.*)(-ldl )', r'\1'),
                           ('^(EXTRALIBS *=.*)(-rdynamic )', r'\1')],
                          '%(builddir)s/Makefile')
        self.file_sub([('^(EXTRALIBS *=.*)', r'\1 -lwinspool -lcomdlg32 -lz')],
                      '%(builddir)s/Makefile')
        self.file_sub([('^unix__=.*',
                        misc.join_lines('''unix__=
$(GLOBJ)gp_mswin.$(OBJ)
$(GLOBJ)gp_wgetv.$(OBJ)
$(GLOBJ)gp_stdia.$(OBJ)
$(GLOBJ)gp_ntfs.$(OBJ)
$(GLOBJ)gp_win32.$(OBJ)
$(GLOBJ)gp_upapr.$(OBJ) 
$(GLOBJ)gp_wutf8.$(OBJ)
'''))], '%(srcdir)s/base/unix-aux.mak')
        self.dump('''
GLCCWIN=$(CC) $(CFLAGS) -I$(GLOBJDIR)
PSCCWIN=$(CC) $(CFLAGS) -I$(GLOBJDIR)

include $(GLSRCDIR)/w32.mak
include $(GLSRCDIR)/gsdll.mak
include $(GLSRCDIR)/winplat.mak
include $(GLSRCDIR)/pcwin.mak
''',
                  '%(builddir)s/Makefile',
                  mode='a')
Example #27
0
class LilyPond_test (lilypond.LilyPond_base):
    dependencies = (lilypond.LilyPond_base.dependencies
                + [
                'tools::netpbm',
                'tools::fonts-dejavu',
                'tools::fonts-libertine',
                'tools::fonts-bitstream-charter',
                'tools::fonts-bitstream-vera',
                'tools::fonts-liberation',
                'tools::fonts-urw-core35',
                'tools::fonts-luximono',
                'tools::fonts-ipafont',
                'tools::fonts-gnufreefont',
                ])
    @context.subst_method
    def test_ball (self):
        return '%(uploads)s/lilypond-%(version)s-%(build_number)s.test-output.tar.bz2'
    make_flags = misc.join_lines ('''
CPU_COUNT=%(cpu_count)s
''')
    compile_flags = lilypond.LilyPond_base.compile_flags + ' test'
        #return (lilypond.LilyPond_base.install_command
    install_command = 'true'
    def install (self):
        target.AutoBuild.install (self) 
        self.system ('''
LD_PRELOAD= tar -C %(builddir)s -cjf %(test_ball)s input/regression/out-test
''')
Example #28
0
File: raptor.py Project: jrioux/gub
class Raptor(target.AutoBuild):
    source = 'http://download.librdf.org/source/raptor-1.4.18.tar.gz'
    patches = ['raptor-1.4.18-cross.patch']
    dependencies = [
        'curl-devel', 'expat-devel', 'libxml2-devel', 'libxslt-devel',
        'tools::flex', 'tools::autoconf', 'tools::automake', 'tools::libtool',
        'tools::gtk_doc'
    ]
    config_cache_overrides = target.AutoBuild.config_cache_overrides + '''
ac_cv_vsnprint_result_c99=1
ac_cv_libxmlparse_xml_parsercreate=no
ac_cv_expat_xml_parsercreate=yes
ac_cv_expat_initial_utf8_bom=yes
'''
    configure_flags = (target.AutoBuild.configure_flags + misc.join_lines('''
--enable-maintainer-mode
'''))

    def autoupdate(self):
        self.file_sub([('( |-I|-L)/usr', r'\1%(system_prefix)s')],
                      '%(srcdir)s/configure.ac')
        self.runner._execute(commands.ForcedAutogenMagic(self))

    def config_script(self):
        return 'raptor-config'
Example #29
0
File: build.py Project: epronk/gub
    def generate_dll_a_and_la(self, libname, depend=""):
        # ugh, atexit, _onexit mutliply defined in crt2.o
        self.system(
            misc.join_lines(
                """
cd %(install_prefix)s
&& echo EXPORTS > lib/lib%(libname)s.a.def
&& %(toolchain_prefix)snm bin/lib%(libname)s.dll | grep ' T _' | sed -e 's/.* T _//' | grep -Ev '^(atexit|_onexit)$' >> lib/lib%(libname)s.a.def
&& (grep '@' lib/lib%(libname)s.a.def | sed -e 's/@.*//' >> lib/lib%(libname)s.a.def || :)
&& %(toolchain_prefix)sdlltool --def lib/lib%(libname)s.a.def --dllname bin/lib%(libname)s.dll --output-lib lib/lib%(libname)s.dll.a
"""
            ),
            locals(),
        )
        self.file_sub(
            [
                ("LIBRARY", "%(libname)s"),
                ("STATICLIB", ""),
                ("DEPEND", " %(depend)s"),
                ("LIBDIR", "%(prefix_dir)s/lib"),
            ],
            "%(sourcefiledir)s/libtool.la",
            "%(install_prefix)s/lib/lib%(libname)s.la",
            env=locals(),
        )
Example #30
0
class Gcc__tools (tools.AutoBuild):
    dependencies = [
            'binutils',
            ]
    configure_flags = (tools.AutoBuild.configure_flags
                + '%(enable_languages)s'
                + ' --disable-multilib'
                + ' --enable-static'
                + ' --enable-shared'
                + ' --with-as=%(tools_prefix)s/bin/as'
                + ' --with-ld=%(tools_prefix)s/bin/ld'
                + ' --with-nm=%(tools_prefix)s/bin/nm'
                )
    def patch (self):
        tools.AutoBuild.patch (self)
        do_not_look_in_slash_usr (self)
    def languages (self):
        return ['c', 'c++']
    @context.subst_method
    def enable_languages (self):
        flags = ' --enable-languages=' + ','.join (self.languages ()) 
        if 'c++' in self.languages ():
            flags += ' --enable-libstdcxx-debug'
        return flags
    make_flags = misc.join_lines ('''
tooldir='%(cross_prefix)s/%(target_architecture)s'
gcc_tooldir='%(prefix_dir)s/%(target_architecture)s'
''')
    def install (self):
        tools.AutoBuild.install (self)
        move_target_libs (self, '%(install_prefix)s/%(target_architecture)s')
#        move_target_libs ('%(install_prefix)s%/lib')
        self.disable_libtool_la_files ('stdc[+][+]')
Example #31
0
class Gcc__freebsd(cross_gcc.Gcc):
    source = 'http://ftp.gnu.org/pub/gnu/gcc/gcc-4.3.2/gcc-4.3.2.tar.bz2'
    dependencies = cross_gcc.Gcc.dependencies + ['tools::mpfr']
    configure_command = (''' LDFLAGS='-L%(tools_prefix)s/lib %(rpath)s' ''' +
                         cross_gcc.Gcc.configure_command)
    configure_flags = (cross_gcc.Gcc.configure_flags + misc.join_lines('''
--program-prefix=%(toolchain_prefix)s
'''))
Example #32
0
    def compile(self):
        inkscape_branch = self.source.full_branch_name()
        self.system(
            sys.executable + misc.join_lines('''
bin/gib
--platform=%(target_platform)s
--branch=inkscape=%(inkscape_branch)s
lilypond
'''), locals())
Example #33
0
    def doc_relocation (self):
        return misc.join_lines ('''
LILYPOND_EXTERNAL_BINARY=%(system_prefix)s/bin/lilypond
PATH=%(tools_prefix)s/bin:%(system_prefix)s/bin:$PATH
MALLOC_CHECK_=2
LD_LIBRARY_PATH=%(tools_prefix)s/lib:%(system_prefix)s/lib:${LD_LIBRARY_PATH-/foe}
GS_FONTPATH=%(system_prefix)s/share/ghostscript/%(ghostscript_version)s/fonts:%(system_prefix)s/share/gs/fonts
GS_LIB=%(system_prefix)s/share/ghostscript/%(ghostscript_version)s/Resource/Init:%(system_prefix)s/share/ghostscript/%(ghostscript_version)s/Resource
''')
Example #34
0
    def compile (self):
        inkscape_branch = self.source.full_branch_name ()
        self.system (sys.executable
                     + misc.join_lines ('''
bin/gib
--platform=%(target_platform)s
--branch=inkscape=%(inkscape_branch)s
lilypond
'''), locals ())
Example #35
0
    def patch_upstream (self):
        # config_office is gone? but avoid rewriting everything for
        # now -- how's upstream?
        self.system ('cd %(upstream_dir)s && rm -f config_office && ln -s . config_office')
        self.upstream_patch_reset ()
        list (map (self.apply_upstream_patch, self.upstream_patches))
        self.upstream_patched_unchanged_preserve_mtime ()

        # configure blindly adds /usr includes, even when not necessary
        self.system ('sed -i -e "s@=/usr/include@=%(system_prefix)s/include@" %(upstream_dir)s/config_office/configure.in')

        # configure.in uses AC_CHECK_FILE, which simply assert-fails
        # when cross compiling slated for removal in ~2000
        # http://www.mail-archive.com/[email protected]/msg02857.html
        self.system ('sed -i -e "s@AC_CHECK_FILE(@AC_CHECK_FILE_CROSS(@" %(upstream_dir)s/config_office/configure.in')

        # TODO: ASM is handled in individual solenv/inc/*mk
        self.system (misc.join_lines ('''sed -i.guborig
-e 's@\<ar\>@$(AR)@g'
-e 's@\<dlltool\>@$(DLLTOOL)@g'
-e 's@\<ld\>\([^-]\|$\)@$(LD)\\1@g'
-e 's@\<nm\>@$(NM)@g'
-e 's@\<ranlib\>@$(RANLIB)@g'
-e 's@\<windres\>@$(WINDRES)@g'
%(upstream_dir)s/solenv/inc/*mk'''))

        self.system ('chmod +x %(upstream_dir)s/solenv/bin/build.pl %(upstream_dir)s/solenv/bin/deliver.pl')

        have_wine = True
        disable_modules = [
            'bean', # com_sun_star_comp_beans_LocalOfficeWindow.c:39:18: error: jawt.h: No such file or directory
            'embedserv', # uses ATL http://article.gmane.org/gmane.comp.gnu.mingw.user/18483
            ]
        disable_modules += ['testtools']
        # ~/.wine/system.reg
        # "PATH"=str(2):"C:/windows/system32;C:/windows;z:/home/janneke/vc/gub/target/mingw/build/openoffice-trunk/build/ooo300-m9/solver/300/bin/wntgcci.pro/bin;z:/home/janneke/vc/gub/target/mingw/root/usr/bin;z:/home/janneke/vc/gub/target/mingw/root/usr/lib;"
        wine_modules = [
            'testtools',
            'goodies',
            # Hmmm
            # wine   ../../../solver/300/wntgcci.pro/bin/regcomp.exe -register -r applicat.rdb -c i18npool.uno.dll
        ]

        for module in disable_modules:
            self.file_sub ([('(^[^#].*[ \t](all|n|w|w,vc[0-9])[ \t])', r'#\1')], '%(upstream_dir)s/%(module)s/prj/build.lst', env=locals ())

        module = 'setup_native'
        self.file_sub ([('^(pk.*customactions.*)', r'#\1')], '%(upstream_dir)s/%(module)s/prj/build.lst', env=locals ())

        # uses oledb.h from psdk 
        module = 'connectivity'
        self.file_sub ([(r'^([^#].*drivers.ado.*[ \t]w[ \t])', r'#\1')], '%(upstream_dir)s/%(module)s/prj/build.lst', env=locals ())
Example #36
0
    def doc_relocation (self):
        # These environment variables control lilypond while being run
        # within gub to build documentation.  In particular, we use a
        # special fontconfig setup that doesn't use fonts outside of gub.
        return misc.join_lines ('''
LILYPOND_EXTERNAL_BINARY=%(system_prefix)s/bin/lilypond
PATH=%(tools_prefix)s/bin:%(system_prefix)s/bin:$PATH
MALLOC_CHECK_=2
LD_LIBRARY_PATH=%(tools_prefix)s/lib:%(system_prefix)s/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
GS_FONTPATH=%(system_prefix)s/share/ghostscript/%(ghostscript_version)s/fonts:%(system_prefix)s/share/gs/fonts
GS_LIB=%(system_prefix)s/share/ghostscript/%(ghostscript_version)s/Resource/Init:%(system_prefix)s/share/ghostscript/%(ghostscript_version)s/Resource
FONTCONFIG_FILE=%(system_prefix)s/etc/fonts-gub/fonts.conf
FONTCONFIG_PATH=%(tools_prefix)s/etc/fonts-gub
''')
Example #37
0
    def compile (self):
        # FIXME: ugh, no branches anymore in self.settings.branches['guile'],
        # let's hope/assume the user did not override guile source or branch...
        #guile_branch = guile.Guile (self.settings, guile.Guile.source).source.full_branch_name ()
        dir = os.path.join (self.settings.downloads, 'guile')
        guile_branch = repository.get_repository_proxy (dir, guile.Guile.source, guile.Guile.branch).full_branch_name ()
        lilypond_branch = self.source.full_branch_name ()
        compile_command = (sys.executable
                + misc.join_lines ('''
bin/gib
--platform=%%(target_platform)s
--branch=guile=%(guile_branch)s
--branch=lilypond=%(lilypond_branch)s
lilypond
%%(compile_flags)s
''' % locals ()))
        self.system (compile_command)
Example #38
0
    def generate_dll_a_and_la (self, libname, depend=''):
        # ugh, atexit, _onexit mutliply defined in crt2.o
        symbols = 'ABbCDdGgiNpRrSsTtUuVvWw-?'
        #defined_symbols = 'tT'
        #defined_symbols = 'ACGgiNpSsTtuVvWw'
        defined_symbols = 'ABCDGgIiNpSsTtuRVvWw'
        self.system (misc.join_lines ('''
cd %(install_prefix)s
&& echo EXPORTS > lib/lib%(libname)s.a.def
&& %(toolchain_prefix)snm bin/lib%(libname)s.dll | grep ' [%(defined_symbols)s] _' | sed -e 's/.* [%(defined_symbols)s] _//' | grep -Ev '^(atexit|__main|_onexit|_pei386_runtime_relocator|DllMain|DllMainCRTStartup)(@|$)' | sed -e 's/_imp__//' | sort | uniq -c | grep '^ *1 ' | sed -e 's/^ *1 //' >> lib/lib%(libname)s.a.def
&& (grep '@' lib/lib%(libname)s.a.def | sed -e 's/@.*//' >> lib/lib%(libname)s.a.def || :)
&& %(toolchain_prefix)sdlltool --def lib/lib%(libname)s.a.def --dllname bin/lib%(libname)s.dll --output-lib lib/lib%(libname)s.dll.a
'''), locals ())
        self.file_sub ([('LIBRARY', '%(libname)s'),
                        ('STATICLIB', ''),
                        ('DEPEND', ' %(depend)s'),
                        ('LIBDIR', '%(prefix_dir)s/lib')],
                       '%(sourcefiledir)s/libtool.la',
                       '%(install_prefix)s/lib/lib%(libname)s.la', env=locals ())
Example #39
0
    def configure(self):
        Ghostscript.configure(self)
        if shared:  # Shared is a configure cross-compile disaster area,
            # it uses BUILD's uname to determine HOST libraries.
            self.file_sub(
                [("^(EXTRALIBS *=.*)(-ldl )", r"\1"), ("^(EXTRALIBS *=.*)(-rdynamic )", r"\1")], "%(builddir)s/Makefile"
            )
        self.file_sub([("^(EXTRALIBS *=.*)", r"\1 -lwinspool -lcomdlg32 -lz")], "%(builddir)s/Makefile")
        self.file_sub(
            [
                (
                    "^unix__=.*",
                    misc.join_lines(
                        """unix__=
$(GLOBJ)gp_mswin.$(OBJ)
$(GLOBJ)gp_wgetv.$(OBJ)
$(GLOBJ)gp_stdia.$(OBJ)
$(GLOBJ)gp_ntfs.$(OBJ)
$(GLOBJ)gp_win32.$(OBJ)
$(GLOBJ)gp_upapr.$(OBJ) 
"""
                    ),
                )
            ],
            "%(srcdir)s/base/unix-aux.mak",
        )
        self.dump(
            """
GLCCWIN=$(CC) $(CFLAGS) -I$(GLOBJDIR)
PSCCWIN=$(CC) $(CFLAGS) -I$(GLOBJDIR)

include $(GLSRCDIR)/w32.mak
include $(GLSRCDIR)/gsdll.mak
include $(GLSRCDIR)/winplat.mak
include $(GLSRCDIR)/pcwin.mak
""",
            "%(builddir)s/Makefile",
            mode="a",
        )