description="Library and tools used to manipulate, convert and view Scalable Vector Graphic images."
url="http://librsvg.sourceforge.net/"

packager="spiky <spiky@nutyx.org>"
contributors="Pierre,Tnut"

makedepends=(gdk-pixbuf libcroco pango vala rustc
             gi-docgen python-docutils python-smartypants)

name=librsvg
version=2.55.1
release=2

source=(https://download.gnome.org/sources/$name/${version%.*}/$name-$version.tar.xz)
build() {
cd $name-$version
./configure --prefix=/usr \
--disable-static \
--enable-vala

# Until we findout what's wrong with pango
sed -i 's@doc $(GIR_FILE)@doc $(GIR_FILE) || true@' doc/Makefile

make
make DESTDIR=$PKG install
rm $PKG/usr/lib/librsvg-2.la
rm $PKG/usr/lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-svg.la
}
uptodate(){
local latest lastversion url
url="https://download.gnome.org/sources/$name"
latest="`lynx -read_timeout=20 -dump -listonly -nonumbers \
$url/?C=N\;O=D|grep [0-9]/$|head -1`"
lastversion="`lynx -read_timeout=20 -dump -listonly -nonumbers \
$latest/?C=N\;O=D|grep LATEST|grep [0-9]$|cut -d "-" -f3`"
echo "$lastversion"
}
