From 3a7fadd67e881af6b6cf3d2588dcec6ced6b2c8e Mon Sep 17 00:00:00 2001 From: Cameron Smith Date: Mon, 14 May 2018 19:19:46 -0400 Subject: [PATCH] prenek missing X.h (#8121) --- var/spack/repos/builtin/packages/nek5000/package.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/var/spack/repos/builtin/packages/nek5000/package.py b/var/spack/repos/builtin/packages/nek5000/package.py index 2ea0654a2b..b18d220bb1 100644 --- a/var/spack/repos/builtin/packages/nek5000/package.py +++ b/var/spack/repos/builtin/packages/nek5000/package.py @@ -85,6 +85,7 @@ class Nek5000(Package): depends_on('libx11', when="+postnek") # libxt is needed for X11/Intrinsic.h but not for linking depends_on('libxt', when="+prenek") + depends_on('xproto', when="+prenek") depends_on('libxt', when="+postnek") depends_on('visit', when="+visit") @@ -125,6 +126,14 @@ def install(self, spec, prefix): raise RuntimeError('Xlib.h not found in %s' % spec['libx11'].prefix.include) cflags += ['-I%s' % os.path.dirname(libx11_h.directories[0])] + + xproto_h = find_headers('X', spec['xproto'].prefix.include, + recursive=True) + if not xproto_h: + raise RuntimeError('X.h not found in %s' % + spec['xproto'].prefix.include) + cflags += ['-I%s' % os.path.dirname(xproto_h.directories[0])] + libxt_h = find_headers('Intrinsic', spec['libxt'].prefix.include, recursive=True) if not libxt_h: