diff options
author | Tristan Partin <tristan@partin.io> | 2022-01-26 00:33:58 -0600 |
---|---|---|
committer | Eli Schwartz <eschwartz93@gmail.com> | 2022-03-02 16:23:09 -0500 |
commit | 96b2469544fba40e63d009db73b41c3b07b80684 (patch) | |
tree | 4d365b8e8c8a6a8784b55b37eefa2b8b33b2d09b /mesonbuild/dependencies | |
parent | f9bfeb2add70973113ab4a98454a5c5d7e3a26ae (diff) | |
download | meson-96b2469544fba40e63d009db73b41c3b07b80684.zip meson-96b2469544fba40e63d009db73b41c3b07b80684.tar.gz meson-96b2469544fba40e63d009db73b41c3b07b80684.tar.bz2 |
Rename JDK system dep to JNI
JNI is a more apt name because it currently only supports the JNI. I
also believe that CMake uses the terminology JNI here as well.
JNI is currently the only way to interact with the JVM through native
code, but there is a project called "Project Panama" which aims to be
another way for native code to interact with the JVM.
Diffstat (limited to 'mesonbuild/dependencies')
-rw-r--r-- | mesonbuild/dependencies/__init__.py | 3 | ||||
-rw-r--r-- | mesonbuild/dependencies/dev.py | 21 |
2 files changed, 20 insertions, 4 deletions
diff --git a/mesonbuild/dependencies/__init__.py b/mesonbuild/dependencies/__init__.py index b49514b..1e1a9f7 100644 --- a/mesonbuild/dependencies/__init__.py +++ b/mesonbuild/dependencies/__init__.py @@ -27,7 +27,7 @@ from .pkgconfig import PkgConfigDependency from .factory import DependencyFactory from .detect import find_external_dependency, get_dep_identifier, packages, _packages_accept_language from .dev import ( - ValgrindDependency, JDKSystemDependency, gmock_factory, gtest_factory, + ValgrindDependency, JNISystemDependency, JDKSystemDependency, gmock_factory, gtest_factory, llvm_factory, zlib_factory) from .coarrays import coarray_factory from .mpi import mpi_factory @@ -229,6 +229,7 @@ packages.update({ 'llvm': llvm_factory, 'valgrind': ValgrindDependency, 'zlib': zlib_factory, + 'jni': JNISystemDependency, 'jdk': JDKSystemDependency, 'boost': BoostDependency, diff --git a/mesonbuild/dependencies/dev.py b/mesonbuild/dependencies/dev.py index 85beb4b..247dbc7 100644 --- a/mesonbuild/dependencies/dev.py +++ b/mesonbuild/dependencies/dev.py @@ -22,6 +22,8 @@ import pathlib import shutil import typing as T +from mesonbuild.interpreterbase.decorators import FeatureDeprecated + from .. import mesonlib, mlog from ..compilers import AppleClangCCompiler, AppleClangCPPCompiler, detect_compiler_for from ..environment import get_llvm_tool_names @@ -497,10 +499,11 @@ class ZlibSystemDependency(SystemDependency): self.version = v.strip('"') -class JDKSystemDependency(SystemDependency): +class JNISystemDependency(SystemDependency): def __init__(self, environment: 'Environment', kwargs: T.Dict[str, T.Any]): - super().__init__('jdk', environment, kwargs) - self.feature_since = ('0.59.0', '') + super().__init__('jni', environment, kwargs) + + self.feature_since = ('0.62.0', '') m = self.env.machines[self.for_machine] @@ -549,6 +552,18 @@ class JDKSystemDependency(SystemDependency): return None +class JDKSystemDependency(JNISystemDependency): + def __init__(self, environment: 'Environment', kwargs: T.Dict[str, T.Any]): + super().__init__(environment, kwargs) + + self.feature_since = ('0.59.0', '') + self.featurechecks.append(FeatureDeprecated( + 'jdk system dependency', + '0.62.0', + 'Use the jni system dependency instead' + )) + + llvm_factory = DependencyFactory( 'LLVM', [DependencyMethods.CMAKE, DependencyMethods.CONFIG_TOOL], |