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

glib: Depend on elfutils instead of libelf where possible #24059

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
11 changes: 9 additions & 2 deletions recipes/glib/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,10 @@ def requirements(self):
self.requires("libffi/3.4.4")
self.requires("pcre2/10.42")
if self.options.get_safe("with_elf"):
self.requires("libelf/0.8.13")
if is_apple_os(self) or self.settings.compiler not in ["clang", "gcc"]:
self.requires("libelf/0.8.13")
else:
self.requires("elfutils/0.190")
if self.options.get_safe("with_mount"):
self.requires("libmount/2.39")
if self.options.get_safe("with_selinux"):
Expand Down Expand Up @@ -230,7 +233,11 @@ def package_info(self):
self.cpp_info.components["gio-2.0"].requires.append("libselinux::libselinux")

if self.options.get_safe("with_elf"):
self.cpp_info.components["gresource"].requires.append("libelf::libelf") # this is actually an executable
# gresource is actually an executable
if is_apple_os(self) or self.settings.compiler not in ["clang", "gcc"]:
self.cpp_info.components["gresource"].requires.append("libelf::libelf")
else:
self.cpp_info.components["gresource"].requires.append("elfutils::libelf")

self.env_info.GLIB_COMPILE_SCHEMAS = os.path.join(self.package_folder, "bin", "glib-compile-schemas")
self.env_info.PATH.append(os.path.join(self.package_folder, "bin"))
Expand Down
Loading