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

- [gstreamer] use full_package_mode for GLib #7734

Merged
Merged
Changes from 4 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
9 changes: 9 additions & 0 deletions recipes/gstreamer/all/conanfile.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from conans import ConanFile, tools, Meson, VisualStudioBuildEnvironment
from conans.errors import ConanInvalidConfiguration
import glob
import os
import shutil
Expand Down Expand Up @@ -51,6 +52,11 @@ def config_options(self):
if self.settings.os == 'Windows':
del self.options.fPIC

def validate(self):
if self.options["glib"].static and self.options.shared:
SSE4 marked this conversation as resolved.
Show resolved Hide resolved
# https://gitlab.freedesktop.org/gstreamer/gst-build/-/issues/133
raise ConanInvalidConfiguration("shared GStreamer cannot link to static GLib")

def build_requirements(self):
self.build_requires("meson/0.56.2")
self.build_requires("pkgconf/1.7.4")
Expand Down Expand Up @@ -114,6 +120,9 @@ def package(self):
tools.rmdir(os.path.join(self.package_folder, "share"))
tools.remove_files_by_mask(self.package_folder, "*.pdb")

def package_id(self):
self.info.requires["glib"].full_package_mode()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't we use shared_library_package_id here ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that package id is when you are linking shared + static, here we are aligned (shared + shared; static + static)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comment from conan developers (conan-io/conan#9712):

The shared_library_package_id() helper was introduced to try to alleviate this issue, but it was not matured and it was not adopted in ConanCenter recipes.
I don't think it is worth the huge effort to improve and adopt the shared_library_package_id(), but if anything is to be done, it should be opt-in.


def package_info(self):
gst_plugin_path = os.path.join(self.package_folder, "lib", "gstreamer-1.0")

Expand Down