diff options
author | Marinus Schraal <foser@gentoo.org> | 2006-09-17 14:33:59 +0000 |
---|---|---|
committer | Marinus Schraal <foser@gentoo.org> | 2006-09-17 14:33:59 +0000 |
commit | 9315e38c2ad40cc6fede9570cd4d833285f972e3 (patch) | |
tree | 3b6ffd3cdd46547a1413d87f329f2c34f42e07e3 /eclass | |
parent | Added ~alpha keyword. (diff) | |
download | gentoo-2-9315e38c2ad40cc6fede9570cd4d833285f972e3.tar.gz gentoo-2-9315e38c2ad40cc6fede9570cd4d833285f972e3.tar.bz2 gentoo-2-9315e38c2ad40cc6fede9570cd4d833285f972e3.zip |
update eclass for fontconfig 2.4
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/font.eclass | 44 |
1 files changed, 35 insertions, 9 deletions
diff --git a/eclass/font.eclass b/eclass/font.eclass index a7fbceb3fd43..bd5c6845b910 100644 --- a/eclass/font.eclass +++ b/eclass/font.eclass @@ -1,16 +1,15 @@ # Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/font.eclass,v 1.18 2006/01/12 04:42:13 robbat2 Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/font.eclass,v 1.19 2006/09/17 14:33:59 foser Exp $ # Author: foser <foser@gentoo.org> # Font Eclass # -# Eclass to make font installation more uniform +# Eclass to make font installation uniform inherit eutils - # # Variable declarations # @@ -53,11 +52,12 @@ font_xfont_config() { font_xft_config() { - # create fontconfig cache - einfo "Creating fontconfig cache ..." - # Mac OS X has fc-cache at /usr/X11R6/bin - HOME="/root" fc-cache -f "${D}${FONTDIR}" - + if ! has_version '>=media-libs/fontconfig-2.4'; then + # create fontconfig cache + einfo "Creating fontconfig cache ..." + # Mac OS X has fc-cache at /usr/X11R6/bin + HOME="/root" fc-cache -f "${D}${FONTDIR}" + fi } # @@ -89,9 +89,35 @@ font_src_install() { } font_pkg_setup() { + # make sure we get no colissions # setup is not the nicest place, but preinst doesn't cut it rm -f "${FONTDIR}/fonts.cache-1" + +} + +font_pkg_postinst() { + + if has_version '>=media-libs/fontconfig-2.4'; then + if [ ${ROOT} == "/" ]; then + ebegin "Updating global fontcache" + fc-cache -s + eend $? + fi + fi + +} + +font_pkg_postrm() { + + if has_version '>=media-libs/fontconfig-2.4'; then + if [ ${ROOT} == "/" ]; then + ebegin "Updating global fontcache" + fc-cache -s + eend $? + fi + fi + } -EXPORT_FUNCTIONS src_install pkg_setup +EXPORT_FUNCTIONS src_install pkg_setup pkg_postinst pkg_postrm |