lbry-android-sdk/p4a/pythonforandroid/recipes/ffpyplayer/__init__.py
Akinwale Ariwodola 8b2694efb7
New build (#508)
* fix build for openssl 1.1.1b required for sdk
(cherry picked from commit aa49e3b2755b97b6331cdbbb89efc954de8d5977)

* use js code from master

* fix openssl recipe and tweak build
(cherry picked from commit 6e94c27021c7bd7b1e880c2fc314850e36a5a38e)

* remove unused build recipes
(cherry picked from commit f5c0577bdb175bfc0990602936bbc9e2052e1f25)
2019-03-30 21:58:45 +01:00

28 lines
1.1 KiB
Python

from pythonforandroid.recipe import CythonRecipe
from pythonforandroid.toolchain import Recipe
from os.path import join
class FFPyPlayerRecipe(CythonRecipe):
version = '6f7568b498715c2da88f061ebad082a042514923'
url = 'https://github.com/matham/ffpyplayer/archive/{version}.zip'
depends = [('python2', 'python3'), 'sdl2', 'ffmpeg']
opt_depends = ['openssl', 'ffpyplayer_codecs']
def get_recipe_env(self, arch, with_flags_in_cc=True):
env = super(FFPyPlayerRecipe, self).get_recipe_env(arch)
build_dir = Recipe.get_recipe('ffmpeg', self.ctx).get_build_dir(arch.arch)
env["FFMPEG_INCLUDE_DIR"] = join(build_dir, "include")
env["FFMPEG_LIB_DIR"] = join(build_dir, "lib")
env["SDL_INCLUDE_DIR"] = join(self.ctx.bootstrap.build_dir, 'jni', 'SDL', 'include')
env["SDL_LIB_DIR"] = join(self.ctx.bootstrap.build_dir, 'libs', arch.arch)
env["USE_SDL2_MIXER"] = '1'
env["SDL2_MIXER_INCLUDE_DIR"] = join(self.ctx.bootstrap.build_dir, 'jni', 'SDL2_mixer')
return env
recipe = FFPyPlayerRecipe()