diff --git a/snap/local/patches/gimpchoice-fix.patch b/snap/local/patches/gimpchoice-fix.patch deleted file mode 100644 index 533b14d..0000000 --- a/snap/local/patches/gimpchoice-fix.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 11892f1d83ffc465346dab7e2e8c6e790f555a64 Mon Sep 17 00:00:00 2001 -From: Jehan -Date: Wed, 21 Feb 2024 11:08:23 +0100 -Subject: [PATCH] Issue #10900: install missing gimpchoice.h. - -Argh how this could pass without anyone noticing?! ---- - libgimpbase/meson.build | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/libgimpbase/meson.build b/libgimpbase/meson.build -index a77d125f39d..a2c27016b10 100644 ---- a/libgimpbase/meson.build -+++ b/libgimpbase/meson.build -@@ -84,6 +84,7 @@ libgimpbase_headers_introspectable = files( - 'gimpbaseenums.h', - 'gimpbasetypes.h', - 'gimpchecks.h', -+ 'gimpchoice.h', - 'gimpcpuaccel.h', - 'gimpenv.h', - 'gimplimits.h', --- -GitLab - diff --git a/snap/local/patches/gmic-gimp-image-procedure-new-cast.patch b/snap/local/patches/gmic-gimp-image-procedure-new-cast.patch deleted file mode 100644 index de86b76..0000000 --- a/snap/local/patches/gmic-gimp-image-procedure-new-cast.patch +++ /dev/null @@ -1,13 +0,0 @@ -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/local/patches/libwmf/freetype-pkg-config.patch b/snap/local/patches/libwmf/freetype-pkg-config.patch deleted file mode 100644 index 46da298..0000000 --- a/snap/local/patches/libwmf/freetype-pkg-config.patch +++ /dev/null @@ -1,77 +0,0 @@ -diff --git a/configure.ac b/configure.ac -index 6e08583..cedcae9 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -376,62 +376,16 @@ WMF_FT_CONFIG_CFLAGS="" - WMF_FT_CFLAGS="" - WMF_FT_LDFLAGS="" - --_cppflags=$CPPFLAGS --_ldflags=$LDFLAGS -- --have_freetype=no -- --AC_ARG_WITH(freetype,[ --with-freetype=DIR use freetype2 in DIR],[ -- if [ test "x$withval" != "xno" ]; then -- if [ test "x$withval" != "xyes" ]; then -- FREETYPE_DIR=$withval -- fi -- else -- AC_MSG_ERROR(* * * libwmf requires freetype2 * * *) -- fi --]) -- --if [ test -n "$FREETYPE_DIR" ]; then -- AC_PATH_PROG(FREETYPE_CONFIG,freetype-config, ,[$FREETYPE_DIR/bin:$PATH]) --else -- AC_PATH_PROG(FREETYPE_CONFIG,freetype-config) --fi -- --if [ test -n "$FREETYPE_CONFIG" ]; then -- if [ test -n "$FREETYPE_DIR" ]; then -- freetype_cflags="`$FREETYPE_CONFIG --cflags` -I$FREETYPE_DIR/include" -- freetype_libs=`$FREETYPE_CONFIG --libs` -- else -- freetype_cflags=`$FREETYPE_CONFIG --cflags` -- freetype_libs=`$FREETYPE_CONFIG --libs` -- fi --else -- if [ test -n "$FREETYPE_DIR" ]; then -- freetype_cflags="-I$FREETYPE_DIR/include/freetype2 -I$FREETYPE_DIR/include" -- freetype_libs="-L$FREETYPE_DIR/lib -lfreetype" -- else -- freetype_cflags="" -- freetype_libs="-lfreetype" -- fi --fi -- --CPPFLAGS="$freetype_cflags $CPPFLAGS" --LDFLAGS="$LDFLAGS $freetype_libs" -- --AC_CHECK_LIB(freetype,FT_Init_FreeType,[ -- WMF_FT_LDFLAGS="$freetype_libs" --],[ AC_MSG_ERROR([* * * freetype(2) is required * * *]) --]) --AC_CHECK_HEADER(ft2build.h,[ -- WMF_FT_CFLAGS="$freetype_cflags" -- WMF_FT_CONFIG_CFLAGS="$freetype_cflags" --],[ AC_MSG_ERROR([* * * freetype(2) is required * * *]) --]) -- --GD_DEFS="$GD_DEFS -DHAVE_LIBFREETYPE" -- --CPPFLAGS=$_cppflags --LDFLAGS=$_ldflags -+PKG_CHECK_MODULES( -+ [FREETYPE], -+ [freetype2], -+ [ -+ WMF_FT_CONFIG_CFLAGS="$FREETYPE_CFLAGS" -+ WMF_FT_CFLAGS="$FREETYPE_CFLAGS" -+ WMF_FT_LDFLAGS="$FREETYPE_LIBS" -+ GD_DEFS="$GD_DEFS -DHAVE_LIBFREETYPE" -+ ], -+ [AC_MSG_ERROR([Can't find Freetype library])]) - - dnl (4) zlib {-lz} - diff --git a/snap/local/patches/libwmf/no-trio.patch b/snap/local/patches/libwmf/no-trio.patch deleted file mode 100644 index 40a1508..0000000 --- a/snap/local/patches/libwmf/no-trio.patch +++ /dev/null @@ -1,19 +0,0 @@ -diff --git a/configure.ac b/configure.ac -index 6e08583..708ec9f 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -876,7 +876,6 @@ include/Makefile - include/libwmf/Makefile - src/Makefile - src/extra/Makefile --src/extra/trio/Makefile - src/extra/gd/Makefile - src/ipa/Makefile - src/convert/Makefile -diff --git a/src/extra/Makefile.am b/src/extra/Makefile.am -index 5454b66..9b72534 100644 ---- a/src/extra/Makefile.am -+++ b/src/extra/Makefile.am -@@ -1 +1 @@ --SUBDIRS = trio gd -+SUBDIRS = gd diff --git a/snap/local/patches/rawtherapee.patch b/snap/local/patches/rawtherapee.patch deleted file mode 100644 index 9c12fef..0000000 --- a/snap/local/patches/rawtherapee.patch +++ /dev/null @@ -1,356 +0,0 @@ -See: - https://github.com/Beep6581/RawTherapee/issues/6324 - https://github.com/Beep6581/RawTherapee/commit/2e0137d54243eb729d4a5f939c4320ec8f8f415d - -diff --git a/rtengine/canon_cr3_decoder.cc b/rtengine/canon_cr3_decoder.cc -index 6274154cb..98c743dad 100644 ---- a/rtengine/canon_cr3_decoder.cc -+++ b/rtengine/canon_cr3_decoder.cc -@@ -662,7 +662,7 @@ std::uint32_t _byteswap_ulong(std::uint32_t x) - #endif - - struct LibRaw_abstract_datastream { -- IMFILE* ifp; -+ rtengine::IMFILE* ifp; - - void lock() - { -diff --git a/rtengine/dcraw.cc b/rtengine/dcraw.cc -index 812f122b3..5da696af2 100644 ---- a/rtengine/dcraw.cc -+++ b/rtengine/dcraw.cc -@@ -2025,7 +2025,7 @@ void CLASS phase_one_load_raw_c() - #endif - { - int len[2], pred[2]; -- IMFILE ifpthr = *ifp; -+ rtengine::IMFILE ifpthr = *ifp; - ifpthr.plistener = nullptr; - - #ifdef _OPENMP -@@ -3380,7 +3380,7 @@ void CLASS sony_arw2_load_raw() - { - uchar *data = new (std::nothrow) uchar[raw_width + 1]; - merror(data, "sony_arw2_load_raw()"); -- IMFILE ifpthr = *ifp; -+ rtengine::IMFILE ifpthr = *ifp; - int pos = ifpthr.pos; - ushort pix[16]; - -@@ -6394,7 +6394,7 @@ int CLASS parse_tiff_ifd (int base) - unsigned sony_curve[] = { 0,0,0,0,0,4095 }; - unsigned *buf, sony_offset=0, sony_length=0, sony_key=0; - struct jhead jh; --/*RT*/ IMFILE *sfp; -+/*RT*/ rtengine::IMFILE *sfp; - /*RT*/ int pana_raw = 0; - - if (tiff_nifds >= sizeof tiff_ifd / sizeof tiff_ifd[0]) -@@ -6958,7 +6958,7 @@ it under the terms of the one of two licenses as you choose: - fread (buf, sony_length, 1, ifp); - sony_decrypt (buf, sony_length/4, 1, sony_key); - sfp = ifp; --/*RT*/ ifp = fopen (buf, sony_length); -+/*RT*/ ifp = rtengine::fopen (buf, sony_length); - // if ((ifp = tmpfile())) { - // fwrite (buf, sony_length, 1, ifp); - // fseek (ifp, 0, SEEK_SET); -@@ -7264,7 +7264,7 @@ void CLASS parse_external_jpeg() - { - const char *file, *ext; - char *jname, *jfile, *jext; --/*RT*/ IMFILE *save=ifp; -+/*RT*/ rtengine::IMFILE *save=ifp; - - ext = strrchr (ifname, '.'); - file = strrchr (ifname, '/'); -@@ -7292,7 +7292,7 @@ void CLASS parse_external_jpeg() - *jext = '0'; - } - if (strcmp (jname, ifname)) { --/*RT*/ if ((ifp = fopen (jname))) { -+/*RT*/ if ((ifp = rtengine::fopen (jname))) { - // if ((ifp = fopen (jname, "rb"))) { - if (verbose) - fprintf (stderr,_("Reading metadata from %s ...\n"), jname); -diff --git a/rtengine/dcraw.h b/rtengine/dcraw.h -index 89c1fcaff..f25157088 100644 ---- a/rtengine/dcraw.h -+++ b/rtengine/dcraw.h -@@ -73,7 +73,7 @@ public: - - protected: - int exif_base, ciff_base, ciff_len; -- IMFILE *ifp; -+ rtengine::IMFILE *ifp; - FILE *ofp; - short order; - const char *ifname; -@@ -125,7 +125,7 @@ protected: - int cur_buf_size; // buffer size - uchar *cur_buf; // currently read block - int fillbytes; // Counter to add extra byte for block size N*16 -- IMFILE *input; -+ rtengine::IMFILE *input; - struct int_pair grad_even[3][41]; // tables of gradients - struct int_pair grad_odd[3][41]; - ushort *linealloc; -@@ -278,7 +278,7 @@ void parse_redcine(); - class getbithuff_t - { - public: -- getbithuff_t(DCraw *p,IMFILE *&i, unsigned &z):parent(p),bitbuf(0),vbits(0),reset(0),ifp(i),zero_after_ff(z){} -+ getbithuff_t(DCraw *p,rtengine::IMFILE *&i, unsigned &z):parent(p),bitbuf(0),vbits(0),reset(0),ifp(i),zero_after_ff(z){} - unsigned operator()(int nbits, ushort *huff); - - private: -@@ -288,7 +288,7 @@ private: - DCraw *parent; - unsigned bitbuf; - int vbits, reset; -- IMFILE *&ifp; -+ rtengine::IMFILE *&ifp; - unsigned &zero_after_ff; - }; - getbithuff_t getbithuff; -@@ -296,7 +296,7 @@ getbithuff_t getbithuff; - class nikbithuff_t - { - public: -- explicit nikbithuff_t(IMFILE *&i):bitbuf(0),errors(0),vbits(0),ifp(i){} -+ explicit nikbithuff_t(rtengine::IMFILE *&i):bitbuf(0),errors(0),vbits(0),ifp(i){} - void operator()() {bitbuf = vbits = 0;}; - unsigned operator()(int nbits, ushort *huff); - unsigned errorCount() { return errors; } -@@ -309,7 +309,7 @@ private: - } - unsigned bitbuf, errors; - int vbits; -- IMFILE *&ifp; -+ rtengine::IMFILE *&ifp; - }; - nikbithuff_t nikbithuff; - -@@ -378,7 +378,7 @@ void parse_qt (int end); - // ph1_bithuff(int nbits, ushort *huff); - class ph1_bithuff_t { - public: -- ph1_bithuff_t(DCraw *p, IMFILE *i, short &o):order(o),ifp(i),bitbuf(0),vbits(0){} -+ ph1_bithuff_t(DCraw *p, rtengine::IMFILE *i, short &o):order(o),ifp(i),bitbuf(0),vbits(0){} - unsigned operator()(int nbits, ushort *huff); - unsigned operator()(int nbits); - unsigned operator()(); -@@ -412,7 +412,7 @@ private: - } - - short ℴ -- IMFILE* const ifp; -+ rtengine::IMFILE* const ifp; - UINT64 bitbuf; - int vbits; - }; -@@ -430,11 +430,11 @@ void nokia_load_raw(); - - class pana_bits_t{ - public: -- pana_bits_t(IMFILE *i, unsigned &u, unsigned enc): -+ pana_bits_t(rtengine::IMFILE *i, unsigned &u, unsigned enc): - ifp(i), load_flags(u), vbits(0), encoding(enc) {} - unsigned operator()(int nbits, unsigned *bytes=nullptr); - private: -- IMFILE *ifp; -+ rtengine::IMFILE *ifp; - unsigned &load_flags; - uchar buf[0x4000]; - int vbits; -diff --git a/rtengine/dfmanager.cc b/rtengine/dfmanager.cc -index 1fb1d2e1b..951df2248 100644 ---- a/rtengine/dfmanager.cc -+++ b/rtengine/dfmanager.cc -@@ -540,7 +540,7 @@ std::vector *DFManager::getHotPixels ( const std::string &mak, const std - - int DFManager::scanBadPixelsFile( Glib::ustring filename ) - { -- FILE *file = fopen( filename.c_str(), "r" ); -+ FILE *file = ::fopen( filename.c_str(), "r" ); - - if( !file ) { - return false; -diff --git a/rtengine/myfile.cc b/rtengine/myfile.cc -index 842766dcf..2321d18bb 100644 ---- a/rtengine/myfile.cc -+++ b/rtengine/myfile.cc -@@ -70,7 +70,7 @@ int munmap(void *start, size_t length) - - #ifdef MYFILE_MMAP - --IMFILE* fopen (const char* fname) -+rtengine::IMFILE* rtengine::fopen (const char* fname) - { - int fd; - -@@ -123,13 +123,13 @@ IMFILE* fopen (const char* fname) - return mf; - } - --IMFILE* gfopen (const char* fname) -+rtengine::IMFILE* rtengine::gfopen (const char* fname) - { - return fopen(fname); - } - #else - --IMFILE* fopen (const char* fname) -+rtengine::IMFILE* rtengine::fopen (const char* fname) - { - - FILE* f = g_fopen (fname, "rb"); -@@ -152,7 +152,7 @@ IMFILE* fopen (const char* fname) - return mf; - } - --IMFILE* gfopen (const char* fname) -+rtengine::IMFILE* rtengine::gfopen (const char* fname) - { - - FILE* f = g_fopen (fname, "rb"); -@@ -176,7 +176,7 @@ IMFILE* gfopen (const char* fname) - } - #endif //MYFILE_MMAP - --IMFILE* fopen (unsigned* buf, int size) -+rtengine::IMFILE* rtengine::fopen (unsigned* buf, int size) - { - - IMFILE* mf = new IMFILE; -@@ -190,7 +190,7 @@ IMFILE* fopen (unsigned* buf, int size) - return mf; - } - --void fclose (IMFILE* f) -+void rtengine::fclose (IMFILE* f) - { - #ifdef MYFILE_MMAP - -@@ -207,7 +207,7 @@ void fclose (IMFILE* f) - delete f; - } - --int fscanf (IMFILE* f, const char* s ...) -+int rtengine::fscanf (IMFILE* f, const char* s ...) - { - // fscanf not easily wrapped since we have no terminating \0 at end - // of file data and vsscanf() won't tell us how many characters that -@@ -253,7 +253,7 @@ int fscanf (IMFILE* f, const char* s ...) - } - - --char* fgets (char* s, int n, IMFILE* f) -+char* rtengine::fgets (char* s, int n, IMFILE* f) - { - - if (f->pos >= f->size) { -@@ -270,7 +270,7 @@ char* fgets (char* s, int n, IMFILE* f) - return s; - } - --void imfile_set_plistener(IMFILE *f, rtengine::ProgressListener *plistener, double progress_range) -+void rtengine::imfile_set_plistener(IMFILE *f, rtengine::ProgressListener *plistener, double progress_range) - { - f->plistener = plistener; - f->progress_range = progress_range; -@@ -278,7 +278,7 @@ void imfile_set_plistener(IMFILE *f, rtengine::ProgressListener *plistener, doub - f->progress_current = 0; - } - --void imfile_update_progress(IMFILE *f) -+void rtengine::imfile_update_progress(IMFILE *f) - { - if (!f->plistener || f->progress_current < f->progress_next) { - return; -diff --git a/rtengine/myfile.h b/rtengine/myfile.h -index 423edea9a..c655696e6 100644 ---- a/rtengine/myfile.h -+++ b/rtengine/myfile.h -@@ -30,8 +30,6 @@ namespace rtengine - - class ProgressListener; - --} -- - struct IMFILE { - int fd; - ssize_t pos; -@@ -141,3 +139,5 @@ inline unsigned char* fdata(int offset, IMFILE* f) - - int fscanf (IMFILE* f, const char* s ...); - char* fgets (char* s, int n, IMFILE* f); -+ -+} -diff --git a/rtengine/rtthumbnail.cc b/rtengine/rtthumbnail.cc -index 9da601e2a..097b9e711 100644 ---- a/rtengine/rtthumbnail.cc -+++ b/rtengine/rtthumbnail.cc -@@ -1922,7 +1922,7 @@ bool Thumbnail::writeImage (const Glib::ustring& fname) - - Glib::ustring fullFName = fname + ".rtti"; - -- FILE* f = g_fopen (fullFName.c_str (), "wb"); -+ FILE* f = ::g_fopen (fullFName.c_str (), "wb"); - - if (!f) { - return false; -@@ -1965,7 +1965,7 @@ bool Thumbnail::readImage (const Glib::ustring& fname) - return false; - } - -- FILE* f = g_fopen(fullFName.c_str (), "rb"); -+ FILE* f = ::g_fopen(fullFName.c_str (), "rb"); - - if (!f) { - return false; -@@ -2191,7 +2191,7 @@ bool Thumbnail::writeData (const Glib::ustring& fname) - return false; - } - -- FILE *f = g_fopen (fname.c_str (), "wt"); -+ FILE *f = ::g_fopen (fname.c_str (), "wt"); - - if (!f) { - if (settings->verbose) { -@@ -2214,7 +2214,7 @@ bool Thumbnail::readEmbProfile (const Glib::ustring& fname) - embProfile = nullptr; - embProfileLength = 0; - -- FILE* f = g_fopen (fname.c_str (), "rb"); -+ FILE* f = ::g_fopen (fname.c_str (), "rb"); - - if (f) { - if (!fseek (f, 0, SEEK_END)) { -@@ -2242,7 +2242,7 @@ bool Thumbnail::writeEmbProfile (const Glib::ustring& fname) - { - - if (embProfileData) { -- FILE* f = g_fopen (fname.c_str (), "wb"); -+ FILE* f = ::g_fopen (fname.c_str (), "wb"); - - if (f) { - fwrite (embProfileData, 1, embProfileLength, f); -@@ -2257,7 +2257,7 @@ bool Thumbnail::writeEmbProfile (const Glib::ustring& fname) - bool Thumbnail::readAEHistogram (const Glib::ustring& fname) - { - -- FILE* f = g_fopen(fname.c_str(), "rb"); -+ FILE* f = ::g_fopen(fname.c_str(), "rb"); - - if (!f) { - aeHistogram.reset(); -@@ -2280,7 +2280,7 @@ bool Thumbnail::writeAEHistogram (const Glib::ustring& fname) - { - - if (aeHistogram) { -- FILE* f = g_fopen (fname.c_str (), "wb"); -+ FILE* f = ::g_fopen (fname.c_str (), "wb"); - - if (f) { - fwrite (&aeHistogram[0], 1, (65536 >> aeHistCompression)*sizeof (aeHistogram[0]), f); \ No newline at end of file diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index 5661471..7a7d07f 100755 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -1,5 +1,5 @@ name: gimp -version: 2.99.18 +version: 2.99.19-dev summary: GNU Image Manipulation Program description: | Whether you are a graphic designer, photographer, illustrator, or scientist, @@ -9,48 +9,22 @@ description: | grade: stable confinement: strict -base: core22 +base: core24 compression: lzo -architectures: - - build-on: amd64 - - build-on: arm64 +platforms: + arm64: + amd64: layout: /etc/gimp: bind: $SNAP/etc/gimp - /etc/ld.so.cache: - bind-file: $SNAP_DATA/etc/ld.so.cache - /usr/bin/gjs: - symlink: $SNAP/gnome-platform/usr/bin/gjs /usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/babl-0.1: bind: $SNAP/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/babl-0.1 /usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/gegl-0.4: bind: $SNAP/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/gegl-0.4 - /usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/evince/4/backends: - bind: $SNAP/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/evince/4/backends - /usr/lib/gvfs: - bind: $SNAP/usr/lib/gvfs - /usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/gvfs: - bind: $SNAP/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/gvfs - /usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/lua: - symlink: $SNAP/usr/lib/$CRAFT_ARCH_TRIPLET/lua - /usr/libexec: - bind: $SNAP/usr/libexec - /usr/share/color: - bind: $SNAP/usr/share/color - /usr/share/ghostscript: - bind: $SNAP/usr/share/ghostscript - /usr/share/gvfs: - bind: $SNAP/usr/share/gvfs - /usr/share/lensfun: - bind: $SNAP/usr/share/lensfun /usr/share/locale: bind: $SNAP/usr/share/locale - /usr/share/lua: - bind: $SNAP/usr/share/lua - /usr/share/mypaint-data: - bind: $SNAP/usr/share/mypaint-data slots: dbus-gimp: @@ -59,158 +33,58 @@ slots: name: org.gimp.GIMP.UI environment: - GTK_USE_PORTAL: "1" - GI_TYPELIB_PATH: $SNAP/gnome-platform/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/gjs/girepository-1.0 - GIMP2_LOCALEDIR: $SNAP/usr/share/locale + GI_TYPELIB_PATH: $SNAP/gnome-platform/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/gjs/girepository-1.0:$GI_TYPELIB_PATH LD_LIBRARY_PATH: $SNAP/lib:$SNAP/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 - PYTHONHOME: $SNAP/gnome-platform/usr - PYTHONPATH: $SNAP/gnome-platform/usr/lib/python3.10 + # Ensure the gmic plugin can correctly locate the QT plugins + QT_PLUGIN_PATH: $SNAP/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/qt6/plugins apps: gimp: command: usr/bin/gimp-2.99 extensions: [gnome] desktop: usr/share/applications/gimp.desktop + common-id: org.gimp.GIMP slots: - dbus-gimp plugs: - cups-control - browser-support - - desktop - - desktop-legacy - - gsettings - home - network - - opengl - removable-media - unity7 - - wayland - - x11 parts: - gexiv: - plugin: meson - source: https://download.gnome.org/sources/gexiv2/0.14/gexiv2-0.14.0.tar.xz - source-checksum: sha256/e58279a6ff20b6f64fa499615da5e9b57cf65ba7850b72fafdf17221a9d6d69e - meson-parameters: - - --prefix=/usr - - --buildtype=release - - -Db_lto=true - - -Dintrospection=false - - -Dpython3=false - - -Dvapi=false - build-environment: - - CFLAGS: -Ofast -g -pipe - - CXXFLAGS: -Ofast -g -pipe - build-packages: - - libexiv2-dev - - libcodec2-dev - stage-packages: - - libexiv2-27 - - libav: - after: - - libaom - plugin: autotools - source: https://ffmpeg.org/releases/ffmpeg-5.1.tar.xz - autotools-configure-parameters: - - --prefix=/usr - - --disable-programs - - --disable-doc - - --disable-alsa - - --enable-gpl - - --enable-shared - - --enable-libaom - - --enable-libfontconfig - - --enable-libfreetype - - --enable-librsvg - - --enable-libv4l2 - - --enable-libvpx - - --enable-libwebp - - --enable-libx264 - - --enable-libx265 - - --enable-libxvid - build-environment: - - CFLAGS: -Ofast -g -pipe - - CXXFLAGS: -Ofast -g -pipe - - PATH: /usr/bin:$PATH - build-packages: - - to amd64: - - libmfx-dev - - libbz2-dev - - libsdl2-dev - - libtheora-dev - - libv4l-dev - - libva-drm2 - - libva-x11-2 - - libva-dev - - libvdpau-dev - - libvpx-dev - - libx264-dev - - libx265-dev - - libxvidcore-dev - - nasm - stage-packages: - - to amd64: - - libmfx1 - - libbz2-1.0 - - libsdl2-2.0-0 - - libtheora0 - - libv4l-0 - - libva2 - - libvdpau1 - - libvpx7 - - libx264-163 - - libx265-199 - - libxvidcore4 - - # https://download.gimp.org/pub/babl babl: plugin: meson source: https://gitlab.gnome.org/GNOME/babl.git - # source: https://download.gimp.org/pub/babl/0.1/babl-0.1.92.tar.xz - # source-checksum: sha256/f667735028944b6375ad18f160a64ceb93f5c7dccaa9d8751de359777488a2c1 + # TODO: replace this with a tag on next release + source-commit: c5f97c86224a473cc3fea231f17adef84580f2cc meson-parameters: - --prefix=/usr - --buildtype=release - - -Db_lto=true - -Dwith-docs=false - build-environment: - - CFLAGS: -Ofast -g -pipe - - CXXFLAGS: -Ofast -g -pipe - override-pull: | - craftctl default - sed -i 's/not stable, Description:/not stable, description:/' meson.build build-packages: - - git - - meson - w3m - # https://download.gimp.org/pub/gegl gegl: after: - babl - - gexiv - - ghostscript - - libav source: https://gitlab.gnome.org/GNOME/gegl.git - # source: https://download.gimp.org/pub/gegl/0.4/gegl-0.4.36.tar.xz - # source-checksum: sha256/6fd58a0cdcc7702258adaeffb573a389228ae8f0eff47578efda2309b61b2ca6 + # TODO: replace this with a tag on next release + source-commit: d540df2ad27c06891271d96247f915073b042a3e plugin: meson meson-parameters: - --prefix=/usr - --buildtype=release - -Ddocs=false - -Dworkshop=true - - -Db_lto=true - build-environment: - - CFLAGS: -Ofast -g -pipe - - CXXFLAGS: -Ofast -g -pipe - - GIO_MODULE_DIR: /snap/gnome-42-2204-sdk/current/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/gio/modules build-packages: + - ffmpeg - libexiv2-dev - libfftw3-dev + - libgexiv2-2 - libglu1-mesa-dev - liblensfun-dev - libluajit-5.1-dev @@ -222,254 +96,46 @@ parts: - libsuitesparse-dev - libv4l-dev - libwebp-dev - - meson stage-packages: - - libamd2 - - libbtf1 - - libcamd2 - - libccolamd2 - - libcholmod3 - - libcolamd2 - - libcxsparse3 + - ffmpeg + - libamd3 + - libbtf2 + - libcamd3 + - libccolamd3 + - libcholmod5 + - libcolamd3 + - libcxsparse4 - libexiv2-27 - - libgraphblas6 - - libklu1 + - libgexiv2-2 + - libgraphblas7 + - libklu2 - liblapack3 - - libldl2 + - libldl3 - liblensfun1 - libluajit-5.1-2 - libmaxflow0 - - libopenexr25 - - libraw20 - - librbio2 + - libopenexr-3-1-30 + - libraw-bin + - librbio4 - libsdl2-2.0-0 - libspiro1 - - libspqr2 - - libumfpack5 + - libspqr4 + - libumfpack6 - libv4l-0 - # https://aomedia.googlesource.com - libaom: - source: https://aomedia.googlesource.com/aom - source-type: git - source-tag: v3.4.0 - plugin: cmake - build-environment: - - CFLAGS: -Ofast -g -pipe -flto - - CXXFLAGS: -Ofast -g -pipe -flto - - LDFLAGS: -flto - - PATH: /usr/bin:$PATH - cmake-parameters: - - -DCMAKE_BUILD_TYPE=Release - - -DCMAKE_INSTALL_PREFIX=/usr - - -DENABLE_DOCS=OFF - - -DENABLE_EXAMPLES=OFF - - -DENABLE_TESTDATA=OFF - - -DENABLE_TESTS=OFF - - -DCONFIG_PIC=1 - - -DCONFIG_AV1_ENCODER=1 - - -DCONFIG_AV1_DECODER=1 - - -DCONFIG_MULTITHREAD=1 - build-packages: - - yasm - - # https://github.com/strukturag/libheif/releases - libheif: - after: [libaom] - source: https://github.com/strukturag/libheif/releases/download/v1.12.0/libheif-1.12.0.tar.gz - plugin: autotools - build-environment: - - CFLAGS: -Ofast -g -pipe -flto - - CXXFLAGS: -Ofast -g -pipe -flto - - LDFLAGS: -flto - - PATH: /usr/bin:$PATH - autotools-configure-parameters: - - --prefix=/usr - - --disable-go - - --disable-examples - build-packages: - - libde265-dev - - libx265-dev - stage-packages: - - libde265-0 - - libx265-199 - - # https://github.com/mypaint/libmypaint/releases - libmypaint: - plugin: autotools - source: https://github.com/mypaint/libmypaint/releases/download/v1.6.1/libmypaint-1.6.1.tar.xz - source-checksum: sha256/741754f293f6b7668f941506da07cd7725629a793108bb31633fb6c3eae5315f - build-packages: - - intltool - - libjson-c-dev - autotools-configure-parameters: - - --prefix=/usr - - --disable-static - build-environment: - - CFLAGS: -Ofast -g -pipe -flto - - CXXFLAGS: -Ofast -g -pipe -flto - - LDFLAGS: -flto - stage: - - -**/*.la - prime: - - -usr/include - - -usr/lib/pkgconfig - - # https://github.com/mypaint/mypaint-brushes/releases - mypaint-brushes: - after: - - libmypaint - source: https://github.com/mypaint/mypaint-brushes/releases/download/v1.3.1/mypaint-brushes-1.3.1.tar.xz - source-checksum: sha256/fef66ffc241b7c5cd29e9c518e933c739618cb51c4ed4d745bf648a1afc3fe70 - plugin: autotools - autotools-configure-parameters: - - --prefix=/usr - build-environment: - - CFLAGS: -Ofast -g -pipe -flto - - CXXFLAGS: -Ofast -g -pipe -flto - - LDFLAGS: -flto - build-packages: - - automake - - # https://github.com/hughsie/appstream-glib - appstream-glib: - plugin: meson - source: https://github.com/hughsie/appstream-glib.git - build-environment: - - CFLAGS: -Ofast -g -pipe - - CXXFLAGS: -Ofast -g -pipe - meson-parameters: - - --prefix=/usr - - --buildtype=release - - -Db_lto=true - - -Dbuilder=false - - -Drpm=false - - -Dman=false - build-packages: - - gperf - - libarchive-dev - - libstemmer-dev - - libyaml-dev - stage-packages: - - libarchive13 - - libstemmer0d - - libyaml-0-2 - - # https://gitlab.gnome.org/GNOME/evince - evince: - source: https://gitlab.gnome.org/GNOME/evince.git - source-type: git - source-branch: "gnome-42" - plugin: meson - build-environment: - - CFLAGS: -Ofast -g -pipe -flto - - CXXFLAGS: -Ofast -g -pipe -flto - - LDFLAGS: -flto - meson-parameters: - - --prefix=/snap/$SNAPCRAFT_PROJECT_NAME/current/usr - - --buildtype=release - - -Dnautilus=false - - -Dgtk_doc=false - - -Dintrospection=false - organize: - snap/$SNAPCRAFT_PROJECT_NAME/current/usr: usr - build-packages: - - autotools-dev - - dh-apparmor - - intltool - - libarchive-dev - - libdjvulibre-dev - - libkpathsea-dev - - libsm-dev - stage-packages: - - libarchive13 - - libdjvulibre21 - - libkpathsea6 - - libnspr4 - - # https://github.com/ArtifexSoftware/ghostpdl-downloads - ghostscript: - plugin: autotools - source: https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs9561/ghostscript-9.56.1.tar.xz - build-environment: - - CFLAGS: -Ofast -g -pipe -flto - - CXXFLAGS: -Ofast -g -pipe -flto - - LDFLAGS: -flto - autotools-configure-parameters: - - --prefix=/usr - - --disable-compile-inits - - --enable-dynamic - override-build: | - ./configure \ - --prefix=/usr \ - --disable-compile-inits \ - --enable-dynamic - make -j$CRAFT_PARALLEL_BUILD_COUNT - make -j$CRAFT_PARALLEL_BUILD_COUNT so - make DESTDIR=$CRAFT_PART_INSTALL install - make DESTDIR=$CRAFT_PART_INSTALL soinstall - - # https://www.rawtherapee.com/downloads/ - rawtherapee: - source: https://rawtherapee.com/shared/source/rawtherapee-5.8.tar.xz - plugin: cmake - override-pull: | - craftctl default - patch -Np1 -i $CRAFT_PROJECT_DIR/snap/local/patches/rawtherapee.patch - cmake-parameters: - - -DCMAKE_BUILD_TYPE=Release - - -DCMAKE_INSTALL_PREFIX=/usr - - -DWITH_LTO=ON - - -DCACHE_NAME_SUFFIX="" - build-environment: - - CFLAGS: -O3 -g -pipe - - CXXFLAGS: -O3 -g -pipe - build-packages: - - libiptcdata0-dev - - liblensfun-dev - stage-packages: - - libiptcdata0 - - liblensfun1 - - # https://github.com/caolanm/libwmf - libwmf: - after: [ghostscript] - plugin: autotools - source: https://github.com/caolanm/libwmf/archive/refs/tags/v0.2.12.tar.gz - override-pull: | - craftctl default - patch -Np1 -i $CRAFT_PROJECT_DIR/snap/local/patches/libwmf/no-trio.patch - patch -Np1 -i $CRAFT_PROJECT_DIR/snap/local/patches/libwmf/freetype-pkg-config.patch - autoreconf --force --install --include=patches - autotools-configure-parameters: - - --prefix=/usr - - --with-gsfontmap=/usr/share/ghostscript/9.56.1/Resource/Init/Fontmap.GS - build-environment: - - CFLAGS: -Ofast -g -pipe -flto - - CXXFLAGS: -Ofast -g -pipe -flto - - LDFLAGS: -flto - override-build: | - craftctl default - sed -i "s|/usr/lib/libwmflite.la|$CRAFT_STAGE/usr/lib/libwmflite.la|" $CRAFT_PART_INSTALL/usr/lib/libwmf.la - stage-packages: - - libexpat1 - - # https://download.gimp.org/pub/gimp/v2.10/ gimp: after: - - appstream-glib - babl - - evince - gegl - - gexiv - - ghostscript - - libheif - - libmypaint - - libwmf - - mypaint-brushes - - rawtherapee plugin: meson - source: https://download.gimp.org/gimp/v2.99/gimp-${SNAPCRAFT_PROJECT_VERSION}.tar.xz + source: https://gitlab.gnome.org/GNOME/gimp.git + source-commit: a92388c433da868c5d84b14362f7a8151d287ad7 + override-pull: | + # TODO: remove `craftctl default` and use this when 2.99.19 actually releases + # tag="$(echo "GIMP_${SNAPCRAFT_PROJECT_VERSION}" | tr "." "_")" + # git clone -b "$tag" https://gitlab.gnome.org/GNOME/gimp.git + craftctl default + sed -i 's|^Icon=.*|Icon=/usr/share/icons/hicolor/256x256/apps/gimp.png|' desktop/gimp.desktop.in.in meson-parameters: - --prefix=/usr - --buildtype=release @@ -478,53 +144,39 @@ parts: - -Dbuild-id=org.gimp.GIMP.snapcraft.preview - -Dbug-report-url=https://github.com/snapcrafters/gimp/issues/ - -Dcheck-update=no - - -Dpython=enabled - -Denable-default-bin=enabled - -Drelocatable-bundle=yes - -Dlibunwind=true build-environment: - - CFLAGS: -Ofast -pipe -flto - - CXXFLAGS: -Ofast -pipe -flto - - LDFLAGS: -flto - BABL_PATH: $CRAFT_STAGE/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/babl-0.1 - GEGL_PATH: $CRAFT_STAGE/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/gegl-0.4 - # the LIBRARY_PATH is to fix ld unable to find libwmf - - LIBRARY_PATH: $CRAFT_STAGE/usr/lib - # the LD_LIBRARY_PATH is to fix configure failing to test for gegl matting-levin support - - LD_LIBRARY_PATH: $LD_LIBRARY_PATH:$CRAFT_STAGE/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR - - GIO_MODULE_DIR: /snap/gnome-42-2204-sdk/current/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/gio/modules - - PYTHON: /usr/bin/python3.10 - override-pull: | - craftctl default - sed -i 's|^Icon=.*|Icon=/usr/share/icons/hicolor/256x256/apps/gimp.png|' desktop/gimp.desktop.in.in - # TODO: Drop this on next release. - # See: https://gitlab.gnome.org/GNOME/gimp/-/commit/11892f1d83ffc465346dab7e2e8c6e790f555a64 - patch -Np1 -i $CRAFT_PROJECT_DIR/snap/local/patches/gimpchoice-fix.patch - override-build: | - craftctl default - sed -i -E 's|^# \(mypaint-brush-path .*$|(mypaint-brush-path "/usr/share/mypaint-data/1.0/brushes:~/.mypaint/brushes")|' $CRAFT_PART_INSTALL/etc/gimp/2.99/gimprc + - GI_TYPELIB_PATH: $CRAFT_STAGE/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/girepository-1.0:$GI_TYPELIB_PATH + - LD_LIBRARY_PATH: $LD_LIBRARY_PATH:$CRAFT_STAGE/usr/lib:$CRAFT_STAGE/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR build-packages: - automake - intltool - iso-codes - libaa1-dev + - libappstream-glib-dev - libart-2.0-dev - libbz2-dev + - libcairo-gobject2 - libexif-dev - libexpat1-dev - libfftw3-dev + - libgexiv2-2 - libgpm-dev - libice-dev - - libilmbase-dev - - libisocodes-dev - libluajit-5.1-dev - liblzma-dev - libmng-dev + - libmypaint-dev - libopenexr-dev - libslang2-dev - libsm-dev - libunwind-dev - libwebp-dev + - libwmf-dev - libxmu-dev - libxpm-dev - luajit @@ -532,36 +184,45 @@ parts: - xdg-utils - xsltproc stage-packages: + - evince + - ghostscript - iso-codes - libaa1 + - libappstream-glib8 - libart-2.0-2 - libbz2-1.0 - libexif12 - - libfftw3-3 + - libfftw3-bin + - libgexiv2-dev - libgpm2 - - libilmbase25 + - libheif1 - libluajit-5.1-2 - liblzma5 - libmng2 - - libopenexr25 + - libmypaint-1.5-1 + - libmypaint-common + - libopenexr-3-1-30 - libslang2 - libsndio7.0 - libunwind8 - libwebp7 - libwebpdemux2 - libwebpmux3 + - libwmf-0.2-7 - libxmu6 - libxpm4 - libxv1 - lua-lgi - luajit + - mypaint-brushes + - mypaint-data - poppler-data gmic: after: [gimp] plugin: nil override-pull: | - VERSION=v.3.3.4 + VERSION=v.3.4.2 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,38 +232,9 @@ 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 - - PKG_CONFIG_PATH: $CRAFT_STAGE/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/pkgconfig:${PKG_CONFIG_PATH:+:$PKG_CONFIG_PATH} - QT_SELECT: qt6 - - CFLAGS: -Ofast -g -pipe -flto - - CXXFLAGS: -Ofast -g -pipe -flto - - LDFLAGS: -flto build-packages: - - curl - - g++ - - gcc - - libcurl4-openssl-dev - - libffi7 - - libfftw3-dev - - libgraphicsmagick++1-dev - - libgraphicsmagick1-dev - - libjpeg-dev - - libopencv-core-dev - - libopencv-highgui-dev - - libopencv-videoio-dev - - libopenexr-dev - - libpng-dev - - libtiff5-dev - - libxkbfile-dev - - libxres-dev - - make - pkg-config - qmake6-bin - qt6-base-dev @@ -611,51 +243,29 @@ parts: - qt6-wayland-dev - qtchooser - wget - - zlib1g-dev - override-build: | - qtchooser -install qt6 $(which qmake6) || true - make -C gmic/src CImg.h gmic_stdlib_community.h - cd gmic-qt - qmake HOST=gimp3 - make -j$SNAPCRAFT_PARALLEL_BUILD_COUNT - make DESTDIR=$SNAPCRAFT_PART_INSTALL install stage-packages: - libcurl4 - libdouble-conversion3 - - libfftw3-3 - - libffi7 + - libfftw3-bin + - libffi8 - libgraphicsmagick-q16-3 - libgraphicsmagick++-q16-12 - libjpeg-turbo8 - - libopencv-core4.5d - - libopencv-highgui4.5d - - libopencv-videoio4.5d - - libopenexr25 + - libopencv-core406t64 + - libopencv-highgui406t64 + - libopencv-video406t64 + - libopenexr-3-1-30 - libpng16-16 - - libqt6core6 - - libqt6gui6 - - libqt6network6 - - libqt6widgets6 - - libtiff5 - - libxkbfile1 - - libxres1 + - libqt6core6t64 + - libqt6gui6t64 + - libqt6network6t64 + - libqt6widgets6t64 - qt6-wayland - - zlib1g - - cleanup: - after: [gimp, gmic] - plugin: nil - build-snaps: - - core22 - - gnome-42-2204 - - gtk-common-themes - override-prime: | - set -eux - for snap in "gnome-42-2204" "gtk-common-themes"; do # List all content-snaps you're using here - cd "/snap/$snap/current" && find . -type f,l -not -path "./usr/share/xml/iso-codes/*" -exec rm -f "$CRAFT_PRIME/{}" \; - done - for CRUFT in bug lintian man; do - rm -rf $CRAFT_PRIME/usr/share/$CRUFT - done - find $CRAFT_PRIME/usr/share/doc/ -type f -not -name 'copyright' -delete - find $CRAFT_PRIME/usr/share -type d -empty -delete + override-build: | + qtchooser -install qt6 "$(which qmake6)" || true + make -C gmic/src CImg.h gmic_stdlib_community.h + cd gmic-qt + qmake HOST=gimp3 + make + install -Dm 0755 $CRAFT_PART_BUILD/gmic-qt/gmic_gimp_qt \ + $CRAFT_PART_INSTALL/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/gimp/3.0/plug-ins/gmic_gimp_qt/gmic_gimp_qt