diff options
author | James Meyer <James.meyer@operamail.com> | 2008-10-02 03:19:12 (GMT) |
---|---|---|
committer | James Meyer <James.meyer@operamail.com> | 2008-10-02 03:19:12 (GMT) |
commit | 0e2532d4e8f4eed5e047f1db54d5c03ba849ec0a (patch) | |
tree | c0aa2c0b53c317be87eacfcb77b63f53f1f415e7 /abs/core/fontconfig | |
download | linhes_pkgbuild-0e2532d4e8f4eed5e047f1db54d5c03ba849ec0a.zip linhes_pkgbuild-0e2532d4e8f4eed5e047f1db54d5c03ba849ec0a.tar.gz linhes_pkgbuild-0e2532d4e8f4eed5e047f1db54d5c03ba849ec0a.tar.bz2 |
initial import
Diffstat (limited to 'abs/core/fontconfig')
-rw-r--r-- | abs/core/fontconfig/29-replace-bitmap-fonts.conf | 37 | ||||
-rw-r--r-- | abs/core/fontconfig/PKGBUILD | 32 | ||||
-rw-r--r-- | abs/core/fontconfig/fontconfig.install | 100 |
3 files changed, 169 insertions, 0 deletions
diff --git a/abs/core/fontconfig/29-replace-bitmap-fonts.conf b/abs/core/fontconfig/29-replace-bitmap-fonts.conf new file mode 100644 index 0000000..7ac4483 --- /dev/null +++ b/abs/core/fontconfig/29-replace-bitmap-fonts.conf @@ -0,0 +1,37 @@ +<?xml version="1.0"?> +<!DOCTYPE fontconfig SYSTEM "fonts.dtd"> +<fontconfig> + <!-- Replace generic bitmap font names by generic font families. + These font-families will get replaced by other rules and + default to scaled ones. --> + <match target="pattern" name="family"> + <test name="family" qual="any"> + <string>Helvetica</string> + </test> + <edit mode="assign" name="family"> + <string>Arial</string> + <string>Liberation Sans</string> + <string>sans-serif</string> + </edit> + </match> + <match target="pattern" name="family"> + <test name="family" qual="any"> + <string>Courier</string> + </test> + <edit mode="assign" name="family"> + <string>Courier New</string> + <string>Liberation Mono</string> + <string>monospace</string> + </edit> + </match> + <match target="pattern" name="family"> + <test name="family" qual="any"> + <string>Times</string> + </test> + <edit mode="assign" name="family"> + <string>Times New Roman</string> + <string>Liberation Serif</string> + <string>serif</string> + </edit> + </match> +</fontconfig> diff --git a/abs/core/fontconfig/PKGBUILD b/abs/core/fontconfig/PKGBUILD new file mode 100644 index 0000000..7abdf6d --- /dev/null +++ b/abs/core/fontconfig/PKGBUILD @@ -0,0 +1,32 @@ +# $Id: PKGBUILD 4424 2008-07-06 22:09:03Z jgc $ +# Maintainer: Jan de Groot <jgc@archlinux.org> +pkgname=fontconfig +pkgver=2.6.0 +pkgrel=2 +pkgdesc="A library for configuring and customizing font access" +arch=(i686 x86_64) +url="http://www.fontconfig.org/release/" +license=('custom') +depends=('expat>=2.0' 'freetype2>=2.3.7') +options=('!libtool') +install=fontconfig.install +source=(http://www.fontconfig.org/release/${pkgname}-${pkgver}.tar.gz + 29-replace-bitmap-fonts.conf) +md5sums=('ab54ec1d4ddd836313fdbc0cd5299d6d' + 'f6b67e8cc79197ed6abd4701911e83da') + +build() { + cd ${startdir}/src/${pkgname}-${pkgver} + # enable Position Independent Code for prelinking + export CFLAGS="${CFLAGS} -fPIC" + ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var || return 1 + make || return 1 + make DESTDIR=${startdir}/pkg install || return 1 + install -m644 ${startdir}/src/29-replace-bitmap-fonts.conf \ + ${startdir}/pkg/etc/fonts/conf.avail || return 1 + rm -f ${startdir}/pkg/etc/fonts/conf.d/*.conf + + #Install license + install -m755 -d ${pkgdir}/usr/share/licenses/${pkgname} + install -m644 COPYING ${pkgdir}/usr/share/licenses/${pkgname}/ || return 1 +} diff --git a/abs/core/fontconfig/fontconfig.install b/abs/core/fontconfig/fontconfig.install new file mode 100644 index 0000000..6608834 --- /dev/null +++ b/abs/core/fontconfig/fontconfig.install @@ -0,0 +1,100 @@ +configs=('20-fix-globaladvance.conf' + '20-unhint-small-vera.conf' + '29-replace-bitmap-fonts.conf' + '30-metric-aliases.conf' + '30-urw-aliases.conf' + '40-nonlatin.conf' + '45-latin.conf' + '49-sansserif.conf' + '50-user.conf' + '51-local.conf' + '60-latin.conf' + '65-fonts-persian.conf' + '65-nonlatin.conf' + '69-unifont.conf' + '80-delicious.conf' + '90-synthetic.conf') + +post_install() { + echo -n "updating font cache... " + /sbin/ldconfig -r . + 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() { + rm -f /etc/fonts/conf.d/10-bitmaps.conf + cat << _EOF + +===> Important Fontconfig configuration change <=== + + The way fontconfig is configured has been changed. + Configuration is done via /etc/fonts/conf.avail and conf.d. + Read /etc/fonts/conf.avail/README for more information. + + Configuration via /etc/fonts/local.conf is still possible, + but is no longer recommended for options available in conf.avail. + +_EOF + + 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-1 $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() { + pushd /etc/fonts/conf.d > /dev/null + for config in "${configs[@]}"; do + rm -f ${config} + done + popd > /dev/null +} |