From 7970485b030aa8b638bf51fad0fd1137f71e8990 Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Fri, 24 Jun 2022 09:55:11 +0300 Subject: [PATCH] aedi: move brotli to tier 3 --- aedi/target/__init__.py | 2 +- aedi/target/library_tier2.py | 27 --------------------------- aedi/target/library_tier3.py | 27 +++++++++++++++++++++++++++ 3 files changed, 28 insertions(+), 28 deletions(-) diff --git a/aedi/target/__init__.py b/aedi/target/__init__.py index fe9ac191..f485cfff 100644 --- a/aedi/target/__init__.py +++ b/aedi/target/__init__.py @@ -69,7 +69,6 @@ def targets(): ZMusicTarget(), # Libraries needed for other targets - BrotliTarget(), DumbTarget(), FmtTarget(), LzmaTarget(), @@ -93,6 +92,7 @@ def targets(): ZstdTarget(), # Obsolete libraries without binaries + BrotliTarget(), ExpatTarget(), FreeImageTarget(), FreeTypeTarget(), diff --git a/aedi/target/library_tier2.py b/aedi/target/library_tier2.py index 97d9644c..2e814bad 100644 --- a/aedi/target/library_tier2.py +++ b/aedi/target/library_tier2.py @@ -21,33 +21,6 @@ import glob from .base import * -class BrotliTarget(CMakeStaticDependencyTarget): - def __init__(self, name='brotli'): - super().__init__(name) - - def prepare_source(self, state: BuildState): - state.download_source( - 'https://github.com/google/brotli/archive/refs/tags/v1.0.9.tar.gz', - 'f9e8d81d0405ba66d181529af42a3354f838c939095ff99930da6aa9cdf6fe46') - - def post_build(self, state: BuildState): - super().post_build(state) - - dylib_pattern = str(state.install_path / 'lib/*.dylib') - for dylib in glob.iglob(dylib_pattern): - os.unlink(dylib) - - archive_suffix = '-static.a' - archive_pattern = str(state.install_path / f'lib/*{archive_suffix}') - for archive in glob.iglob(archive_pattern): - no_suffix_name = archive.replace(archive_suffix, '.a') - os.rename(archive, no_suffix_name) - - @staticmethod - def _process_pkg_config(pcfile: Path, line: str) -> str: - return line.replace('-R${libdir} ', '') if line.startswith('Libs:') else line - - class DumbTarget(CMakeStaticDependencyTarget): def __init__(self, name='dumb'): super().__init__(name) diff --git a/aedi/target/library_tier3.py b/aedi/target/library_tier3.py index 97b50b21..42b305a8 100644 --- a/aedi/target/library_tier3.py +++ b/aedi/target/library_tier3.py @@ -19,6 +19,33 @@ from .base import * +class BrotliTarget(CMakeStaticDependencyTarget): + def __init__(self, name='brotli'): + super().__init__(name) + + def prepare_source(self, state: BuildState): + state.download_source( + 'https://github.com/google/brotli/archive/refs/tags/v1.0.9.tar.gz', + 'f9e8d81d0405ba66d181529af42a3354f838c939095ff99930da6aa9cdf6fe46') + + def post_build(self, state: BuildState): + super().post_build(state) + + dylib_pattern = str(state.install_path / 'lib/*.dylib') + for dylib in glob.iglob(dylib_pattern): + os.unlink(dylib) + + archive_suffix = '-static.a' + archive_pattern = str(state.install_path / f'lib/*{archive_suffix}') + for archive in glob.iglob(archive_pattern): + no_suffix_name = archive.replace(archive_suffix, '.a') + os.rename(archive, no_suffix_name) + + @staticmethod + def _process_pkg_config(pcfile: Path, line: str) -> str: + return line.replace('-R${libdir} ', '') if line.startswith('Libs:') else line + + class ExpatTarget(CMakeStaticDependencyTarget): def __init__(self, name='expat'): super().__init__(name)