Page MenuHomeFreeBSD

D56417.diff
No OneTemporary

D56417.diff

diff --git a/graphics/inkscape/Makefile b/graphics/inkscape/Makefile
--- a/graphics/inkscape/Makefile
+++ b/graphics/inkscape/Makefile
@@ -46,7 +46,7 @@
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 @@
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 @@
${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
--- /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
+

File Metadata

Mime Type
text/plain
Expires
Sun, Apr 19, 6:12 AM (9 h, 25 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31691146
Default Alt Text
D56417.diff (2 KB)

Event Timeline