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: fix single-profile build #20594

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
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
12 changes: 0 additions & 12 deletions recipes/xkbcommon/all/conandata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,3 @@ sources:
"1.3.1":
url: "https://xkbcommon.org/download/libxkbcommon-1.3.1.tar.xz"
sha256: "b3c710d27a2630054e1e1399c85b7f330ef03359b460f0c1b3b587fd01fe9234"
"1.2.1":
url: "https://xkbcommon.org/download/libxkbcommon-1.2.1.tar.xz"
sha256: "e833a7d3024c9bb9d5eb2b20f6d5de08865541f21bb7ba227c83cbd236691fb3"
"1.1.0":
url: "https://xkbcommon.org/download/libxkbcommon-1.1.0.tar.xz"
sha256: "412cfcca596f92914ea1a66ad244804d73a5ff20b6d86459951e7ad20576c246"
"1.0.3":
url: "https://xkbcommon.org/download/libxkbcommon-1.0.3.tar.xz"
sha256: "a2202f851e072b84e64a395212cbd976ee18a8ee602008b0bad02a13247dbc52"
"0.10.0":
url: "https://xkbcommon.org/download/libxkbcommon-0.10.0.tar.xz"
sha256: "57c3630cdc38fb4734cd57fa349e92244f5ae3862813e533cedbd86721a0b6f2"
15 changes: 3 additions & 12 deletions recipes/xkbcommon/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
from conan.tools.gnu import PkgConfigDeps
from conan.tools.layout import basic_layout
from conan.tools.meson import Meson, MesonToolchain
from conan.tools.scm import Version
from conan.errors import ConanInvalidConfiguration

required_conan_version = ">=1.53.0"
Expand Down Expand Up @@ -41,13 +40,7 @@ class XkbcommonConan(ConanFile):
def _has_build_profile(self):
return hasattr(self, "settings_build")

@property
def _has_xkbregistry_option(self):
return Version(self.version) >= "1.0.0"

def config_options(self):
if not self._has_xkbregistry_option:
del self.options.xkbregistry
if self.settings.os != "Linux":
del self.options.with_wayland

Expand All @@ -64,7 +57,7 @@ def requirements(self):
self.requires("xkeyboard-config/system")
if self.options.with_x11:
self.requires("xorg/system")
if self.options.get_safe("xkbregistry"):
if self.options.xkbregistry:
self.requires("libxml2/2.11.4")
if self.options.get_safe("with_wayland"):
self.requires("wayland/1.22.0", run=not self._has_build_profile)
Expand Down Expand Up @@ -95,8 +88,7 @@ def generate(self):
tc.project_options["enable-docs"] = False
tc.project_options["enable-wayland"] = self.options.get_safe("with_wayland", False)
tc.project_options["enable-x11"] = self.options.with_x11
if self._has_xkbregistry_option:
tc.project_options["enable-xkbregistry"] = self.options.xkbregistry
tc.project_options["enable-xkbregistry"] = self.options.xkbregistry
tc.project_options["build.pkg_config_path"] = self.generators_folder
tc.generate()

Expand Down Expand Up @@ -152,8 +144,7 @@ def package_info(self):
if not self._has_build_profile:
self.cpp_info.components["xkbcli-interactive-wayland"].requires.append("wayland-protocols::wayland-protocols")

if Version(self.version) >= "1.0.0":
self.env_info.PATH.append(os.path.join(self.package_folder, "bin"))
self.env_info.PATH.append(os.path.join(self.package_folder, "bin"))
ericLemanissier marked this conversation as resolved.
Show resolved Hide resolved

# unofficial, but required to avoid side effects (libxkbcommon component
# "steals" the default global pkg_config name)
Expand Down
8 changes: 0 additions & 8 deletions recipes/xkbcommon/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,3 @@ versions:
folder: all
"1.3.1":
folder: all
"1.2.1":
folder: all
"1.1.0":
folder: all
"1.0.3":
folder: all
"0.10.0":
folder: all