# Contributor: Rasmus Thomsen <oss@cogitri.dev>
# Contributor: Carlo Landmeter <clandmeter@alpinelinux.org>
# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=cogl
pkgver=1.22.8
pkgrel=3
pkgdesc="An object oriented GL/GLES Abstraction/Utility Layer"
options="!check" # All tests fail for unknown reasons
url="https://gitlab.gnome.org/Archive/cogl"
arch="all"
license="MIT"
makedepends="
	cairo-dev
	gdk-pixbuf-dev
	gobject-introspection-dev
	gtk-doc
	libxcomposite-dev
	libxrandr-dev
	mesa-dev
	pango-dev
	wayland-dev
	"
#	gstreamer-dev
#	gst-plugins-base-dev
#	"
subpackages="$pkgname-dev $pkgname-lang"
source="https://download.gnome.org/sources/cogl/${pkgver%.*}/cogl-$pkgver.tar.xz"

prepare() {
	default_prepare
	update_config_sub
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--localstatedir=/var \
		--disable-debug \
		--disable-gles1 \
		--enable-gles2 \
		--enable-kms-egl-platform \
		--enable-gl \
		--enable-gdk-pixbuf \
		--enable-introspection \
		--enable-cairo \
		--enable-wayland-egl-platform \
		--enable-wayland-egl-server \
		--disable-dependency-tracking
	make
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="
702d5b1b22dc34bffaa82c9c57021caf036ee3a13fa7ca24a90cca1ebc0f8b7a86070cc1fe5125757132b02774fa874bb55675c96d1ccbc233fac0e6132da65f  cogl-1.22.8.tar.xz
"
