2020-05-03 16:23:08 +02:00
|
|
|
from kivy_ios.toolchain import CythonRecipe
|
2015-02-20 16:12:42 +01:00
|
|
|
from os.path import join
|
|
|
|
|
|
|
|
|
2015-02-25 13:37:52 +01:00
|
|
|
class FFPyplayerRecipe(CythonRecipe):
|
2019-11-24 22:34:18 +01:00
|
|
|
version = "4.2.0"
|
2015-02-25 13:37:52 +01:00
|
|
|
url = "https://github.com/matham/ffpyplayer/archive/{version}.zip"
|
2015-02-20 16:12:42 +01:00
|
|
|
library = "libffpyplayer.a"
|
|
|
|
depends = ["python", "ffmpeg"]
|
2015-02-23 11:34:36 +01:00
|
|
|
pbx_frameworks = [
|
|
|
|
"CoreVideo", "CoreMedia", "CoreImage", "AVFoundation", "UIKit",
|
|
|
|
"CoreMotion"]
|
|
|
|
pbx_libraries = ["libiconv"]
|
2015-02-25 13:37:52 +01:00
|
|
|
pre_build_ext = True
|
2015-02-20 16:12:42 +01:00
|
|
|
|
2015-02-25 13:37:52 +01:00
|
|
|
def get_recipe_env(self, arch):
|
|
|
|
env = super(FFPyplayerRecipe, self).get_recipe_env(arch)
|
|
|
|
env["CC"] += " -I{}".format(
|
|
|
|
join(self.ctx.dist_dir, "include", arch.arch, "libffi"))
|
|
|
|
env["SDL_INCLUDE_DIR"] = join(self.ctx.dist_dir, "include",
|
2020-04-25 18:28:16 +02:00
|
|
|
"common", "sdl2")
|
2015-02-25 13:37:52 +01:00
|
|
|
env["FFMPEG_INCLUDE_DIR"] = join(self.ctx.dist_dir, "include",
|
2020-04-25 18:28:16 +02:00
|
|
|
arch.arch, "ffmpeg")
|
2015-02-25 13:37:52 +01:00
|
|
|
env["CONFIG_POSTPROC"] = "0"
|
|
|
|
return env
|
2015-02-20 16:12:42 +01:00
|
|
|
|
2019-11-24 22:34:18 +01:00
|
|
|
def prebuild_arch(self, arch):
|
|
|
|
# common to all archs
|
2020-04-25 18:28:16 +02:00
|
|
|
if self.has_marker("patched"):
|
2019-11-24 22:34:18 +01:00
|
|
|
return
|
|
|
|
self.apply_patch("misc-visibility.patch")
|
|
|
|
self.set_marker("patched")
|
|
|
|
|
2015-02-20 16:12:42 +01:00
|
|
|
|
|
|
|
recipe = FFPyplayerRecipe()
|