/[gentoo-x86]/eclass/font.eclass
Gentoo

Diff of /eclass/font.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.18 Revision 1.19
1# Copyright 1999-2004 Gentoo Foundation 1# Copyright 1999-2004 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/eclass/font.eclass,v 1.18 2006/01/12 04:42:13 robbat2 Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/font.eclass,v 1.19 2006/09/17 14:33:59 foser Exp $
4 4
5# Author: foser <foser@gentoo.org> 5# Author: foser <foser@gentoo.org>
6 6
7# Font Eclass 7# Font Eclass
8# 8#
9# Eclass to make font installation more uniform 9# Eclass to make font installation uniform
10 10
11inherit eutils 11inherit eutils
12
13 12
14# 13#
15# Variable declarations 14# Variable declarations
16# 15#
17 16
51 50
52} 51}
53 52
54font_xft_config() { 53font_xft_config() {
55 54
55 if ! has_version '>=media-libs/fontconfig-2.4'; then
56 # create fontconfig cache 56 # create fontconfig cache
57 einfo "Creating fontconfig cache ..." 57 einfo "Creating fontconfig cache ..."
58 # Mac OS X has fc-cache at /usr/X11R6/bin 58 # Mac OS X has fc-cache at /usr/X11R6/bin
59 HOME="/root" fc-cache -f "${D}${FONTDIR}" 59 HOME="/root" fc-cache -f "${D}${FONTDIR}"
60 60 fi
61} 61}
62 62
63# 63#
64# Public inheritable functions 64# Public inheritable functions
65# 65#
87 dodoc ${DOCS} 87 dodoc ${DOCS}
88 88
89} 89}
90 90
91font_pkg_setup() { 91font_pkg_setup() {
92
92 # make sure we get no colissions 93 # make sure we get no colissions
93 # setup is not the nicest place, but preinst doesn't cut it 94 # setup is not the nicest place, but preinst doesn't cut it
94 rm -f "${FONTDIR}/fonts.cache-1" 95 rm -f "${FONTDIR}/fonts.cache-1"
96
95} 97}
96 98
99font_pkg_postinst() {
100
101 if has_version '>=media-libs/fontconfig-2.4'; then
102 if [ ${ROOT} == "/" ]; then
103 ebegin "Updating global fontcache"
104 fc-cache -s
105 eend $?
106 fi
107 fi
108
109}
110
111font_pkg_postrm() {
112
113 if has_version '>=media-libs/fontconfig-2.4'; then
114 if [ ${ROOT} == "/" ]; then
115 ebegin "Updating global fontcache"
116 fc-cache -s
117 eend $?
118 fi
119 fi
120
121}
122
97EXPORT_FUNCTIONS src_install pkg_setup 123EXPORT_FUNCTIONS src_install pkg_setup pkg_postinst pkg_postrm

Legend:
Removed from v.1.18  
changed lines
  Added in v.1.19

  ViewVC Help
Powered by ViewVC 1.1.20