From f1fa0c1f34d6f0b1e7a5ffcea171b134698fd4df Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Fri, 11 Dec 2020 16:48:43 +0200 Subject: [PATCH] build script: add yasm target --- .gitignore | 4 ++++ build.py | 14 ++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/.gitignore b/.gitignore index 9a251c8f..8f28a72a 100644 --- a/.gitignore +++ b/.gitignore @@ -42,3 +42,7 @@ /deps/sndfile/bin/ /deps/sndfile/include/sndfile.hh /deps/sndfile/lib/cmake/ +/deps/yasm/bin/vsyasm +/deps/yasm/bin/ytasm +/deps/yasm/include/ +/deps/yasm/lib/ diff --git a/build.py b/build.py index 6b97e349..77af52aa 100755 --- a/build.py +++ b/build.py @@ -1076,6 +1076,19 @@ class VorbisTarget(ConfigureMakeStaticDependencyTarget): return os.path.exists(builder.source_path + 'vorbis.pc.in') +class YasmTarget(ConfigureMakeDependencyTarget): + def __init__(self, name='yasm'): + super().__init__(name) + + def prepare_source(self, builder: 'Builder'): + builder.download_source( + 'https://www.tortall.net/projects/yasm/releases/yasm-1.3.0.tar.gz', + '3dce6601b495f5b3d45b59f7d2492a340ee7e84b5beca17e48f862502bd5603f') + + def detect(self, builder: 'Builder') -> bool: + return os.path.exists(builder.source_path + 'libyasm.h') + + class ZlibTarget(ConfigureMakeDependencyTarget): def __init__(self, name='zlib'): super().__init__(name) @@ -1324,6 +1337,7 @@ class Builder(object): PkgConfigTarget(), SndFileTarget(), VorbisTarget(), + YasmTarget(), ZlibTarget(), # Special