gnu: meson: Patch to allow installing to independent prefixes.
Meson goes to lengths at preventing installation to directories outside of the main installation prefix. This isn't convenient or desirable in Guix; patch it out using a patch maintained by Nix. * gnu/packages/patches/meson-allow-dirs-outside-of-prefix.patch: Add patch. * gnu/local.mk (dist_patch_DATA): Register it. * gnu/packages/build-tools.scm (meson): Use it.
This commit is contained in:
parent
0136d81580
commit
802307fe6f
3 changed files with 24 additions and 1 deletions
|
@ -1468,6 +1468,7 @@ dist_patch_DATA = \
|
||||||
%D%/packages/patches/mesa-opencl-all-targets.patch \
|
%D%/packages/patches/mesa-opencl-all-targets.patch \
|
||||||
%D%/packages/patches/mesa-skip-tests.patch \
|
%D%/packages/patches/mesa-skip-tests.patch \
|
||||||
%D%/packages/patches/mescc-tools-boot.patch \
|
%D%/packages/patches/mescc-tools-boot.patch \
|
||||||
|
%D%/packages/patches/meson-allow-dirs-outside-of-prefix.patch \
|
||||||
%D%/packages/patches/metabat-fix-compilation.patch \
|
%D%/packages/patches/metabat-fix-compilation.patch \
|
||||||
%D%/packages/patches/mhash-keygen-test-segfault.patch \
|
%D%/packages/patches/mhash-keygen-test-segfault.patch \
|
||||||
%D%/packages/patches/minetest-add-MINETEST_MOD_PATH.patch \
|
%D%/packages/patches/minetest-add-MINETEST_MOD_PATH.patch \
|
||||||
|
|
|
@ -272,7 +272,9 @@ files and generates build instructions for the Ninja build system.")
|
||||||
version ".tar.gz"))
|
version ".tar.gz"))
|
||||||
(sha256
|
(sha256
|
||||||
(base32
|
(base32
|
||||||
"0v9m0bazhj48kwc8x3gkxg5c3kcvknvqfjlq22z6pm2h2r2nln6v"))))
|
"0v9m0bazhj48kwc8x3gkxg5c3kcvknvqfjlq22z6pm2h2r2nln6v"))
|
||||||
|
(patches (search-patches
|
||||||
|
"meson-allow-dirs-outside-of-prefix.patch"))))
|
||||||
(build-system python-build-system)
|
(build-system python-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
`(;; FIXME: Tests require many additional inputs and patching many
|
`(;; FIXME: Tests require many additional inputs and patching many
|
||||||
|
|
|
@ -0,0 +1,20 @@
|
||||||
|
Source: https://raw.githubusercontent.com/NixOS/nixpkgs/master/pkgs/development/tools/build-managers/meson/allow-dirs-outside-of-prefix.patch
|
||||||
|
--- 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()
|
Reference in a new issue