description="An object oriented GL/GLES Abstraction/Utility Layer"
url="http://www.gnome.org/"

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

makedepends=(xorg-libxrandr gdk-pixbuf mesa xorg-glu
             pango xorg-libdrm gobject-introspection)

name=cogl
version=1.22.8

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

build() {
unset MAKEFLAGS

cd $name-$version
autoreconf
./configure --prefix=/usr \
--enable-gles{1,2} \
--enable-{kms,wayland,xlib}-egl-platform \
--enable-wayland-egl-server
make
make DESTDIR=$PKG install
rm $PKG/usr/lib/{libcogl,libcogl-path,libcogl-pango,libcogl-gles2}.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"
}
