mirror of
https://github.com/ZDoom/zdoom-macos-deps.git
synced 2024-11-22 03:51:33 +00:00
aedi: add p7zip target
This commit is contained in:
parent
cc4795b7e8
commit
29053e25d6
2 changed files with 19 additions and 0 deletions
|
@ -101,6 +101,7 @@ def targets():
|
|||
MesonTarget(),
|
||||
NasmTarget(),
|
||||
NinjaTarget(),
|
||||
P7ZipTarget(),
|
||||
PkgConfigTarget(),
|
||||
YasmTarget(),
|
||||
ZipTarget(),
|
||||
|
|
|
@ -103,6 +103,24 @@ class NinjaTarget(MakeTarget):
|
|||
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):
|
||||
def __init__(self, name='pkg-config'):
|
||||
super().__init__(name)
|
||||
|
|
Loading…
Reference in a new issue