# Contributor: Mika Havela <mika.havela@gmail.com>
# Maintainer: 
pkgname=fontconfig
pkgver=2.16.0
pkgrel=0
pkgdesc="Library for configuring and customizing font access"
url="https://www.freedesktop.org/wiki/Software/fontconfig/"
arch="all"
options="!check"  # Fails test with fixed fonts
license="MIT"
depends=""
makedepends="freetype-dev expat-dev python3-dev gperf util-linux-dev"
triggers="$pkgname.trigger=/usr/share/fonts/*"
subpackages="$pkgname-dev $pkgname-lang"
source="https://www.freedesktop.org/software/fontconfig/release/${pkgname}-${pkgver}.tar.xz"

build() {
	# regenerate hash functions
	rm -f src/fcobjshash.h

	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--localstatedir=/var \
		--enable-static \
		--disable-docs
	make
}

check() {
	make check
}

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

sha512sums="90b5c39e5eadc56a9fbddd69b2a6eaa6bf9ee5cda003091b0896e66f87f3c1be8ab4442f54d20fca7232d72f60d9578f5e5ba3f376e39b64b8a2aa7b8f13b062  fontconfig-2.16.0.tar.xz"