summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--var/spack/repos/builtin/packages/giflib/package.py22
1 files 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):