Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

msys2: cleanup & decrease min conan version #15443

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
remove useless stuff & decrease min conan version
  • Loading branch information
SpaceIm committed Jan 23, 2023
commit 8146946254eb8dc475cb8af010a5c8df35c7b1a1
21 changes: 8 additions & 13 deletions recipes/msys2/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
import errno
import ctypes

required_conan_version = ">=1.55.0"
required_conan_version = ">=1.47.0"


class lock:
def __init__(self):
Expand Down Expand Up @@ -57,19 +58,18 @@ class MSYS2Conan(ConanFile):

short_paths = True

def layout(self):
basic_layout(self, src_folder="src")

def package_id(self):
del self.info.options.no_kill

def validate(self):
if self.settings.os != "Windows":
raise ConanInvalidConfiguration("Only Windows supported")
if self.settings.arch != "x86_64":
raise ConanInvalidConfiguration("Only Windows x64 supported")

def configure(self):
self.settings.rm_safe("compiler.libcxx")
self.settings.rm_safe("compiler.cppstd")

def layout(self):
basic_layout(self, src_folder="src")

def source(self):
get(self, **self.conan_data["sources"][self.version],
destination=self.source_folder, strip_root=False) # Preserve tarball root dir (msys64/)
Expand Down Expand Up @@ -177,16 +177,12 @@ def package(self):
def package_info(self):
self.cpp_info.libdirs = []
self.cpp_info.includedirs = []
self.cpp_info.resdirs = []

msys_root = os.path.join(self.package_folder, "bin", "msys64")
msys_bin = os.path.join(msys_root, "usr", "bin")
self.cpp_info.bindirs.append(msys_bin)

self.output.info(f"Creating MSYS_ROOT env var : {msys_root}")
self.buildenv_info.define_path("MSYS_ROOT", msys_root)

self.output.info(f"Creating MSYS_BIN env var : {msys_bin}")
self.buildenv_info.define_path("MSYS_BIN", msys_bin)

self.conf_info.define("tools.microsoft.bash:subsystem", "msys2")
Expand All @@ -195,5 +191,4 @@ def package_info(self):
# conan v1 specific stuff
self.env_info.MSYS_ROOT = msys_root
self.env_info.MSYS_BIN = msys_bin
self.output.info(f"Appending PATH env var with : {msys_bin}")
self.env_info.path.append(msys_bin)