summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--var/spack/repos/builtin/packages/graphviz/package.py22
-rw-r--r--var/spack/repos/builtin/packages/libgd/package.py1
2 files changed, 23 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/graphviz/package.py b/var/spack/repos/builtin/packages/graphviz/package.py
index 89e7ffc635..9a0337e656 100644
--- a/var/spack/repos/builtin/packages/graphviz/package.py
+++ b/var/spack/repos/builtin/packages/graphviz/package.py
@@ -74,6 +74,11 @@ class Graphviz(AutotoolsPackage):
description='Enable for optional tcl language bindings'
' (not yet functional)')
+ variant('pangocairo', default=False,
+ description='Build with pango+cairo support (more output formats)')
+ variant('libgd', default=False,
+ description='Build with libgd support (more output formats)')
+
parallel = False
# These language bindings have been tested, we know they work.
@@ -90,6 +95,9 @@ class Graphviz(AutotoolsPackage):
for b in tested_bindings + untested_bindings:
depends_on('swig', when=b)
+ depends_on('cairo', when='+pangocairo')
+ depends_on('pango', when='+pangocairo')
+ depends_on('libgd', when='+libgd')
depends_on('ghostscript')
depends_on('freetype')
depends_on('expat')
@@ -99,6 +107,14 @@ class Graphviz(AutotoolsPackage):
depends_on('jdk', when='+java')
depends_on('python@2:2.8', when='+python')
+ def patch(self):
+ # Fix a few variable names, gs after 9.18 renamed them
+ # See http://lists.linuxfromscratch.org/pipermail/blfs-book/2015-October/056960.html
+ if self.spec.satisfies('^ghostscript@9.18:'):
+ kwargs = {'ignore_absent': False, 'backup': True, 'string': True}
+ filter_file(' e_', ' gs_error_', 'plugin/gs/gvloadimage_gs.c',
+ **kwargs)
+
def configure_args(self):
spec = self.spec
options = []
@@ -130,6 +146,12 @@ class Graphviz(AutotoolsPackage):
else:
options.append('--enable-swig=no')
+ for var in ('+pangocairo', '+libgd'):
+ if var in spec:
+ options.append('--with-{0}'.format(var[1:]))
+ else:
+ options.append('--without-{0}'.format(var[1:]))
+
# On OSX fix the compiler error:
# In file included from tkStubLib.c:15:
# /usr/include/tk.h:78:11: fatal error: 'X11/Xlib.h' file not found
diff --git a/var/spack/repos/builtin/packages/libgd/package.py b/var/spack/repos/builtin/packages/libgd/package.py
index c70d8b56fd..d3cb549f4c 100644
--- a/var/spack/repos/builtin/packages/libgd/package.py
+++ b/var/spack/repos/builtin/packages/libgd/package.py
@@ -54,5 +54,6 @@ class Libgd(AutotoolsPackage):
depends_on('libiconv')
depends_on('libpng')
+ depends_on('jpeg')
depends_on('libtiff')
depends_on('fontconfig')