From 452bdbfee89ec0268500fc1be794bac74ac151b2 Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Mon, 25 Nov 2024 10:35:13 +0200 Subject: [PATCH] aedi: add ffmpeg target --- aedi/target/__init__.py | 1 + aedi/target/tool_tier2.py | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/aedi/target/__init__.py b/aedi/target/__init__.py index 5ccc6e93..7504f047 100644 --- a/aedi/target/__init__.py +++ b/aedi/target/__init__.py @@ -132,6 +132,7 @@ def targets(): DosBoxXTarget(), DzipTarget(), EricWToolsTarget(), + FFmpegTarget(), GlslangTarget(), M4Target(), P7ZipTarget(), diff --git a/aedi/target/tool_tier2.py b/aedi/target/tool_tier2.py index 151821a8..54fbc780 100644 --- a/aedi/target/tool_tier2.py +++ b/aedi/target/tool_tier2.py @@ -110,6 +110,24 @@ def prepare_source(self, state: BuildState): patches='ericw-tools-hardcode-version') +class FFmpegTarget(base.ConfigureMakeDependencyTarget): + # TODO: fix absolute paths in bin/* and lib/* + def __init__(self, name='ffmpeg'): + super().__init__(name) + + def prepare_source(self, state: BuildState): + state.download_source( + 'https://ffmpeg.org/releases/ffmpeg-7.1.tar.xz', + '40973d44970dbc83ef302b0609f2e74982be2d85916dd2ee7472d30678a7abe6') + + def detect(self, state: BuildState) -> bool: + return state.has_source_file('doc/ffmpeg.txt') + + def configure(self, state: BuildState): + state.options['--arch'] = state.architecture() + super().configure(state) + + class GlslangTarget(base.CMakeStaticDependencyTarget): def __init__(self, name='glslang'): super().__init__(name)