# Maintainer: Joris Steyn <jorissteyn@gmail.com>
# Contributor: Florian Dejonckheere <florian@floriandejonckheere.be>
# Contributor: Tevin Zhang <mail2tevin {at} gmail {dot} com>
# Contributor: Andrea Fagiani <andfagiani {at} gmail {dot} com>
# Contributor: Biru Ionut <biru.ionut at gmail.com>
# Contributor: Paul Bredbury <brebs@sent.com>
# Installation order: freetype2-ubuntu fontconfig-ubuntu cairo-ubuntu
pkgname=fontconfig-ubuntu
pkgver=2.11.0
_ubver=2.11.0-0ubuntu4.debian
pkgrel=2
pkgdesc="A library for configuring and customizing font access, with Ubuntu's LCD rendering patches."
arch=('i686' 'x86_64')
url="https://launchpad.net/ubuntu/+source/fontconfig"
license=('custom')
depends=('expat' 'freetype2-ubuntu')
conflicts=('fontconfig')
provides=("fontconfig=$pkgver")
options=('!libtool')
install=fontconfig.install
source=(https://launchpad.net/ubuntu/+archive/primary/+files/fontconfig_$pkgver.orig.tar.bz2
https://launchpad.net/ubuntu/+archive/primary/+files/fontconfig_$_ubver.tar.gz
53-monospace-lcd-filter.patch)
md5sums=('000bd4baf7aefa828e03414d0c8c7dc5'
'50682ac34c77af146b97c2bcc01c3ffb'
'a17e48be6a06bc056574be6756cb9738')
prepare() {
cd "${srcdir}"/fontconfig-${pkgver}
for _f in $(cat ../debian/patches/series) ; do
patch -Np1 -i "../debian/patches/$_f"
done
patch -u "conf.d/53-monospace-lcd-filter.conf" "${srcdir}/53-monospace-lcd-filter.patch"
}
build() {
cd "${srcdir}"/fontconfig-${pkgver}
# make sure there's no rpath trouble and sane .so versioning - FC and Gentoo do this as well
libtoolize -f
autoreconf -fi
# Enable Position Independent Code for prelinking
export CFLAGS="$CFLAGS -fPIC"
./configure --prefix=/usr \
--sysconfdir=/etc \
--with-templatedir=/etc/fonts/conf.avail \
--with-xmldir=/etc/fonts \
--localstatedir=/var \
--disable-static \
--with-default-fonts=/usr/share/fonts \
--with-add-fonts=/usr/share/fonts
make
}
package() {
cd "${srcdir}"/fontconfig-${pkgver}
make DESTDIR="${pkgdir}" install
# License
install -Dm0644 COPYING "${pkgdir}"/usr/share/licenses/"${pkgname}"/COPYING
# Docs
install -Dm0644 "${srcdir}"/debian/changelog "${pkgdir}"/usr/share/doc/fontconfig/changelog
}
check() {
cd "$srcdir/fontconfig-$pkgver"
# check doesn't work on arch with 2.10.2
# uncomment this when fontconfig >2.10.93 arrives.
make -k check
}
# vim:set ts=2 sw=2 et: