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

Diff of /eclass/font.eclass

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

Revision 1.29 Revision 1.30
1# Copyright 1999-2007 Gentoo Foundation 1# Copyright 1999-2007 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.29 2007/09/16 02:20:05 dirtyepic Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/font.eclass,v 1.30 2007/09/16 06:21:05 dirtyepic 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#
82 82
83 insinto "${FONTDIR}" 83 insinto "${FONTDIR}"
84 84
85 for suffix in ${FONT_SUFFIX}; do 85 for suffix in ${FONT_SUFFIX}; do
86 doins *.${suffix} 86 doins *.${suffix}
87 # ensure fonts are world readable to prevent fontconfig segfaults
88 chmod 0644 ${D}${FONTDIR}/*.${suffix}
89 done 87 done
90 88
91 rm -f fonts.{dir,scale} encodings.dir 89 rm -f fonts.{dir,scale} encodings.dir
92 90
93 font_xfont_config 91 font_xfont_config
108 # setup is not the nicest place, but preinst doesn't cut it 106 # setup is not the nicest place, but preinst doesn't cut it
109 [[ -e "${FONTDIR}/fonts.cache-1" ]] && rm -f "${FONTDIR}/fonts.cache-1" 107 [[ -e "${FONTDIR}/fonts.cache-1" ]] && rm -f "${FONTDIR}/fonts.cache-1"
110} 108}
111 109
112font_pkg_postinst() { 110font_pkg_postinst() {
111 find /usr/share/fonts/ -type f \! -perm 0644 -print0 \
112 | xargs -0 chmod 0644 2&>/dev/null
113
113 if has_version '>=media-libs/fontconfig-2.4'; then 114 if has_version '>=media-libs/fontconfig-2.4'; then
114 if [ ${ROOT} == "/" ]; then 115 if [ ${ROOT} == "/" ]; then
115 ebegin "Updating global fontcache" 116 ebegin "Updating global fontcache"
116 fc-cache -fs 117 fc-cache -fs
117 eend $? 118 eend $?
118 fi 119 fi
119 fi 120 fi
120} 121}
121 122
122font_pkg_postrm() { 123font_pkg_postrm() {
124 find /usr/share/fonts/ -type f \! -perm 0644 -print0 \
125 | xargs -0 chmod 0644 2&>/dev/null
126
123 if has_version '>=media-libs/fontconfig-2.4'; then 127 if has_version '>=media-libs/fontconfig-2.4'; then
124 if [ ${ROOT} == "/" ]; then 128 if [ ${ROOT} == "/" ]; then
125 ebegin "Updating global fontcache" 129 ebegin "Updating global fontcache"
126 fc-cache -fs 130 fc-cache -fs
127 eend $? 131 eend $?

Legend:
Removed from v.1.29  
changed lines
  Added in v.1.30

  ViewVC Help
Powered by ViewVC 1.1.20