From 50842a187dde355a3babcd4cf82677dc274afea4 Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Sun, 10 Jul 2022 10:49:29 +0300 Subject: [PATCH] aedi: move tiff to tier 3 --- aedi/target/__init__.py | 2 +- aedi/target/library_tier2.py | 33 --------------------------------- aedi/target/library_tier3.py | 33 +++++++++++++++++++++++++++++++++ 3 files changed, 34 insertions(+), 34 deletions(-) diff --git a/aedi/target/__init__.py b/aedi/target/__init__.py index f485cfff..7dcdc2d0 100644 --- a/aedi/target/__init__.py +++ b/aedi/target/__init__.py @@ -84,7 +84,6 @@ def targets(): Sdl2MixerTarget(), Sdl2NetTarget(), SodiumTarget(), - TiffTarget(), VulkanHeadersTarget(), VulkanLoaderTarget(), WebpTarget(), @@ -102,6 +101,7 @@ def targets(): LuaTarget(), Sdl2TtfTarget(), SfmlTarget(), + TiffTarget(), WxWidgetsTarget(), # Tools diff --git a/aedi/target/library_tier2.py b/aedi/target/library_tier2.py index cb359ffb..8595c5ff 100644 --- a/aedi/target/library_tier2.py +++ b/aedi/target/library_tier2.py @@ -359,39 +359,6 @@ class SodiumTarget(ConfigureMakeStaticDependencyTarget): return state.has_source_file('libsodium.pc.in') -class TiffTarget(CMakeStaticDependencyTarget): - def __init__(self, name='tiff'): - super().__init__(name) - - def prepare_source(self, state: BuildState): - state.download_source( - 'https://download.osgeo.org/libtiff/tiff-4.3.0.tar.gz', - '0e46e5acb087ce7d1ac53cf4f56a09b221537fc86dfc5daaad1c2e89e1b37ac8', - patches='tiff-remove-useless') - - def configure(self, state: BuildState): - opts = state.options - opts['cxx'] = 'NO' - opts['lzma'] = 'YES' - - super().configure(state) - - @staticmethod - def _process_pkg_config(pcfile: Path, line: str) -> str: - version = 'Version:' - cflags = 'Cflags:' - libs = 'Libs:' - - if line.startswith(version): - return version + ' 4.3.0\n' - elif line.startswith(cflags): - return cflags + ' -I${includedir}\nRequires.private: libjpeg liblzma libwebp libzstd zlib\n' - elif line.startswith(libs): - return libs + ' -L${libdir} -ltiff\n' - - return line - - class VulkanHeadersTarget(CMakeStaticDependencyTarget): def __init__(self, name='vulkan-headers'): super().__init__(name) diff --git a/aedi/target/library_tier3.py b/aedi/target/library_tier3.py index 11270bd0..2ce7974a 100644 --- a/aedi/target/library_tier3.py +++ b/aedi/target/library_tier3.py @@ -293,6 +293,39 @@ class SfmlTarget(CMakeStaticDependencyTarget): super().configure(state) +class TiffTarget(CMakeStaticDependencyTarget): + def __init__(self, name='tiff'): + super().__init__(name) + + def prepare_source(self, state: BuildState): + state.download_source( + 'https://download.osgeo.org/libtiff/tiff-4.3.0.tar.gz', + '0e46e5acb087ce7d1ac53cf4f56a09b221537fc86dfc5daaad1c2e89e1b37ac8', + patches='tiff-remove-useless') + + def configure(self, state: BuildState): + opts = state.options + opts['cxx'] = 'NO' + opts['lzma'] = 'YES' + + super().configure(state) + + @staticmethod + def _process_pkg_config(pcfile: Path, line: str) -> str: + version = 'Version:' + cflags = 'Cflags:' + libs = 'Libs:' + + if line.startswith(version): + return version + ' 4.3.0\n' + elif line.startswith(cflags): + return cflags + ' -I${includedir}\nRequires.private: libjpeg liblzma libwebp libzstd zlib\n' + elif line.startswith(libs): + return libs + ' -L${libdir} -ltiff\n' + + return line + + class WxWidgetsTarget(CMakeStaticDependencyTarget): def __init__(self, name='wxwidgets'): super().__init__(name)