Followup to #1035925.

Kay's diagnosis from 2023 still holds, and I can now confirm it with a
working build. I have built the G'MIC-Qt plugin for Debian's Krita
1:6.0.3+dfsg-1+b2 on forky/testing with Qt 6.10, and it loads and runs
correctly. What follows is what it took, in case it is useful for
packaging.

The host side is already in the package. krita ships both
kritaplugins/kritaqmic.so and libkritaqmicinterface.so.21, so nothing needs
to change in how Krita itself is built. What is missing is the plugin module
plus the development files needed to build it, which debian/rules currently
deletes:

rm -rfv debian/tmp/usr/include/

Three headers are required: kis_qmic_interface.h and
kis_qmic_plugin_interface.h from plugins/extensions/qmic/, and the
CMake-generated kritaqmicinterface_export.h. A krita-gmic-dev binary package
containing those, plus the unversioned .so symlink, would make the plugin
buildable out of tree. Note that find_library() needs
libkritaqmicinterface.so without the version suffix; debian/rules currently
strips those symlinks.

The plugin itself needs its own source package. It is built from a patched
G'MIC tarball maintained for Krita rather than upstream gmic, and the exact
version and hash for a given Krita release are recorded in
3rdparty_plugins/ext_gmic/CMakeLists.txt. For 6.0.3 that is G'MIC 3.7.2.2
from github.com/vanyossi/gmic. Configuration is an ordinary G'MIC-Qt build
with -DGMIC_QT_HOST=krita-plugin and CMAKE_PREFIX_PATH pointing at the Krita
headers. Arch Linux carries this as krita-plugin-gmic, so there is existing
precedent for the approach.

Two things that cost me time and may save someone else's:

- lrelease is not on PATH in Debian; it is at /usr/lib/qt6/bin/lrelease in
qt6-l10n-tools. Without it the build fails on missing .qm files, since
translations.qrc references them unconditionally.

- -DENABLE_SYSTEM_GMIC=ON currently fails because find_package(Gmic) is
broken in libgmic-dev: GmicTargets.cmake exports libgmic with CImg::CImg
in its link interface, but nothing provides that target. I have filed
that separately as #1146487. Building the bundled engine with
-DENABLE_SYSTEM_GMIC=OFF works. If #1146487 is fixed, linking against
system G'MIC should become possible, which would avoid an embedded code
copy in the source package.

One thing that may be worth acting on independently of any of the above: the
krita-gmic package is still in the archive at version 2.9.4, and krita still
Recommends it. It cannot work with Krita 5 or later, so users who install it
get exactly the error Kay reported. Removing it, or replacing it with a
package built the new way, would at least stop the archive from shipping a
plugin that is guaranteed not to load.

I appreciate this is two packages rather than a small change, and that the
G'MIC source package version would be tied to Krita's. Happy to test any
packaging attempt on forky/amd64.

Kind regards,Are Mehus

Phone: +47 91660292
Mail: are.mehus @pm.me
Tøyengata 35 B,0578 Oslo, Norway

Sendt med [Proton Mail](https://pr.tn/ref/KQEDMA1N) sikker e-post.

Reply via email to