[83363] trunk/dports/graphics/librsvg/Portfile

Ryan Schmidt ryandesign at macports.org
Tue Aug 30 14:22:05 PDT 2011


On Aug 30, 2011, at 06:33, pixilla at macports.org wrote:

> Revision: 83363
>          http://trac.macports.org/changeset/83363
> Author:   pixilla at macports.org
> Date:     2011-08-30 04:33:43 -0700 (Tue, 30 Aug 2011)
> Log Message:
> -----------
> graphics/librsvg:
> - Fix improper escaping. See #31029
> 
> Modified Paths:
> --------------
>    trunk/dports/graphics/librsvg/Portfile

> @@ -59,11 +59,11 @@
>     xinstall -d ${buildpath}
>     set fp [open ${buildpath}/svg2pdf w]
>     puts $fp "#!/bin/sh"
> -    puts $fp "if [ $# -lt 2 -o \"$1\" = \"-h\" -o \"$1\" = \"--help\" ] ; then"
> -    puts $fp "	echo \"FAIL: usage: $0 input_file.svg output_file.pdf\""
> +    puts $fp "if \[ \$# -lt 2 -o \"\$1\" = \"-h\" -o \"\$1\" = \"--help\" \] ; then"
> +    puts $fp "	echo \"FAIL: usage: \$0 input_file.svg output_file.pdf\""
>     puts $fp "	exit 255;"
>     puts $fp "fi"
> -    puts $fp "rsvg-convert -f pdf -o \"$2\" \"$1\""
> +    puts $fp "rsvg-convert -f pdf -o \"\$2\" \"\$1\""
>     close $fp

I'm still unclear why this isn't just a ready-made file in the files directory. See:

http://lists.macosforge.org/pipermail/macports-dev/2011-August/015976.html

Also, consider calling rsvg-convert by its full path, i.e. @PREFIX@/bin/rsvg-convert, for the benefit of users who may not have $PREFIX/bin in their PATH.





More information about the macports-dev mailing list