Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 16 Apr 2026 10:10:19 +0000
From:      Gleb Popov <arrowd@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 294cedf501f1 - main - graphics/inkscape: Enable testing
Message-ID:  <69e0b58b.27880.659c0a6@gitrepo.freebsd.org>

index | next in thread | raw e-mail

The branch main has been updated by arrowd:

URL: https://cgit.FreeBSD.org/ports/commit/?id=294cedf501f169e6bf84d8d94c5822f81d79708e

commit 294cedf501f169e6bf84d8d94c5822f81d79708e
Author:     Gleb Popov <arrowd@FreeBSD.org>
AuthorDate: 2026-04-15 18:40:13 +0000
Commit:     Gleb Popov <arrowd@FreeBSD.org>
CommitDate: 2026-04-16 10:10:11 +0000

    graphics/inkscape: Enable testing
    
    Approved by:    fluffy (gnome@)
    Differential Revision: https://reviews.freebsd.org/D56417
---
 graphics/inkscape/Makefile                         | 11 +++++++-
 .../inkscape/files/patch-fix-rendering-tests.patch | 30 ++++++++++++++++++++++
 2 files changed, 40 insertions(+), 1 deletion(-)

diff --git a/graphics/inkscape/Makefile b/graphics/inkscape/Makefile
index f399ccda3783..a267b323b9b5 100644
--- a/graphics/inkscape/Makefile
+++ b/graphics/inkscape/Makefile
@@ -46,7 +46,7 @@ TEST_DEPENDS=	googletest>0:devel/googletest \
 		bash:shells/bash
 
 USES=		compiler:c++20-lang cmake:testing cpe desktop-file-utils ghostscript:run \
-		gnome jpeg pathfix pkgconfig python \
+		gnome iconv jpeg magick:test pathfix pkgconfig python \
 		readline shebangfix tar:xz xorg
 USE_GNOME=	cairo gdkpixbuf glibmm gtkmm30 gtksourceview4 libxml2 libxslt
 USE_PYTHON=	cython
@@ -60,6 +60,8 @@ BINARY_ALIAS=	python3=${PYTHON_CMD}
 SHEBANG_FILES=	share/extensions/*.py share/extensions/genpofiles.sh \
 		share/templates/*.py man/fix-roff-punct
 
+TESTING_UNSAFE=	Some tests fail due to missing input files, an upstream packaging problem
+
 OPTIONS_DEFINE=		OPENMP POPPLER SCRIBUS VISIO CDR WPG GVFS NLS GSPELL
 OPTIONS_DEFAULT=	POPPLER VISIO CDR WPG GM GSPELL
 OPTIONS_DEFAULT_amd64=	OPENMP
@@ -118,4 +120,11 @@ post-patch:
 		${WRKSRC}/src/extension/implementation/script.cpp
 	@${TOUCH} ${WRKSRC}/share/extensions/gcodetools_check_for_updates.inx.h
 
+# inkscape's buildsystem tries to execute tests that aren't built yet
+# we have to build tests first with an explicit 'ninja tests' call
+pre-test:
+	@cd ${BUILD_WRKSRC} && \
+		${SETENVI} ${WRK_ENV} ${CONFIGURE_ENV} ${CMAKE_BIN} ${CMAKE_ARGS} ${CMAKE_TESTING_ARGS} ${CMAKE_SOURCE_PATH} && \
+		${SETENVI} ${WRK_ENV} ${MAKE_ENV} ${MAKE_CMD} ${_MAKE_JOBS} ${MAKE_ARGS} tests
+
 .include <bsd.port.mk>
diff --git a/graphics/inkscape/files/patch-fix-rendering-tests.patch b/graphics/inkscape/files/patch-fix-rendering-tests.patch
new file mode 100644
index 000000000000..3152d2acab95
--- /dev/null
+++ b/graphics/inkscape/files/patch-fix-rendering-tests.patch
@@ -0,0 +1,30 @@
+From 3ad0be197fe1c2e203a301e11c169915776fc341 Mon Sep 17 00:00:00 2001
+From: Alvin Wong <alvin@alvinhc.com>
+Date: Thu, 4 Dec 2025 18:10:54 +0800
+Subject: [PATCH] Fix rendering_tests for newer ImageMagick
+
+The output of `-match AE` was changed in ImageMagick 7.1.1.44.
+
+Ref:
+* https://github.com/ImageMagick/ImageMagick/issues/7990
+* https://github.com/ImageMagick/ImageMagick/commit/d85a7583f9a96bf031941c24d774b71529de3ce0
+---
+ testfiles/rendering_tests/test.sh | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git testfiles/rendering_tests/test.sh testfiles/rendering_tests/test.sh
+index 9d44a22787..a6398dd621 100755
+--- testfiles/rendering_tests/test.sh
++++ testfiles/rendering_tests/test.sh
+@@ -36,7 +36,7 @@ perform_test()
+     COMPARE_OUTPUT="$(compare -metric "$METRIC" "${TESTNAME}${SUFFIX}.png" "${EXPECTED}${SUFFIX}.png" "${TESTNAME}-compare${SUFFIX}.png" 2>&1)"
+ 
+     if [ "$FUZZ" = "" ]; then
+-        if [ "$COMPARE_OUTPUT" = 0 ]; then
++        if [ "$COMPARE_OUTPUT" = 0 ] || [ "$COMPARE_OUTPUT" = "0 (0)" ]; then
+             echo "${TESTNAME}${SUFFIX}" "PASSED; absolute difference is exactly zero."
+             rm "${TESTNAME}${SUFFIX}.png" "${TESTNAME}-compare${SUFFIX}.png"
+         else
+-- 
+GitLab
+


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?69e0b58b.27880.659c0a6>