Esempio n. 1
0
 def build(self, toolchain):
     build = self.configure(toolchain)
     if self.subdirs is not None:
         for subdir in self.subdirs:
             MakeProject.build(self, toolchain, os.path.join(build, subdir))
     else:
         MakeProject.build(self, toolchain, build)
Esempio n. 2
0
 def build(self, toolchain):
     build = self.configure(toolchain)
     if self.subdirs is not None:
         for subdir in self.subdirs:
             MakeProject.build(self, toolchain, os.path.join(build, subdir))
     else:
         MakeProject.build(self, toolchain, build)
Esempio n. 3
0
 def __init__(self, url, md5, installed, **kwargs):
     MakeProject.__init__(self,
                          url,
                          md5,
                          installed,
                          install_target='install_dev',
                          **kwargs)
Esempio n. 4
0
 def __init__(self,
              url,
              alternative_url,
              md5,
              installed,
              configure_args=[],
              autogen=False,
              cppflags='',
              ldflags='',
              libs='',
              shared=False,
              install_prefix=None,
              use_destdir=False,
              make_args=[],
              config_script='configure',
              use_actual_arch=False,
              **kwargs):
     MakeProject.__init__(self, url, alternative_url, md5, installed,
                          **kwargs)
     self.configure_args = configure_args
     self.autogen = autogen
     self.cppflags = cppflags
     self.ldflags = ldflags
     self.libs = libs
     self.shared = shared
     self.install_prefix = install_prefix
     self.use_destdir = use_destdir
     self.make_args = make_args
     self.config_script = config_script
     self.use_actual_arch = use_actual_arch
Esempio n. 5
0
 def __init__(self, url, alternative_url, md5, installed, **kwargs):
     MakeProject.__init__(self,
                          url,
                          alternative_url,
                          md5,
                          installed,
                          install_target='install_sw',
                          **kwargs)
Esempio n. 6
0
    def build(self, toolchain):
        src = self.unpack(toolchain, out_of_tree=False)

        subprocess.check_call(['/bin/sh', './Configure',
                               'dist', 'no-dso', 'no-krb5',
                               '--prefix=' + toolchain.install_prefix],
                              cwd=src, env=toolchain.env)
        MakeProject.build(self, toolchain, wd)
Esempio n. 7
0
    def build(self, toolchain):
        src = self.unpack(toolchain, out_of_tree=False)

        subprocess.check_call([
            './configure', '--prefix=' + toolchain.install_prefix, '--static'
        ],
                              cwd=src,
                              env=toolchain.env)
        MakeProject.build(self, toolchain, src)
Esempio n. 8
0
    def build(self, toolchain):
        src = self.unpack(toolchain, out_of_tree=False)

        subprocess.check_call([
            '/bin/sh', './Configure', 'dist', 'no-dso', 'no-krb5',
            '--prefix=' + toolchain.install_prefix
        ],
                              cwd=src,
                              env=toolchain.env)
        MakeProject.build(self, toolchain, wd)
Esempio n. 9
0
 def __init__(self, url, md5, installed, configure_args=[],
              autogen=False,
              cppflags='',
              ldflags='',
              libs='',
              **kwargs):
     MakeProject.__init__(self, url, md5, installed, **kwargs)
     self.configure_args = configure_args
     self.autogen = autogen
     self.cppflags = cppflags
     self.ldflags = ldflags
     self.libs = libs
Esempio n. 10
0
 def __init__(self, url, md5, installed, configure_args=[],
              autogen=False,
              cppflags='',
              ldflags='',
              libs='',
              subdirs=None,
              **kwargs):
     MakeProject.__init__(self, url, md5, installed, **kwargs)
     self.configure_args = configure_args
     self.autogen = autogen
     self.cppflags = cppflags
     self.ldflags = ldflags
     self.libs = libs
     self.subdirs = subdirs
Esempio n. 11
0
    def build(self, toolchain):
        src = self.unpack(toolchain, out_of_tree=False)

        # OpenSSL has a weird target architecture scheme with lots of
        # hard-coded architectures; this table translates between our
        # "toolchain_arch" (HOST_TRIPLET) and the OpenSSL target
        openssl_archs = {
            # not using "android-*" because those OpenSSL targets want
            # to know where the SDK is, but our own build scripts
            # prepared everything already to look like a regular Linux
            # build
            'arm-linux-androideabi': 'linux-generic32',
            'aarch64-linux-android': 'linux-aarch64',
            'i686-linux-android': 'linux-x86-clang',
            'x86_64-linux-android': 'linux-x86_64-clang',

            # Kobo
            'arm-linux-gnueabihf': 'linux-generic32',

            # Windows
            'i686-w64-mingw32': 'mingw',
            'x86_64-w64-mingw32': 'mingw64',

            # Apple
            'x86_64-apple-darwin': 'darwin64-x86_64-cc',
        }

        openssl_arch = openssl_archs[toolchain.toolchain_arch]
        cross_compile_prefix = toolchain.toolchain_arch + '-'

        subprocess.check_call(
            [
                './Configure',
                'no-shared',
                'no-module',
                'no-engine',
                'no-static-engine',
                'no-async',
                'no-tests',
                'no-asm',  # "asm" causes build failures on Windows
                openssl_arch,
                '--cross-compile-prefix=' + cross_compile_prefix,
                '--prefix=' + toolchain.install_prefix
            ],
            cwd=src,
            env=toolchain.env)
        MakeProject.build(self, toolchain, src)
Esempio n. 12
0
File: zlib.py Progetto: hjr/XCSoar-1
 def get_make_args(self, toolchain):
     return MakeProject.get_make_args(self, toolchain) + [
         'CC=' + toolchain.cc + ' ' + toolchain.cppflags + ' ' +
         toolchain.cflags, 'CPP=' + toolchain.cc + ' -E ' +
         toolchain.cppflags, 'AR=' + toolchain.ar,
         'ARFLAGS=' + toolchain.arflags, 'RANLIB=' + toolchain.ranlib,
         'LDSHARED=' + toolchain.cc + ' -shared', 'libz.a'
     ]
Esempio n. 13
0
 def get_make_args(self, toolchain):
     return MakeProject.get_make_args(self, toolchain) + [
         'CC=' + toolchain.cc,
         'CFLAGS=' + toolchain.cflags,
         'CPPFLAGS=' + toolchain.cppflags,
         'AR=' + toolchain.ar,
         'RANLIB=' + toolchain.ranlib,
         'build_libs',
     ]
Esempio n. 14
0
    def build(self, toolchain):
        src = self.unpack(toolchain, out_of_tree=False)

        wd = os.path.join(src, 'src')

        MakeProject.build(self, toolchain, wd, False)

        includedir = os.path.join(toolchain.install_prefix, 'include')
        libdir = os.path.join(toolchain.install_prefix, 'lib')

        os.makedirs(includedir, exist_ok=True)
        for i in ('lauxlib.h', 'luaconf.h', 'lua.h', 'lualib.h'):
            shutil.copyfile(os.path.join(src, 'src', i),
                            os.path.join(includedir, i))

        os.makedirs(libdir, exist_ok=True)
        shutil.copyfile(os.path.join(src, 'src', 'liblua.a'),
                        os.path.join(libdir, 'liblua.a'))
Esempio n. 15
0
    def build(self, toolchain):
        src = self.unpack(toolchain, out_of_tree=False)

        wd = os.path.join(src, 'src')

        MakeProject.build(self, toolchain, wd, False)

        includedir = os.path.join(toolchain.install_prefix, 'include')
        libdir = os.path.join(toolchain.install_prefix, 'lib')

        os.makedirs(includedir, exist_ok=True)
        for i in ('lauxlib.h', 'luaconf.h', 'lua.h', 'lualib.h'):
            shutil.copyfile(os.path.join(src, 'src', i),
                            os.path.join(includedir, i))

        os.makedirs(libdir, exist_ok=True)
        shutil.copyfile(os.path.join(src, 'src', 'liblua.a'),
                        os.path.join(libdir, 'liblua.a'))
Esempio n. 16
0
 def get_make_args(self, toolchain):
     return MakeProject.get_make_args(self, toolchain) + [
         'CC=' + toolchain.cc + ' ' + toolchain.cppflags + ' ' + toolchain.cflags,
         'CPP=' + toolchain.cc + ' -E ' + toolchain.cppflags,
         'AR=' + toolchain.ar,
         'ARFLAGS=' + toolchain.arflags,
         'RANLIB=' + toolchain.ranlib,
         'LDSHARED=' + toolchain.cc + ' -shared',
         'libz.a'
     ]
Esempio n. 17
0
 def __init__(self, url, alternative_url, md5, installed, configure_args=[],
              autogen=False,
              cppflags='',
              ldflags='',
              libs='',
              install_prefix=None,
              use_destdir=False,
              use_actual_arch=False,
              subdirs=None,
              **kwargs):
     MakeProject.__init__(self, url, alternative_url, md5, installed, **kwargs)
     self.configure_args = configure_args
     self.autogen = autogen
     self.cppflags = cppflags
     self.ldflags = ldflags
     self.libs = libs
     self.install_prefix = install_prefix
     self.use_destdir = use_destdir
     self.use_actual_arch = use_actual_arch
     self.subdirs = subdirs
Esempio n. 18
0
File: lua.py Progetto: hjr/XCSoar-1
    def get_make_args(self, toolchain):
        cflags = toolchain.cflags + ' ' + toolchain.cppflags

        # hard-code lua_getlocaledecpoint() because
        # localeconv()->decimal_point is not available on the Bionic
        # version we're depnding on
        cflags += " \"-Dlua_getlocaledecpoint()='.'\""

        return MakeProject.get_make_args(self, toolchain) + [
            'CC=' + toolchain.cc, 'AR=' + toolchain.ar + ' rcu', 'RANLIB=true',
            'MYCFLAGS=' + cflags, 'MYLDFLAGS=' + toolchain.ldflags, 'liblua.a'
        ]
Esempio n. 19
0
 def __init__(self, url, alternative_url, md5, installed, configure_args=[],
              autogen=False,
              cppflags='',
              ldflags='',
              libs='',
              shared=False,
              install_prefix=None,
              use_destdir=False,
              make_args=[],
              config_script='configure',
              use_actual_arch=False,
              **kwargs):
     MakeProject.__init__(self, url, alternative_url, md5, installed, **kwargs)
     self.configure_args = configure_args
     self.autogen = autogen
     self.cppflags = cppflags
     self.ldflags = ldflags
     self.libs = libs
     self.shared = shared
     self.install_prefix = install_prefix
     self.use_destdir = use_destdir
     self.make_args = make_args
     self.config_script = config_script
     self.use_actual_arch = use_actual_arch
Esempio n. 20
0
    def get_make_args(self, toolchain):
        cflags = toolchain.cflags + ' ' + toolchain.cppflags

        # hard-code lua_getlocaledecpoint() because
        # localeconv()->decimal_point is not available on the Bionic
        # version we're depnding on
        cflags += " \"-Dlua_getlocaledecpoint()='.'\""

        return MakeProject.get_make_args(self, toolchain) + [
            'CC=' + toolchain.cc,
            'AR=' + toolchain.ar + ' rcu',
            'RANLIB=true',
            'MYCFLAGS=' + cflags,
            'MYLDFLAGS=' + toolchain.ldflags,
            'liblua.a'
        ]
Esempio n. 21
0
 def get_make_args(self, toolchain):
     return MakeProject.get_make_args(self, toolchain) + [
         'CC=' + toolchain.cc,
         'AR=' + toolchain.ar + ' r',
         'RANLIB=arm-linux-gnueabihf-ranlib'
     ]
Esempio n. 22
0
 def get_make_install_args(self, toolchain):
     args = MakeProject.get_make_install_args(self, toolchain)
     if self.use_destdir:
         args += ['DESTDIR=' + toolchain.install_prefix]
     return args
Esempio n. 23
0
 def get_make_args(self, toolchain):
     return MakeProject.get_make_args(self, toolchain) + self.make_args
Esempio n. 24
0
 def build(self, toolchain):
     build = self.configure(toolchain)
     MakeProject.build(self, toolchain, build)
Esempio n. 25
0
 def get_make_args(self, toolchain):
     return MakeProject.get_make_args(self, toolchain) + [
         'CC=' + toolchain.cc, 'AR=' + toolchain.ar + ' r',
         'RANLIB=arm-linux-gnueabihf-ranlib'
     ]
Esempio n. 26
0
 def get_make_install_args(self, toolchain):
     # OpenSSL's Makefile runs "ranlib" during installation
     return MakeProject.get_make_install_args(self, toolchain) + [
         'RANLIB=' + toolchain.ranlib,
     ]
Esempio n. 27
0
    def build(self, toolchain):
        src = self.unpack(toolchain, out_of_tree=False)

        subprocess.check_call(['./configure', '--prefix=' + toolchain.install_prefix, '--static'],
                              cwd=src, env=toolchain.env)
        MakeProject.build(self, toolchain, src)
Esempio n. 28
0
 def get_make_args(self, toolchain):
     return MakeProject.get_make_args(self, toolchain) + self.make_args
Esempio n. 29
0
 def get_make_install_args(self, toolchain):
     args = MakeProject.get_make_install_args(self, toolchain)
     if self.use_destdir:
         args += ['DESTDIR=' + toolchain.install_prefix]
     return args
Esempio n. 30
0
 def build(self, toolchain):
     build = self.configure(toolchain)
     MakeProject.build(self, toolchain, build)
Esempio n. 31
0
 def __init__(self, url, alternative_url, md5, installed,
              **kwargs):
     MakeProject.__init__(self, url, alternative_url, md5, installed, install_target='install_sw', **kwargs)