void-packages/srcpkgs/inkscape/template

45 lines
1.9 KiB
Bash

# Template file for 'inkscape'
pkgname=inkscape
version=1.3
revision=3
build_style=cmake
make_check_target="check"
hostmakedepends="automake gettext glib-devel intltool libgraphicsmagick-devel
libtool perl-XML-Parser pkg-config which python3-Cython ragel"
makedepends="aspell-devel cairomm-devel double-conversion-devel gc-devel
gdl-devel gsl-devel gspell-devel gtkmm-devel gtkspell3-devel harfbuzz-devel
hunspell-devel libatomic_ops-devel libcdr-devel libgomp-devel libsoup-devel
libvisio-devel libwpd-devel libwpd-devel libwpg-devel libxslt-devel pango-devel
poppler-devel poppler-glib-devel potrace-devel gtest-devel gtksourceview4-devel
lib2geom-devel popt-devel readline-devel"
depends="desktop-file-utils hicolor-icon-theme python3-Pillow python3-appdirs
python3-cssselect python3-lxml python3-numpy python3-requests python3-scour"
checkdepends="$depends GraphicsMagick ImageMagick cantarell-fonts gtest-devel"
short_desc="Vector-based drawing program"
maintainer="Alex Lohr <alex.lohr@logmein.com>"
license="GPL-2.0-only, LGPL-2.1-or-later"
homepage="https://inkscape.org/"
distfiles="https://media.inkscape.org/dl/resources/file/inkscape-${version}.tar.xz"
checksum=bf4f286b025e0169b8948cc14d5199a9b4c204d761c894c4b48496571ec76307
python_version=3
# some tests still fail on musl: https://gitlab.com/inkscape/inkscape/-/issues/2241
make_check=no
if [ -n "$XBPS_CHECK_PKGS" ]; then
configure_args+=" -DBUILD_TESTING=ON"
else
configure_args+=" -DBUILD_TESTING=OFF"
fi
post_patch() {
if [ "$XBPS_TARGET_LIBC" = musl ]; then
# disable errors for missing sentinels in glib variadic functions,
# since inkscape uses NULL instead of nullptr
vsed -e "/-Werror=format/d" -i CMakeScripts/DefineDependsandFlags.cmake
fi
# disable glyph tests that fail due to different hinting
vsed -e \
"s/add_subdirectory(rendering_tests)/# \0 - skipped due to hinting issues/" \
-i testfiles//CMakeLists.txt
}