Name fontconfig
Description Library for configuring and customizing font access
Version 2.15.0-r3
Package Base fontconfig
Homepage https://www.freedesktop.org/wiki/Software/fontconfig
Maintainers ['Natanael Copa <ncopa@alpinelinux.org>']
Contributors ['Mika Havela <mika.havela@gmail.com>']
Distro-repo https://gitlab.alpinelinux.org/alpine/aports/-/tree/3.22-stable/main/fontconfig
Sources ['fix-arithmetic.patch', 'https://www.freedesktop.org/software/fontconfig/release/fontconfig-2.15.0-r3.tar.gz']
Dependencies ['/bin/sh', 'libc.musl-x86_64.so.1', 'libexpat.so.1', 'libfreetype.so.6']
Optional-Dependencies []
Build-Dependencies ['freetype-dev', 'expat-dev', 'python3-dev', 'gperf', 'util-linux-dev', 'docbook2x']
Provides ['so:libfontconfig.so.1=1.12.1', 'cmd:fc-cache=2.15.0-r3', 'cmd:fc-cat=2.15.0-r3', 'cmd:fc-conflist=2.15.0-r3', 'cmd:fc-list=2.15.0-r3', 'cmd:fc-match=2.15.0-r3', 'cmd:fc-pattern=2.15.0-r3', 'cmd:fc-query=2.15.0-r3', 'cmd:fc-scan=2.15.0-r3', 'cmd:fc-validate=2.15.0-r3']
Builddate 07-04-2025 10:08:03
Architecture x86_64
Distro-Version v3.22
Licenses ['MIT']
Hash Q1+KSt81PBdOUodSG3iTzlS0xfTYY=
# Contributor: Mika Havela <mika.havela@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=fontconfig
pkgver=2.15.0
pkgrel=3
pkgdesc="Library for configuring and customizing font access"
url="https://www.freedesktop.org/wiki/Software/fontconfig"
arch="all"
license="MIT"
makedepends="freetype-dev expat-dev python3-dev gperf util-linux-dev docbook2x"
checkdepends="bash json-c-dev uuidgen curl"
triggers="$pkgname.trigger=/usr/share/fonts/*"
subpackages="$pkgname-static $pkgname-dev $pkgname-doc"
source="https://www.freedesktop.org/software/fontconfig/release/fontconfig-$pkgver.tar.gz
	fix-arithmetic.patch
	"

# For generation of man pages
export DOC2MAN=docbook2x-man

prepare() {
	default_prepare
	update_config_sub
}

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

	# test tries to download google fonts from internet
	# https://gitlab.freedesktop.org/fontconfig/fontconfig/-/blob/2.15.0/test/run-test.sh#L435
	chmod -x test/test-crbug1004254
}

check() {
	make -j1 check || (cat test/test-suite.log; false)
}

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

sha512sums="
4feb02935d94002ed0aba5b9e44bab47c14bbc0ecfcdcdb14c9004681109cef51415cd2368e959f8c4bd2e67ff9e8fcf45102a4bd8728b2f50b3c56723fcb81c  fontconfig-2.15.0.tar.gz
9e0a010c8075085dedfe6bda1b26d8a7c693091e3ba5e823da8dd79468116c7b6e4a94b1173649999075cf9532bfc81adc97d0182bbff7635e9699bc44d6aa1c  fix-arithmetic.patch
"