From b6185d4ad7540f9292ea7b5d59a88470eb666527 Mon Sep 17 00:00:00 2001
From: Michael Kuhn <michael@ikkoku.de>
Date: Fri, 22 Mar 2019 12:46:53 +0100
Subject: [PATCH] openfoam-com: Fix flex dependency (#10956)

openfoam-com needs flex's FlexLexer.h, which can only be found if flex
is also a link dependency.
---
 var/spack/repos/builtin/packages/openfoam-com/package.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/var/spack/repos/builtin/packages/openfoam-com/package.py b/var/spack/repos/builtin/packages/openfoam-com/package.py
index 408383ac0d..8b4dd5fbed 100644
--- a/var/spack/repos/builtin/packages/openfoam-com/package.py
+++ b/var/spack/repos/builtin/packages/openfoam-com/package.py
@@ -307,7 +307,7 @@ class OpenfoamCom(Package):
     depends_on('cgal')
     # The flex restriction is ONLY to deal with a spec resolution clash
     # introduced by the restriction within scotch!
-    depends_on('flex@:2.6.1,2.6.4:', type='build')
+    depends_on('flex@:2.6.1,2.6.4:')
     depends_on('cmake', type='build')
 
     # Require scotch with ptscotch - corresponds to standard OpenFOAM setup
-- 
GitLab