aedi: add p7zip target

This commit is contained in:
alexey.lysiuk 2021-07-04 12:37:29 +03:00
parent cc4795b7e8
commit 29053e25d6
2 changed files with 19 additions and 0 deletions

View file

@ -101,6 +101,7 @@ def targets():
MesonTarget(), MesonTarget(),
NasmTarget(), NasmTarget(),
NinjaTarget(), NinjaTarget(),
P7ZipTarget(),
PkgConfigTarget(), PkgConfigTarget(),
YasmTarget(), YasmTarget(),
ZipTarget(), ZipTarget(),

View file

@ -103,6 +103,24 @@ class NinjaTarget(MakeTarget):
self.copy_to_bin(state) self.copy_to_bin(state)
class P7ZipTarget(CMakeTarget):
def __init__(self, name='p7zip'):
super().__init__(name)
self.src_root = 'CPP/7zip/CMAKE/7za'
def prepare_source(self, state: BuildState):
state.download_source(
'https://github.com/jinfeihan57/p7zip/archive/refs/tags/v17.04.tar.gz',
'ea029a2e21d2d6ad0a156f6679bd66836204aa78148a4c5e498fe682e77127ef')
def detect(self, state: BuildState) -> bool:
return os.path.exists(state.source + 'CPP/7zip/CMAKE/CMakeLists.txt') \
and os.path.exists(state.source + 'C/fast-lzma2/fast-lzma2.h')
def post_build(self, state: BuildState):
self.copy_to_bin(state, '7za')
class PkgConfigTarget(ConfigureMakeDependencyTarget): class PkgConfigTarget(ConfigureMakeDependencyTarget):
def __init__(self, name='pkg-config'): def __init__(self, name='pkg-config'):
super().__init__(name) super().__init__(name)