mirror of
https://github.com/ZDoom/zdoom-macos-deps.git
synced 2024-11-25 13:21:05 +00:00
build script: add bzip2 target
This commit is contained in:
parent
8fb8f4a868
commit
5037eec424
2 changed files with 27 additions and 0 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -7,6 +7,8 @@
|
||||||
/deps/**/*.la
|
/deps/**/*.la
|
||||||
/deps/**/*.pc
|
/deps/**/*.pc
|
||||||
|
|
||||||
|
/deps/bzip2/bin/
|
||||||
|
/deps/bzip2/man/
|
||||||
/deps/jpeg-turbo/bin/
|
/deps/jpeg-turbo/bin/
|
||||||
/deps/jpeg-turbo/include/turbojpeg.h
|
/deps/jpeg-turbo/include/turbojpeg.h
|
||||||
/deps/jpeg-turbo/lib/libturbojpeg.a
|
/deps/jpeg-turbo/lib/libturbojpeg.a
|
||||||
|
|
25
build.py
25
build.py
|
@ -600,6 +600,30 @@ class QuakespasmTarget(MakeTarget):
|
||||||
self.options[ldflags] = self.environment[ldflags]
|
self.options[ldflags] = self.environment[ldflags]
|
||||||
|
|
||||||
|
|
||||||
|
class Bzip2Target(MakeTarget):
|
||||||
|
def __init__(self, name='bzip2'):
|
||||||
|
super().__init__(name)
|
||||||
|
|
||||||
|
def prepare_source(self, builder: 'Builder'):
|
||||||
|
builder.download_source(
|
||||||
|
'https://sourceware.org/pub/bzip2/bzip2-1.0.8.tar.gz',
|
||||||
|
'ab5a03176ee106d3f0fa90e381da478ddae405918153cca248e682cd0c4a2269')
|
||||||
|
|
||||||
|
def detect(self, builder: 'Builder') -> bool:
|
||||||
|
return os.path.exists(builder.source_path + 'bzlib.h')
|
||||||
|
|
||||||
|
def configure(self, builder: 'Builder'):
|
||||||
|
super().configure(builder)
|
||||||
|
|
||||||
|
# Copy compiler flags from environment to command line argument, they would be overridden by Makefile otherwise
|
||||||
|
cflags = 'CFLAGS'
|
||||||
|
self.options[cflags] = self.environment[cflags] + ' -D_FILE_OFFSET_BITS=64 -O2'
|
||||||
|
|
||||||
|
def post_build(self, builder: 'Builder'):
|
||||||
|
self.options['PREFIX'] = self.prefix
|
||||||
|
self.install(builder, self.options)
|
||||||
|
|
||||||
|
|
||||||
class JpegTurboTarget(CMakeStaticDependencyTarget):
|
class JpegTurboTarget(CMakeStaticDependencyTarget):
|
||||||
def __init__(self, name='jpeg-turbo'):
|
def __init__(self, name='jpeg-turbo'):
|
||||||
super().__init__(name)
|
super().__init__(name)
|
||||||
|
@ -888,6 +912,7 @@ class Builder(object):
|
||||||
QuakespasmTarget(),
|
QuakespasmTarget(),
|
||||||
|
|
||||||
# Dependencies
|
# Dependencies
|
||||||
|
Bzip2Target(),
|
||||||
JpegTurboTarget(),
|
JpegTurboTarget(),
|
||||||
NasmTarget(),
|
NasmTarget(),
|
||||||
OggTarget(),
|
OggTarget(),
|
||||||
|
|
Loading…
Reference in a new issue