Skip to content

Commit

Permalink
xorg-macros: fix building from source on Windows (#16162)
Browse files Browse the repository at this point in the history
* 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 <git@rinconblanco.es>
Co-authored-by: Stella Smith <40411082+StellaSmith@users.noreply.github.com>
  • Loading branch information
3 people committed Feb 20, 2023
1 parent 8802daf commit cbf992a
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions recipes/xorg-macros/all/conanfile.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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):
Expand All @@ -50,6 +53,9 @@ def generate(self):
)
tc.generate()

buildenv = VirtualBuildEnv(self)
buildenv.generate()

def build(self):
apply_conandata_patches(self)

Expand Down

0 comments on commit cbf992a

Please sign in to comment.