[vlc-commits] snap: make vulkan actually work inside a snap

Konstantin Pavlov git at videolan.org
Sat Nov 10 17:50:58 CET 2018


vlc | branch: master | Konstantin Pavlov <thresh at videolan.org> | Sat Nov 10 19:20:37 2018 +0300| [58c57d1c4bdf17459f74dd70a3374f25cb38911e] | committer: Konstantin Pavlov

snap: make vulkan actually work inside a snap

Ubuntu 16.04 has an outdated libvulkan package which ships layers in
the -dev subpackage, so we have to add it to staged packages.  This can
be reverted when it's fixed.

Also introduced another part "fixup-vulkan-icd-paths".  The rationale to
add it is that icd ship with an absolute path to vulkan drivers, which
breaks under snap confinement;  with just a filename, vulkan will look
for those files under LD_LIBRARY_PATH.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=58c57d1c4bdf17459f74dd70a3374f25cb38911e
---

 extras/package/snap/snapcraft.yaml | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/extras/package/snap/snapcraft.yaml b/extras/package/snap/snapcraft.yaml
index 55e944a968..5e90db86ac 100644
--- a/extras/package/snap/snapcraft.yaml
+++ b/extras/package/snap/snapcraft.yaml
@@ -208,6 +208,8 @@ parts:
       - libnotify4
       - libvulkan1
       - libaacs0
+      - mesa-vulkan-drivers
+      - libvulkan-dev
     filesets:
       exclusion:
       - "-usr/lib/*/cmake/*"
@@ -227,3 +229,9 @@ parts:
     source: .
     organize:
       vlc-snap-wrapper.sh: bin/vlc-snap-wrapper.sh
+
+  fixup-vulkan-icd-paths:
+    plugin: nil
+    after: [wrapper]
+    override-build: |
+      sed -i -E 's,(^.+"library_path": ")/.*/,\1,' $SNAPCRAFT_STAGE/usr/share/vulkan/icd.d/*.json



More information about the vlc-commits mailing list