diff --git a/.gitignore b/.gitignore index 8ffd04a6..647d4381 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,4 @@ deps/jpeg-turbo/bin/ deps/jpeg-turbo/include/turbojpeg.h deps/jpeg-turbo/lib/libturbojpeg.a deps/nasm/bin/ndisasm +deps/opusfile/lib/libopusurl.a diff --git a/build.py b/build.py index 953a7afe..48b5b864 100755 --- a/build.py +++ b/build.py @@ -653,6 +653,20 @@ class OpusTarget(ConfigureMakeStaticDependencyTarget): return os.path.exists(builder.source_path + 'opus.pc.in') +class OpusFileTarget(ConfigureMakeStaticDependencyTarget): + def __init__(self, name='opusfile'): + super().__init__(name) + self.options['--enable-http'] = 'no' + + def prepare_source(self, builder: 'Builder'): + builder.download_source( + 'https://downloads.xiph.org/releases/opus/opusfile-0.12.tar.gz', + '118d8601c12dd6a44f52423e68ca9083cc9f2bfe72da7a8c1acb22a80ae3550b') + + def detect(self, builder: 'Builder') -> bool: + return os.path.exists(builder.source_path + 'opusfile.pc.in') + + class VorbisTarget(ConfigureMakeStaticDependencyTarget): def __init__(self, name='vorbis'): super().__init__(name) @@ -851,6 +865,7 @@ class Builder(object): NasmTarget(), OggTarget(), OpusTarget(), + OpusFileTarget(), VorbisTarget(), ) diff --git a/deps/opus/include/opus/opusfile.h b/deps/opusfile/include/opus/opusfile.h similarity index 100% rename from deps/opus/include/opus/opusfile.h rename to deps/opusfile/include/opus/opusfile.h diff --git a/deps/opus/lib/libopusfile.a b/deps/opusfile/lib/libopusfile.a similarity index 100% rename from deps/opus/lib/libopusfile.a rename to deps/opusfile/lib/libopusfile.a