diff --git a/srcpkgs/inkscape/patches/musl_page_size.patch b/srcpkgs/inkscape/patches/musl_page_size.patch new file mode 100644 index 00000000000..15fcfb4705d --- /dev/null +++ b/srcpkgs/inkscape/patches/musl_page_size.patch @@ -0,0 +1,51 @@ +PAGE_SIZE is a reserved identifier, but we should be abnle to safely rename it +in the enum without breaking anything to still build against musl +-- +diff --git a/src/attributes.cpp b/src/attributes.cpp +index e5abed3..9e0c459 100644 +--- a/src/attributes.cpp ++++ b/src/attributes.cpp +@@ -142,7 +142,7 @@ static SPStyleProp const props[] = { + /* SPPage */ + {SPAttr::PAGE_MARGIN, "margin"}, + {SPAttr::PAGE_BLEED, "bleed"}, +- {SPAttr::PAGE_SIZE, "page-size"}, ++ {SPAttr::PAGE_SIZEx, "page-size"}, + /* SPGrid */ + {SPAttr::ORIGINX, "originx"}, + {SPAttr::ORIGINY, "originy"}, +diff --git a/src/attributes.h b/src/attributes.h +index 2b17b09..4e8470a 100644 +--- a/src/attributes.h ++++ b/src/attributes.h +@@ -141,7 +141,7 @@ enum class SPAttr { + /* SPPage */ + PAGE_MARGIN, + PAGE_BLEED, +- PAGE_SIZE, ++ PAGE_SIZEx, + /* SPGrid */ + ORIGINX, + ORIGINY, +diff --git a/src/object/sp-page.cpp b/src/object/sp-page.cpp +index cc5c41f..4d0a1fc 100644 +--- a/src/object/sp-page.cpp ++++ b/src/object/sp-page.cpp +@@ -42,7 +42,7 @@ void SPPage::build(SPDocument *document, Inkscape::XML::Node *repr) + SPObject::build(document, repr); + + this->readAttr(SPAttr::INKSCAPE_LABEL); +- this->readAttr(SPAttr::PAGE_SIZE); ++ this->readAttr(SPAttr::PAGE_SIZEx); + this->readAttr(SPAttr::X); + this->readAttr(SPAttr::Y); + this->readAttr(SPAttr::WIDTH); +@@ -85,7 +85,7 @@ void SPPage::set(SPAttr key, const gchar *value) + case SPAttr::PAGE_BLEED: + this->bleed.readOrUnset(value); + break; +- case SPAttr::PAGE_SIZE: ++ case SPAttr::PAGE_SIZEx: + this->_size_label = value ? std::string(value) : ""; + break; + default: diff --git a/srcpkgs/inkscape/template b/srcpkgs/inkscape/template index 49633b61fd8..b6b29f0790e 100644 --- a/srcpkgs/inkscape/template +++ b/srcpkgs/inkscape/template @@ -1,28 +1,35 @@ # Template file for 'inkscape' pkgname=inkscape -version=1.2.2 +version=1.3 revision=1 build_style=cmake -# builds executables then runs checks -# some tests still fail on musl: https://gitlab.com/inkscape/inkscape/-/issues/2241 -make_check_target=check -hostmakedepends="automake gettext glib-devel intltool libmagick-devel libtool - perl-XML-Parser pkg-config which" +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" + 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 ImageMagick cantarell-fonts gtest-devel" +checkdepends="$depends GraphicsMagick ImageMagick cantarell-fonts gtest-devel" short_desc="Vector-based drawing program" maintainer="Alex Lohr " license="GPL-2.0-only, LGPL-2.1-or-later" -homepage="http://inkscape.org/" +homepage="https://inkscape.org/" distfiles="https://media.inkscape.org/dl/resources/file/inkscape-${version}.tar.xz" -checksum=a0c7fd0d03c0a21535e648ef301dcf80dd7cfc1f3545e51065fbf1ba3ee8a5c4 +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 @@ -32,6 +39,6 @@ post_patch() { fi # disable glyph tests that fail due to different hinting vsed -e \ - "s/\(test-glyph-y-pos\|test-rtl-vertical\|text-glyphs-combining\|text-glyphs-vertical\)/# \1 - skipped due to hinting issues/" \ - -i testfiles/rendering_tests/CMakeLists.txt + "s/add_subdirectory(rendering_tests)/# \0 - skipped due to hinting issues/" \ + -i testfiles//CMakeLists.txt }