summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGlenn Johnson <glenn-johnson@uiowa.edu>2021-04-23 09:40:32 -0500
committerGitHub <noreply@github.com>2021-04-23 16:40:32 +0200
commit32368c7f46abe4f108108e7ada22a2a0d59b69d4 (patch)
tree16370cebda415e9100a645007c90c6b137fd7236
parentf246f6701a2d2913fe2c23e30324b07cd61fc5f9 (diff)
downloadspack-32368c7f46abe4f108108e7ada22a2a0d59b69d4.tar.gz
spack-32368c7f46abe4f108108e7ada22a2a0d59b69d4.tar.bz2
spack-32368c7f46abe4f108108e7ada22a2a0d59b69d4.tar.xz
spack-32368c7f46abe4f108108e7ada22a2a0d59b69d4.zip
r-rjava: set JAVAH environment variable (#23055)
Set the path to javah via the JAVAH environment variable. If it is a version of java that does not have javah it will fall back to `javac -h`. Without specifying this the build could pick up a javah from the system.
-rw-r--r--var/spack/repos/builtin/packages/r-rjava/package.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/r-rjava/package.py b/var/spack/repos/builtin/packages/r-rjava/package.py
index 87cf4bef54..073e1a7e73 100644
--- a/var/spack/repos/builtin/packages/r-rjava/package.py
+++ b/var/spack/repos/builtin/packages/r-rjava/package.py
@@ -30,3 +30,8 @@ class RRjava(RPackage):
depends_on('libiconv')
depends_on('pcre2')
depends_on('xz')
+
+ def setup_build_environment(self, env):
+ spec = self.spec
+ env.append_flags('JAVAH', '{0}/javah'.format(
+ join_path(spec['java'].prefix.bin)))