From d7483cffb4e1f8aaf28898d46f8ae0bbe5b32c6a Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Sun, 28 Apr 2024 13:57:33 +0300 Subject: [PATCH] aedi: move zlib-ng to tier 2 zmusic before 1.1.13 was the last target that required zlib --- aedi/target/__init__.py | 2 +- aedi/target/library_tier1.py | 23 ----------------------- aedi/target/library_tier2.py | 23 +++++++++++++++++++++++ 3 files changed, 24 insertions(+), 24 deletions(-) diff --git a/aedi/target/__init__.py b/aedi/target/__init__.py index 23fe875c..a2ff267c 100644 --- a/aedi/target/__init__.py +++ b/aedi/target/__init__.py @@ -71,7 +71,6 @@ def targets(): SndFileTarget(), VorbisTarget(), VpxTarget(), - ZlibNgTarget(), ZMusicTarget(), # Libraries needed for other targets @@ -97,6 +96,7 @@ def targets(): WavPackTarget(), WebpTarget(), XmpTarget(), + ZlibNgTarget(), # Obsolete libraries without binaries BrotliTarget(), diff --git a/aedi/target/library_tier1.py b/aedi/target/library_tier1.py index b13657b7..e2c4ece1 100644 --- a/aedi/target/library_tier1.py +++ b/aedi/target/library_tier1.py @@ -472,29 +472,6 @@ class VpxTarget(base.ConfigureMakeDependencyTarget): self.update_text_file(state.build_path / 'vpx_config.c', clean_build_config) -class ZlibNgTarget(base.CMakeStaticDependencyTarget): - def __init__(self, name='zlib-ng'): - super().__init__(name) - - def prepare_source(self, state: BuildState): - state.download_source( - 'https://github.com/zlib-ng/zlib-ng/archive/refs/tags/2.1.6.tar.gz', - 'a5d504c0d52e2e2721e7e7d86988dec2e290d723ced2307145dedd06aeb6fef2') - - def detect(self, state: BuildState) -> bool: - return state.has_source_file('zlib-ng.h') - - def configure(self, state: BuildState): - opts = state.options - opts['WITH_GTEST'] = 'NO' - opts['WITH_SANITIZER'] = 'NO' - opts['ZLIB_COMPAT'] = 'YES' - opts['ZLIB_ENABLE_TESTS'] = 'NO' - opts['ZLIBNG_ENABLE_TESTS'] = 'NO' - - super().configure(state) - - class ZMusicTarget(base.CMakeStaticDependencyTarget): def __init__(self, name='zmusic'): super().__init__(name) diff --git a/aedi/target/library_tier2.py b/aedi/target/library_tier2.py index f46f8034..c7b95708 100644 --- a/aedi/target/library_tier2.py +++ b/aedi/target/library_tier2.py @@ -472,3 +472,26 @@ class XmpTarget(base.ConfigureMakeStaticDependencyTarget): def configure(self, state: BuildState): state.options['--enable-static'] = None super().configure(state) + + +class ZlibNgTarget(base.CMakeStaticDependencyTarget): + def __init__(self, name='zlib-ng'): + super().__init__(name) + + def prepare_source(self, state: BuildState): + state.download_source( + 'https://github.com/zlib-ng/zlib-ng/archive/refs/tags/2.1.6.tar.gz', + 'a5d504c0d52e2e2721e7e7d86988dec2e290d723ced2307145dedd06aeb6fef2') + + def detect(self, state: BuildState) -> bool: + return state.has_source_file('zlib-ng.h') + + def configure(self, state: BuildState): + opts = state.options + opts['WITH_GTEST'] = 'NO' + opts['WITH_SANITIZER'] = 'NO' + opts['ZLIB_COMPAT'] = 'YES' + opts['ZLIB_ENABLE_TESTS'] = 'NO' + opts['ZLIBNG_ENABLE_TESTS'] = 'NO' + + super().configure(state)