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.
This commit is contained in:
Glenn Johnson 2021-04-23 09:40:32 -05:00 committed by GitHub
parent f246f6701a
commit 32368c7f46
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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)))