summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElizabeth Fischer <rpf2116@columbia.edu>2017-02-17 15:07:54 -0500
committerTodd Gamblin <tgamblin@llnl.gov>2017-02-17 12:07:54 -0800
commit71806132181a1916b046ab996951e61203de4739 (patch)
tree460b57f107b1eb3349a850ac29f029b100e0a118
parent1de2c5393585c698a9ba0223228891c247992caa (diff)
downloadspack-71806132181a1916b046ab996951e61203de4739.tar.gz
spack-71806132181a1916b046ab996951e61203de4739.tar.bz2
spack-71806132181a1916b046ab996951e61203de4739.tar.xz
spack-71806132181a1916b046ab996951e61203de4739.zip
graphviz: Tame Language Bindings (#1089)
graphviz: * Download from Fedora projet, as main graphviz site not working. * Disable java because Spack does not yet support Java, and the system might not have it installed. * Added all language binding variants; disabled enough in the default configuration to avoid dependencies. * Removed alternate download location (turned into comments). * Turn off all language bindings by default. * Raise an exception on bindings that have not been verified to work. * Added text indicating what works and doesn't work when user runs `spack info`.
-rw-r--r--var/spack/repos/builtin/packages/graphviz/package.py97
1 files changed, 79 insertions, 18 deletions
diff --git a/var/spack/repos/builtin/packages/graphviz/package.py b/var/spack/repos/builtin/packages/graphviz/package.py
index 1bf6c70926..a6d3234695 100644
--- a/var/spack/repos/builtin/packages/graphviz/package.py
+++ b/var/spack/repos/builtin/packages/graphviz/package.py
@@ -29,33 +29,94 @@ import shutil
class Graphviz(AutotoolsPackage):
"""Graph Visualization Software"""
- homepage = "http://www.graphviz.org"
- url = "http://www.graphviz.org/pub/graphviz/stable/SOURCES/graphviz-2.38.0.tar.gz"
+ homepage = 'http://www.graphviz.org'
+ url = 'http://www.graphviz.org/pub/graphviz/stable/SOURCES/graphviz-2.38.0.tar.gz'
version('2.38.0', '5b6a829b2ac94efcd5fa3c223ed6d3ae')
- # By default disable optional Perl language support to prevent build issues
- # related to missing Perl packages. If spack begins support for Perl in the
- # future, this package can be updated to depend_on('perl') and the
- # ncecessary devel packages.
- variant(
- 'perl', default=False,
- description='Enable if you need the optional Perl language bindings.')
+ # We try to leave language bindings enabled if they don't cause
+ # build issues or add dependencies.
+ variant('swig', default=False,
+ description='Enable for optional swig language bindings'
+ ' (not yet functional)')
+ variant('sharp', default=False,
+ description='Enable for optional sharp language bindings'
+ ' (not yet functional)')
+ variant('go', default=False,
+ description='Enable for optional go language bindings'
+ ' (not yet functional)')
+ variant('guile', default=False,
+ description='Enable for optional guile language bindings'
+ ' (not yet functional)')
+ variant('io', default=False,
+ description='Enable for optional io language bindings'
+ ' (not yet functional)')
+ variant('java', default=False, # Spack has no Java support
+ description='Enable for optional java language bindings')
+ variant('lua', default=False,
+ description='Enable for optional lua language bindings'
+ ' (not yet functional)')
+ variant('ocaml', default=False,
+ description='Enable for optional ocaml language bindings'
+ ' (not yet functional)')
+ variant('perl', default=False, # Spack has no Perl support
+ description='Enable for optional perl language bindings')
+ variant('php', default=False,
+ description='Enable for optional php language bindings'
+ ' (not yet functional)')
+ variant('python', default=False, # Build issues with Python 2/3
+ description='Enable for optional python language bindings'
+ ' (not yet functional)')
+ variant('r', default=False,
+ description='Enable for optional r language bindings'
+ ' (not yet functional)')
+ variant('ruby', default=False,
+ description='Enable for optional ruby language bindings'
+ ' (not yet functional)')
+ variant('tcl', default=False,
+ description='Enable for optional tcl language bindings'
+ ' (not yet functional)')
parallel = False
- depends_on("swig")
- depends_on("python")
- depends_on("ghostscript")
- depends_on("freetype")
- depends_on("expat")
- depends_on("libtool")
- depends_on("pkg-config", type='build')
+ depends_on('swig', when='+swig')
+ depends_on('ghostscript')
+ depends_on('freetype')
+ depends_on('expat')
+ depends_on('libtool')
+ depends_on('pkg-config', type='build')
+
+ depends_on('jdk', when='+java')
+ depends_on('python@2:2.8', when='+python')
def configure_args(self):
options = []
- if '+perl' not in self.spec:
- options.append('--disable-perl')
+
+ # These language bindings have been tested, we know they work.
+ tested_bindings = ('+java', '+perl')
+
+ # These language bindings have not yet been tested. They
+ # likely need additional dependencies to get working.
+ untested_bindings = (
+ '+swig', '+sharp', '+go', '+guile', '+io',
+ '+lua', '+ocaml', '+php',
+ '+python', '+r', '+ruby', '+tcl')
+
+ for var in untested_bindings:
+ if var in spec:
+ raise SpackException(
+ "The variant {0} for language bindings has not been "
+ "tested. It might or might not work. To try it "
+ "out, run `spack edit graphviz`, and then move '{0}' "
+ "from the `untested_bindings` list to the "
+ "`tested_bindings` list. Be prepared to add "
+ "required dependencies. "
+ "Please then submit a pull request to "
+ "http://github.com/llnl/spack")
+
+ for var in tested_bindings:
+ enable = 'enable' if (var in spec) else 'disable'
+ options.append('--%s-%s' % (enable, var[1:]))
# On OSX fix the compiler error:
# In file included from tkStubLib.c:15: