I have been doing some work with laser cutting and to that end, I need to translate files from Inkscape’s native SVG format to other formats, like plt or eps. For quite some time now, this has been failing, as the uniconvertor team — who supply the internal translation functions — have let their code base fall into decay.
Turns out the trick isn’t building uniconvertor, but the underlying library, sk1lib, where the real work gets done. For some reason, sk1lib doesn’t come with the developer-supplied distribution, even though the SK1project offers binary packages for Windows and umpteen variants of Linux. So you can successfully install uniconvertor but it doesn’t check dependencies, so you won’t know it doesn’t work until you try to run it. Annoying, that. They haven’t been particularly responsive, either. Too busy working on 2.0 which no one will care about is 1.x is broken.
I wish I had saved my error messages and other debris to better explain all this but it came together pretty quickly before I knew I was on the right track.
You’ll need the following distributions:
Install the tools, if you don’t have them. Make sure they are up to date. I found I had to rip Xcode out and replace it with this toolchain to get things working. There were some issues with llvm/clang that seemed to clear up after I did that. Next, download, build and install FreeType2. I found this symlink was needed:
ln -s /usr/local/include/freetype2/freetype/ /usr/include/freetype
If I remember where I found it, I’ll credit the poster, though it seems to be a pretty common workaround.
Next, lcms: the usual drill:
./configure, make install clean
Then, build and install sk1libs.
python ./setup.py build; python ./setup.py install --record installed-files.txt
The installed-files.txt is just a list of the files that get installed, in lieu of an actual package manager.
And then this patch has to be applied to
sk1libs/src/utils/fs.py, either before installation or after.
< return ['/System/Library/Fonts', '/Library/Fonts', os.path.expanduser("~/Library/Fonts")]
> return ['/',]
Without the patch, the program will read every file on your system into some list, for a purpose known to no man. The comments point to python 1.5 so I suspect it’s long overdue for review and refactoring. Credit for this goes to Valerio Aimale.
Credit for this discovery goes to the Inkscape developers who are trying to get the OS X releases of Inkscape in parity with Windows and Linux.
Finally, uniconvertor-1.1.5 —
python ./setup.py build; python ./setup.py install --record --installed-files.txt
And that should do it. Test it out.