add various variants to vim (#3255)

* add various variants to vim

* default to --enable-fail-if-missing

* vim package: -{python,ruby,lua,perl} sets build option to `no`

* vim's interpreter build options are `--enable-XXXXinterp={yes,no,dynamic}`
* dynamic seems to work only on windows builds
* `=no` is the default => use it in spack if the variant is disabled
This commit is contained in:
healther 2017-03-02 21:26:52 +01:00 committed by Adam J. Stewart
parent d0835289e8
commit a562d684b7

View File

@ -50,6 +50,12 @@ class Vim(Package):
variant('ruby', default=False, description="build with Ruby")
depends_on('ruby', when='+ruby')
variant('lua', default=False, description="build with Lua")
depends_on('lua', when='+lua')
variant('perl', default=False, description="build with Perl")
depends_on('perl', when='+perl')
variant('cscope', default=False, description="build with cscope support")
depends_on('cscope', when='+cscope', type='run')
@ -77,18 +83,30 @@ def install(self, spec, prefix):
if feature_set is None:
feature_set = 'normal'
configure_args = []
configure_args = ["--enable-fail-if-missing"]
configure_args.append("--with-features=" + feature_set)
if '+python' in spec:
configure_args.append("--enable-pythoninterp=yes")
else:
configure_args.append("--enable-pythoninterp=dynamic")
configure_args.append("--enable-pythoninterp=no")
if '+ruby' in spec:
configure_args.append("--enable-rubyinterp=yes")
else:
configure_args.append("--enable-rubyinterp=dynamic")
configure_args.append("--enable-rubyinterp=no")
if '+lua' in spec:
configure_args.append("--enable-luainterp=yes")
configure_args.append("--with-lua-prefix=%s" % spec['lua'].prefix)
else:
configure_args.append("--enable-luainterp=no")
if '+perl' in spec:
configure_args.append("--enable-perlinterp=yes")
else:
configure_args.append("--enable-perlinterp=no")
if '+gui' in spec:
configure_args.append("--enable-gui=auto")