build script: add flac target

This commit is contained in:
alexey.lysiuk 2020-11-30 11:34:22 +02:00
parent 5037eec424
commit 1ec9144924
2 changed files with 17 additions and 0 deletions

3
.gitignore vendored
View file

@ -9,6 +9,9 @@
/deps/bzip2/bin/
/deps/bzip2/man/
/deps/flac/bin/
/deps/flac/include/FLAC++/
/deps/flac/lib/libFLAC++.a
/deps/jpeg-turbo/bin/
/deps/jpeg-turbo/include/turbojpeg.h
/deps/jpeg-turbo/lib/libturbojpeg.a

View file

@ -624,6 +624,19 @@ class Bzip2Target(MakeTarget):
self.install(builder, self.options)
class FLACTurboTarget(ConfigureMakeStaticDependencyTarget):
def __init__(self, name='flac'):
super().__init__(name)
def prepare_source(self, builder: 'Builder'):
builder.download_source(
'https://downloads.xiph.org/releases/flac/flac-1.3.3.tar.xz',
'213e82bd716c9de6db2f98bcadbc4c24c7e2efe8c75939a1a84e28539c4e1748')
def detect(self, builder: 'Builder') -> bool:
return os.path.exists(builder.source_path + 'FLAC/flac.pc.in')
class JpegTurboTarget(CMakeStaticDependencyTarget):
def __init__(self, name='jpeg-turbo'):
super().__init__(name)
@ -913,6 +926,7 @@ class Builder(object):
# Dependencies
Bzip2Target(),
FLACTurboTarget(),
JpegTurboTarget(),
NasmTarget(),
OggTarget(),