mirror of
https://github.com/ZDoom/zdoom-macos-deps.git
synced 2024-11-21 19:41:15 +00:00
aedi: add xdelta target, version 3.1.0
This commit is contained in:
parent
eda6daf2b7
commit
33212d8acc
2 changed files with 27 additions and 0 deletions
|
@ -135,6 +135,7 @@ def targets():
|
|||
RizinTarget(),
|
||||
SeverZipTarget(),
|
||||
UnrarTarget(),
|
||||
XdeltaTarget(),
|
||||
XzTarget(),
|
||||
ZipTarget(),
|
||||
|
||||
|
|
|
@ -262,6 +262,32 @@ class UnrarTarget(base.MakeTarget):
|
|||
return state.has_source_file('rar.hpp')
|
||||
|
||||
|
||||
class XdeltaTarget(base.ConfigureMakeDependencyTarget):
|
||||
# Depends on autoconf, automake, and (optionally) xz
|
||||
def __init__(self, name='xdelta'):
|
||||
super().__init__(name)
|
||||
self.src_root = 'xdelta3'
|
||||
|
||||
def prepare_source(self, state: BuildState):
|
||||
state.download_source(
|
||||
'https://github.com/jmacd/xdelta/archive/refs/tags/v3.1.0.tar.gz',
|
||||
'7515cf5378fca287a57f4e2fee1094aabc79569cfe60d91e06021a8fd7bae29d')
|
||||
|
||||
def detect(self, state: BuildState) -> bool:
|
||||
return state.has_source_file('xdelta3/xdelta3.h')
|
||||
|
||||
def configure(self, state: BuildState):
|
||||
# Invoke MakeTarget.configure() explicitly to create symlinks needed for autoconf
|
||||
base.MakeTarget.configure(self, state)
|
||||
|
||||
# Generate configure script with autoconf
|
||||
work_path = state.build_path / self.src_root
|
||||
subprocess.run(('autoreconf', '--install'), check=True, cwd=work_path, env=state.environment)
|
||||
|
||||
# Run generated configure script
|
||||
super().configure(state)
|
||||
|
||||
|
||||
class XzTarget(base.CMakeStaticDependencyTarget):
|
||||
def __init__(self, name='xz'):
|
||||
super().__init__(name)
|
||||
|
|
Loading…
Reference in a new issue