Add add'l output formats for graphviz (#4431)
* Add add'l output formats for graphviz
Add support for additional output formats to graphviz, including gif,
jpg, pdf, and png.
Graphviz calls its pango+cairo option *pangocairo* so I followed suit.
Libgd was missing jpeg/jpg support. None of the other supported
formats are conditionalized and there is no --with/--without support,
so I followed suit.
* Fix ghostscript plugin
When I installed thusly:
spack install graphviz+pangocairo+libgd^cairo+X^pango+X
the ghostscript plugin tripped over some variable names that had
changes in `gs@9.18:`. This fixes them.
* Remove wayward import of tty
This commit is contained in:
committed by
Adam J. Stewart
parent
54cc8dd7fd
commit
aa51e766cd
@@ -74,6 +74,11 @@ class Graphviz(AutotoolsPackage):
|
|||||||
description='Enable for optional tcl language bindings'
|
description='Enable for optional tcl language bindings'
|
||||||
' (not yet functional)')
|
' (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
|
parallel = False
|
||||||
|
|
||||||
# These language bindings have been tested, we know they work.
|
# These language bindings have been tested, we know they work.
|
||||||
@@ -90,6 +95,9 @@ class Graphviz(AutotoolsPackage):
|
|||||||
for b in tested_bindings + untested_bindings:
|
for b in tested_bindings + untested_bindings:
|
||||||
depends_on('swig', when=b)
|
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('ghostscript')
|
||||||
depends_on('freetype')
|
depends_on('freetype')
|
||||||
depends_on('expat')
|
depends_on('expat')
|
||||||
@@ -99,6 +107,14 @@ class Graphviz(AutotoolsPackage):
|
|||||||
depends_on('jdk', when='+java')
|
depends_on('jdk', when='+java')
|
||||||
depends_on('python@2:2.8', when='+python')
|
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):
|
def configure_args(self):
|
||||||
spec = self.spec
|
spec = self.spec
|
||||||
options = []
|
options = []
|
||||||
@@ -130,6 +146,12 @@ def configure_args(self):
|
|||||||
else:
|
else:
|
||||||
options.append('--enable-swig=no')
|
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:
|
# On OSX fix the compiler error:
|
||||||
# In file included from tkStubLib.c:15:
|
# In file included from tkStubLib.c:15:
|
||||||
# /usr/include/tk.h:78:11: fatal error: 'X11/Xlib.h' file not found
|
# /usr/include/tk.h:78:11: fatal error: 'X11/Xlib.h' file not found
|
||||||
|
|||||||
@@ -54,5 +54,6 @@ class Libgd(AutotoolsPackage):
|
|||||||
|
|
||||||
depends_on('libiconv')
|
depends_on('libiconv')
|
||||||
depends_on('libpng')
|
depends_on('libpng')
|
||||||
|
depends_on('jpeg')
|
||||||
depends_on('libtiff')
|
depends_on('libtiff')
|
||||||
depends_on('fontconfig')
|
depends_on('fontconfig')
|
||||||
|
|||||||
Reference in New Issue
Block a user