Skip to content

Commit

Permalink
Merge pull request #3042 from gonatienza/libsodium-recipe-update
Browse files Browse the repository at this point in the history
libsodium-recipe-update to url
  • Loading branch information
AndreMiras authored Jul 29, 2024
2 parents 0364903 + 3ae66d5 commit dddecaa
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion pythonforandroid/recipes/libsodium/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,24 @@
from pythonforandroid.logger import shprint
from multiprocessing import cpu_count
import sh
from packaging import version as packaging_version


class LibsodiumRecipe(Recipe):
version = '1.0.16'
url = 'https://github.com/jedisct1/libsodium/releases/download/{version}/libsodium-{version}.tar.gz'
url = 'https://github.com/jedisct1/libsodium/releases/download/{}/libsodium-{}.tar.gz'
depends = []
patches = ['size_max_fix.patch']
built_libraries = {'libsodium.so': 'src/libsodium/.libs'}

@property
def versioned_url(self):
asked_version = packaging_version.parse(self.version)
if asked_version > packaging_version.parse('1.0.16'):
return self._url.format(self.version + '-RELEASE', self.version)
else:
return self._url.format(self.version, self.version)

def build_arch(self, arch):
env = self.get_recipe_env(arch)
with current_directory(self.get_build_dir(arch.arch)):
Expand Down

0 comments on commit dddecaa

Please sign in to comment.