build script: add sodium target

This commit is contained in:
alexey.lysiuk 2020-12-20 10:21:44 +02:00
parent 363a237829
commit fdd594f282

View file

@ -1360,6 +1360,19 @@ class SndFileTarget(CMakeStaticDependencyTarget):
return os.path.exists(builder.source_path + 'sndfile.pc.in') return os.path.exists(builder.source_path + 'sndfile.pc.in')
class SodiumTarget(ConfigureMakeStaticDependencyTarget):
def __init__(self, name='sodium'):
super().__init__(name)
def prepare_source(self, builder: 'Builder'):
builder.download_source(
'https://download.libsodium.org/libsodium/releases/libsodium-1.0.18.tar.gz',
'6f504490b342a4f8a4c4a02fc9b866cbef8622d5df4e5452b46be121e46636c1')
def detect(self, builder: 'Builder') -> bool:
return os.path.exists(builder.source_path + 'libsodium.pc.in')
class VorbisTarget(ConfigureMakeStaticDependencyTarget): class VorbisTarget(ConfigureMakeStaticDependencyTarget):
def __init__(self, name='vorbis'): def __init__(self, name='vorbis'):
super().__init__(name) super().__init__(name)
@ -1743,6 +1756,7 @@ class Builder(object):
Sdl2NetTarget(), Sdl2NetTarget(),
Sdl2TtfTarget(), Sdl2TtfTarget(),
SndFileTarget(), SndFileTarget(),
SodiumTarget(),
VorbisTarget(), VorbisTarget(),
VpxTarget(), VpxTarget(),
WebpTarget(), WebpTarget(),