summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDet2015-07-09 13:31:25 +0300
committerDet2015-07-09 13:31:25 +0300
commit758ef677a8c25e31a82552c2efa7a2754d3f6174 (patch)
tree14e2f65a4e70a5fc5c53ae97aba38045d23ef32b
downloadaur-758ef677a8c25e31a82552c2efa7a2754d3f6174.tar.gz
Initial import: 2.11.1-3
-rw-r--r--.SRCINFO20
-rw-r--r--53-monospace-lcd-filter.patch11
-rw-r--r--PKGBUILD75
-rw-r--r--fontconfig-ubuntu.install124
4 files changed, 230 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..10a153f3f728
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,20 @@
+pkgbase = fontconfig-ubuntu
+ pkgdesc = Library for configuring and customizing font access, with Ubuntu's LCD rendering patches.
+ pkgver = 2.11.1
+ pkgrel = 3
+ url = https://launchpad.net/ubuntu/+source/fontconfig
+ install = fontconfig-ubuntu.install
+ arch = i686
+ arch = x86_64
+ license = custom
+ depends = expat
+ depends = freetype2-ubuntu
+ provides = fontconfig=2.11.1
+ conflicts = fontconfig
+ source = https://launchpad.net/ubuntu/+archive/primary/+files/fontconfig_2.11.1.orig.tar.bz2
+ source = https://launchpad.net/ubuntu/+archive/primary/+files/fontconfig_2.11.1-0ubuntu6.debian.tar.xz
+ source = 53-monospace-lcd-filter.patch
+ options = !libtool
+
+pkgname = fontconfig-ubuntu
+
diff --git a/53-monospace-lcd-filter.patch b/53-monospace-lcd-filter.patch
new file mode 100644
index 000000000000..89703dabb58c
--- /dev/null
+++ b/53-monospace-lcd-filter.patch
@@ -0,0 +1,11 @@
+--- fontconfig-2.10.2/conf.d/53-monospace-lcd-filter.conf 2013-04-06 17:08:56.186733226 +0200
++++ fontconfig-2.10.2/conf.d/53-monospace-lcd-filter.conf 2013-04-06 17:13:26.551935199 +0200
+@@ -6,6 +6,8 @@
+ <match target="font">
+ <test name="family">
+ <string>DejaVu Sans Mono</string>
++ </test>
++ <test name="family">
+ <string>Bitstream Vera Sans Mono</string>
+ </test>
+ <test name="pixelsize" compare="less_eq">
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..6165eba682a8
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,75 @@
+# Maintainer: Det
+# Contributors: Joris Steyn, Florian Dejonckheere, Tevin Zhang, Andrea Fagiani, Biru Ionut, Paul Bredbury
+# Installation order: freetype2-ubuntu → fontconfig-ubuntu → cairo-ubuntu
+
+pkgname=fontconfig-ubuntu
+pkgver=2.11.1
+_ubver=0ubuntu6
+pkgrel=3
+pkgdesc="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=$pkgname.install
+source=("https://launchpad.net/ubuntu/+archive/primary/+files/fontconfig_$pkgver.orig.tar.bz2"
+ "https://launchpad.net/ubuntu/+archive/primary/+files/fontconfig_$pkgver-$_ubver.debian.tar.xz"
+ '53-monospace-lcd-filter.patch')
+md5sums=('824d000eb737af6e16c826dd3b2d6c90'
+ 'c445273d4c1e8d4fa3cc9542d06b486f'
+ 'a17e48be6a06bc056574be6756cb9738')
+
+prepare() {
+ cd fontconfig-$pkgver
+
+ # loop debian patches
+ for _f in $(cat ../debian/patches/series); do
+ patch -Np1 -i "../debian/patches/$_f"
+ done
+
+ # patch
+ patch -u conf.d/53-monospace-lcd-filter.conf ../53-monospace-lcd-filter.patch
+}
+
+build() {
+ cd fontconfig-$pkgver
+
+ # make sure there's no rpath trouble and sane .so versioning - FC and Gentoo do this as well
+ msg2 "Running 'libtoolize'.."
+ libtoolize -f
+
+ msg2 "Running 'autoreconf'.."
+ autoreconf -fi
+
+ # Enable Position Independent Code for prelinking
+ export CFLAGS="$CFLAGS -fPIC"
+
+ msg2 "Running './configure'.."
+ ./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
+
+ msg2 "Running 'make'.."
+ make
+}
+
+package() {
+ cd fontconfig-$pkgver
+
+ msg2 "Running 'make install'.."
+ make DESTDIR="$pkgdir" install
+
+ # License
+ install -Dm0644 COPYING "$pkgdir"/usr/share/licenses/$pkgname/COPYING
+
+ # Docs
+ install -Dm0644 debian/changelog "$pkgdir"/usr/share/doc/fontconfig/changelog
+}
diff --git a/fontconfig-ubuntu.install b/fontconfig-ubuntu.install
new file mode 100644
index 000000000000..b9b081de43c5
--- /dev/null
+++ b/fontconfig-ubuntu.install
@@ -0,0 +1,124 @@
+configs=('10-antialias.conf'
+ '10-hinting.conf'
+ '10-hinting-slight.conf'
+ '11-lcd-filter-lcddefault.conf'
+ '20-fix-globaladvance.conf'
+ '20-unhint-small-vera.conf'
+ '25-ttf-arphic-uming-render.conf'
+ '30-cjk-aliases.conf'
+ '30-defoma.conf'
+ '30-metric-aliases.conf'
+ '30-urw-aliases.conf'
+ '35-ttf-arphic-uming-aliases.conf'
+ '40-nonlatin.conf'
+ '41-ttf-arphic-uming.conf'
+ '45-latin.conf'
+ '49-sansserif.conf'
+ '50-user.conf'
+ '51-local.conf'
+ '53-monospace-lcd-filter.conf'
+ '60-latin.conf'
+ '64-ttf-arphic-uming.conf'
+ '64-ttf-thai-tlwg.conf'
+ '65-fonts-persian.conf'
+ '65-nonlatin.conf'
+ '69-unifont.conf'
+ '80-delicious.conf'
+ '90-synthetic.conf'
+ '90-ttf-arphic-uming-embolden.conf'
+ '90-ttf-thai-tlwg-synthetic.conf')
+
+post_install() {
+ cat << _EOF
+
+ Fontconfig configuration is done via /etc/fonts/conf.avail and conf.d.
+ Read /etc/fonts/conf.d/README for more information.
+
+ Configuration via /etc/fonts/local.conf is still possible,
+ but is no longer recommended for options available in conf.avail.
+
+ Main systemwide configuration should be done by symlinks
+ (especially for autohinting, sub-pixel and lcdfilter):
+
+ cd /etc/fonts/conf.d
+ ln -s ../conf.avail/XX-foo.conf
+
+ Check also https://wiki.archlinux.org/index.php/Font_Configuration
+ and https://wiki.archlinux.org/index.php/Fonts.
+
+_EOF
+
+ echo -n "updating font cache... "
+
+ pushd /etc/fonts/conf.d > /dev/null
+ for config in "${configs[@]}"; do
+ ln -sf ../conf.avail/${config} .
+ done
+ popd > /dev/null
+
+ /usr/bin/fc-cache -f
+ echo "done."
+}
+
+post_upgrade() {
+ if [ `vercmp 2.4.1-1 $2` -gt 0 ]; then
+ # Upgrade from old version, place all symlinks. pre-symlink package version
+ echo -n "Linking configuration files... "
+ pushd /etc/fonts/conf.d > /dev/null
+ for config in "${configs[@]}"; do
+ ln -sf ../conf.avail/${config} .
+ done
+ popd > /dev/null
+ echo "done."
+ fi
+
+ if [ `vercmp 2.6.0-6 $2` -gt 0 ]; then
+ # pre-2.6.0 versions have missing config
+ echo -n "Adding missing configuration files... "
+ pushd /etc/fonts/conf.d > /dev/null
+ ln -sf ../conf.avail/30-metric-aliases.conf .
+ ln -sf ../conf.avail/40-nonlatin.conf .
+ ln -sf ../conf.avail/45-latin.conf .
+ popd > /dev/null
+ echo "done."
+ fi
+
+ # Remove dead links
+ echo -n "Removing outdated configuration files... "
+ for config in /etc/fonts/conf.d/*; do
+ if [ ! -f ${config} ]; then
+ rm -f ${config}
+ fi
+ done
+ echo "done."
+ echo -n "updating font cache... "
+ /usr/bin/fc-cache -f
+ echo "done."
+}
+
+pre_upgrade() {
+ # Link new config files not present on system yet
+ echo -n "Symlinking new configuration files... "
+ pushd /etc/fonts/conf.d > /dev/null
+ for config in "${configs[@]}"; do
+ if [ ! -f ../conf.avail/${config} ]; then
+ ln -sf ../conf.avail/${config} .
+ fi
+ done
+ popd > /dev/null
+ echo "done."
+}
+
+post_remove() {
+ cat << _EOF
+
+ Checking for dead symlinks and leftover files
+ in /etc/fonts/conf.d/
+
+_EOF
+ pushd /etc/fonts/conf.d > /dev/null
+ for config in "${configs[@]}"; do
+ rm -f ${config}
+ done
+ popd > /dev/null
+}