summaryrefslogtreecommitdiff
path: root/recipes
diff options
context:
space:
mode:
authorL. E. Segovia <amy@centricular.com>2024-06-06 23:08:32 -0300
committerBackport Bot <gitlab-backport-bot@gstreamer-foundation.org>2024-06-21 14:06:06 +0100
commite453fb29cb074ec6d6e120b184e24a05190ecebf (patch)
treeb8b90fc9336b86a1233c5a60ada923474e31e886 /recipes
parent596c978763bcd2202a6f5b98a5003410f9052702 (diff)
gstreamer: Work around Meson assuming absolute dylib IDs
This works around an undocumented semantic in Meson as regard dylibs' IDs. The fix performed for dyld in 2c058e57282577cbb77a3cd99bd16fee3b6cddaa meant that anyone attempting to use relocated libraries within Meson would have their libraries or executables crash at launch, since Meson does not insert any RPATH entries for dependencies, only for build targets in the current project. See: https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/1478 https://github.com/mesonbuild/meson/pull/3691 (NOTE: for a more comprehensive fix, implement the post-install step on osxuniversalgenerator.py:do_merge inside the copy-pc action.) Part-of: <https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/1491>
Diffstat (limited to 'recipes')
-rw-r--r--recipes/gstreamer-1.0.recipe12
1 files changed, 11 insertions, 1 deletions
diff --git a/recipes/gstreamer-1.0.recipe b/recipes/gstreamer-1.0.recipe
index 0ec88dc2..9451fbed 100644
--- a/recipes/gstreamer-1.0.recipe
+++ b/recipes/gstreamer-1.0.recipe
@@ -1,5 +1,5 @@
# -*- Mode: Python -*- vi:si:et:sw=4:sts=4:ts=4:syntax=python
-import shutil
+from cerbero.utils import shell
class Recipe(custom.GStreamer):
name = 'gstreamer-1.0'
@@ -82,3 +82,13 @@ class Recipe(custom.GStreamer):
self.config.target_platform not in [Platform.IOS, Platform.ANDROID]:
self.meson_options['ptp-helper'] = 'enabled'
self.files_misc.append('libexec/gstreamer-1.0/gst-ptp-helper%(bext)s')
+
+ def post_install(self):
+ if self.config.platform in (Platform.DARWIN, Platform.IOS):
+ files = [
+ f'{self.config.libdir}/pkgconfig/gstreamer-1.0.pc',
+ ]
+ for f in files:
+ shell.replace(f, {'Libs:': 'Libs: -Wl,-rpath,${libdir}'})
+
+ super().post_install()