Revision
83340
Author
pixilla@macports.org
Date
2011-08-29 19:57:54 -0700 (Mon, 29 Aug 2011)

Log Message

graphics/librsvg:
- Claim maintainer.
- Add svg2pdf script.
- See #27887.

Modified Paths

Diff

Modified: trunk/dports/graphics/librsvg/Portfile (83339 => 83340)


--- trunk/dports/graphics/librsvg/Portfile	2011-08-30 02:33:13 UTC (rev 83339)
+++ trunk/dports/graphics/librsvg/Portfile	2011-08-30 02:57:54 UTC (rev 83340)
@@ -6,12 +6,12 @@
 
 name            librsvg
 version         2.34.0
-revision        0
+revision        1
 license         GPL-2 LGPL-2
 set branch      [join [lrange [split ${version} .] 0 1] .]
 categories      graphics gnome
 platforms       darwin
-maintainers     nomaintainer
+maintainers     pixilla openmaintainer
 description     Gnome implementation of rsvg.
 
 long_description \
@@ -54,6 +54,19 @@
     lib/libpango-1.0.dylib \
     lib/libxml2.dylib
 
+set buildpath   ${worksrcpath}/macports
+post-build {
+    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 "	exit 255;"
+    puts $fp "fi"
+    puts $fp "rsvg-convert -f pdf -o \"$2\" \"$1\""
+    close $fp
+}
+
 post-destroot {
     set python.branch ${pyversion}
     set python.bin ${frameworks_dir}/Python.framework/Versions/${python.branch}/bin/python${python.branch}
@@ -64,6 +77,8 @@
     xinstall -d ${destroot}${docdir}
     xinstall -m 644 -W ${worksrcpath} AUTHORS COPYING COPYING.LIB NEWS README \
         ${destroot}${docdir}
+    xinstall -m 755 -W ${buildpath} svg2pdf \
+        ${destroot}${prefix}/sbin
 }
 
 post-activate {