From 140d6aef04ecd4d1d1df49a04d591060b4fb7a7e Mon Sep 17 00:00:00 2001 From: Eli Schwartz Date: Tue, 22 Feb 2022 17:39:35 -0500 Subject: [PATCH] mark a bunch of dependencies with the version they were introduced All these dependencies are impossible to find on versions of Meson older than the ones they got custom lookups in, because they don't provide pkg-config files. So they should not / cannot be reasonably used on older versions, and it is easy to say "yep, these should emit a FeatureNew for the versions they got added in". --- mesonbuild/dependencies/dev.py | 1 + mesonbuild/dependencies/misc.py | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/mesonbuild/dependencies/dev.py b/mesonbuild/dependencies/dev.py index d31acbf1c..85beb4bd7 100644 --- a/mesonbuild/dependencies/dev.py +++ b/mesonbuild/dependencies/dev.py @@ -500,6 +500,7 @@ class ZlibSystemDependency(SystemDependency): class JDKSystemDependency(SystemDependency): def __init__(self, environment: 'Environment', kwargs: T.Dict[str, T.Any]): super().__init__('jdk', environment, kwargs) + self.feature_since = ('0.59.0', '') m = self.env.machines[self.for_machine] diff --git a/mesonbuild/dependencies/misc.py b/mesonbuild/dependencies/misc.py index 9cc549c7c..41ed5d71b 100644 --- a/mesonbuild/dependencies/misc.py +++ b/mesonbuild/dependencies/misc.py @@ -63,6 +63,7 @@ def netcdf_factory(env: 'Environment', class DlBuiltinDependency(BuiltinDependency): def __init__(self, name: str, env: 'Environment', kwargs: T.Dict[str, T.Any]): super().__init__(name, env, kwargs) + self.feature_since = ('0.62.0', "consider checking for dlopen() with and without find_library('dl')") if self.clib_compiler.has_function('dlopen', '#include ', env)[0]: self.is_found = True @@ -71,6 +72,7 @@ class DlBuiltinDependency(BuiltinDependency): class DlSystemDependency(SystemDependency): def __init__(self, name: str, env: 'Environment', kwargs: T.Dict[str, T.Any]): super().__init__(name, env, kwargs) + self.feature_since = ('0.62.0', "consider checking for dlopen() with and without find_library('dl')") h = self.clib_compiler.has_header('dlfcn.h', '', env) self.link_args = self.clib_compiler.find_library('dl', env, [], self.libtype) @@ -470,6 +472,7 @@ class CursesSystemDependency(SystemDependency): class IconvBuiltinDependency(BuiltinDependency): def __init__(self, name: str, env: 'Environment', kwargs: T.Dict[str, T.Any]): super().__init__(name, env, kwargs) + self.feature_since = ('0.60.0', "consider checking for iconv_open() with and without find_library('iconv')") code = '''#include \n\nint main() {\n iconv_open("","");\n}''' # [ignore encoding] this is C, not python, Mr. Lint if self.clib_compiler.links(code, env)[0]: @@ -479,6 +482,7 @@ class IconvBuiltinDependency(BuiltinDependency): class IconvSystemDependency(SystemDependency): def __init__(self, name: str, env: 'Environment', kwargs: T.Dict[str, T.Any]): super().__init__(name, env, kwargs) + self.feature_since = ('0.60.0', "consider checking for iconv_open() with and without find_library('iconv')") h = self.clib_compiler.has_header('iconv.h', '', env) self.link_args = self.clib_compiler.find_library('iconv', env, [], self.libtype) @@ -490,6 +494,7 @@ class IconvSystemDependency(SystemDependency): class IntlBuiltinDependency(BuiltinDependency): def __init__(self, name: str, env: 'Environment', kwargs: T.Dict[str, T.Any]): super().__init__(name, env, kwargs) + self.feature_since = ('0.59.0', "consider checking for ngettext() with and without find_library('intl')") code = '''#include \n\nint main() {\n gettext("Hello world");\n}''' if self.clib_compiler.links(code, env)[0]: @@ -499,6 +504,7 @@ class IntlBuiltinDependency(BuiltinDependency): class IntlSystemDependency(SystemDependency): def __init__(self, name: str, env: 'Environment', kwargs: T.Dict[str, T.Any]): super().__init__(name, env, kwargs) + self.feature_since = ('0.59.0', "consider checking for ngettext() with and without find_library('intl')") h = self.clib_compiler.has_header('libintl.h', '', env) self.link_args = self.clib_compiler.find_library('intl', env, [], self.libtype)