From a98c2d8c90b450349a22f4a2a0a862d92362d8ff Mon Sep 17 00:00:00 2001 From: Jon Seager Date: Thu, 22 Feb 2024 11:40:32 +0000 Subject: [PATCH] chore: bump gmic to v3.3.4 This also comes with a patch to ensure the build succeeds, which I suspect can be dropped after the next release of gmic. --- .../gmic-gimp-image-procedure-new-cast.patch | 13 +++++++++++++ snap/snapcraft.yaml | 7 ++++++- 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 snap/local/patches/gmic-gimp-image-procedure-new-cast.patch diff --git a/snap/local/patches/gmic-gimp-image-procedure-new-cast.patch b/snap/local/patches/gmic-gimp-image-procedure-new-cast.patch new file mode 100644 index 0000000..de86b76 --- /dev/null +++ b/snap/local/patches/gmic-gimp-image-procedure-new-cast.patch @@ -0,0 +1,13 @@ +diff --git a/src/Host/Gimp/host_gimp.cpp b/src/Host/Gimp/host_gimp.cpp +index 166ff0c..86888d4 100644 +--- a/src/Host/Gimp/host_gimp.cpp ++++ b/src/Host/Gimp/host_gimp.cpp +@@ -1205,7 +1205,7 @@ static GimpProcedure * gmic_qt_create_procedure(GimpPlugIn * plug_in, const gcha + GimpProcedure * procedure = NULL; + + if (strcmp(name, PLUG_IN_PROC) == 0) { +- procedure = gimp_image_procedure_new(plug_in, name, GIMP_PDB_PROC_TYPE_PLUGIN, gmic_qt_run, NULL, NULL); ++ procedure = gimp_image_procedure_new(plug_in, name, GIMP_PDB_PROC_TYPE_PLUGIN, (GimpRunImageFunc) gmic_qt_run, NULL, NULL); + + gimp_procedure_set_image_types(procedure, "RGB*, GRAY*"); + diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index 5ea703d..5661471 100755 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -561,7 +561,7 @@ parts: after: [gimp] plugin: nil override-pull: | - VERSION=v.3.3.3 + VERSION=v.3.3.4 git clone -b "$VERSION" https://github.com/GreycLab/gmic.git git clone -b "$VERSION" https://github.com/GreycLab/CImg.git git clone -b "$VERSION" https://github.com/c-koi/gmic-qt.git @@ -571,6 +571,11 @@ parts: # the build phase, by the time we get there the proxy token has # expired - so force it to happen here. wget -qO gmic/src/gmic_stdlib_community.h "https://gmic.eu/gmic_stdlib_community$(echo "${VERSION}" | tr -d "v.").h" + + # TODO: This can potentially be dropped after the next release of gmic-qt + pushd gmic-qt + patch -Np1 -i $CRAFT_PROJECT_DIR/snap/local/patches/gmic-gimp-image-procedure-new-cast.patch + popd build-environment: - LD_LIBRARY_PATH: $CRAFT_STAGE/usr/lib:$CRAFT_STAGE/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR - PATH: /snap/bin:$PATH