Merge pull request #87 from alfredo-gimenez/develop
Added gui and cscope features to Vim package
This commit is contained in:
commit
f34b04e555
17
var/spack/packages/cscope/package.py
Normal file
17
var/spack/packages/cscope/package.py
Normal file
@ -0,0 +1,17 @@
|
||||
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):
|
||||
variant('ruby', default=False, description="build with 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):
|
||||
feature_set = None
|
||||
for fs in self.feature_sets:
|
||||
@ -44,6 +50,11 @@ def install(self, spec, prefix):
|
||||
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:
|
||||
feature_set = 'normal'
|
||||
|
||||
@ -60,6 +71,12 @@ def install(self, spec, prefix):
|
||||
else:
|
||||
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)
|
||||
|
||||
make()
|
||||
|
Loading…
Reference in New Issue
Block a user