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

Diff of /eclass/font.eclass

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

Revision 1.23 Revision 1.25
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.23 2007/06/24 06:15:21 dirtyepic Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/font.eclass,v 1.25 2007/07/29 22:20:39 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#
18 18
19FONT_S="${S}" # Dir containing the fonts 19FONT_S="${S}" # Dir containing the fonts
20 20
21FONT_PN="${PN}" # Last part of $FONTDIR 21FONT_PN="${PN}" # Last part of $FONTDIR
22 22
23FONTDIR="/usr/share/fonts/${FONT_PN}" # this is where the fonts are installed 23FONTDIR="/usr/share/fonts/${FONT_PN}" # This is where the fonts are installed
24
25FONT_CONF="" # Space delimited list of fontconfig-2.4 file(s) to install
24 26
25DOCS="" # Docs to install 27DOCS="" # Docs to install
26 28
27IUSE="X" 29IUSE="X"
28 30
58 # Mac OS X has fc-cache at /usr/X11R6/bin 60 # Mac OS X has fc-cache at /usr/X11R6/bin
59 HOME="/root" fc-cache -f "${D}${FONTDIR}" 61 HOME="/root" fc-cache -f "${D}${FONTDIR}"
60 fi 62 fi
61} 63}
62 64
65font_fontconfig() {
66 local conffile
67 if [[ -n ${FONT_CONF} ]]; then
68 if has_version '>=media-libs/fontconfig-2.4'; then
69 insinto /etc/fonts/conf.avail/
70 for conffile in "${FONT_CONF}"; do
71 [[ -e ${conffile} ]] && doins ${conffile}
72 done
73 fi
74 fi
75}
76
63# 77#
64# Public inheritable functions 78# Public inheritable functions
65# 79#
66 80
67font_src_install() { 81font_src_install() {
78 92
79 rm -f fonts.{dir,scale} encodings.dir 93 rm -f fonts.{dir,scale} encodings.dir
80 94
81 font_xfont_config 95 font_xfont_config
82 font_xft_config 96 font_xft_config
97 font_fontconfig
83 98
84 cd "${S}" 99 cd "${S}"
85 dodoc ${DOCS} 2> /dev/null 100 dodoc ${DOCS} 2> /dev/null
86 101
87 # install common docs 102 # install common docs
88 for commondoc in COPYRIGHT README NEWS AUTHORS BUGS ChangeLog; do 103 for commondoc in COPYRIGHT README NEWS AUTHORS BUGS ChangeLog; do
89 [ -s ${commondoc} ] && dodoc ${commondoc} 104 [[ -s ${commondoc} ]] && dodoc ${commondoc}
90 done 105 done
91} 106}
92 107
93font_pkg_setup() { 108font_pkg_setup() {
94 109
95 # make sure we get no colissions 110 # make sure we get no collisions
96 # setup is not the nicest place, but preinst doesn't cut it 111 # setup is not the nicest place, but preinst doesn't cut it
97 [[ -e "${FONTDIR}/fonts.cache-1" ]] && rm -f "${FONTDIR}/fonts.cache-1" 112 [[ -e "${FONTDIR}/fonts.cache-1" ]] && rm -f "${FONTDIR}/fonts.cache-1"
98 113
99} 114}
100 115

Legend:
Removed from v.1.23  
changed lines
  Added in v.1.25

  ViewVC Help
Powered by ViewVC 1.1.20