def build_armeabi(self):
        # AND: I'm going to ignore any extra pythonrecipe or cythonrecipe behaviour for now
        
        arch = ArchAndroid(self.ctx)
        env = self.get_recipe_env(arch)
        
        env['CFLAGS'] = env['CFLAGS'] + ' -I{jni_path}/png -I{jni_path}/jpeg'.format(
            jni_path=join(self.ctx.bootstrap.build_dir, 'jni'))
        env['CFLAGS'] = env['CFLAGS'] + ' -I{jni_path}/sdl/include -I{jni_path}/sdl_mixer'.format(
            jni_path=join(self.ctx.bootstrap.build_dir, 'jni'))
        env['CFLAGS'] = env['CFLAGS'] + ' -I{jni_path}/sdl_ttf -I{jni_path}/sdl_image'.format(
            jni_path=join(self.ctx.bootstrap.build_dir, 'jni'))
        debug('pygame cflags', env['CFLAGS'])

        
        env['LDFLAGS'] = env['LDFLAGS'] + ' -L{libs_path} -L{src_path}/obj/local/{arch} -lm -lz'.format(
            libs_path=self.ctx.libs_dir, src_path=self.ctx.bootstrap.build_dir, arch=env['ARCH'])

        env['LDSHARED'] = join(self.ctx.root_dir, 'tools', 'liblink')

        with current_directory(self.get_build_dir('armeabi')):
            info('hostpython is ' + self.ctx.hostpython)
            hostpython = sh.Command(self.ctx.hostpython)
            shprint(hostpython, 'setup.py', 'install', '-O2', _env=env)

            info('strip is ' + env['STRIP'])
            build_lib = glob.glob('./build/lib*')
            assert len(build_lib) == 1
            print('stripping pygame')
            shprint(sh.find, build_lib[0], '-name', '*.o', '-exec',
                    env['STRIP'], '{}', ';')

        python_install_path = join(self.ctx.build_dir, 'python-install')
        # AND: Should do some deleting here!
        print('Should remove pygame tests etc. here, but skipping for now')
Beispiel #2
0
    def build_armeabi(self):
        # AND: I'm going to ignore any extra pythonrecipe or cythonrecipe behaviour for now

        arch = ArchAndroid(self.ctx)
        env = self.get_recipe_env(arch)

        env['CFLAGS'] = env[
            'CFLAGS'] + ' -I{jni_path}/png -I{jni_path}/jpeg'.format(
                jni_path=join(self.ctx.bootstrap.build_dir, 'jni'))
        env['CFLAGS'] = env[
            'CFLAGS'] + ' -I{jni_path}/sdl/include -I{jni_path}/sdl_mixer'.format(
                jni_path=join(self.ctx.bootstrap.build_dir, 'jni'))
        env['CFLAGS'] = env[
            'CFLAGS'] + ' -I{jni_path}/sdl_ttf -I{jni_path}/sdl_image'.format(
                jni_path=join(self.ctx.bootstrap.build_dir, 'jni'))
        debug('pygame cflags', env['CFLAGS'])

        env['LDFLAGS'] = env[
            'LDFLAGS'] + ' -L{libs_path} -L{src_path}/obj/local/{arch} -lm -lz'.format(
                libs_path=self.ctx.libs_dir,
                src_path=self.ctx.bootstrap.build_dir,
                arch=env['ARCH'])

        env['LDSHARED'] = join(self.ctx.root_dir, 'tools', 'liblink')

        with current_directory(self.get_build_dir('armeabi')):
            info('hostpython is ' + self.ctx.hostpython)
            hostpython = sh.Command(self.ctx.hostpython)
            shprint(hostpython,
                    'setup.py',
                    'install',
                    '-O2',
                    _env=env,
                    _tail=10,
                    _critical=True)

            info('strip is ' + env['STRIP'])
            build_lib = glob.glob('./build/lib*')
            assert len(build_lib) == 1
            print('stripping pygame')
            shprint(sh.find, build_lib[0], '-name', '*.o', '-exec',
                    env['STRIP'], '{}', ';')

        python_install_path = join(self.ctx.build_dir, 'python-install')
        # AND: Should do some deleting here!
        print('Should remove pygame tests etc. here, but skipping for now')
Beispiel #3
0
 def build_arch(self, arch):
     super(VlcRecipe, self).build_arch(arch)
     build_dir = self.get_build_dir(arch.arch)
     port_dir = join(build_dir, 'vlc-port-android')
     aar = self.aars[arch]
     if not exists(aar):
         with current_directory(port_dir):
             env = dict(environ)
             env.update({
                 'ANDROID_ABI': arch.arch,
                 'ANDROID_NDK': self.ctx.ndk_dir,
                 'ANDROID_SDK': self.ctx.sdk_dir,
             })
             info("compiling vlc from sources")
             debug("environment: {}".format(env))
             if not exists(join('bin', 'VLC-debug.apk')):
                  shprint(sh.Command('./compile.sh'), _env=env,
                               _tail=50, _critical=True)
             shprint(sh.Command('./compile-libvlc.sh'), _env=env,
                         _tail=50, _critical=True)
     shprint(sh.cp, '-a', aar, self.ctx.aars_dir)
Beispiel #4
0
    def build_arch(self, arch):
        # AND: I'm going to ignore any extra pythonrecipe or cythonrecipe behaviour for now

        env = self.get_recipe_env(arch)

        env["CFLAGS"] = env["CFLAGS"] + " -I{jni_path}/png -I{jni_path}/jpeg".format(
            jni_path=join(self.ctx.bootstrap.build_dir, "jni")
        )
        env["CFLAGS"] = env["CFLAGS"] + " -I{jni_path}/sdl/include -I{jni_path}/sdl_mixer".format(
            jni_path=join(self.ctx.bootstrap.build_dir, "jni")
        )
        env["CFLAGS"] = env["CFLAGS"] + " -I{jni_path}/sdl_ttf -I{jni_path}/sdl_image".format(
            jni_path=join(self.ctx.bootstrap.build_dir, "jni")
        )
        debug("pygame cflags", env["CFLAGS"])

        env["LDFLAGS"] = env["LDFLAGS"] + " -L{libs_path} -L{src_path}/obj/local/{arch} -lm -lz".format(
            libs_path=self.ctx.libs_dir, src_path=self.ctx.bootstrap.build_dir, arch=env["ARCH"]
        )

        env["LDSHARED"] = join(self.ctx.root_dir, "tools", "liblink")

        with current_directory(self.get_build_dir(arch.arch)):
            info("hostpython is " + self.ctx.hostpython)
            hostpython = sh.Command(self.ctx.hostpython)
            shprint(hostpython, "setup.py", "install", "-O2", _env=env, _tail=10, _critical=True)

            info("strip is " + env["STRIP"])
            build_lib = glob.glob("./build/lib*")
            assert len(build_lib) == 1
            print("stripping pygame")
            shprint(sh.find, build_lib[0], "-name", "*.o", "-exec", env["STRIP"], "{}", ";")

        python_install_path = join(self.ctx.build_dir, "python-install")
        # AND: Should do some deleting here!
        print("Should remove pygame tests etc. here, but skipping for now")