From 8c8b934fd8953c8451152dc391fbaca9f06bcd25 Mon Sep 17 00:00:00 2001 From: iarspider Date: Mon, 9 Aug 2021 15:32:38 +0200 Subject: giflib: define prefix and libversion also when building (#25263) --- var/spack/repos/builtin/packages/giflib/package.py | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/var/spack/repos/builtin/packages/giflib/package.py b/var/spack/repos/builtin/packages/giflib/package.py index 8dbf7af34b..eebeb8e696 100644 --- a/var/spack/repos/builtin/packages/giflib/package.py +++ b/var/spack/repos/builtin/packages/giflib/package.py @@ -24,14 +24,24 @@ class Giflib(MakefilePackage, SourceforgePackage): patch('bsd-head.patch') - @property - def install_targets(self): - targets = ['install'] + def prefix_and_libversion_args(self): + args = [] if self.spec.satisfies('@5.2.0:'): - targets.append('PREFIX={0}'.format(self.spec.prefix)) - targets.append('LIBMAJOR={0}'.format(self.spec.version.up_to(1))) - targets.append('LIBVER={0}'.format(self.spec.version)) + args.extend([ + 'PREFIX={0}'.format(self.spec.prefix), + 'LIBMAJOR={0}'.format(self.spec.version.up_to(1)), + 'LIBVER={0}'.format(self.spec.version) + ]) + return args + @property + def build_targets(self): + targets = ['all'] + self.prefix_and_libversion_args() + return targets + + @property + def install_targets(self): + targets = ['install'] + self.prefix_and_libversion_args() return targets def check(self): -- cgit v1.2.3-70-g09d2