summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorL. E. Segovia <amy@centricular.com>2024-06-23 14:51:55 -0300
committerBackport Bot <gitlab-backport-bot@gstreamer-foundation.org>2024-06-25 14:29:42 +0100
commit85194850e1f2e7836ac3c86b65074e1a520c6a29 (patch)
treecfa6b5964107f91440090e30fbfc3aec05c39d26
parentcdd05c15cce73993441a70f6adb57f11453729b0 (diff)
glib: Work around Meson assuming absolute dylib IDs
This applies and propagates the workaround from the dep common to all affected recipes. See <https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/1485> Part-of: <https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/1499>
-rw-r--r--recipes/glib-networking.recipe5
-rw-r--r--recipes/glib.recipe15
-rw-r--r--recipes/gstreamer-1.0.recipe10
3 files changed, 10 insertions, 20 deletions
diff --git a/recipes/glib-networking.recipe b/recipes/glib-networking.recipe
index 4118e4c2..da4a40c2 100644
--- a/recipes/glib-networking.recipe
+++ b/recipes/glib-networking.recipe
@@ -31,11 +31,6 @@ class Recipe(recipe.Recipe):
if self.config.target_platform != Platform.LINUX or self.config.cross_compiling():
self.deps.append('openssl')
- if self.config.platform in [Platform.DARWIN, Platform.IOS]:
- # Meson doesn't yet introduce rpaths properly.
- # https://github.com/mesonbuild/meson/issues/2121#issuecomment-347535874
- self.append_env('LDFLAGS', f'-Wl,-rpath,{self.config.libdir}')
-
def post_install(self):
# Meson does not generate la files
LibtoolLibrary('gioopenssl', None, None, None,
diff --git a/recipes/glib.recipe b/recipes/glib.recipe
index 15e9b609..142827fa 100644
--- a/recipes/glib.recipe
+++ b/recipes/glib.recipe
@@ -250,11 +250,6 @@ class Recipe(recipe.Recipe):
raise FatalError(_("Add specific for other Linux distributions here"))
self._set_gio_flags(path1, path2, use_old_uri_scheme)
- if self.config.platform in [Platform.DARWIN, Platform.IOS]:
- # Meson doesn't yet introduce rpaths properly.
- # https://github.com/mesonbuild/meson/issues/2121#issuecomment-347535874
- self.append_env('LDFLAGS', f'-Wl,-rpath,{self.config.libdir}')
-
def post_install(self):
if self.config.target_platform in [Platform.IOS, Platform.DARWIN]:
# For the universal build we need to ship glibconfig.h of both
@@ -277,6 +272,16 @@ class Recipe(recipe.Recipe):
with open(os.path.join(self.config.libdir, 'glib-2.0',
'include', 'glibconfig.h'), 'w+') as f:
f.write(GLIB_CONFIG_UNVERSAL)
+
+ if self.config.platform in (Platform.DARWIN, Platform.IOS):
+ # Meson doesn't yet introduce rpaths properly.
+ # https://github.com/mesonbuild/meson/issues/2121#issuecomment-347535874
+ files = [
+ f'{self.config.libdir}/pkgconfig/glib-2.0.pc',
+ ]
+ for f in files:
+ shell.replace(f, {'Libs:': 'Libs: -Wl,-rpath,${libdir}'})
+
major, minor, micro = get_libtool_versions(self.version)
# Meson does not generate la files
LibtoolLibrary('glib-2.0', major, minor, micro,
diff --git a/recipes/gstreamer-1.0.recipe b/recipes/gstreamer-1.0.recipe
index 9451fbed..308e5342 100644
--- a/recipes/gstreamer-1.0.recipe
+++ b/recipes/gstreamer-1.0.recipe
@@ -82,13 +82,3 @@ 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()