Fake 'inkscape' to allow rsvgconvert to be used

Tim Dickson wrote in --

  I figured out the cause of the out-of-tree fontconfig cache
  creation, and (with help from another packager) a fix.
  The problem only occurs when inkscape is installed (which changes the
  target tool that imagemagik uses for converting svg files from
  rsvgconvert to inkscape's svg conversion program.)
This commit is contained in:
Bill Kendrick 2023-06-12 20:35:29 -07:00
parent eb430d0055
commit cf94635713
3 changed files with 20 additions and 1 deletions

1
.gitignore vendored
View file

@ -22,3 +22,4 @@ src/tuxpaint.desktop
src/tuxpaint-fullscreen.desktop src/tuxpaint-fullscreen.desktop
src/org.tuxpaint.Tuxpaint.appdata.xml src/org.tuxpaint.Tuxpaint.appdata.xml
test-png test-png
inkscape

View file

@ -4,7 +4,7 @@
# Various contributors (see AUTHORS.txt) # Various contributors (see AUTHORS.txt)
# https://tuxpaint.org/ # https://tuxpaint.org/
# June 14, 2002 - June 7, 2023 # June 14, 2002 - June 12, 2023
# The version number, for release: # The version number, for release:
@ -745,6 +745,7 @@ clean:
@-rm -f dlllist a.exe @-rm -f dlllist a.exe
@-rm -f win32/Preprocessed.iss win32/tuxpaint-*.zip win32/tuxpaint-*.exe @-rm -f win32/Preprocessed.iss win32/tuxpaint-*.zip win32/tuxpaint-*.exe
@-rm -f test-png @-rm -f test-png
@-rm -f ./inkscape
@echo @echo
# "make uninstall" should remove the various parts from their # "make uninstall" should remove the various parts from their
@ -882,6 +883,10 @@ $(INSTALLED_THUMB_STARTERS): $(DATA_PREFIX)/%: % install-example-starters-dirs
echo-thumb-starters: echo-thumb-starters:
@echo @echo
@echo "...Generating thumbnails for starters..." @echo "...Generating thumbnails for starters..."
@echo "# Don't let ImageMagick use Inkscape; use rsvgconvert instead" > ./inkscape
@echo "exit 1" >> ./inkscape
@chmod 755 ./inkscape
@(eval export PATH=$(shell pwd):$(PATH))
# Create thumbnails for starters # Create thumbnails for starters
.PHONY: thumb-starters .PHONY: thumb-starters
@ -936,6 +941,10 @@ $(INSTALLED_THUMB_TEMPLATES): $(DATA_PREFIX)/%: %
echo-thumb-templates: echo-thumb-templates:
@echo @echo
@echo "...Generating thumbnails for templates..." @echo "...Generating thumbnails for templates..."
@echo "# Don't let ImageMagick use Inkscape; use rsvgconvert instead" > ./inkscape
@echo "exit 1" >> ./inkscape
@chmod 755 ./inkscape
@(eval export PATH=$(shell pwd):$(PATH))
# Create thumbnails for templates # Create thumbnails for templates
.PHONY: thumb-templates .PHONY: thumb-templates

View file

@ -131,6 +131,15 @@ https://tuxpaint.org/
local filesystem while generating packages, e.g. for Slackware Linux) local filesystem while generating packages, e.g. for Slackware Linux)
Tim Dickson <dickson.tim@googlemail.com> Tim Dickson <dickson.tim@googlemail.com>
* When generating thumbnails for Starters & Templates, create a
"inkscape" shellscript, which simply does "exit 1", and add the
current directory to the beginning of the $PATH variable.
This will prevent ImageMagick's "convert" utility from using
Inkscape, if installed, and fallback to "rsvgconvert".
(When building Slackware packages, it was noticed that FontConfig
was running and generating a cache, which was unexpected.)
Tim Dickson <dickson.tim@googlemail.com>
2023.May.18 (0.9.30) 2023.May.18 (0.9.30)
* Improvements to Stamp tool: * Improvements to Stamp tool:
--------------------------- ---------------------------