name=fontconfig
version=2.18.3
release=1
desc="Font configuration and matching"
url="https://www.freedesktop.org/wiki/Software/fontconfig/"
license="MIT"
depend="glibc freetype expat"
makedepend="meson ninja gperf"
source="https://gitlab.freedesktop.org/fontconfig/fontconfig/-/archive/2.18.3/fontconfig-2.18.3.tar.gz"
sha256="SKIP"

build() {
	unset LD_LIBRARY_PATH
	cd "fontconfig-2.18.3"
	meson setup build \
		--prefix=/usr \
		--libdir=/usr/lib \
		--sysconfdir=/etc \
		--localstatedir=/var \
		--buildtype=release \
		--wrap-mode=nodownload \
		-Db_lto=true
	ninja -C build -j"$JOBS"
}

package() {
	unset LD_LIBRARY_PATH
	cd "fontconfig-2.18.3"
	DESTDIR="$pkgdir" ninja -C build install
}
