# Maintainer: 
pkgname=libcroco
pkgver=0.6.13
pkgrel=1
pkgdesc="GNOME CSS 2 parsing and manipulation toolkit"
url="https://gitlab.gnome.org/GNOME/libcroco"
arch="all"
options="!check"  # Can only test already-installed library
license="LGPL-2.1-only"
subpackages="$pkgname-dev"
depends=""
makedepends="glib-dev libxml2-dev"
checkdepends="cmd:which"
source="https://download.gnome.org/sources/$pkgname/0.6/$pkgname-$pkgver.tar.xz
	CVE-2020-12825.patch
	"

# secfixes:
#   0.6.12-r2:
#     - CVE-2017-7960
#   0.6.13-r1:
#     - CVE-2020-12825

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--disable-static
	make
}

check() {
	make test
}

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

sha512sums="038a3ac9d160a8cf86a8a88c34367e154ef26ede289c93349332b7bc449a5199b51ea3611cebf3a2416ae23b9e45ecf8f9c6b24ea6d16a5519b796d3c7e272d4  libcroco-0.6.13.tar.xz
ae568a259a2a3a90f6cf107b4f0d5a0dbb6cb3a560262a43b96460457a4b72b7c5f45c2df9c061ed1f94c41b71bdcf69bd55582a77bf858e46c2c3c8a55fe6e3  CVE-2020-12825.patch"