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

Diff of /eclass/font.eclass

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

Revision 1.31 Revision 1.32
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.31 2007/09/16 07:07:52 dirtyepic Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/font.eclass,v 1.32 2007/09/16 20:00:56 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#
107 [[ -e "${FONTDIR}/fonts.cache-1" ]] && rm -f "${FONTDIR}/fonts.cache-1" 107 [[ -e "${FONTDIR}/fonts.cache-1" ]] && rm -f "${FONTDIR}/fonts.cache-1"
108} 108}
109 109
110font_pkg_postinst() { 110font_pkg_postinst() {
111 # unreadable font files = fontconfig segfaults 111 # unreadable font files = fontconfig segfaults
112 badperms="$( find /usr/share/fonts/ -type f \! -perm 0644 -print )" 112 find "${ROOT}"usr/share/fonts/ -type f '!' -perm 0644 -print0 \
113 if [[ -n ${badperms} ]]; then 113 | xargs -r -0 chmod -v 0644
114 echo
115 for fontfile in ${badperms}; do
116 ewarn $( chmod -v 0644 ${fontfile} )
117 done
118 echo
119 fi
120 114
121 if has_version '>=media-libs/fontconfig-2.4'; then 115 if has_version '>=media-libs/fontconfig-2.4'; then
122 if [ ${ROOT} == "/" ]; then 116 if [ ${ROOT} == "/" ]; then
123 ebegin "Updating global fontcache" 117 ebegin "Updating global fontcache"
124 fc-cache -fs 118 fc-cache -fs
127 fi 121 fi
128} 122}
129 123
130font_pkg_postrm() { 124font_pkg_postrm() {
131 # unreadable font files = fontconfig segfaults 125 # unreadable font files = fontconfig segfaults
132 badperms="$( find /usr/share/fonts/ -type f \! -perm 0644 -print )" 126 find "${ROOT}"usr/share/fonts/ -type f '!' -perm 0644 -print0 \
133 if [[ -n ${badperms} ]]; then 127 | xargs -r -0 chmod -v 0644
134 echo
135 for fontfile in ${badperms}; do
136 ewarn $( chmod -v 0644 ${fontfile} )
137 done
138 echo
139 fi
140 128
141 if has_version '>=media-libs/fontconfig-2.4'; then 129 if has_version '>=media-libs/fontconfig-2.4'; then
142 if [ ${ROOT} == "/" ]; then 130 if [ ${ROOT} == "/" ]; then
143 ebegin "Updating global fontcache" 131 ebegin "Updating global fontcache"
144 fc-cache -fs 132 fc-cache -fs

Legend:
Removed from v.1.31  
changed lines
  Added in v.1.32

  ViewVC Help
Powered by ViewVC 1.1.20