Skip to content

[pangomm]: use shared glib for shared pangomm #11495

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

Closed
wants to merge 2 commits into from
Closed
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
27 changes: 17 additions & 10 deletions recipes/pangomm/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,13 @@ def validate(self):
elif self._is_1_4_api:
tools.check_min_cppstd(self, 11)

if self.options.shared and (not self.options["pango"].shared
or not self.options["cairomm"].shared
or not self.options["glibmm"].shared):
raise ConanInvalidConfiguration(
"Linking a shared library against static glib can cause unexpected behaviour."
)

@property
def _source_subfolder(self):
return "source_subfolder"
Expand All @@ -60,13 +67,7 @@ def build_requirements(self):
self.build_requires("pkgconf/1.7.4")

def requirements(self):
self.requires("pango/1.50.7")

# FIXME: temporary fix for dependency versions mismatch
# once dependencies versions are bumped remove these requirements
self.requires("expat/2.4.8")
self.requires("zlib/1.2.12")
self.requires("glib/2.72.1")
self.requires("pango/1.50.8")

if self._is_2_48_api:
self.requires("glibmm/2.72.1")
Expand Down Expand Up @@ -113,6 +114,11 @@ def configure(self):
if self.options.shared:
del self.options.fPIC

if self.options.shared:
self.options["pango"].shared = True
self.options["glibmm"].shared = True
self.options["cairomm"].shared = True

def build(self):
self._patch_sources()
with tools.environment_append(tools.RunEnvironment(self).vars):
Expand Down Expand Up @@ -184,6 +190,7 @@ def package_info(self):
"pkg_config_custom_content",
f"gmmprocm4dir=${{libdir}}/{pangomm_lib}/proc/m4")

# FIXME: remove once dependency mismatch issues are solved
self.cpp_info.components[pangomm_lib].requires.extend(
["expat::expat", "zlib::zlib", "glib::glib-2.0"])
def package_id(self):
self.info.requires["pango"].full_package_mode()
self.info.requires["glibmm"].full_package_mode()
self.info.requires["cairomm"].full_package_mode()