aedi: move brotli to tier 3

This commit is contained in:
alexey.lysiuk 2022-06-24 09:55:11 +03:00
parent ea94f79cdf
commit 7970485b03
3 changed files with 28 additions and 28 deletions

View file

@ -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(),

View file

@ -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)

View file

@ -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)