build script: add nasm target

This commit is contained in:
alexey.lysiuk 2020-11-29 12:01:52 +02:00
parent 219977a708
commit 244c80a717
2 changed files with 19 additions and 0 deletions

2
.gitignore vendored
View file

@ -5,3 +5,5 @@
deps/*/share deps/*/share
*.la *.la
*.pc *.pc
deps/nasm/bin/ndisasm

View file

@ -551,6 +551,22 @@ class QuakespasmTarget(MakeTarget):
self.options[ldflags] = self.environment[ldflags] self.options[ldflags] = self.environment[ldflags]
class NasmTarget(ConfigureMakeTarget):
def __init__(self, name='nasm'):
super().__init__(name)
def prepare_source(self, builder: 'Builder'):
builder.download_source(
'https://www.nasm.us/pub/nasm/releasebuilds/2.15.05/nasm-2.15.05.tar.xz',
'3caf6729c1073bf96629b57cee31eeb54f4f8129b01902c73428836550b30a3f')
def detect(self, builder: 'Builder') -> bool:
return os.path.exists(builder.source_path + 'nasm.txt')
def post_build(self, builder: 'Builder'):
self.install(builder)
class OggTarget(ConfigureMakeTarget): class OggTarget(ConfigureMakeTarget):
def __init__(self, name='ogg'): def __init__(self, name='ogg'):
super().__init__(name) super().__init__(name)
@ -761,6 +777,7 @@ class Builder(object):
QuakespasmTarget(), QuakespasmTarget(),
# Dependencies # Dependencies
NasmTarget(),
OggTarget(), OggTarget(),
) )