| 1 | # Copyright 1999-2004 Gentoo Technologies, Inc. |
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.2 2004/05/31 14:59:26 foser Exp $ |
3 | # $Header: /var/cvsroot/gentoo-x86/eclass/font.eclass,v 1.7 2004/09/15 23:10:21 kugelfang 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 | # |
| 9 | # Eclass to make font installation more uniform |
9 | # Eclass to make font installation more uniform |
|
|
10 | |
|
|
11 | inherit eutils |
| 10 | |
12 | |
| 11 | ECLASS="font" |
13 | ECLASS="font" |
| 12 | INHERITED="$INHERITED $ECLASS" |
14 | INHERITED="$INHERITED $ECLASS" |
| 13 | |
15 | |
| 14 | # |
16 | # |
| … | |
… | |
| 32 | # |
34 | # |
| 33 | |
35 | |
| 34 | font_xfont_config() { |
36 | font_xfont_config() { |
| 35 | |
37 | |
| 36 | # create Xfont files |
38 | # create Xfont files |
| 37 | if [ -n "`use X`" ] ; |
39 | if use X ; |
| 38 | then |
40 | then |
| 39 | einfo "Creating fonts.scale & fonts.dir..." |
41 | einfo "Creating fonts.scale & fonts.dir..." |
| 40 | mkfontscale ${D}/usr/share/fonts/${PN} |
42 | mkfontscale ${D}/usr/share/fonts/${PN} |
| 41 | mkfontdir \ |
43 | mkfontdir \ |
| 42 | -e /usr/share/fonts/encodings \ |
44 | -e /usr/share/fonts/encodings \ |
| 43 | -e /usr/share/fonts/encodings/large \ |
45 | -e /usr/share/fonts/encodings/large \ |
| 44 | -e /usr/X11R6/lib/X11/fonts/encodings \ |
46 | -e /usr/X11R6/$(get_libdir)/X11/fonts/encodings \ |
| 45 | ${D}/usr/share/fonts/${PN} |
47 | ${D}/usr/share/fonts/${PN} |
|
|
48 | if [ -e ${FONT_S}/fonts.alias ] ; |
|
|
49 | then |
| 46 | doins ${FONT_S}/fonts.alias |
50 | doins ${FONT_S}/fonts.alias |
|
|
51 | fi |
| 47 | fi |
52 | fi |
| 48 | |
53 | |
| 49 | } |
54 | } |
| 50 | |
55 | |
| 51 | font_xft_config() { |
56 | font_xft_config() { |
| … | |
… | |
| 60 | # Public inheritable functions |
65 | # Public inheritable functions |
| 61 | # |
66 | # |
| 62 | |
67 | |
| 63 | font_src_install() { |
68 | font_src_install() { |
| 64 | |
69 | |
| 65 | local suffix doc |
70 | local suffix |
| 66 | |
71 | |
| 67 | cd ${FONT_S} |
72 | cd ${FONT_S} |
| 68 | |
73 | |
| 69 | insinto /usr/share/fonts/${PN} |
74 | insinto /usr/share/fonts/${PN} |
| 70 | |
75 | |
| … | |
… | |
| 78 | font_xft_config |
83 | font_xft_config |
| 79 | |
84 | |
| 80 | cd ${S} |
85 | cd ${S} |
| 81 | # try to install some common docs |
86 | # try to install some common docs |
| 82 | DOCS="${DOCS} COPYRIGHT README NEWS" |
87 | DOCS="${DOCS} COPYRIGHT README NEWS" |
| 83 | for doc in ${DOCS}; do |
88 | for f in ${DOCS}; do |
| 84 | dodoc ${doc} |
89 | [[ -e ${f} ]] && dodoc ${f} |
| 85 | done |
90 | done |
| 86 | |
|
|
| 87 | } |
91 | } |
| 88 | |
92 | |
| 89 | EXPORT_FUNCTIONS src_install |
93 | EXPORT_FUNCTIONS src_install |