diff options
Diffstat (limited to 'pkgs/development/tools/build-managers/meson/allow-dirs-outside-of-prefix.patch')
-rw-r--r-- | pkgs/development/tools/build-managers/meson/allow-dirs-outside-of-prefix.patch | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/pkgs/development/tools/build-managers/meson/allow-dirs-outside-of-prefix.patch b/pkgs/development/tools/build-managers/meson/allow-dirs-outside-of-prefix.patch index b44289d74f54..bef89c881b5a 100644 --- a/pkgs/development/tools/build-managers/meson/allow-dirs-outside-of-prefix.patch +++ b/pkgs/development/tools/build-managers/meson/allow-dirs-outside-of-prefix.patch @@ -1,6 +1,6 @@ --- a/mesonbuild/coredata.py +++ b/mesonbuild/coredata.py -@@ -266,18 +266,13 @@ +@@ -282,18 +282,13 @@ ''' if option.endswith('dir') and os.path.isabs(value) and \ option not in builtin_dir_noprefix_options: @@ -8,7 +8,7 @@ # commonpath will always return a path in the native format, so we # must use pathlib.PurePath to do the same conversion before # comparing. -- if commonpath([value, prefix]) != str(PurePath(prefix)): +- if os.path.commonpath([value, prefix]) != str(PurePath(prefix)): - m = 'The value of the {!r} option is {!r} which must be a ' \ - 'subdir of the prefix {!r}.\nNote that if you pass a ' \ - 'relative path, it is assumed to be a subdir of prefix.' @@ -16,7 +16,7 @@ - # Convert path to be relative to prefix - skip = len(prefix) + 1 - value = value[skip:] -+ if commonpath([value, prefix]) == str(PurePath(prefix)): ++ if os.path.commonpath([value, prefix]) == str(PurePath(prefix)): + # Convert path to be relative to prefix + skip = len(prefix) + 1 + value = value[skip:] |