void-packages/srcpkgs/fontconfig/template

67 lines
2.2 KiB
Bash

# Template build file for 'fontconfig'.
pkgname=fontconfig
version=2.12.1
revision=1
build_style=gnu-configure
configure_args="--disable-static --enable-docs --with-cache-dir=/var/cache/$pkgname"
hostmakedepends="pkg-config"
makedepends="expat-devel zlib-devel freetype-devel"
conf_files="/etc/fonts/fonts.conf"
short_desc="Library for configuring and customizing font access"
maintainer="Juan RP <xtraeme@voidlinux.eu>"
homepage="http://www.fontconfig.org"
license="MIT"
distfiles="${FREEDESKTOP_SITE}/${pkgname}/release/$pkgname-$version.tar.bz2"
checksum=b449a3e10c47e1d1c7a6ec6e2016cca73d3bd68fbbd4f0ae5cc6b573f7d6c7f3
build_options="ultimate"
desc_option_ultimate="Enable ultimate patchset"
if [ ${build_option_ultimate} ]; then
_ultimate_version="2016-04-23"
_ultimate_wrksrc="${XBPS_BUILDDIR}/fontconfig-ultimate-${_ultimate_version}"
hostmakedepends+=" python-lxml gperf automake libtool"
distfiles+=" https://github.com/bohoomil/fontconfig-ultimate/archive/${_ultimate_version}.tar.gz"
checksum+=" 9ea0e2455980be7c2ff649c1deb07838e9be64f4fad939716e0050fd5897b057"
post_extract() {
msg_normal "Applying ultimate patchset"
cp -r ${_ultimate_wrksrc}/conf.d.infinality ${wrksrc}
for P in ${_ultimate_wrksrc}/${pkgname}_patches/*.patch; do
patch -p1 < $P
done
}
pre_configure() {
autoreconf -fi
}
fi
post_install() {
if [ "$CROSS_BUILD" ]; then
sed -i 's,\(Cflags: -I${includedir}\).*,\1,g' ${DESTDIR}/usr/lib/pkgconfig/fontconfig.pc
fi
if [ ${build_option_ultimate} ]; then
vmkdir etc/fonts/conf.avail.infinality
for dir in combi free ms; do
vcopy ${_ultimate_wrksrc}/${pkgname}_patches/${dir} etc/fonts/conf.avail.infinality
done
vbin ${_ultimate_wrksrc}/${pkgname}_patches/fc-presets
fi
}
fontconfig-devel_package() {
depends="${makedepends} ${sourcepkg}>=${version}_${revision}"
short_desc+=" - development files"
pkg_install() {
vmove usr/include
vmove usr/lib/pkgconfig
vmove usr/lib/*.so
vmove usr/share/man/man3
vmove usr/share/doc
if [ ${build_option_ultimate} ]; then
vmkdir usr/share/doc/fontconfig/fonts-settings
vcopy ${_ultimate_wrksrc}/fontconfig_patches/fonts-settings/*.conf usr/share/doc/fontconfig/fonts-settings
vcopy ${_ultimate_wrksrc}/doc/fontconfig-infinality-ultimate/* usr/share/doc/fontconfig
fi
}
}