Skip to content
Permalink
master
Switch branches/tags
Go to file
 
 
Cannot retrieve contributors at this time
name: gimp
version: '2.10.30'
summary: GNU Image Manipulation Program
description: |
Whether you are a graphic designer, photographer, illustrator, or scientist,
GIMP provides you with sophisticated tools to get your job done. You can
further enhance your productivity with GIMP thanks to many customization
options and 3rd party plugins.
icon: gimp.png
grade: stable
confinement: strict
base: core18
compression: lzo
architectures:
- build-on: amd64
- build-on: arm64
- build-on: armhf
layout:
/etc/gimp:
bind: $SNAP/etc/gimp
/etc/ld.so.cache:
bind-file: $SNAP_DATA/etc/ld.so.cache
/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/babl-0.1:
bind: $SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/babl-0.1
/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/gegl-0.4:
bind: $SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/gegl-0.4
# /usr/lib/$SNAPCRAFT_ARCH_TRIPLET/darktable:
# bind: $SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/darktable
/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/evince/4/backends:
bind: $SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/evince/4/backends
/usr/lib/gimp:
bind: $SNAP/usr/lib/gimp
/usr/lib/python2.7:
bind: $SNAP/usr/lib/python2.7
/usr/lib/gvfs:
bind: $SNAP/usr/lib/gvfs
/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/gvfs:
bind: $SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/gvfs
/usr/libexec:
bind: $SNAP/usr/libexec
/usr/share/color:
bind: $SNAP/usr/share/color
# /usr/share/darktable:
# bind: $SNAP/usr/share/darktable
/usr/share/ghostscript:
bind: $SNAP/usr/share/ghostscript
/usr/share/gimp:
bind: $SNAP/usr/share/gimp
/usr/share/gvfs:
bind: $SNAP/usr/share/gvfs
/usr/share/iso-codes:
bind: $SNAP/data-dir/gnome-platform/usr/share/iso-codes
/usr/share/lensfun:
bind: $SNAP/usr/share/lensfun
/usr/share/locale:
bind: $SNAP/usr/share/locale
/usr/share/mypaint-data:
bind: $SNAP/usr/share/mypaint-data
/usr/share/xml/iso-codes:
bind: $SNAP/data-dir/gnome-platform/usr/share/xml/iso-codes
plugs:
## DISABLED (1 of 4) because gtk2-common-themes only available on amd64
# gtk-2-engines:
# interface: content
# target: $SNAP/lib/gtk-2.0
# default-provider: gtk2-common-themes
gtk-3-themes:
interface: content
target: $SNAP/data-dir/themes
default-provider: gtk-common-themes:gtk-3-themes
sound-themes:
interface: content
target: $SNAP/data-dir/sounds
default-provider: gtk-common-themes:sound-themes
icon-themes:
interface: content
target: $SNAP/data-dir/icons
default-provider: gtk-common-themes:icon-themes
gnome-3-28-1804:
interface: content
target: $SNAP/data-dir/gnome-platform
default-provider: gnome-3-28-1804:gnome-3-28-1804
# color-profiles:
# interface: system-files
# read:
# - /usr/share/color/icc
slots:
dbus-gimp:
interface: dbus
bus: session
name: org.gimp.GIMP.UI
hooks:
install:
command-chain:
- snap/command-chain/desktop-launch
post-refresh:
command-chain:
- snap/command-chain/desktop-launch
environment:
SNAP_DESKTOP_RUNTIME: $SNAP/data-dir/gnome-platform
GTK_EXE_PREFIX: $SNAP/usr
GTK_USE_PORTAL: '1'
GIMP2_LOCALEDIR: $SNAP/usr/share/locale
LD_LIBRARY_PATH: $SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/lapack:$SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/blas
PYTHONPATH: $SNAP/usr/lib/python2.7:$SNAP/usr/lib/python2.7/site-packages:$PYTHONPATH
FINAL_BINARY: $SNAP/usr/bin/gimp
apps:
gimp:
command: usr/bin/gimp
command-chain: [snap/command-chain/desktop-launch]
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
# darktable:
# command: usr/bin/darktable
# command-chain: [snap/command-chain/desktop-launch]
# desktop: usr/share/applications/darktable.desktop
# common-id: darktable.desktop
# plugs:
# - cups-control
# - desktop
# - desktop-legacy
# - gsettings
# - home
# - network
# - opengl
# - removable-media
# - unity7
# - wayland
# - x11
parts:
fix-pkgconfig-files:
plugin: nil
override-build: |
cat <<'EOF' > $SNAPCRAFT_PART_INSTALL/fix-pkgconfig-files.sh
for pcfile in $SNAPCRAFT_PART_INSTALL/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/pkgconfig/*.pc $SNAPCRAFT_PART_INSTALL/usr/lib/pkgconfig/*.pc $SNAPCRAFT_PART_INSTALL/usr/local/lib/$SNAPCRAFT_ARCH_TRIPLET/pkgconfig/*.pc $SNAPCRAFT_PART_INSTALL/usr/local/lib/pkgconfig/*.pc; do
sed -i -E "s~^((include|lib)dir=)/usr(/local)?~\1\\\${prefix}~g" $pcfile || true
sed -i -E "s~^((exec_)?prefix=)(/usr(/local)?)~\1/\3~" $pcfile || true
done
EOF
chmod +x $SNAPCRAFT_PART_INSTALL/fix-pkgconfig-files.sh
prime:
- -*
fix-symlinks:
# REF: https://unix.stackexchange.com/questions/100918/convert-absolute-symlink-to-relative-symlink-with-simple-linux-command
plugin: nil
override-build: |
cat <<'EOF' > $SNAPCRAFT_PART_INSTALL/fix-symlinks.sh
cd $SNAPCRAFT_PART_INSTALL
find . -lname '/*' |
while read l ; do
echo ln -sf $(echo $(echo $l | sed 's|/[^/]*|/..|g')$(readlink $l) | sed 's/.....//') $l
done |
sh
EOF
chmod +x $SNAPCRAFT_PART_INSTALL/fix-symlinks.sh
prime:
- -*
desktop-launch:
plugin: make
source: desktop-launch
build-packages:
- rsync
- libgail-dev
- libgtk-3-dev
- libgtk2.0-dev
stage-packages:
- appmenu-gtk2-module
- gtk2-engines
- gtk2-engines-pixbuf
- libatk-adaptor
- libcanberra-gtk-module
- libgail-common
- libgtk2.0-0
- libgtk2.0-bin
- unity-gtk2-module
- ibus-gtk
override-build: |
snapcraftctl build
mkdir -p $SNAPCRAFT_PART_INSTALL/lib/gtk-2.0
# Make GTK3 available via GTK_EXE_PREFIX expansion instead of GTK_PATH
ln -sf ../../gnome-platform/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/gtk-3.0 \
$SNAPCRAFT_PART_INSTALL/usr/lib/gtk-3.0
# Make GTK2 available via GTK_EXE_PREFIX expansion instead of GTK_PATH
mv $SNAPCRAFT_PART_INSTALL/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/gtk-2.0 \
$SNAPCRAFT_PART_INSTALL/usr/lib/gtk-2.0
## DISABLED (2 of 4) because gtk2-common-themes only available on amd64
# Make GTK2 engines available from content snap via GTK_EXE_PREFIX expansion
# rm -rf $SNAPCRAFT_PART_INSTALL/usr/lib/gtk-2.0/2.10.0/engines
# ln -sf ../../../../lib/gtk-2.0/2.10.0/engines \
# $SNAPCRAFT_PART_INSTALL/usr/lib/gtk-2.0/2.10.0/
scripts:
source: scripts
plugin: dump
organize:
build-ld-cache: bin/build-ld-cache
check-ld-cache: bin/check-ld-cache
gtk-locales:
plugin: nil
build-packages:
- apt
- dpkg
override-pull: |
set -eux
apt download "language-pack-gnome-*-base"
override-build: |
set -eux
for deb in *.deb; do dpkg-deb -x $deb .; done
find usr/share/locale-langpack -type f -not -name "gtk20*.mo" -and -not -name "gtk30*.mo" -exec rm '{}' \;
mkdir -p $SNAPCRAFT_PART_INSTALL/usr/share
cp -R usr/share/locale-langpack $SNAPCRAFT_PART_INSTALL/usr/share/
# https://download.gimp.org/pub/babl
babl:
after:
- fix-pkgconfig-files
plugin: meson
source: https://download.gimp.org/pub/babl/0.1/babl-0.1.88.tar.xz
source-checksum: sha256/4f0d7f4aaa0bb2e725f349adf7b351a957d9fb26d555d9895a7af816b4167039
meson-parameters:
- --prefix=/usr
- -Dwith-docs=false
build-environment:
- CFLAGS: -O2 -g -pipe
- CXXFLAGS: -O2 -g -pipe
override-build: |
snapcraftctl build
$SNAPCRAFT_STAGE/fix-pkgconfig-files.sh
build-packages:
- git
- gobject-introspection
- libgirepository1.0-dev
- liblcms2-dev
- librsvg2-bin
- librsvg2-dev
- valac
- w3m
stage-packages:
- gobject-introspection
- libgirepository-1.0-1
- liblcms2-2
- librsvg2-2
prime:
- -usr/include
- -usr/lib/pkgconfig
- -**/*.la
# https://download.gimp.org/pub/gegl
gegl:
after:
- babl
- fix-pkgconfig-files
source: https://download.gimp.org/pub/gegl/0.4/gegl-0.4.34.tar.xz
source-checksum: sha256/ef63f0bca5b431c6119addd834ca7fbb507c900c4861c57b3667b6f4ccfcaaaa
plugin: meson
meson-parameters:
- --prefix=/usr
- -Dworkshop=true
- -Dvapigen=disabled # disabled for now - TODO: remove after migration to core20
build-environment:
- CFLAGS: -O2 -g -pipe
- CXXFLAGS: -O2 -g -pipe
- GIO_MODULE_DIR: $SNAPCRAFT_STAGE/usr/lib/gio/modules
- XDG_DATA_DIRS: $SNAPCRAFT_STAGE/usr/share:/usr/local/share:/usr/share
override-build: |
sed -i 's/Version:.*/Version: 1.5.2/' /usr/lib/$SNAPCRAFT_ARCH_TRIPLET/pkgconfig/libjpeg.pc
snapcraftctl build
$SNAPCRAFT_STAGE/fix-pkgconfig-files.sh
build-packages:
- gobject-introspection
- libavcodec-dev
- libavformat-dev
- libavutil-dev
- libcairo2-dev
- libexiv2-dev
- libfftw3-dev
- libgdk-pixbuf2.0-dev
- libgexiv2-dev
- libgirepository1.0-dev
- libglib2.0-dev
- libglu1-mesa-dev
- libgraphviz-dev
- libgs-dev
- libjpeg-dev
- libjson-glib-dev
- liblcms2-dev
- liblensfun-dev
- libluajit-5.1-dev
- libmaxflow-dev
- libopenexr-dev
- libopenjp2-7-dev
- libpango1.0-dev
- libpng-dev
- libpoppler-glib-dev
- libraw-dev
- librsvg2-dev
- libsdl2-dev
- libspiro-dev
- libsuitesparse-dev
- libswscale-dev
- libtiff5-dev
- libv4l-dev
- libwebp-dev
- pkg-config
- python-gi-dev
- valac
stage-packages:
- libamd2
- libavcodec57
- libavformat57
- libavutil55
- libbtf1
- libcairo2
- libcamd2
- libccolamd2
- libcdt5
- libcgraph6
- libcholmod3
- libcolamd2
- libcxsparse3
- libexiv2-14
- libgdk-pixbuf2.0-0
- libgexiv2-2
- libgraphblas1
- libgs9
- libgvc6
- libgvc6-plugins-gtk
- libgvpr2
- libjpeg-turbo8
- libklu1
- liblab-gamut1
- liblapack3
- liblcms2-2
- libldl2
- liblensfun1
- libluajit-5.1-2
- libmaxflow0
- libopenexr22
- libpathplan4
- libpng16-16
- libpoppler-glib8
- libraw16
- librbio2
- librsvg2-2
- libsdl2-2.0-0
- libspiro0
- libspqr2
- libswscale4
- libtiff5
- libumfpack5
- libv4l-0
- libxdot4
- python-gi
- python-gobject-2
stage:
- -**/*.la
- -etc
- -var/lib/ucf
- -usr/sbin/update-mime
- -usr/share/X11
- -usr/share/alsa
- -usr/share/applications
- -usr/share/apport
- -usr/share/apps
- -usr/share/binfmts
- -usr/share/bug
- -usr/share/debhelper
- -usr/share/doc
- -usr/share/doc-base
- -usr/share/fonts
- -usr/share/glib-2.0
- -usr/share/libdrm
- -usr/share/libthai
- -usr/share/lintian
- -usr/share/locale
- -usr/share/man
- -usr/share/menu
- -usr/share/mime
- -usr/share/perl5
- -usr/share/pixmaps
- -usr/share/pkgconfig
- -usr/share/python
- -usr/share/xml
prime:
- -usr/include
- -usr/lib/pkgconfig
- -usr/share/vala
libaom:
after: [gegl]
source: https://aomedia.googlesource.com/aom
source-type: git
plugin: cmake
configflags:
- -DCMAKE_BUILD_TYPE=Release
- -DCMAKE_INSTALL_PREFIX=/usr
- -DENABLE_DOCS=OFF
- -DENABLE_EXAMPLES=OFF
- -DENABLE_TESTDATA=OFF
- -DENABLE_TESTS=OFF
- -DCONFIG_PIC=1
override-build: |
EXTRA=""
if [ $SNAPCRAFT_ARCH_TRIPLET = "arm-linux-gnueabihf" ]; then
EXTRA="-DAOM_NEON_INTRIN_FLAG=-mfpu=neon"
fi
export DESTDIR="$SNAPCRAFT_PART_INSTALL"
cmake $SNAPCRAFT_PART_SRC \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
-DENABLE_DOCS=OFF \
-DENABLE_EXAMPLES=OFF \
-DENABLE_TESTDATA=OFF \
-DENABLE_TESTS=OFF \
-DCONFIG_PIC=1 $EXTRA
cmake --build . -- -j$SNAPCRAFT_PARALLEL_BUILD_COUNT
cmake --build . --target install
build-packages:
- cmake
- 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
configflags:
- --prefix=/usr
- --disable-go
- --disable-examples
build-packages:
- libde265-dev
- libgdk-pixbuf2.0-dev
- libjpeg-dev
- libpng-dev
- libx265-dev
stage-packages:
- libde265-0
- libgdk-pixbuf2.0-0
- libjpeg-turbo8
- libpng16-16
- libx265-146
override-build: |
snapcraftctl build
$SNAPCRAFT_STAGE/fix-pkgconfig-files.sh
# https://github.com/mypaint/libmypaint/releases
libmypaint:
after:
- fix-pkgconfig-files
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:
- gobject-introspection
- intltool
- libgirepository1.0-dev
- libglib2.0-dev
- libjson-c-dev
- libjson-glib-dev
configflags:
- --prefix=/usr
- --disable-static
build-environment:
- CFLAGS: -O2 -g -pipe
- CXXFLAGS: -O2 -g -pipe
- XDG_DATA_DIRS: $SNAPCRAFT_STAGE/usr/share:/usr/local/share:/usr/share
override-build: |
snapcraftctl build
$SNAPCRAFT_STAGE/fix-pkgconfig-files.sh
stage:
- -**/*.la
prime:
- -usr/include
- -usr/lib/pkgconfig
# https://github.com/Jehan/mypaint-brushes/releases
mypaint-brushes:
after:
- libmypaint
source: https://github.com/Jehan/mypaint-brushes/archive/v1.3.0.tar.gz
plugin: autotools
configflags:
- --prefix=/usr
build-environment:
- CFLAGS: -O2 -g -pipe
- CXXFLAGS: -O2 -g -pipe
build-packages:
- automake-1.15
# TODO: Think about splitting to a separate snap and consume via content interface?
# # https://download.gimp.org/mirror/pub/gimp/help
# gimp-help:
# after: [gimp]
# plugin: autotools
# source: https://download.gimp.org/mirror/pub/gimp/help/gimp-help-2.10.0.tar.bz2
# source-checksum: sha512/2f6d5e7cf0c3b4960c92074ef02d51a1d089c148f6453a66e453a3084cdede280f72c6b77d35f66777adbda8aa273ec2a472fb538142e51bb263c3077eec473a
# configflags:
# - --prefix=/usr
# build-environment:
# - PATH: /usr/bin:$PATH # Ensure system python is used, not from staging area
# build-packages:
# - dblatex
# - docbook2odf
# - pngcrush
# - pngnq
# - python
# - python-libxml2
# organize:
# root/stage/usr: usr
# prime:
# - -root
# https://download.gimp.org/mirror/pub/gimp/v2.10/
gimp:
after:
- babl
- desktop-settings-packages
- gegl
- gtk-locales
- libheif
- libmypaint
- mypaint-brushes
plugin: autotools
source: https://download.gimp.org/pub/gimp/v2.10/gimp-$SNAPCRAFT_PROJECT_VERSION.tar.bz2
source-checksum: sha256/88815daa76ed7d4277eeb353358bafa116cd2fcd2c861d95b95135c1d52b67dc
configflags:
- --prefix=/usr
- --sysconfdir=/etc
- --with-bug-report-url=https://github.com/snapcrafters/gimp/issues/
- --with-build-id=org.gimp.GIMP.snapcraft.stable
- --disable-check-update
- --disable-docs
- --disable-gtk-doc
- --disable-gtk-doc-html
- --disable-python
build-environment:
- CFLAGS: -O2 -g -pipe
- CXXFLAGS: -O2 -g -pipe
- BABL_PATH: $SNAPCRAFT_STAGE/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/babl-0.1
- GEGL_PATH: $SNAPCRAFT_STAGE/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/gegl-0.4
# the LD_LIBRARY_PATH is to fix configure failing to test for gegl matting-levin support
- LD_LIBRARY_PATH: $LD_LIBRARY_PATH:$SNAPCRAFT_STAGE/usr/lib/$SNAPCRAFT_ARCH_TRIPLET
- XDG_DATA_DIRS: $SNAPCRAFT_STAGE/usr/share:/usr/local/share:/usr/share
- PYTHON: /usr/bin/python2.7
override-pull: |
snapcraftctl pull
sed -i 's|^Icon=.*|Icon=/usr/share/icons/hicolor/256x256/apps/gimp.png|' desktop/gimp.desktop.in.in
override-build: |
rm -f $SNAPCRAFT_PART_INSTALL/usr/share/pkgconfig/iso-codes.pc
snapcraftctl build
sed -i -E "s|^(.*python2?=).*|\1/snap/$SNAPCRAFT_PROJECT_NAME/current/usr/bin/python|" $SNAPCRAFT_PART_INSTALL/usr/lib/gimp/2.0/interpreters/pygimp.interp || true
sed -i -E 's|^# \(mypaint-brush-path .*$|(mypaint-brush-path "/usr/share/mypaint-data/1.0/brushes:~/.mypaint/brushes")|' $SNAPCRAFT_PART_INSTALL/etc/gimp/2.0/gimprc
build-packages:
- automake
- glib-networking
- gobject-introspection
- gtk-doc-tools
- intltool
- iso-codes
- libaa1-dev
- libart-2.0-dev
- libbz2-dev
- libcairo2-dev
- libcurl4-gnutls-dev
- libdbus-glib-1-dev
- libexif-dev
- libfftw3-dev
- libgdk-pixbuf2.0-dev
- libgexiv2-dev
- libgirepository1.0-dev
- libglib2.0-dev
- libgpm-dev
- libgs-dev
- libgtk-3-dev
- libgtk2.0-dev
- libgudev-1.0-dev
- libheif-dev
- libice-dev
- libilmbase-dev
- libisocodes-dev
- libjpeg-dev
- libjson-glib-dev
- liblcms2-dev
- liblzma-dev
- libmng-dev
- libopenexr-dev
- libopenjp2-7-dev
- libpng-dev
- libpoppler-glib-dev
- libslang2-dev
- libsm-dev
- libtiff5-dev
- libwebp-dev
- libwmf-dev
- libx11-dev
- libxcursor-dev
- libxmu-dev
- libxpm-dev
- libxt-dev
- python-dev
- python-cairo-dev
- python-gtk2-dev
- xdg-utils
- xsltproc
- zlib1g-dev
- try:
- libunwind-dev # not available in s390x
stage-packages:
- dbus-x11
- evince
- ghostscript
- gir1.2-gtk-2.0
- gir1.2-poppler-0.18
- glib-networking
- gvfs-backends
- libaa1
- libart-2.0-2
- libbz2-1.0
- libcairo2
- libcurl3-gnutls
- libdbus-glib-1-2
- libexif12
- libgexiv2-2
- libfftw3-double3
- libfftw3-single3
- libgdk-pixbuf2.0-0
- libglib2.0-0
- libgpm2
- libgs9
# - libheif1
- libilmbase12
- libjpeg-turbo8
- libjson-glib-1.0-0
- liblcms2-2
- liblzma5
- libmng2
- libopenexr22
- libopenjp2-7
- libpng16-16
- libpoppler-glib8
- libslang2
- libtiff5
- libwebp6
- libwebpdemux2
- libwebpmux3
- libwmf0.2-7
- libxmu6
- libxpm4
- libxt6
- python-cairo
- python-dev
- python-gi
- python-gtk2
- rawtherapee
- zlib1g
- try:
- libunwind8 # not available in s390x
- libfftw3-long3 # only amd64 and i386
- libfftw3-quad3 # only amd64 and i386
stage:
- -**/*.la
- -etc/dbus-1
- -etc/default
- -etc/dictionaries-common
- -etc/emacs
- -etc/fonts
- -etc/glvnd
- -etc/gnome
- -etc/gss
- -etc/gtk-3.0
- -etc/init.d
- -etc/libblockdev
- -etc/libpaper.d
- -etc/mailcap.order
- -etc/mime.types
- -etc/rc*.d
- -etc/sensors3.conf
- -etc/systemd
- -etc/ucf.conf
- -etc/udisks2
- -etc/X11
- -sbin/cfdisk
- -sbin/cgdisk
- -sbin/fdisk
- -sbin/fixparts
- -sbin/gdisk
- -sbin/parted
- -sbin/partprobe
- -sbin/sfddisk
- -sbin/sgdisk
- -usr/bin/aspell*
- -usr/bin/dbus*
- -usr/bin/desktop-file-*
- -usr/bin/fc-*
- -usr/bin/gtk-update-icon-cache
- -usr/bin/ispell*
- -usr/bin/mtrace
- -usr/bin/rpcgen
- -usr/bin/run-*
- -usr/bin/select-default-iwrap
- -usr/bin/update-*-database
- -usr/bin/xdpyinfo
- -usr/bin/xdriinfo
- -usr/bin/xev
- -usr/bin/xfd
- -usr/bin/xfontsel
- -usr/bin/xkill
- -usr/bin/xlsatoms
- -usr/bin/xlsclients
- -usr/bin/xlsfonts
- -usr/bin/xmessage
- -usr/bin/xprop
- -usr/bin/xvinfo
- -usr/bin/xwininfo
- -usr/lib/aspell
- -usr/share/doc/libjpeg*
- -usr/share/ghostscript
- -usr/share/pkgconfig/iso-codes.pc
- -**/iso-codes
- -var/cache
- -var/lib/aspell
- -var/lib/dbus
- -var/lib/dictionaries-common
- -var/lib/emacsen-common
- -var/lib/ispell
- -var/lib/systemd
- -var/lib/ucf
prime:
- -usr/include
- -usr/lib/pkgconfig
gmic:
after: [gimp]
plugin: nil
override-pull: |
git clone https://github.com/dtschump/gmic.git
git clone https://github.com/dtschump/CImg.git
git clone https://github.com/c-koi/gmic-qt.git
cd gmic-qt
# VERSION="$(git tag -l 'v.*.*' --sort=version:refname | tail -n1)"
VERSION=v.2.9.6
git checkout "$VERSION"
cd ../gmic
git checkout "$VERSION"
cd ../CImg
git checkout "$VERSION"
override-build: |
make -C gmic/src CImg.h gmic_stdlib.h
cd gmic-qt
mkdir build
cd build
cmake .. \
-DCMAKE_INSTALL_PREFIX=/usr \
-DGMIC_QT_HOST=gimp \
-DGMIC_PATH=$SNAPCRAFT_PART_BUILD/gmic/src \
-DCMAKE_BUILD_TYPE=Release
make -j$SNAPCRAFT_PARALLEL_BUILD_COUNT
make DESTDIR=$SNAPCRAFT_PART_INSTALL install
# mv $SNAPCRAFT_PART_INSTALL/usr/bin/gmic $SNAPCRAFT_PART_INSTALL/usr/bin/gmic.real
# cat <<'EOF' > $SNAPCRAFT_PART_INSTALL/usr/bin/gmic
# export SNAP_DESKTOP_RUNTIME="$SNAP/kf5"
# export FINAL_BINARY="$SNAP/usr/bin/gmic.real"
# exec $SNAP/snap/command-chain/kde-desktop-launch $SNAP/bin/check-ld-cache $SNAP/usr/bin/gmic.real "$@"
# EOF
# chmod +x $SNAPCRAFT_PART_INSTALL/usr/bin/gmic
build-environment:
- PATH: /snap/bin:$PATH
- CFLAGS: -O2 -g -pipe
- CXXFLAGS: -O2 -g -pipe
build-packages:
- cimg-dev
- cmake
- curl
- g++
- gcc
- libcurl4-gnutls-dev
- libfftw3-dev
- libgraphicsmagick++1-dev
- libgraphicsmagick1-dev
- libjpeg-dev
- libopencv-core-dev
- libopencv-highgui-dev
- libopencv-videoio-dev
# - libopencv-imgcodecs-dev
# - libopencv-imgproc-dev
- libopenexr-dev
- libpng-dev
- libtiff5-dev
- libxkbfile-dev
- libxres-dev
- make
- pkg-config
- qt5-default
- qtbase5-dev
- qttools5-dev
- wget
- zlib1g-dev
stage-packages:
- libcurl3-gnutls
- libdouble-conversion1
- libfftw3-double3
- libfftw3-single3
- libgraphicsmagick-q16-3
- libgraphicsmagick++-q16-12
- libjpeg-turbo8
- libopencv-core3.2
- libopencv-highgui3.2
- libopencv-videoio3.2
- libopenexr22
- libpng16-16
- libqt5core5a
- libqt5gui5
- libqt5network5
- libqt5widgets5
- libtiff5
- libxkbfile1
- libxres1
- zlib1g
- try:
- libfftw3-long3
- libfftw3-quad3
# # https://github.com/darktable-org/darktable/releases
# darktable:
# after: [gimp, gmic]
# source: https://github.com/darktable-org/darktable/releases/download/release-3.0.2/darktable-3.0.2.tar.xz
# source-checksum: sha256/6abaf661fe9414e92bdb33b58b98ef024ccf6132b7876abaf0751ec2109f36fb
# plugin: cmake
# override-pull: |
# snapcraftctl pull
# sed -i 's|Exec=.*|Exec=darktable %U|;s|TryExec=.*|TryExec=darktable|;s|Icon=.*|Icon=${SNAP}/usr/share/icons/hicolor/scalable/apps/darktable.svg|' data/darktable.desktop.in
# configflags:
# - -DCMAKE_BUILD_TYPE=Release
# - -DCMAKE_INSTALL_PREFIX=/usr
# build-environment:
# - CFLAGS: -O2 -g -pipe
# - CXXFLAGS: -O2 -g -pipe
# build-packages:
# - cmake
# - curl
# - freeglut3-dev
# - fop
# - intltool
# - libcairo2-dev
# - libcolord-dev
# - libcolord-gtk-dev
# - libcups2-dev
# - libdbus-glib-1-dev
# - libexiv2-dev
# - libflickcurl-dev
# - libgnome-keyring-dev
# - libgphoto2-dev
# - libgraphicsmagick1-dev
# - libgtk-3-dev
# - libjpeg-dev
# - libjson-glib-dev
# - liblcms2-dev
# - liblensfun-dev
# - liblua5.3-dev
# - libopenexr-dev
# - libopenjp2-7-dev
# - libosmgpsmap-1.0-dev
# - libpng-dev
# - libpugixml-dev
# - librsvg2-dev
# - libsdl1.2-dev
# - libsecret-1-dev
# - libsoup2.4-dev
# - libsqlite3-dev
# - libtiff-dev
# - libwebp-dev
# - xsltproc
# - zlib1g-dev
# stage-packages:
# - freeglut3
# - libcolord2
# - libcolord-gtk1
# - libcups2
# - libdbus-glib-1-2
# - libexiv2-14
# - libflickcurl0
# - libgnome-keyring0
# - libgphoto2-6
# - libgraphicsmagick-q16-3
# - libjpeg-turbo8
# - libjson-glib-1.0-0
# - liblcms2-2
# - liblensfun1
# - liblensfun-data-v1
# - liblua5.3-0
# - libopenexr22
# - libopenjp2-7
# - libosmgpsmap-1.0-1
# - libpng16-16
# - libpugixml1v5
# - librsvg2-2
# - libsdl1.2debian
# - libsecret-1-0
# - libsoup2.4-1
# - libsqlite3-0
# - libtiff5
# - libwebp6
# Ship a default set of GSettings schemas so that the correct theme is used
# in Wayland sessions on Ubuntu (see https://forum.snapcraft.io/t/7806/3).
desktop-settings-packages:
after: [ desktop-launch ]
plugin: nil
build-packages:
- libglib2.0-bin
stage-packages:
- gsettings-desktop-schemas
- ubuntu-settings
prime:
- usr/share/glib-2.0/schemas/*
desktop-settings-build:
plugin: nil
after: [ gimp, gmic, desktop-settings-packages ]
override-prime: |
set -eux
glib-compile-schemas usr/share/glib-2.0/schemas
cleanup:
after: [ gimp, gmic, desktop-settings-build ]
plugin: nil
build-snaps:
- core18
- gnome-3-28-1804
- gtk-common-themes
## DISABLED (3 of 4) because gtk2-common-themes only available on amd64
# - gtk2-common-themes
override-prime: |
set -eux
for snap in "gnome-3-28-1804" "gtk-common-themes"; do # List all content-snaps you're using here
cd "/snap/$snap/current" && find . -type f,l -exec rm -f "$SNAPCRAFT_PRIME/{}" \;
done
for CRUFT in bug lintian man; do
rm -rf $SNAPCRAFT_PRIME/usr/share/$CRUFT
done
find $SNAPCRAFT_PRIME/usr/share/doc/ -type f -not -name 'copyright' -delete
find $SNAPCRAFT_PRIME/usr/share -type d -empty -not -path "$SNAPCRAFT_PRIME/usr/share/gimp/*" -delete