#TODO probably wrong script, see https://docs.krita.org/en/untranslatable_pages/building_krita.html#building-on-linux
#TODO port to orbital
#TODO maybe missing dependencies
[source]
tar = "https://download.kde.org/stable/krita/5.2.1/krita-5.2.1.tar.gz"
[build]
template = "custom"
dependencies = [
    "gexiv2",
    "ffmpeg6",
    "fftw",
    "fontconfig",
    "freetype2",
    "fribidi",
    "libgif",
    "harfbuzz",
    "liblcms",
    "libpng",
    "libtiff",
    "libwebp",
    "qt5-base",
    "qt5-svg",
    "zlib",
    "libmypaint",
    "boost",
    "libheif",
    "libjpeg-turbo",
    "libjxl",
    "kf5-extra-cmake-modules",
    "kf5-completion",
    "kf5-config",
    "kf5-coreaddons",
    "kf5-crash",
    "kf5-guiaddons",
    "kf5-i18n",
    "kf5-itemviews",
    "kf5-widgetaddons",
    "kf5-windowsystem",
    "mlt",
    "opencolorio",
    "openexr",
    "openjpeg",
    "sdl2",
    "libxi",
    "zlib",
    "libeigen",
    "libgsl",
    "libseexpr-kde",
    "liblager",
    "libunibreak",
    "libxsimd",
    "libxtl",
]
script = """
COOKBOOK_CONFIGURE="cmake"
COOKBOOK_CONFIGURE_FLAGS=(
    -DCMAKE_BUILD_TYPE=Release
    -DCMAKE_CROSSCOMPILING=True
    -DCMAKE_EXE_LINKER_FLAGS="-static"
    -DCMAKE_INSTALL_PREFIX="/"
    -DCMAKE_PREFIX_PATH="${COOKBOOK_SYSROOT}"
    -DCMAKE_SYSTEM_NAME=Generic
    -DCMAKE_SYSTEM_PROCESSOR="$(echo "${TARGET}" | cut -d - -f1)"
    -DCMAKE_VERBOSE_MAKEFILE=On
"${COOKBOOK_SOURCE}"
)
cookbook_configure
"""
