From 14f3f230c19771b2f337b260319267edc0f16f34 Mon Sep 17 00:00:00 2001 From: ketsubouchi <67359246+ketsubouchi@users.noreply.github.com> Date: Wed, 15 Jul 2020 11:24:18 +0900 Subject: [PATCH] scons: support Fujitsu Fortran moddir option (#17538) --- var/spack/repos/builtin/packages/scons/package.py | 9 +++++++++ 1 file changed, 9 insertions(+) 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:')