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

Diff of /eclass/font.eclass

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

Revision 1.55 Revision 1.56
1# Copyright 1999-2011 Gentoo Foundation 1# Copyright 1999-2013 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.55 2013/04/05 13:25:25 yngwin Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/font.eclass,v 1.56 2013/06/09 02:08:23 lu_zero Exp $
4 4
5# @ECLASS: font.eclass 5# @ECLASS: font.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# fonts@gentoo.org 7# fonts@gentoo.org
8# @BLURB: Eclass to make font installation uniform 8# @BLURB: Eclass to make font installation uniform
54DEPEND="X? ( 54DEPEND="X? (
55 x11-apps/mkfontdir 55 x11-apps/mkfontdir
56 media-fonts/encodings 56 media-fonts/encodings
57 ) 57 )
58 >=media-libs/fontconfig-2.4.0" 58 >=media-libs/fontconfig-2.4.0"
59RDEPEND="${DEPEND}" 59RDEPEND=""
60 60
61# @FUNCTION: font_xfont_config 61# @FUNCTION: font_xfont_config
62# @DESCRIPTION: 62# @DESCRIPTION:
63# Generate Xorg font files (mkfontscale/mkfontdir). 63# Generate Xorg font files (mkfontscale/mkfontdir).
64font_xfont_config() { 64font_xfont_config() {
209 elog 209 elog
210 elog "Use \`eselect fontconfig\` to enable/disable them." 210 elog "Use \`eselect fontconfig\` to enable/disable them."
211 echo 211 echo
212 fi 212 fi
213 213
214 if [[ ${ROOT} == / ]]; then 214 if has_version media-libs/fontconfig && [[ ${ROOT} == / ]]; then
215 ebegin "Updating global fontcache" 215 ebegin "Updating global fontcache"
216 fc-cache -fs 216 fc-cache -fs
217 eend $? 217 eend $?
218 fi 218 fi
219} 219}
226 226
227 # unreadable font files = fontconfig segfaults 227 # unreadable font files = fontconfig segfaults
228 find "${EROOT}"usr/share/fonts/ -type f '!' -perm 0644 -print0 \ 228 find "${EROOT}"usr/share/fonts/ -type f '!' -perm 0644 -print0 \
229 | xargs -0 chmod -v 0644 2>/dev/null 229 | xargs -0 chmod -v 0644 2>/dev/null
230 230
231 if [[ ${ROOT} == / ]]; then 231 if has_version media-libs/fontconfig && [[ ${ROOT} == / ]]; then
232 ebegin "Updating global fontcache" 232 ebegin "Updating global fontcache"
233 fc-cache -fs 233 fc-cache -fs
234 eend $? 234 eend $?
235 fi 235 fi
236} 236}

Legend:
Removed from v.1.55  
changed lines
  Added in v.1.56

  ViewVC Help
Powered by ViewVC 1.1.20