summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--var/spack/repos/builtin/packages/scons/package.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/scons/package.py b/var/spack/repos/builtin/packages/scons/package.py
index 328fa558ab..82b9bcd7d1 100644
--- a/var/spack/repos/builtin/packages/scons/package.py
+++ b/var/spack/repos/builtin/packages/scons/package.py
@@ -25,6 +25,15 @@ class Scons(PythonPackage):
depends_on('python@:2', when='@:2', type=('build', 'run'))
depends_on('py-setuptools', when='@3.0.2:', type='build')
+ def patch(self):
+ if self.spec.satisfies('%fj'):
+ filter_file(
+ 'env[\'FORTRANMODDIRPREFIX\'] = "-J"',
+ 'env[\'FORTRANMODDIRPREFIX\'] = "-M"',
+ 'engine/SCons/Tool/gfortran.py',
+ string=True
+ )
+
# Prevent passing --single-version-externally-managed to
# setup.py, which it does not support.
@when('@3.0.2:')