From 6e5829cb7b3d951cb9ed9e0c11f53024a3a50b00 Mon Sep 17 00:00:00 2001 From: Jon Seager Date: Fri, 6 Sep 2024 17:22:54 +0100 Subject: [PATCH] chore: bump to `core24` This commit bumps the snap to core24, and temporarily disables gmic while I iron out some build issues with it. --- snap/snapcraft.yaml | 419 ++++++++++++-------------------------------- 1 file changed, 111 insertions(+), 308 deletions(-) diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index 59f5b54..3920711 100755 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -9,44 +9,20 @@ 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/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/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: @@ -55,11 +31,8 @@ slots: name: org.gimp.GIMP.UI environment: - 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 apps: gimp: @@ -78,88 +51,9 @@ apps: - unity7 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 meson-parameters: - --prefix=/usr - --buildtype=release @@ -176,15 +70,10 @@ parts: - meson - w3m - # https://download.gimp.org/pub/gegl gegl: after: - babl - - gexiv - - 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 plugin: meson meson-parameters: - --prefix=/usr @@ -195,10 +84,12 @@ parts: 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 + - GIO_MODULE_DIR: /snap/gnome-46-2404-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 @@ -212,122 +103,36 @@ parts: - 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://download.gimp.org/pub/gimp/v2.10/ gimp: after: - babl - gegl - - gexiv - - libheif - - libmypaint - - mypaint-brushes plugin: meson source: https://gitlab.gnome.org/GNOME/gimp.git override-pull: | @@ -353,13 +158,11 @@ parts: - 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 - - GI_TYPELIB_PATH: $CRAFT_STAGE/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/girepository-1.0 - # the LIBRARY_PATH is to fix ld unable to find libwmf - - LIBRARY_PATH: $CRAFT_STAGE/usr/lib + - GI_TYPELIB_PATH: $CRAFT_STAGE/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/girepository-1.0:$GI_TYPELIB_PATH # 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_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 + - GIO_MODULE_DIR: /snap/gnome-46-2404-sdk/current/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/gio/modules + # - PYTHON: /usr/bin/python3.12 build-packages: - automake - intltool @@ -368,21 +171,23 @@ parts: - 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 @@ -398,13 +203,16 @@ parts: - 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 @@ -417,84 +225,79 @@ parts: - libxv1 - lua-lgi - luajit + - mypaint-brushes + - mypaint-data - poppler-data - gmic: - after: [gimp] - plugin: nil - override-pull: | - 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 + # gmic: + # after: [gimp] + # plugin: nil + # override-pull: | + # 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 - # Force this extra online fetch to happen during the pull phase. - # This build takes a long time on Launchpad, and if we wait until - # 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" - 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 - - qt6-l10n-tools - - qt6-tools-dev - - 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 - - libgraphicsmagick-q16-3 - - libgraphicsmagick++-q16-12 - - libjpeg-turbo8 - - libopencv-core4.5d - - libopencv-highgui4.5d - - libopencv-videoio4.5d - - libopenexr25 - - libpng16-16 - - libqt6core6 - - libqt6gui6 - - libqt6network6 - - libqt6widgets6 - - libtiff5 - - libxkbfile1 - - libxres1 - - qt6-wayland - - zlib1g + # # Force this extra online fetch to happen during the pull phase. + # # This build takes a long time on Launchpad, and if we wait until + # # 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" + # 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 + # - libffi-dev + # - libffi8 + # - 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 + # - qt6-l10n-tools + # - qt6-tools-dev + # - 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-bin + # - libffi8 + # - libgraphicsmagick-q16-3 + # - libgraphicsmagick++-q16-12 + # - libjpeg-turbo8 + # - libopencv-core406t64 + # - libopencv-highgui406t64 + # - libopencv-video406t64 + # - libopenexr-3-1-30 + # - libpng16-16 + # - libqt6core6t64