{
    "app-id": "org.gimp.GIMP",
    "branch": "master",
    "runtime": "org.gnome.Platform",
    "runtime-version": "3.28",
    "sdk": "org.gnome.Sdk",
    "command": "gimp-2.99",
    "separate-locales": false,
    "rename-desktop-file": "gimp.desktop",
    "rename-icon": "gimp",
    "finish-args": ["--share=ipc", "--share=network",
                    "--socket=x11", "--socket=wayland",
                    "--filesystem=host", "--filesystem=xdg-config/GIMP",
                    "--filesystem=xdg-config/gtk-3.0", "--filesystem=/tmp",
                    "--talk-name=org.gtk.vfs", "--talk-name=org.gtk.vfs.*" ],
    "tags": ["GTK+3", "nightly"],
    "desktop-file-name-prefix": "(Nightly) ",
    "build-options" : {
        "cflags": "-O2 -g",
        "cxxflags": "-O2 -g",
        "env": {
            "V": "1"
        }
    },
    "cleanup": ["/include", "/lib/pkgconfig", "/share/pkgconfig",
                "/share/aclocal", "/man", "/share/man", "/share/gtk-doc",
                "/share/vala", "*.la", "*.a", "/bin/wmf*", "/bin/libwmf-*",
                "/bin/pygtk*", "/bin/pygobject*", "/bin/pygobject-codegen-2.0"],
    "modules": [
        {
            "name": "python",
            "modules": [
                {
                    "name": "py2cairo",
                    "rm-configure": true,
                    "sources": [
                        {
                            "type": "archive",
                            "url": "http://cairographics.org/releases/py2cairo-1.10.0.tar.bz2",
                            "sha256": "d30439f06c2ec1a39e27464c6c828b6eface3b22ee17b2de05dc409e429a7431"
                        },
                        {
                            "type": "script",
                            "commands": [
                                "libtoolize --force",
                                "aclocal",
                                "autoheader",
                                "automake --force-missing --add-missing --foreign",
                                "autoconf"
                            ],
                            "dest-filename": "autogen.sh"
                        }
                    ]
                },
                {
                    "name": "pygobject",
                    "config-opts": [ "--disable-introspection" ],
                    "sources": [
                        {
                            "type": "archive",
                            "url": "http://ftp.gnome.org/pub/GNOME/sources/pygobject/2.28/pygobject-2.28.7.tar.xz",
                            "sha256": "bb9d25a3442ca7511385a7c01b057492095c263784ef31231ffe589d83a96a5a"
                        },
                        {
                            "type": "shell",
                            "commands": [ "cp -p /usr/share/automake-*/config.{sub,guess} ." ]
                        }
                    ]
                },
                {
                    "name": "pygtk",
                    "sources": [
                        {
                            "type": "archive",
                            "url": "http://ftp.gnome.org/pub/GNOME/sources/pygtk/2.24/pygtk-2.24.0.tar.gz",
                            "sha256": "6e3e54fa6e65a69ac60bd58cb2e60a57f3346ac52efe995f3d10b6c38c972fd8"
                        },
                        {
                            "type": "shell",
                            "commands": [ "cp -p /usr/share/automake-*/config.{sub,guess} ." ]
                        }
                    ]
                }
            ]
        },
        {
            "name": "gexiv2",
            "modules": [
                {
                    "name": "exiv2",
                    "cleanup": [ "/bin" ],
                    "sources": [
                        {
                            "type": "archive",
                            "url": "http://www.exiv2.org/builds/exiv2-0.26-trunk.tar.gz",
                            "sha256": "c75e3c4a0811bf700d92c82319373b7a825a2331c12b8b37d41eb58e4f18eafb"
                        },
                        {
                            "type": "shell",
                            "commands": [ "cp -p /usr/share/automake-*/config.{sub,guess} config/" ]
                        }
                    ]
                }
            ],
            "config-opts": [ "--disable-introspection" ],
            "sources": [
                {
                    "type": "archive",
                    "url": "https://download.gnome.org/sources/gexiv2/0.10/gexiv2-0.10.8.tar.xz",
                    "sha256": "81c528fd1e5e03577acd80fb77798223945f043fd1d4e06920c71202eea90801"
                }
            ]
        },
        {
            "name": "openexr",
            "modules": [
                {
                    "name": "ilmbase",
                    "config-opts": [ "--disable-static" ],
                    "sources": [
                        {
                            "type": "archive",
                            "url": "http://download.savannah.nongnu.org/releases/openexr/ilmbase-2.2.0.tar.gz",
                            "sha256": "ecf815b60695555c1fbc73679e84c7c9902f4e8faa6e8000d2f905b8b86cedc7"
                        },
                        {
                            "type": "shell",
                            "commands": [ "cp -p /usr/share/automake-*/config.{sub,guess} ." ]
                        }
                    ]
                }
            ],
            "config-opts": [ "--disable-static", "--disable-ilmbasetest" ],
            "cleanup": [ "/bin", "/share/doc" ],
            "sources": [
                {
                    "type": "archive",
                    "url": "http://download.savannah.nongnu.org/releases/openexr/openexr-2.2.0.tar.gz",
                    "sha256": "36a012f6c43213f840ce29a8b182700f6cf6b214bea0d5735594136b44914231"
                },
                {
                    "type": "shell",
                    "commands": [ "cp -p /usr/share/automake-*/config.{sub,guess} ." ]
                }
            ]
        },
        {
            "name": "libraw",
            "config-opts": [ "--disable-static" ],
            "cleanup": [ "/bin", "/share/doc" ],
            "sources": [
                {
                    "type": "archive",
                    "url": "http://www.libraw.org/data/LibRaw-0.19.0.tar.gz",
                    "sha256": "e83f51e83b19f9ba6b8bd144475fc12edf2d7b3b930d8d280bdebd8a8f3ed259"
                }
            ]
        },
        {
            "name": "poppler",
            "modules": [
                {
                    "name": "popplerdata",
                    "no-autogen": true,
                    "make-install-args": ["prefix=/app"],
                    "sources": [
                        {
                            "type": "archive",
                            "url": "http://poppler.freedesktop.org/poppler-data-0.4.7.tar.gz",
                            "sha256": "e752b0d88a7aba54574152143e7bf76436a7ef51977c55d6bd9a48dccde3a7de"
                        }
                    ]
                }
            ],
            "config-opts": [ "--disable-libopenjpeg", "--disable-introspection" ],
            "cleanup": [ "/bin" ],
            "sources": [
                {
                    "type": "archive",
                    "url": "https://poppler.freedesktop.org/poppler-0.51.0.tar.xz",
                    "sha256": "e997c9ad81a8372f2dd03a02b00692b8cc479c220340c8881edaca540f402c1f"
                }
            ]
        },
        {
            /* These are dependencies which are already in the runtime, but in
             * older versions. When we need newer versions of a dep, I add it
             * here so that I can easily spot the duplicate and recheck when
             * updating the runtime.
             */
            "name": "duplicate-dependencies",
            "modules": [
                {
                    "name": "libpng",
                    "cleanup": [ "/bin", "/share" ],
                    "sources": [
                        {
                            "type": "archive",
                            "url": "https://src.fedoraproject.org/repo/pkgs/rpms/libpng/libpng-1.6.34.tar.xz/sha512/89407c5abc1623faaa3992fc1e4a62def671d9a7401108dfceee895d5f16fe7030090bea89b34a36d377d8e6a5d40046886991f663ce075d1a2d31bf9eaf3c51/libpng-1.6.34.tar.xz",
                            "sha256": "2f1e960d92ce3b3abd03d06dfec9637dfbd22febf107a536b44f7a47c60659f6"
                        }
                    ]
                },
                {
                    "name": "lcms2",
                    "config-opts": [ "--disable-static" ],
                    "cleanup": [ "/bin", "/share" ],
                    "sources": [
                        {
                            "type": "archive",
                            "url": "https://src.fedoraproject.org/repo/pkgs/rpms/lcms2/lcms2-2.9.tar.gz/sha512/e30ad5a9a1ab9e7aaace9431434caa19a5ff6143db46644aba971a5ee37a265b26bf738e886d766405a7eb45a9d620d67c7ab3684ace86a107cf5a76642c04a5/lcms2-2.9.tar.gz",
                            "sha256": "a83cd711db57404e17bc943a4c9742d7a98560918ad3d0a4f511428f96d1ad5b"
                        }
                    ]
                },
                {
                    "name": "libwebp",
                    "config-opts": [ "--disable-static", "--enable-libwebpmux", "--enable-libwebpdemux" ],
                    "cleanup": [ "/share", "/bin" ],
                    "sources": [
                        {
                            "type": "archive",
                            "url": "http://downloads.webmproject.org/releases/webp/libwebp-1.0.0.tar.gz",
                            "sha256": "84259c4388f18637af3c5a6361536d754a5394492f91be1abc2e981d4983225b"
                        }
                    ]
                }
            ]
        },
        {
            "name": "aalib",
            "config-opts": [ "--disable-static" ],
            "cleanup": [ "/bin", "/info", "/man" ],
            "sources": [
                {
                    "type": "archive",
                    "url": "https://src.fedoraproject.org/repo/pkgs/rpms/aalib/aalib-1.4rc5.tar.gz/9801095c42bba12edebd1902bcf0a990/aalib-1.4rc5.tar.gz",
                    "sha256": "fbddda9230cf6ee2a4f5706b4b11e2190ae45f5eda1f0409dc4f99b35e0a70ee"
                },
                {
                    "type": "shell",
                    "commands": [ "cp -p /usr/share/automake-*/config.{sub,guess} ." ]
                }
            ]
        },
        {
            "name": "libmng",
            "config-opts": [ "--disable-static" ],
            "cleanup": [ "/share" ],
            "sources": [
                {
                    "type": "archive",
                    "url": "https://src.fedoraproject.org/repo/pkgs/rpms/libmng/libmng-2.0.3.tar.gz/7e9a12ba2a99dff7e736902ea07383d4/libmng-2.0.3.tar.gz",
                    "sha256": "cf112a1fb02f5b1c0fce5cab11ea8243852c139e669c44014125874b14b7dfaa"
                }
            ]
        },
        {
            "name": "libwmf",
            "config-opts": [ "--disable-static", "--disable-dependency-tracking" ],
            "cleanup": [ "/share/doc", "/bin" ],
            "sources": [
                {
                    "type": "archive",
                    "url": "https://src.fedoraproject.org/repo/pkgs/rpms/libwmf/libwmf-0.2.8.4.tar.gz/d1177739bf1ceb07f57421f0cee191e0/libwmf-0.2.8.4.tar.gz",
                    "sha256": "5b345c69220545d003ad52bfd035d5d6f4f075e65204114a9e875e84895a7cf8"
                },
                {
                    "type": "shell",
                    "commands": [ "cp -p /usr/share/automake-*/config.{sub,guess} ." ]
                }
            ]
        },
        {
            "name": "ghostscript",
            "config-opts": [ "--disable-cups" ],
            "make-args": [ "so" ],
            "make-install-args": [ "soinstall" ],
            "cleanup": [ "/bin", "/share/man", "/share/ghostscript/9.25/doc/", "/share/ghostscript/9.25/examples" ],
            "sources": [
                {
                    "type": "archive",
                    "url": "https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs925/ghostscript-9.25.tar.gz",
                    "sha512": "6710bf00e6246bf07173d4012c7742dd2315b6888b883d63372c0dc2fef76e8be5672f10e4c529244ba153f4ae8ab713403209365a3f7a76c469d69d797761b1"
                },
                {
                    "type": "shell",
                    "commands": [
                                  "cp -p /usr/share/automake-*/config.{sub,guess} freetype/builds/unix/",
                                  "cp -p /usr/share/automake-*/config.{sub,guess} ijs/",
                                  "cp -p /usr/share/automake-*/config.{sub,guess} jpeg/",
                                  "cp -p /usr/share/automake-*/config.{sub,guess} libpng/",
                                  "cp -p /usr/share/automake-*/config.{sub,guess} lcms2mt/",
                                  "cp -p /usr/share/automake-*/config.{sub,guess} tiff/config/",
                                  "rm -rf libpng/pngread.c"
                                ]
                }
            ]
        },
        {
            "name": "libmypaint",
            "config-opts": [ "--disable-gegl", "--disable-introspection" ],
            "sources": [
                {
                    "type": "archive",
                    "url": "https://github.com/mypaint/libmypaint/releases/download/v1.3.0/libmypaint-1.3.0.tar.xz",
                    "sha256": "6a07d9d57fea60f68d218a953ce91b168975a003db24de6ac01ad69dcc94a671"
                }
            ]
        },
        {
            "name": "mypaint-brushes",
            "sources": [
                {
                    "type": "git",
                    "url": "https://github.com/Jehan/mypaint-brushes.git",
                    "branch": "v1.3.0",
                    "commit": "fce9b5f23f658f15f8168ef5cb2fee69cf90addb"
                }
            ]
        },
        {
            "name": "openjpeg",
            "cmake": true,
            "buildsystem": "cmake-ninja",
            "builddir": true,
            "cleanup": [ "/bin", "/lib/openjpeg-2.3" ],
            "sources": [
                {
                    "type": "archive",
                    "url": "https://github.com/uclouvain/openjpeg/archive/v2.3.0.tar.gz",
                    "sha256": "3dc787c1bb6023ba846c2a0d9b1f6e179f1cd255172bde9eb75b01f1e6c7d71a"
                }
            ]
        },
        {
            "name" : "pango",
            "modules": [
                {
                    "name" : "fribidi",
                    "sources" : [
                        {
                            "url" : "https://github.com/fribidi/fribidi/releases/download/0.19.7/fribidi-0.19.7.tar.bz2",
                            "sha256" : "08222a6212bbc2276a2d55c3bf370109ae4a35b689acbc66571ad2a670595a8e",
                            "type" : "archive"
                        }
                    ]
                }
            ],
            "sources" : [
                {
                    "url" : "https://download.gnome.org/sources/pango/1.42/pango-1.42.1.tar.xz",
                    "sha256" : "915a6756b298578ff27c7a6393f8c2e62e6e382f9411f2504d7af1a13c7bce32",
                    "type" : "archive"
                }
            ]
        },
        {
            "name" : "libheif",
            "modules": [
                {
                    "name": "libde265",
                    "config-opts": [ "--disable-sherlock265" ],
                    "sources": [
                        {
                            "type": "archive",
                            "url": "https://github.com/strukturag/libde265/releases/download/v1.0.3/libde265-1.0.3.tar.gz",
                            "sha256": "e4206185a7c67d3b797d6537df8dcaa6e5fd5a5f93bd14e65a755c33cd645f7a"
                        }
                    ]
                }
            ],
            "sources" : [
                {
                    "url" : "https://github.com/strukturag/libheif/releases/download/v1.1.0/libheif-1.1.0.tar.gz",
                    "sha256" : "3f8e62e5481b38965b05d44cddc522b15c4820ee635205f826a6b15c0d4040cb",
                    "type" : "archive"
                }
            ]
        },
        {
            "name": "babl",
            "config-opts": [ "--disable-docs" ],
            "sources": [
                {
                    "type": "git",
                    "url": "https://gitlab.gnome.org/GNOME/babl.git",
                    "branch": "master"
                }
            ]
        },
        {
            "name": "gegl",
            "config-opts": [ "--disable-docs", "--disable-introspection" ],
            "cleanup": [ "/bin" ],
            "sources": [
                {
                    "type": "git",
                    "url": "https://gitlab.gnome.org/GNOME/gegl.git",
                    "branch": "master"
                }
            ]
        },
        {
            "name": "gimp",
            "config-opts": [ "--disable-docs", "--disable-gtk-doc", "--disable-gtk-doc-html",
                             "--with-icc-directory=/run/host/usr/share/color/icc/" ],
            "cleanup": [ "/bin/gimptool-3.0", "/bin/gimp-console-2.99" ],
            "sources": [
                {
                    "type": "git",
                    "url": "https://gitlab.gnome.org/GNOME/gimp.git",
                    "branch": "master"
                }
            ],
	    "post-install": [
                "rm -fr /app/include /app/lib/pkgconfig /app/share/pkgconfig",
                "rm -fr /app/share/gtk-doc/ /app/share/man/",
                "rm -fr /app/lib/*.la /app/lib/*.a",
                "rm -fr /app/share/ghostscript/9.20/doc/",
                "rm -fr /app/bin/wmf* /app/bin/libwmf-*",
                "rm -fr /app/bin/pygtk* /app/bin/pygobject* /app/bin/pygobject-codegen-2.0"
            ]
        }
    ]
}
