# Depends on: pcre2, gtk3, perl-xml-parser, python2-gtk, gobject-introspection

description="Vte is a library (libvte) implementing a terminal emulator widget for GTK+ 3"
url="http://developer.gnome.org/arch/gnome/widgets/vte.html"
packager=" <tnut tnut@nutyx.org>"
contributors="Greg, Pierre B, Jayce"

name=vte3
_name=vte
version=0.54.1
release=2

source=(http://ftp.gnome.org/pub/gnome/sources/${_name}/${version%.*}/${_name}-$version.tar.xz)

build() {

	cd ${_name}-$version
	sed -i '/Werror/d' configure.ac
	autoreconf
	./configure --prefix=/usr\
		--libexecdir=/usr/lib/$name \
		--enable-introspection \
		--with-xft2 \
		--with-pangox
		
	make
	make DESTDIR=$PKG install

# Obsolet lib
rm $PKG/usr/lib/libvte-2.91.la	
}
uptodate(){
local latest lastversion url
url="http://ftp.gnome.org/pub/gnome/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"
}
