aedi: add lzma target

This commit is contained in:
alexey.lysiuk 2021-06-19 11:40:17 +03:00
parent 341150a7ce
commit fd01e0541b
2 changed files with 22 additions and 0 deletions

View file

@ -70,6 +70,7 @@ def targets():
DumbTarget(),
FmtTarget(),
FreeTypeTarget(),
LzmaTarget(),
MadTarget(),
MikmodTarget(),
ModPlugTarget(),

View file

@ -78,6 +78,27 @@ class FreeTypeTarget(CMakeStaticDependencyTarget):
return os.path.exists(state.source + 'include/freetype/freetype.h')
class LzmaTarget(CMakeStaticDependencyTarget):
def __init__(self, name='lzma'):
super().__init__(name)
def prepare_source(self, state: BuildState):
state.download_source(
'https://tukaani.org/xz/xz-5.2.5.tar.gz',
'f6f4910fd033078738bd82bfba4f49219d03b17eb0794eb91efbae419f4aba10',
patches='lzma-add-cmake')
def detect(self, state: BuildState) -> bool:
return os.path.exists(state.source + 'src/liblzma/liblzma.pc.in')
def post_build(self, state: BuildState):
super().post_build(state)
self.write_pc_file(state, 'liblzma.pc', name='liblzma',
description='General purpose data compression library',
version='5.2.5', libs='-llzma')
class MadTarget(ConfigureMakeStaticDependencyTarget):
def __init__(self, name='mad'):
super().__init__(name)