mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-04-16 14:23:38 +00:00
tools/meson: sync with upstream
Signed-off-by: Linhui Liu <liulinhui36@gmail.com>
This commit is contained in:
parent
0fe111a083
commit
fe40a5e5bb
@ -19,7 +19,6 @@
|
|||||||
#
|
#
|
||||||
# Host packages are built in the same fashion, just use these vars instead:
|
# Host packages are built in the same fashion, just use these vars instead:
|
||||||
#
|
#
|
||||||
# HOST_BUILD_DEPENDS:=meson/host
|
|
||||||
# MESON_HOST_ARGS+=-Dfoo -Dbar=baz
|
# MESON_HOST_ARGS+=-Dfoo -Dbar=baz
|
||||||
# MESON_HOST_VARS+=FOO=bar
|
# MESON_HOST_VARS+=FOO=bar
|
||||||
|
|
||||||
@ -57,7 +56,7 @@ MESON_CPU:="$(CPU_TYPE)$(if $(CPU_SUBTYPE),+$(CPU_SUBTYPE))"
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
define Meson
|
define Meson
|
||||||
$(2) $(STAGING_DIR_HOST)/bin/$(PYTHON) $(MESON_DIR)/meson.py $(1)
|
$(2) $(STAGING_DIR_HOST)/bin/$(PYTHON) $(STAGING_DIR_HOST)/bin/meson.py $(1)
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Meson/CreateNativeFile
|
define Meson/CreateNativeFile
|
||||||
@ -101,7 +100,7 @@ define Host/Configure/Meson
|
|||||||
--native-file $(HOST_BUILD_DIR)/openwrt-native.txt \
|
--native-file $(HOST_BUILD_DIR)/openwrt-native.txt \
|
||||||
$(MESON_HOST_ARGS) \
|
$(MESON_HOST_ARGS) \
|
||||||
$(MESON_HOST_BUILD_DIR) \
|
$(MESON_HOST_BUILD_DIR) \
|
||||||
$(HOST_BUILD_DIR), \
|
$(MESON_HOST_BUILD_DIR)/.., \
|
||||||
$(MESON_HOST_VARS))
|
$(MESON_HOST_VARS))
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
@ -25,7 +25,6 @@ define Host/Install
|
|||||||
$(INSTALL_DIR) $(STAGING_DIR_HOST)/lib/meson
|
$(INSTALL_DIR) $(STAGING_DIR_HOST)/lib/meson
|
||||||
$(INSTALL_CONF) files/openwrt-cross.txt.in $(STAGING_DIR_HOST)/lib/meson/
|
$(INSTALL_CONF) files/openwrt-cross.txt.in $(STAGING_DIR_HOST)/lib/meson/
|
||||||
$(INSTALL_CONF) files/openwrt-native.txt.in $(STAGING_DIR_HOST)/lib/meson/
|
$(INSTALL_CONF) files/openwrt-native.txt.in $(STAGING_DIR_HOST)/lib/meson/
|
||||||
$(HOST_BUILD_DIR)/packaging/create_zipapp.py $(HOST_BUILD_DIR) --outfile $(STAGING_DIR_HOST)/lib/meson/meson.py
|
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Host/Clean
|
define Host/Clean
|
||||||
|
21
tools/meson/patches/010-wsl2.patch
Normal file
21
tools/meson/patches/010-wsl2.patch
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
From 7d1ef4343ed5b2b7ab51469177a42c32c47f0528 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Rosen Penev <rosenp@gmail.com>
|
||||||
|
Date: Tue, 6 Sep 2022 01:36:17 -0700
|
||||||
|
Subject: [PATCH] minstall: handle extra error for selinuxenabled
|
||||||
|
|
||||||
|
Microsoft's WSL2 uses a Plan 9 filesystem, which returns IOError when file is missing.
|
||||||
|
---
|
||||||
|
mesonbuild/minstall.py | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
--- a/mesonbuild/minstall.py
|
||||||
|
+++ b/mesonbuild/minstall.py
|
||||||
|
@@ -229,7 +229,7 @@ def restore_selinux_contexts() -> None:
|
||||||
|
'''
|
||||||
|
try:
|
||||||
|
subprocess.check_call(['selinuxenabled'])
|
||||||
|
- except (FileNotFoundError, NotADirectoryError, PermissionError, subprocess.CalledProcessError):
|
||||||
|
+ except (FileNotFoundError, NotADirectoryError, OSError, PermissionError, subprocess.CalledProcessError):
|
||||||
|
# If we don't have selinux or selinuxenabled returned 1, failure
|
||||||
|
# is ignored quietly.
|
||||||
|
return
|
Loading…
Reference in New Issue
Block a user