Opened 10 years ago

Closed 9 years ago

Last modified 9 years ago

#27887 closed update (fixed)

svg2pdf update

Reported by: ejtttje@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version:
Keywords: haspatch Cc: mkae (Marko Käning), pixilla (Bradley Giesbrecht)
Port: svg2pdf


The svg2pdf 'snapshot' being used is from 2005, and is no longer being developed. (see "out of date" banner on

However, if you follow the link from that banner, there is a newer version from 2007, which was forked out of the cairo test suite. This version is a very thin wrapper about librsvg, which is receiving ongoing maintenance from GNOME. This is a larger dependency tree for svg2pdf, but it works on more modern SVG files.

I will also contact the developer (cworth) to see if he will host a release package that can be downloaded instead of a git clone.

Attachments (1)

patch-svg2pdf-Portfile (3.3 KB) - added by ejtttje@… 10 years ago.
Fix revision number and actually build universal now

Download all attachments as: .zip

Change History (10)

comment:1 Changed 10 years ago by jmroot (Joshua Root)

Keywords: haspatch added
Version: 1.9.2

Have you tested that +universal actually works? At first glance I don't see how it could. Also note that the initial revision for a new version should be 0.

Changed 10 years ago by ejtttje@…

Attachment: patch-svg2pdf-Portfile added

Fix revision number and actually build universal now

comment:2 Changed 10 years ago by ejtttje@…

The svg2pdf author replied to me, and declined to provide a dedicated svg2pdf package because it turns out there is already a 'rsvg-convert' tool bundled with librsvg. I confirmed this is already available in MacPorts, and produces byte-identical output to the svg2pdf update I attached above, but also accepts additional arguments for controlling zoom, background, etc. Considering rsvg-convert is a supported tool of the main librsvg library, it clearly seems to be the preferable route vs. this unmaintained version.

So, I see two options:

  1. Convert this svg2pdf port to a dependance on librsvg with a simple wrapper script, e.g.:
    if [ $# -lt 2 -o "$1" = "-h" -o "$1" = "--help" ] ; then
    	echo "FAIL: usage: $0 input_file.svg output_file.pdf"
    	exit 255;
    rsvg-convert -f pdf -o "$2" "$1"
  2. Remove this port, perhaps with some kind of reference or alias to librsvg's tool (I don't think MacPorts has such a thing?)

comment:3 Changed 10 years ago by ryandesign (Ryan Schmidt)

We do have the "replaced_by" keyword.

comment:4 Changed 9 years ago by ejtttje@…

Hmm, this ticket is old, we should do something with it.

If we were to drop this port, the rsvg-convert functionality of librsvg isn't as well known, so people might have trouble finding rsvg-convert on their own. Also since librsvg doesn't directly provide a svg2pdf script, using 'replaced_by' isn't 100% appropriate. So I prefer option (a), it will maintain syntactic compatibility with any scripts which are using svg2pdf, yet provide a maintained/modern svg implementation.

I don't know Portfile syntax well enough to know how to make it install the script shown above. Can it be stored directly in svg2pdf/files and then somehow referenced from the Portfile to install it?

comment:5 Changed 9 years ago by pixilla (Bradley Giesbrecht)

How about naming the script rsvg2pdf and adding a note to the svg2pdf port along the lines of "For a more modern alternative install rsvg2pdf, a wrapper for librsvg providing svg2pdf functionality"?

comment:6 Changed 9 years ago by mkae (Marko Käning)

Cc: mk@… added

Cc Me!

comment:7 Changed 9 years ago by mkae (Marko Käning)

Cc: pixilla@… added

comment:8 Changed 9 years ago by pixilla (Bradley Giesbrecht)

Resolution: fixed
Status: newclosed

See r83340.

comment:9 Changed 9 years ago by neverpanic (Clemens Lang)

What's the reasoning for installing svg2pdf in ${prefix}/sbin rather than ${prefix}/bin? Shouldn't this be rather placed in bin and marked conflicting with the svg2pdf port?

Note: See TracTickets for help on using tickets.