summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--var/spack/repos/builtin/packages/libsodium/package.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/libsodium/package.py b/var/spack/repos/builtin/packages/libsodium/package.py
index 86a06b422f..714822fd55 100644
--- a/var/spack/repos/builtin/packages/libsodium/package.py
+++ b/var/spack/repos/builtin/packages/libsodium/package.py
@@ -4,6 +4,8 @@
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
+import llnl.util.tty as tty
+import os
class Libsodium(AutotoolsPackage):
@@ -31,3 +33,14 @@ class Libsodium(AutotoolsPackage):
elif version < Version('1.0.17'):
url += 'old/'
return url + 'libsodium-{0}.tar.gz'.format(version)
+
+ def patch(self):
+ # Necessary on ppc64le / aarch64, because Spack tries to execute these scripts
+ # to check if they work (see lib/spack/spack/build_systems/autotools.py).
+ try:
+ os.chmod("build-aux/config.guess", 0o755)
+ os.chmod("build-aux/config.sub", 0o755)
+ except OSError:
+ # Old versions of libsodium don't have these files.
+ tty.debug("Couldn't chmod config.guess or config.sub: file not found")
+ pass