[PATCH -perfbook 1/3] Ignore error of unstable Inkscape

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Recently, conversions of SVG --> PDF are hit by unstability of
command-line runs of Inkscape under the GNOME session/window manager.

There is an issue ticket at the upstream Inkscape repository [1].

It was closed after a bugfix in glib2, but Fedora 38 has not
received the fix.  Furthermore, pre-release Fedora 39, as well as
openSUSE tumbleweed, still has the very similar symptoms.

As a matter of fact, the conversion is properly finished most
of the time when the Inkscape error happened.

So let's add a make variable IGNORE_INKSCAPE_ERROR and ignore error
code from Inkscape when it is enabled.  It is enabled by default.

[1] Issue #4177 "glib2 2.76.0 breaks Command Line export" at
    https://gitlab.com/inkscape/inkscape/-/issues/

Signed-off-by: Akira Yokosawa <akiyks@xxxxxxxxx>
---
 Makefile | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/Makefile b/Makefile
index f25baf27d8ad..18639b60cece 100644
--- a/Makefile
+++ b/Makefile
@@ -109,6 +109,7 @@ INKSCAPE := $(shell $(WHICH) inkscape 2>/dev/null)
 ifdef INKSCAPE
   INKSCAPE_ONE := $(shell inkscape --version 2>/dev/null | grep -c "Inkscape 1")
 endif
+IGNORE_INKSCAPE_ERROR ?= 1
 LATEXPAND := $(shell $(WHICH) latexpand 2>/dev/null)
 QPDF := $(shell $(WHICH) qpdf 2>/dev/null)
 
@@ -481,7 +482,11 @@ endif
 ifeq ($(INKSCAPE_ONE),0)
 	@inkscape --export-pdf=$@ $<i > /dev/null 2>&1
 else
+  ifneq ($(IGNORE_INKSCAPE_ERROR),0)
+	-@inkscape -o $@ $<i > /dev/null 2>&1
+  else
 	@inkscape -o $@ $<i > /dev/null 2>&1
+  endif
 endif
 	@rm -f $<i
 ifeq ($(chkpagegroup),on)
-- 
2.25.1





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux