commit 22125fa6de76ec884a0a0c41506e78a8fdae575c
Author: Juergen Spitzmueller
Date: Sun Oct 29 08:52:15 2017 +0100
Only use full path for inkscape file arguments on Mac.
---
lib/configure.py | 24 +---
1 files changed, 17 insertions(+), 7 deletions(-)
diff --git a/lib/configure.py b/lib/configure.py
index f13dcbe..40066d6 100644
--- a/lib/configure.py
+++ b/lib/configure.py
@@ -1014,16 +1014,18 @@ def checkConverterEntries():
\converter tgif png"tgif -print -color -png -o $$d $$i" ""
\converter tgif pdf6 "tgif -print -color -pdf -stdout $$i > $$o"
""'''])
#
-checkProg('a WMF -> EPS converter', ['metafile2eps $$i $$o', 'wmf2eps -o
$$o $$i', inkscape_name + ' --file=$$p$$i --export-area-drawing --without-gui
--export-eps=$$p$$o'],
+checkProg('a WMF -> EPS converter', ['metafile2eps $$i $$o', 'wmf2eps -o
$$o $$i', inkscape_name + ' --file=%s$$i --export-area-drawing --without-gui
--export-eps=%s$$o'
+ % (inkscape_fileprefix, inkscape_fileprefix)],
rc_entry = [ r'\converter wmfeps"%%" ""'])
#
-checkProg('an EMF -> EPS converter', ['metafile2eps $$i $$o', 'wmf2eps -o
$$o $$i', inkscape_name + ' --file=$$p$$i --export-area-drawing --without-gui
--export-eps=$$p$$o'],
+checkProg('an EMF -> EPS converter', ['metafile2eps $$i $$o', 'wmf2eps -o
$$o $$i', inkscape_name + ' --file=%s$$i --export-area-drawing --without-gui
--export-eps=%s$$o'
+ % (inkscape_fileprefix, inkscape_fileprefix)],
rc_entry = [ r'\converter emfeps"%%" ""'])
#
-checkProg('a WMF -> PDF converter', [inkscape_name + ' --file=$$p$$i
--export-area-drawing --without-gui --export-pdf=$$p$$o'],
+checkProg('a WMF -> PDF converter', [inkscape_name + ' --file=%s$$i
--export-area-drawing --without-gui --export-pdf=%s$$o' % (inkscape_fileprefix,
inkscape_fileprefix)],
rc_entry = [ r'\converter wmfpdf6"%%" ""'])
#
-checkProg('an EMF -> PDF converter', [inkscape_name + ' --file=$$p$$i
--export-area-drawing --without-gui --export-pdf=$$p$$o'],
+checkProg('an EMF -> PDF converter', [inkscape_name + ' --file=%s$$i
--export-area-drawing --without-gui --export-pdf=%s$$o' % (inkscape_fileprefix,
inkscape_fileprefix)],
rc_entry = [ r'\converter emfpdf6"%%" ""'])
# Only define a converter to pdf6 for graphics
checkProg('an EPS -> PDF converter', ['epstopdf'],
@@ -1069,17 +1071,20 @@ def checkConverterEntries():
rc_entry = [ r'\converter svgsvgz "%%" ""'])
# Only define a converter to pdf6 for graphics
# Prefer rsvg-convert over inkscape since it is faster (see
http://www.lyx.org/trac/ticket/9891)
-checkProg('a SVG -> PDF converter', ['rsvg-convert -f pdf -o $$o $$i',
inkscape_name + ' --file=$$p$$i --export-area-drawing --without-gui
--export-pdf=$$p$$o'],
+checkProg('a SVG -> PDF converter', ['rsvg-convert -f pdf -o $$o $$i',
inkscape_name + ' --file=%s$$i --export-area-drawing --without-gui
--export-pdf=%s$$o'
+ % (inkscape_fileprefix, inkscape_fileprefix)],
rc_entry = [ r'''\converter svgpdf6 "%%"""
\converter svgz pdf6 "%%"""'''],
path = ['', inkscape_path])
#
-checkProg('a SVG -> EPS converter', ['rsvg-convert -f ps -o $$o $$i',
inkscape_name + ' --file=$$p$$i --export-area-drawing --without-gui
--export-eps=$$p$$o'],
+checkProg('a SVG -> EPS converter', ['rsvg-convert -f ps -o $$o $$i',
inkscape_name + ' --file=%s$$i --export-area-drawing --without-gui
--export-eps=%s$$o'
+ % (inkscape_fileprefix, inkscape_fileprefix)],
rc_entry = [ r'''\converter svgeps"%%"""
\converter svgz eps"%%"""'''],
path = ['', inkscape_path])
#
-checkProg('a SVG -> PNG converter', ['rsvg-convert -f png -o $$o $$i',
inkscape_name + ' --without-gui --file=$$i --export-png=$$o'],
+checkProg('a SVG -> PNG converter', ['rsvg-convert -f png -o $$o $$i',
inkscape_name + ' --without-gui --file=%s$$i --export-png=%s$$o'
+ % (inkscape_fileprefix, inkscape_fileprefix)],
rc_entry = [ r'''\converter svgpng"%%""",
\converter svgz png"%%"""'''],
path = ['', inkscape_path])
@@ -1850,6 +1855,11 @@ Format %i
java = checkProg('a java interpreter', ['java'])[1]
perl = checkProg('a perl interpreter', ['perl'])[1]
(inkscape_path, inkscape_name) = os.path.split(checkInkscape())
+# On MacOSX, Inkscape requires full path file arguments. This
+# is not needed on Linux and Win and even breaks the latter.
+inkscape_fileprefix = ""
+if sys.platform == 'darwin':
+inkscape_fileprefix = "$$p"
checkFormatEntries(dtl_tools)
checkConverterEntries()
(chk_docbook, bool_docbook, docbook_cmd) =