From 402991fce8c35d0caebed18ab9f2947d7115c2d5 Mon Sep 17 00:00:00 2001 From: David Lechner Date: Thu, 2 Apr 2020 20:44:36 -0500 Subject: [PATCH] config: add support for inkscape 1.x There are breaking command line option changes between 0.9.x and 1.x. --- doc/api/diagram_source/Makefile | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/doc/api/diagram_source/Makefile b/doc/api/diagram_source/Makefile index 526cdfc..f337dcd 100755 --- a/doc/api/diagram_source/Makefile +++ b/doc/api/diagram_source/Makefile @@ -13,4 +13,13 @@ clean: rm -f $(DIAGRAMS) $(OUT_DIR)/%$(POSTFIX).png: $(SRC_DIR)/%.svg - inkscape --file=$(DIR)/$< --export-area-drawing --export-png=$(DIR)/$@ + if inkscape --version | grep -q "Inkscape 0"; then \ + inkscape --file=$(DIR)/$< --export-area-drawing --export-png=$(DIR)/$@; \ + else \ + inkscape \ + --export-area-drawing \ + --export-background=white \ + --export-background-opacity=1.0 \ + --export-file=$(DIR)/$@ \ + $(DIR)/$<; \ + fi