description="provides the links of Python 3 for the class GObject of GLib."
url="http://www.gnome.org/"

packager="tnut <tnut@nutyx.org>"
contributors="Pierre,Spiky"

makedepends=(python-cairo gobject-introspection xorg-libxxf86vm libffi meson ninja)
run=(python)

name=python-gobject
version=3.42.2
release=4

source=(https://download.gnome.org/sources/pygobject/${version%.*}/pygobject-$version.tar.xz)

build() {
cd pygobject-$version
mkdir build
cd    build

meson --prefix=/usr \
-D python=/usr/bin/python3
ninja
DESTDIR=$PKG ninja install
}
uptodate(){
local latest lastversion url
url="https://download.gnome.org/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"
}
