depot/third_party/nixpkgs/pkgs/development/tools/build-managers/meson/allow-dirs-outside-of-prefix.patch
Default email 07d6a74cbb Project import generated by Copybara.
GitOrigin-RevId: f5e8bdd07d1afaabf6b37afc5497b1e498b8046f
2021-03-19 18:17:44 +01:00

19 lines
852 B
Diff

--- a/mesonbuild/coredata.py
+++ b/mesonbuild/coredata.py
@@ -506,7 +506,6 @@ class CoreData:
return value
if option.name.endswith('dir') and value.is_absolute() and \
option not in BULITIN_DIR_NOPREFIX_OPTIONS:
- # Value must be a subdir of the prefix
# commonpath will always return a path in the native format, so we
# must use pathlib.PurePath to do the same conversion before
# comparing.
@@ -518,7 +517,7 @@ class CoreData:
try:
value = value.relative_to(prefix)
except ValueError:
- raise MesonException(msg.format(option, value, prefix))
+ pass
if '..' in str(value):
raise MesonException(msg.format(option, value, prefix))
return value.as_posix()