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

Contents of /eclass/font.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide annotations) (download)
Mon May 31 14:21:06 2004 UTC (10 years, 4 months ago) by foser
Branch: MAIN
add initial version of a font eclass

1 foser 1.1 # Copyright 1999-2004 Gentoo Technologies, Inc.
2     # Distributed under the terms of the GNU General Public License v2
3     # $Header: /home/cvsroot/gentoo-x86/eclass/gnome2.eclass,v 1.36 2003/10/26 10:22:51 liquidx Exp $
4    
5     # Author: foser <foser@gentoo.org>
6    
7     # Font Eclass
8     #
9     # Eclass to make font installation more uniform
10    
11     ECLASS="font"
12     INHERITED="$INHERITED $ECLASS"
13    
14     #
15     # Variable declarations
16     #
17    
18     FONT_SUFFIX="" # Space delimited list of font suffixes to install
19    
20     DOCS="" # Docs to install
21    
22     IUSE="${IUSE} X"
23    
24     DEPEND="${DEPEND} \
25     X? ( virtual/x11 ) \
26     media-libs/fontconfig"
27    
28     #
29     # Public inheritable functions
30     #
31    
32     font_src_install() {
33    
34     local suffix, doc
35    
36     insinto /usr/share/fonts/${PN}
37    
38     for suffix in ${FONT_SUFFIX}; do
39     doins ${S}/*.${suffix}
40     done
41    
42     rm -f fonts.{dir,scale} encodings.dir
43    
44     # create Xfont files
45     if [ -n "`use X`" ] ;
46     then
47     einfo "Creating fonts.scale & fonts.dir..."
48     mkfontscale ${D}/usr/share/fonts/${PN}
49     mkfontdir \
50     -e /usr/share/fonts/encodings \
51     -e /usr/share/fonts/encodings/large \
52     -e /usr/X11R6/lib/X11/fonts/encodings ${D}/usr/share/fonts/${PN}
53     doins fonts.alias
54     fi
55    
56     # create fontconfig cache
57     einfo "Creating fontconfig cache..."
58     HOME="/root" /usr/bin/fc-cache -f ${D}/usr/share/fonts/${PN}
59    
60     # try to install some common docs
61     DOCS="${DOCS} COPYRIGHT README NEWS"
62     for doc in ${DOCS}; do
63     dodoc ${doc}
64     done
65    
66     }
67    
68     EXPORT_FUNCTIONS src_install

  ViewVC Help
Powered by ViewVC 1.1.20