# Depends on: python2-cairo xorg-libxxf86vm 

description="provides the links of Python 2 for the class GObject of GLib."
url="http://www.gnome.org/"
packager="tnut <tnut@nutyx.org>"
contributors="Pierre B"

name=python2-gobject2
version=2.28.6
release=2

source=(http://www.linuxfromscratch.org/patches/blfs/svn/pygobject-$version-fixes-1.patch
         http://ftp.gnome.org/pub/gnome/sources/pygobject/${version%.*}/pygobject-$version.tar.xz)
	
build() {
cd pygobject-$version
patch -Np1 -i ../pygobject-$version-fixes-1.patch
./configure --prefix=/usr --disable-introspection
make
make DESTDIR=$PKG install

# Obsolets libs
rm $PKG/usr/lib/libpyglib-2.0-python.la
rm $PKG/usr/lib/python2.7/site-packages/glib/_glib.la
rm $PKG/usr/lib/python2.7/site-packages/gobject/_gobject.la
rm $PKG/usr/lib/python2.7/site-packages/gtk-2.0/gio/_gio.la
rm $PKG/usr/lib/python2.7/site-packages/gtk-2.0/gio/unix.la
}
uptodate(){
local latest lastversion url
url="http://ftp.gnome.org/pub/gnome/sources/pygobject"
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"
} 
