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

xkbcommon: Small fixes #12882

Merged
merged 2 commits into from
Sep 14, 2022
Merged
Show file tree
Hide file tree
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
18 changes: 2 additions & 16 deletions recipes/xkbcommon/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class XkbcommonConan(ConanFile):
"xkbregistry": True,
}

generators = "PkgConfigDeps", "VirtualBuildEnv", "VirtualRunEnv"
generators = "PkgConfigDeps", "VirtualBuildEnv"

@property
def _has_xkbregistry_option(self):
Expand Down Expand Up @@ -68,7 +68,7 @@ def build_requirements(self):
self.tool_requires("meson/0.63.1")
self.tool_requires("bison/3.7.6")
self.tool_requires("pkgconf/1.7.4")
if self.options.get_safe("with_wayland"):
if hasattr(self, "settings_build") and self.options.get_safe("with_wayland"):
self.tool_requires("wayland/1.21.0")

def layout(self):
Expand Down Expand Up @@ -124,26 +124,14 @@ def package_info(self):
self.cpp_info.components["libxkbcommon"].requires = ["xorg::xkeyboard-config"]
self.cpp_info.components["libxkbcommon"].resdirs = ["res"]

# todo Remove in Conan version 1.50.0 where these are set by default for the PkgConfigDeps generator.
self.cpp_info.components["libxkbcommon"].includedirs = ["include"]
self.cpp_info.components["libxkbcommon"].libdirs = ["lib"]

if self.options.with_x11:
self.cpp_info.components["libxkbcommon-x11"].set_property("pkg_config_name", "xkbcommon-x11")
self.cpp_info.components["libxkbcommon-x11"].libs = ["xkbcommon-x11"]
self.cpp_info.components["libxkbcommon-x11"].requires = ["libxkbcommon", "xorg::xcb", "xorg::xcb-xkb"]

# todo Remove in Conan version 1.50.0 where these are set by default for the PkgConfigDeps generator.
self.cpp_info.components["libxkbcommon-x11"].includedirs = ["include"]
self.cpp_info.components["libxkbcommon-x11"].libdirs = ["lib"]
if self.options.get_safe("xkbregistry"):
self.cpp_info.components["libxkbregistry"].set_property("pkg_config_name", "xkbregistry")
self.cpp_info.components["libxkbregistry"].libs = ["xkbregistry"]
self.cpp_info.components["libxkbregistry"].requires = ["libxml2::libxml2"]

# todo Remove in Conan version 1.50.0 where these are set by default for the PkgConfigDeps generator.
self.cpp_info.components["libxkbregistry"].includedirs = ["include"]
self.cpp_info.components["libxkbregistry"].libdirs = ["lib"]
if self.options.get_safe("with_wayland", False):
# FIXME: This generates just executable, but I need to use the requirements to pass Conan checks
self.cpp_info.components["xkbcli-interactive-wayland"].libs = []
Expand All @@ -152,8 +140,6 @@ def package_info(self):

if Version(self.version) >= "1.0.0":
bindir = os.path.join(self.package_folder, "bin")
self.buildenv_info.prepend_path("PATH", bindir)
self.runenv_info.prepend_path("PATH", bindir)
self.output.info(f"Appending PATH environment variable: {bindir}")
self.env_info.PATH.append(bindir)

Expand Down
2 changes: 1 addition & 1 deletion recipes/xkbcommon/all/test_package/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

class TestPackageConan(ConanFile):
settings = "os", "arch", "compiler", "build_type"
generators = "CMakeToolchain", "CMakeDeps", "VirtualBuildEnv", "VirtualRunEnv"
generators = "CMakeToolchain", "CMakeDeps", "VirtualRunEnv"

def requirements(self):
self.requires(self.tested_reference_str)
Expand Down