# $Id: Portfile,v 1.19 2006/03/24 01:27:35 yves Exp $
PortSystem 1.0
name		librsvg
version		2.12.7
revision		1
description	Gnome implementation of rsvg.
long_description       	${description}
maintainers	gnome-darwinports@opendarwin.org
categories	gnome
platforms	darwin 
homepage	http://librsvg.sourceforge.net/
master_sites    gnome:sources/${name}/2.12/
checksums	sha1 2dbb387bca326d44c24348bd48b39b12bd3ab365

depends_lib	port:libcroco port:libgsf port:libart_lgpl port:libxml2
use_bzip2 	yes
configure.args  --mandir=${prefix}/share/man --enable-pixbuf-loader \
		--with-svgz 
configure.env   CPPFLAGS="-L${prefix}/lib -I${prefix}/include" \
		CFLAGS="-no-cpp-precomp -flat_namespace -undefined suppress"
post-activate {
	set fl [open "| grep -c svg ${prefix}/etc/gtk-2.0/gdk-pixbuf.loaders" ]
	set data [read $fl]
	if {[catch {close $fl} err]} {
		ui_msg "Updating ${prefix}/etc/gtk-2.0/gdk-pixbuf.loaders"
		cd ${prefix}/lib/gtk-2.0/2.4.0/loaders
		system "gdk-pixbuf-query-loaders *.so > ${prefix}/etc/gtk-2.0/gdk-pixbuf.loaders"
	}
}
variant use-sys-deps {
	depends_lib	lib:libcroco-0.6:libcroco lib:libgsf-1.1:libgsf lib:libart_lgpl_2:libart_lgpl lib:libxml2:libxml2
}
