Skip to content

Commit 1be96f2

Browse files
authored
Merge pull request #318 from frenchwr/2.99-openvino
fix: minor plug-in and extension errors from logs
2 parents f07eada + f5da54c commit 1be96f2

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

snap/snapcraft.yaml

+12-7
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,11 @@ environment:
5858
LD_LIBRARY_PATH: $SNAP/lib:$SNAP/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR:$SNAP/gnome-platform/usr/lib:$SNAP/gnome-platform/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR:$SNAP/usr/lib:$SNAP/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR:$SNAP/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/lapack:$SNAP/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/blas:$SNAP/npu-libs
5959
# Ensure the gmic plugin can correctly locate the QT plugins
6060
QT_PLUGIN_PATH: $SNAP/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/qt6/plugins
61+
GIMP3_LOCALEDIR: $SNAP/usr/share/locale
62+
# Lua goat exercise considered unstable upstream: https://gitlab.gnome.org/GNOME/gimp/-/commit/78665ca3723f723ac313fdaeef5b62d41ab6b48d
63+
# The extension will fail on GIMP startup but commenting these lines avoids the risk of a nasty crash loop
64+
#LUA_PATH: $SNAP/usr/share/lua/5.1/?.lua;$SNAP/usr/share/lua/5.1/lgi/?.lua;$SNAP/usr/share/lua/5.1/lgi/override/?.lua
65+
#LUA_CPATH: $SNAP/usr/lib/x86_64-linux-gnu/lua/5.1/?.so
6166

6267
apps:
6368
gimp:
@@ -245,17 +250,17 @@ parts:
245250
- poppler-data
246251
override-stage: |
247252
# fix gimp python interpreters file
248-
cat <<EOF > $CRAFT_PART_INSTALL/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/gimp/2.99/interpreters/pygimp.interp
249-
python=/snap/"${SNAPCRAFT_PROJECT_NAME}"/current/usr/bin/python3
250-
python3=/snap/"${SNAPCRAFT_PROJECT_NAME}"/current/usr/bin/python3
251-
/usr/bin/python=/snap/"${SNAPCRAFT_PROJECT_NAME}"/current/usr/bin/python3
252-
/usr/bin/python3=/snap/"${SNAPCRAFT_PROJECT_NAME}"/current/usr/bin/python3
253+
cat <<EOF > ${CRAFT_PART_INSTALL}/usr/lib/${CRAFT_ARCH_TRIPLET_BUILD_FOR}/gimp/2.99/interpreters/pygimp.interp
254+
python=/usr/bin/python3
255+
python3=/usr/bin/python3
256+
/usr/bin/python=/usr/bin/python3
257+
/usr/bin/python3=/usr/bin/python3
253258
:Python:E::py::python3:
254259
EOF
255260
# update gimp's plugin search path so it will pick up plugins mounted over snapd's content interface
256261
current_path=$(grep "# (plug-in-path" ${CRAFT_PART_INSTALL}/etc/gimp/2.99/gimprc | cut -d '"' -f2)
257-
add_dir=/snap/"${SNAPCRAFT_PROJECT_NAME}"/current/openvino-ai-plugins-gimp/gimp-plugins
258-
echo "(plug-in-path \"${current_path}:${add_dir}\")" >> $CRAFT_PART_INSTALL/etc/gimp/2.99/gimprc
262+
add_dir=/snap/${SNAPCRAFT_PROJECT_NAME}/current/openvino-ai-plugins-gimp/gimp-plugins
263+
echo "(plug-in-path \"${current_path}:${add_dir}\")" >> ${CRAFT_PART_INSTALL}/etc/gimp/2.99/gimprc
259264
craftctl default
260265
261266
command-chain-openvino:

0 commit comments

Comments
 (0)