From 2340ed4c69ae0bb3bda08e8f9aae2cf1bdf0ced5 Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Fri, 3 Sep 2021 11:32:52 +0300 Subject: [PATCH] aedi: add xmp target --- aedi/target/__init__.py | 1 + aedi/target/library_tier2.py | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/aedi/target/__init__.py b/aedi/target/__init__.py index 52847b37..c51c9ba1 100644 --- a/aedi/target/__init__.py +++ b/aedi/target/__init__.py @@ -96,6 +96,7 @@ def targets(): TiffTarget(), WebpTarget(), WxWidgetsTarget(), + XmpTarget(), ZstdTarget(), # Tools diff --git a/aedi/target/library_tier2.py b/aedi/target/library_tier2.py index 4716fc2e..d51a1ea2 100644 --- a/aedi/target/library_tier2.py +++ b/aedi/target/library_tier2.py @@ -758,6 +758,23 @@ class WxWidgetsTarget(CMakeStaticDependencyTarget): self.update_text_file(wx_config_path, patch_wx_config) +class XmpTarget(ConfigureMakeStaticDependencyTarget): + def __init__(self, name='xmp'): + super().__init__(name) + + def prepare_source(self, state: BuildState): + state.download_source( + 'https://sourceforge.net/projects/xmp/files/libxmp/4.5.0/libxmp-4.5.0.tar.gz', + '7847d262112d14e8442f44e5ac6ed9ddbca54c251284720b563c852b31f26e75') + + def detect(self, state: BuildState) -> bool: + return state.has_source_file('libxmp.pc.in') + + def configure(self, state: BuildState): + state.options['--enable-static'] = None + super().configure(state) + + class ZstdTarget(CMakeStaticDependencyTarget): def __init__(self, name='zstd'): super().__init__(name)