Skip to content
Snippets Groups Projects
Commit f34b04e5 authored by Todd Gamblin's avatar Todd Gamblin
Browse files

Merge pull request #87 from alfredo-gimenez/develop

Added gui and cscope features to Vim package
parents 1792115b d6bf9c98
No related branches found
No related tags found
No related merge requests found
from spack import *
class Cscope(Package):
"""Cscope is a developer's tool for browsing source code."""
homepage = "http://http://cscope.sourceforge.net/"
url = "http://downloads.sourceforge.net/project/cscope/cscope/15.8b/cscope-15.8b.tar.gz"
version('15.8b', '8f9409a238ee313a96f9f87fe0f3b176')
# Can be configured to use flex (not necessary)
# ./configure --with-flex
def install(self, spec, prefix):
configure('--prefix=%s' % prefix)
make()
make("install")
...@@ -35,6 +35,12 @@ class Vim(Package): ...@@ -35,6 +35,12 @@ class Vim(Package):
variant('ruby', default=False, description="build with Ruby") variant('ruby', default=False, description="build with Ruby")
depends_on('ruby', when='+ruby') depends_on('ruby', when='+ruby')
variant('cscope', default=False, description="build with cscope support")
depends_on('cscope', when='+cscope')
variant('gui', default=False, description="build with gui (gvim)")
# virtual dependency?
def install(self, spec, prefix): def install(self, spec, prefix):
feature_set = None feature_set = None
for fs in self.feature_sets: for fs in self.feature_sets:
...@@ -44,6 +50,11 @@ def install(self, spec, prefix): ...@@ -44,6 +50,11 @@ def install(self, spec, prefix):
feature_set, feature_set,
fs)) fs))
feature_set = fs feature_set = fs
if '+gui' in spec:
if feature_set is not None:
if feature_set is not 'huge':
tty.error("+gui variant requires 'huge' feature set, {} was specified".format(feature_set))
feature_set = 'huge'
if feature_set is None: if feature_set is None:
feature_set = 'normal' feature_set = 'normal'
...@@ -60,6 +71,12 @@ def install(self, spec, prefix): ...@@ -60,6 +71,12 @@ def install(self, spec, prefix):
else: else:
configure_args.append("--enable-rubyinterp=dynamic") configure_args.append("--enable-rubyinterp=dynamic")
if '+gui' in spec:
configure_args.append("--enable-gui=auto")
if '+cscope' in spec:
configure_args.append("--enable-cscope")
configure("--prefix=%s" % prefix, *configure_args) configure("--prefix=%s" % prefix, *configure_args)
make() make()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment