summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2020-09-23 14:39:23 +0530
committerNirbheek Chauhan <nirbheek@centricular.com>2020-09-23 15:38:07 +0530
commit60c5e7f9c0e05653dfd3e304c0ee0b5bc8f3f54e (patch)
tree742a1b945c88dd34d0302e46688ece6b873e1ae5
parentc93a5989ca71ea005044cfb9f142272d6b819a0b (diff)
libdca.recipe: Fixup symlinks to have a relative path
These are written out with an absolute path, which breaks relocation. Part-of: <https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/613>
-rw-r--r--recipes/libdca.recipe13
1 files changed, 13 insertions, 0 deletions
diff --git a/recipes/libdca.recipe b/recipes/libdca.recipe
index a0588b5e..1affeb94 100644
--- a/recipes/libdca.recipe
+++ b/recipes/libdca.recipe
@@ -18,3 +18,16 @@ class Recipe(recipe.Recipe):
def prepare(self):
if self.config.target_platform == Platform.ANDROID:
self.configure_options += ' --disable-oss'
+
+ def post_install(self):
+ # Create relative symlinks to prevent breakage during packaging
+ if self.config.platform != Platform.WINDOWS:
+ dangling = [
+ ('lib/libdts.a', 'libdca.a'),
+ ('share/man/man1/extract_dts.1', 'extract_dca.1'),
+ ('share/man/man1/dtsdec.1', 'dcadec.a'),
+ ]
+ for src, dest in dangling:
+ os.remove(os.path.join(self.config.prefix, src))
+ os.symlink(src, os.path.join(self.config.prefix, dest))
+ super().post_install()