From 24d98367380a8bfa6935fced88e4dc0cd05fc5da Mon Sep 17 00:00:00 2001 From: Max Gaukler Date: Sat, 1 Feb 2025 15:12:54 +0100 Subject: [PATCH] Fix snap package: printing and print-preview (backport to 1.4.x) - Printing needs cups -> trigger host-side installation of the cups snap socket (or however it is called) - Print preview needs evince (which needs some further stuff) --> include it in the snap until a better solution is found Fixes #1734 for 1.4.x --- snap/snapcraft.yaml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index cafbc0b022..a606e291ef 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -6,6 +6,15 @@ confinement: strict base: core22 compression: lzo +# ---- +# hacks to make `evince` work for the print preview +layout: + /usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/evince/4/backends: + bind: $SNAP/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/evince/4/backends + /usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/glib-2.0: + bind: $SNAP/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/glib-2.0 +# ---- + plugs: dot-config-inkscape: interface: personal-files @@ -18,6 +27,14 @@ plugs: interface: content target: $SNAP/data-dir/icons default-provider: gtk-common-themes +# ---- +# hack needed to ensure that the "cups" slot is available on the host, see https://snapcraft.io/docs/cups-interface + foo-install-cups: + interface: content + content: foo + default-provider: cups + target: $SNAP_DATA/foo +# ---- slots: inkscape-dbus: @@ -106,6 +123,11 @@ parts: - python3-pil - python3-gi - python3-gi-cairo +# ---- +# needed by the print preview feature + - evince + - libglib2.0-0 +# ---- prime: - -lib/inkscape/*.a - -*canberra*so* # We don't have sound permissions anyway -- GitLab