summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorHarmen Stoppels <harmenstoppels@gmail.com>2021-04-08 14:11:40 +0200
committerGitHub <noreply@github.com>2021-04-08 14:11:40 +0200
commit65563946e3d937966ea462b3920fa631f2ee0a83 (patch)
tree20d4992dba80ca6f71dd140f682bf8bd7e638b19 /var
parent5b77046e2020763f8460263b03750319594b0762 (diff)
downloadspack-65563946e3d937966ea462b3920fa631f2ee0a83.tar.gz
spack-65563946e3d937966ea462b3920fa631f2ee0a83.tar.bz2
spack-65563946e3d937966ea462b3920fa631f2ee0a83.tar.xz
spack-65563946e3d937966ea462b3920fa631f2ee0a83.zip
squashfs: ensure we install with required options (#22863)
Currently the make install step uses the default variables, which causes things to rebuild with default options.
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/squashfs/package.py26
1 files changed, 15 insertions, 11 deletions
diff --git a/var/spack/repos/builtin/packages/squashfs/package.py b/var/spack/repos/builtin/packages/squashfs/package.py
index a5fb61e4d3..03d01dca30 100644
--- a/var/spack/repos/builtin/packages/squashfs/package.py
+++ b/var/spack/repos/builtin/packages/squashfs/package.py
@@ -49,19 +49,23 @@ class Squashfs(MakefilePackage):
patch('gcc-10.patch', when="%gcc@10:")
patch('gcc-10.patch', when="%clang@11:")
+ def make_options(self, spec):
+ default = spec.variants['default_compression'].value
+ return [
+ 'GZIP_SUPPORT={0}'.format(1 if '+gzip' in spec else 0),
+ 'LZ4_SUPPORT={0}' .format(1 if '+lz4' in spec else 0),
+ 'LZO_SUPPORT={0}' .format(1 if '+lzo' in spec else 0),
+ 'XZ_SUPPORT={0}' .format(1 if '+xz' in spec else 0),
+ 'ZSTD_SUPPORT={0}'.format(1 if '+zstd' in spec else 0),
+ 'COMP_DEFAULT={0}'.format(default),
+ ]
+
def build(self, spec, prefix):
+ options = self.make_options(spec)
with working_dir('squashfs-tools'):
- default = spec.variants['default_compression'].value
- make(
- 'GZIP_SUPPORT={0}'.format(1 if '+gzip' in spec else 0),
- 'LZ4_SUPPORT={0}' .format(1 if '+lz4' in spec else 0),
- 'LZO_SUPPORT={0}' .format(1 if '+lzo' in spec else 0),
- 'XZ_SUPPORT={0}' .format(1 if '+xz' in spec else 0),
- 'ZSTD_SUPPORT={0}'.format(1 if '+zstd' in spec else 0),
- 'COMP_DEFAULT={0}'.format(default),
- parallel=False
- )
+ make(*options, parallel=False)
def install(self, spec, prefix):
+ options = self.make_options(spec)
with working_dir('squashfs-tools'):
- make('install', 'INSTALL_DIR=%s' % prefix.bin, parallel=False)
+ make('install', 'INSTALL_DIR=%s' % prefix.bin, *options, parallel=False)