#TODO probably wrong script, see https://inkscape.org/develop/getting-started/#compile
#TODO missing dependencies, see https://gitlab.com/inkscape/inkscape-ci-docker/-/raw/master/install_dependencies.sh
[source]
tar = "https://inkscape.org/gallery/item/44467/inkscape-1.3.1.tar.xz"
[build]
template = "custom"
dependencies = [
    "boost",
    "glib",
    "glibmm",
    "gtk3",
    "gtk3mm",
    "gdk-pixbuf",
    "gtksourceview",
    "cairo",
    "cairomm",
    "pango",
    "pangomm",
    "readline",
    "fontconfig",
    "freetype2",
    "imagemagick",
    "potrace",
    "zlib",
    "lib2geom",
    "atkmm",
    "harfbuzz",
    "libblas",
    "libsoup",
    "libsigc++",
    "librsvg",
    "librevenge",
    "libwpd",
    "libpng",
    "libvisio",
    "libxml2",
    "libxslt",
    "libcdr",
    "libgsl",
    "libgspell-gtk3",
    "libjpeg-turbo",
    "liblcms",
    "liblapack",
]
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
"""
