summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin/packages/graphviz/package.py
diff options
context:
space:
mode:
Diffstat (limited to 'var/spack/repos/builtin/packages/graphviz/package.py')
-rw-r--r--var/spack/repos/builtin/packages/graphviz/package.py14
1 files changed, 12 insertions, 2 deletions
diff --git a/var/spack/repos/builtin/packages/graphviz/package.py b/var/spack/repos/builtin/packages/graphviz/package.py
index 203e7b7f3c..2f99015ba2 100644
--- a/var/spack/repos/builtin/packages/graphviz/package.py
+++ b/var/spack/repos/builtin/packages/graphviz/package.py
@@ -23,6 +23,8 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
from spack import *
+import sys
+
class Graphviz(Package):
"""Graph Visualization Software"""
@@ -35,19 +37,27 @@ class Graphviz(Package):
# 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.')
+ variant('perl', default=False, description='Enable if you need the optional Perl language bindings.') # NOQA: ignore=E501
parallel = False
depends_on("swig")
depends_on("python")
depends_on("ghostscript")
+ depends_on("pkg-config")
def install(self, spec, prefix):
options = ['--prefix=%s' % prefix]
- if not '+perl' in spec:
+ if '+perl' not in spec:
options.append('--disable-perl')
+ # 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
+ # include <X11/Xlib.h>
+ if sys.platform == 'darwin':
+ options.append('CFLAGS=-I/opt/X11/include')
+
configure(*options)
make()
make("install")