From 12dbba8907c287676ea49d2e161ba978839a6963 Mon Sep 17 00:00:00 2001 From: SSE4 Date: Thu, 1 Jul 2021 20:57:45 +0700 Subject: [PATCH 1/2] - [waf] skip test for cross-building (m1) Signed-off-by: SSE4 --- recipes/waf/all/test_package/conanfile.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/recipes/waf/all/test_package/conanfile.py b/recipes/waf/all/test_package/conanfile.py index fc44b38fb8fe6..9d956eec26829 100644 --- a/recipes/waf/all/test_package/conanfile.py +++ b/recipes/waf/all/test_package/conanfile.py @@ -9,11 +9,16 @@ class TestPackageConan(ConanFile): exports_sources = "a.cpp", "b.cpp", "main.c", "main.cpp", "wscript" def build(self): + if tools.cross_building(self.settings): + return + for src in self.exports_sources: shutil.copy(os.path.join(self.source_folder, src), self.build_folder) - waf_path = tools.which("waf").replace("\\", "/") - assert waf_path.startswith(str(self.deps_cpp_info["waf"].rootpath)) + waf_path = tools.which("waf") + if waf_path: + waf_path = waf_path.replace("\\", "/") + assert waf_path.startswith(str(self.deps_cpp_info["waf"].rootpath)) with tools.vcvars(self.settings) if self.settings.compiler == "Visual Studio" else tools.no_op(): self.run("waf -h") From dcac5511b57260b48f10438219a622cd43577b84 Mon Sep 17 00:00:00 2001 From: SSE4 Date: Mon, 5 Jul 2021 14:10:04 +0700 Subject: [PATCH 2/2] Update conanfile.py --- recipes/waf/all/conanfile.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/waf/all/conanfile.py b/recipes/waf/all/conanfile.py index 877630a1e558f..cc8d7cdece540 100644 --- a/recipes/waf/all/conanfile.py +++ b/recipes/waf/all/conanfile.py @@ -9,7 +9,7 @@ class WafConan(ConanFile): url = "https://github.com/conan-io/conan-center-index" homepage = "https://waf.io" license = "BSD-3-Clause" - settings = "os_build", "arch_build" + settings = "os", "arch" @property def _source_subfolder(self): @@ -40,7 +40,7 @@ def package(self): self.copy("waf-light", src=self._source_subfolder, dst=binpath) self.copy("waflib/*", src=self._source_subfolder, dst=libpath) - if self.settings.os_build == "Windows": + if self.settings.os == "Windows": self.copy("waf.bat", src=os.path.join(self._source_subfolder, "utils"), dst=binpath) os.chmod(os.path.join(binpath, "waf"), 0o755)