mirror of
				https://git.jami.net/savoirfairelinux/jami-client-qt.git
				synced 2025-10-30 07:53:33 +08:00 
			
		
		
		
	snap: fix runtime issues
This commit updates LD_LIBRARY_PATH and the gnome plug in snapcraft.yaml in order to fix runtime issues that were introduced when switching from core20 to core22 as the Jami snap's base. It also replaces the deprecated project variable CRAFT_ARCH_TRIPLET by CRAFT_ARCH_TRIPLET_BUILD_FOR as recommended in snap's documentation: https://documentation.ubuntu.com/snapcraft/stable/reference/architectures/ GitLab: #2087 Change-Id: If14efb39979af3bddf5575dc7d0d9fd66c8d3ec2
This commit is contained in:
		| @ -101,10 +101,10 @@ grade: stable | ||||
| base: core22 | ||||
|  | ||||
| plugs: | ||||
|   gnome-3-38-2004: | ||||
|   gnome-42-2204: | ||||
|     interface: content | ||||
|     target: $SNAP/gnome-platform | ||||
|     default-provider: gnome-3-38-2004:gnome-3-38-2004 | ||||
|     default-provider: gnome-42-2204 | ||||
|   gtk-3-themes: | ||||
|     interface: content | ||||
|     target: $SNAP/data-dir/themes | ||||
| @ -129,8 +129,8 @@ slots: | ||||
|     name: cx.ring.Ring | ||||
|  | ||||
| layout: | ||||
|   /usr/lib/$CRAFT_ARCH_TRIPLET/alsa-lib: | ||||
|     bind: $SNAP/usr/lib/$CRAFT_ARCH_TRIPLET/alsa-lib | ||||
|   /usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/alsa-lib: | ||||
|     bind: $SNAP/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/alsa-lib | ||||
|   /usr/share/alsa: | ||||
|     bind: $SNAP/usr/share/alsa | ||||
|   /usr/share/X11/xkb: | ||||
| @ -139,7 +139,7 @@ layout: | ||||
| environment: | ||||
|   XDG_CURRENT_DESKTOP: Unity | ||||
|   QT_BASE_DIR: "/usr/lib/libqt-jami" | ||||
|   LD_LIBRARY_PATH: "${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$SNAP$QT_BASE_DIR/lib" | ||||
|   LD_LIBRARY_PATH: "${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$SNAP$QT_BASE_DIR/lib:$SNAP/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR:$SNAP/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/pulseaudio" | ||||
|  | ||||
| apps: | ||||
|   jami: | ||||
| @ -153,8 +153,8 @@ apps: | ||||
|     desktop: usr/share/applications/net.jami.Jami.desktop | ||||
|     environment: | ||||
|       PIPEWIRE_CONFIG_NAME: "$SNAP/usr/share/pipewire/pipewire.conf" | ||||
|       PIPEWIRE_MODULE_DIR: "$SNAP/usr/lib/$CRAFT_ARCH_TRIPLET/pipewire-0.3" | ||||
|       SPA_PLUGIN_DIR: "$SNAP/usr/lib/$CRAFT_ARCH_TRIPLET/spa-0.2" | ||||
|       PIPEWIRE_MODULE_DIR: "$SNAP/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/pipewire-0.3" | ||||
|       SPA_PLUGIN_DIR: "$SNAP/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/spa-0.2" | ||||
|     slots: | ||||
|     - dbus-jami | ||||
|     - dbus-ring | ||||
| @ -295,7 +295,8 @@ parts: | ||||
|                -DCMAKE_INSTALL_PREFIX=/usr \ | ||||
|                -DCMAKE_BUILD_TYPE=Release \ | ||||
|                -DCMAKE_PREFIX_PATH=$QT_BASE_DIR \ | ||||
|                -DBUILD_VERSION=BUILD_VERSION_PLACEHOLDER | ||||
|                -DBUILD_VERSION=BUILD_VERSION_PLACEHOLDER \ | ||||
|                -DBUILD_TESTING=Off | ||||
|       make -j$CRAFT_PARALLEL_BUILD_COUNT | ||||
|       DESTDIR=$CRAFT_PART_INSTALL make install | ||||
|     build-packages: | ||||
| @ -388,6 +389,6 @@ parts: | ||||
|     - -usr/lib/libqt-jami/bin/ | ||||
|     - -usr/lib/libqt-jami/docs/ | ||||
|     - -usr/lib/libqt-jami/examples/ | ||||
|     - -usr/lib/$CRAFT_ARCH_TRIPLET/libLLVM-*.so* | ||||
|     - -usr/lib/$CRAFT_ARCH_TRIPLET/libclang-*.so* | ||||
|     - -usr/lib/$CRAFT_ARCH_TRIPLET/libflite*.so* | ||||
|     - -usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/libLLVM-*.so* | ||||
|     - -usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/libclang-*.so* | ||||
|     - -usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/libflite*.so* | ||||
|  | ||||
| @ -20,8 +20,8 @@ meson install -C builddir | ||||
| # The files installed by the previous command are only for the "Build" step of the snap | ||||
| # creation process (https://snapcraft.io/docs/how-snapcraft-builds). In order to ensure | ||||
| # that PipeWire is installed in the final snap archive, we also need to copy all the | ||||
| # required files under the $SNAPCRAFT_PART_INSTALL directory. | ||||
| meson configure builddir -Dprefix=$SNAPCRAFT_PART_INSTALL/usr/ | ||||
| # required files under the $CRAFT_PART_INSTALL directory. | ||||
| meson configure builddir -Dprefix=$CRAFT_PART_INSTALL/usr/ | ||||
| meson install -C builddir | ||||
|  | ||||
| # Cleanup | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 François-Simon Fauteux-Chapleau
					François-Simon Fauteux-Chapleau