From cbf992a8358ea8a60378cd39f87b49d13ad12ee6 Mon Sep 17 00:00:00 2001 From: Luis Caro Campos <3535649+jcar87@users.noreply.github.com> Date: Mon, 20 Feb 2023 20:17:21 +0000 Subject: [PATCH] xorg-macros: fix building from source on Windows (#16162) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * xorg-macros: fix building from source on Windows * Update recipes/xorg-macros/all/conanfile.py Co-authored-by: Stella Smith <40411082+StellaSmith@users.noreply.github.com> --------- Co-authored-by: Rubén Rincón Blanco Co-authored-by: Stella Smith <40411082+StellaSmith@users.noreply.github.com> --- recipes/xorg-macros/all/conanfile.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/recipes/xorg-macros/all/conanfile.py b/recipes/xorg-macros/all/conanfile.py index fe12c645bc98c..6fe36bf8322c5 100644 --- a/recipes/xorg-macros/all/conanfile.py +++ b/recipes/xorg-macros/all/conanfile.py @@ -1,5 +1,6 @@ from conan import ConanFile from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir +from conan.tools.env import VirtualBuildEnv from conan.tools.gnu import Autotools, AutotoolsToolchain from conan.tools.layout import basic_layout from conan.tools.microsoft import unix_path_package_info_legacy @@ -32,8 +33,10 @@ def source(self): get(self, **self.conan_data["sources"][self.version], destination=self.source_folder, strip_root=True) def build_requirements(self): - if self._settings_build.os == "Windows" and not self.conf.get("tools.microsoft.bash:path", check_type=str): - self.tool_requires("msys2/cci.latest") + if self._settings_build.os == "Windows": + self.win_bash = True + if not self.conf.get("tools.microsoft.bash:path", check_type=str): + self.tool_requires("msys2/cci.latest") self.tool_requires("automake/1.16.5") def package_id(self): @@ -50,6 +53,9 @@ def generate(self): ) tc.generate() + buildenv = VirtualBuildEnv(self) + buildenv.generate() + def build(self): apply_conandata_patches(self)