From 2d465ffd10d6388ec3269a377bff79be597617e5 Mon Sep 17 00:00:00 2001 From: Tom Scogland Date: Wed, 10 Jun 2015 14:14:31 -0700 Subject: partial upgrade to vim package --- var/spack/packages/vim/package.py | 40 ++++++++++++++++++++++++++++++++++++--- 1 file changed, 37 insertions(+), 3 deletions(-) (limited to 'var') diff --git a/var/spack/packages/vim/package.py b/var/spack/packages/vim/package.py index 5c6d7cb56b..0ac064d8dc 100644 --- a/var/spack/packages/vim/package.py +++ b/var/spack/packages/vim/package.py @@ -25,8 +25,42 @@ class Vim(Package): version('6.1', '7fd0f915adc7c0dab89772884268b030') version('6.0', '9d9ca84d489af6b3f54639dd97af3774') + feature_sets = ('huge', 'big', 'normal', 'small', 'tiny') + for fs in feature_sets: + variant(fs, default=False, description="Use '{}' feature set".format(fs)) + + variant('python', default=False, description="build with Python") + depends_on('python', when='+python') + + variant('ruby', default=False, description="build with Ruby") + depends_on('ruby', when='+ruby') + def install(self, spec, prefix): - configure("--prefix=%s" % prefix) + feature_set = None + for fs in self.feature_sets: + if "+" + fs in spec: + if feature_set is not None: + tty.error("Only one feature set allowed, both {} and {} specified".format( + feature_set, + fs)) + feature_set = fs + if feature_set is None: + feature_set = 'normal' + + configure_args = [] + configure_args.append("--with-features=" + feature_set) + + if '+python' in spec: + configure_args.append("--enable-pythoninterp=yes") + else: + configure_args.append("--enable-pythoninterp=dynamic") + + if '+ruby' in spec: + configure_args.append("--enable-rubyinterp=yes") + else: + configure_args.append("--enable-rubyinterp=dynamic") + + configure("--prefix=%s" % prefix, *configure_args) - make() - make("install") + make() + make("install") -- cgit v1.2.3-60-g2f50