summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorJen Herting <jen@herting.cc>2020-06-30 10:27:48 -0400
committerGitHub <noreply@github.com>2020-06-30 09:27:48 -0500
commitf25d6e64f63607e4c7b487d3c12ac4b5dde27f72 (patch)
tree69d5e769b3453341620a5a12b4bfe24c2d714bb3 /var
parent6d46fbb6f73f71e135334be774dffb9c3bd21f1a (diff)
downloadspack-f25d6e64f63607e4c7b487d3c12ac4b5dde27f72.tar.gz
spack-f25d6e64f63607e4c7b487d3c12ac4b5dde27f72.tar.bz2
spack-f25d6e64f63607e4c7b487d3c12ac4b5dde27f72.tar.xz
spack-f25d6e64f63607e4c7b487d3c12ac4b5dde27f72.zip
[ruby] fixing path to gcc such that users can use gem to install nati… (#17141)
* [ruby] fixing path to gcc such that users can use gem to install native gems to their home directory * [ruby] working on making flake8 happier * [ruby] Line can't really be split cleanly. Enhancing flake8's calm. ya learn something new every day... * [ruby] line break where requested * [ruby] make raw string * [ruby] only running for x86_64-linux everything else is untested * [ruby] finding rbconfig.rb in a cross platform manner
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/ruby/package.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/ruby/package.py b/var/spack/repos/builtin/packages/ruby/package.py
index 0a67b9baa7..ade1e2f39f 100644
--- a/var/spack/repos/builtin/packages/ruby/package.py
+++ b/var/spack/repos/builtin/packages/ruby/package.py
@@ -114,3 +114,14 @@ class Ruby(AutotoolsPackage):
'rubygems',
'ssl_certs')
install(rubygems_updated_cert_path, rubygems_certs_path)
+
+ rbconfig = find(self.prefix, 'rbconfig.rb')[0]
+ filter_file(r'^(\s*CONFIG\["CXX"\]\s*=\s*).*',
+ r'\1"{0}"'.format(self.compiler.cxx),
+ rbconfig)
+ filter_file(r'^(\s*CONFIG\["CC"\]\s*=\s*).*',
+ r'\1"{0}"'.format(self.compiler.cc),
+ rbconfig)
+ filter_file(r'^(\s*CONFIG\["MJIT_CC"\]\s*=\s*).*',
+ r'\1"{0}"'.format(self.compiler.cc),
+ rbconfig)