summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Scogland <tscogland@llnl.gov>2015-06-10 14:14:31 -0700
committerThomas R. W. Scogland <scogland@llnl.gov>2015-06-10 14:14:31 -0700
commit2d465ffd10d6388ec3269a377bff79be597617e5 (patch)
treeca709f4cbb5cc9270095774b507ebc5d13532fca
parentf420f9393a229832a05d87cfa53bd2f89ffd91fc (diff)
downloadspack-2d465ffd10d6388ec3269a377bff79be597617e5.tar.gz
spack-2d465ffd10d6388ec3269a377bff79be597617e5.tar.bz2
spack-2d465ffd10d6388ec3269a377bff79be597617e5.tar.xz
spack-2d465ffd10d6388ec3269a377bff79be597617e5.zip
partial upgrade to vim package
-rw-r--r--var/spack/packages/vim/package.py40
1 files changed, 37 insertions, 3 deletions
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")