Gentoo Archives: gentoo-commits

From: "Peter Volkov (pva)" <pva@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in eclass: font.eclass
Date: Sat, 21 Jun 2008 06:12:51
Message-Id: E1K9wL7-0002Wx-PO@stork.gentoo.org
1 pva 08/06/21 06:12:45
2
3 Modified: font.eclass
4 Log:
5 Make eclass-manpages ready, bug #210933, thanks mren.
6
7 Revision Changes Path
8 1.38 eclass/font.eclass
9
10 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/font.eclass?rev=1.38&view=markup
11 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/font.eclass?rev=1.38&content-type=text/plain
12 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/font.eclass?r1=1.37&r2=1.38
13
14 Index: font.eclass
15 ===================================================================
16 RCS file: /var/cvsroot/gentoo-x86/eclass/font.eclass,v
17 retrieving revision 1.37
18 retrieving revision 1.38
19 diff -u -r1.37 -r1.38
20 --- font.eclass 19 May 2008 00:42:13 -0000 1.37
21 +++ font.eclass 21 Jun 2008 06:12:45 -0000 1.38
22 @@ -1,12 +1,13 @@
23 # Copyright 1999-2007 Gentoo Foundation
24 # Distributed under the terms of the GNU General Public License v2
25 -# $Header: /var/cvsroot/gentoo-x86/eclass/font.eclass,v 1.37 2008/05/19 00:42:13 dirtyepic Exp $
26 +# $Header: /var/cvsroot/gentoo-x86/eclass/font.eclass,v 1.38 2008/06/21 06:12:45 pva Exp $
27
28 -# Author: foser <foser@g.o>
29 -
30 -# Font Eclass
31 +# @ECLASS: font.eclass
32 +# @MAINTAINER:
33 +# fonts@g.o
34 #
35 -# Eclass to make font installation uniform
36 +# Author: foser <foser@g.o>
37 +# @BLURB: Eclass to make font installation uniform
38
39 inherit eutils
40
41 @@ -14,17 +15,35 @@
42 # Variable declarations
43 #
44
45 -FONT_SUFFIX="" # Space delimited list of font suffixes to install
46 -
47 -FONT_S=${S} # Dir containing the fonts
48 -
49 -FONT_PN=${PN} # Last part of $FONTDIR
50 -
51 -FONTDIR=/usr/share/fonts/${FONT_PN} # This is where the fonts are installed
52 -
53 -FONT_CONF=( "" ) # Array, which element(s) is(are) path(s) of fontconfig-2.4 file(s) to install
54 -
55 -DOCS="" # Docs to install
56 +# @ECLASS-VARIABLE: FONT_SUFFIX
57 +# @DESCRIPTION:
58 +# Space delimited list of font suffixes to install
59 +FONT_SUFFIX=""
60 +
61 +# @ECLASS-VARIABLE: FONT_S
62 +# @DESCRIPTION:
63 +# Dir containing the fonts
64 +FONT_S=${S}
65 +
66 +# @ECLASS-VARIABLE: FONT_PN
67 +# @DESCRIPTION:
68 +# Last part of $FONTDIR
69 +FONT_PN=${PN}
70 +
71 +# @ECLASS-VARIABLE: FONTDIR
72 +# @DESCRIPTION:
73 +# This is where the fonts are installed
74 +FONTDIR=/usr/share/fonts/${FONT_PN}
75 +
76 +# @ECLASS-VARIABLE: FONT_CONF
77 +# @DESCRIPTION:
78 +# Array, which element(s) is(are) path(s) of fontconfig-2.4 file(s) to install
79 +FONT_CONF=( "" )
80 +
81 +# @ECLASS-VARIABLE: DOCS
82 +# @DESCRIPTION:
83 +# Docs to install
84 +DOCS=""
85
86 IUSE="X"
87
88 @@ -35,6 +54,9 @@
89 # Public functions
90 #
91
92 +# @FUNCTION: font_xfont_config
93 +# @DESCRIPTION:
94 +# Creates the Xfont files.
95 font_xfont_config() {
96 # create Xfont files
97 if use X ; then
98 @@ -50,6 +72,9 @@
99 fi
100 }
101
102 +# @FUNCTION: font_xft_config
103 +# @DESCRIPTION:
104 +# Creates the fontconfig cache if necessary.
105 font_xft_config() {
106 if ! has_version '>=media-libs/fontconfig-2.4'; then
107 # create fontconfig cache
108 @@ -59,6 +84,9 @@
109 fi
110 }
111
112 +# @FUNCTION: font_fontconfig
113 +# @DESCRIPTION:
114 +# Installs the fontconfig config files of FONT_CONF.
115 font_fontconfig() {
116 local conffile
117 if [[ -n ${FONT_CONF[@]} ]]; then
118 @@ -75,6 +103,9 @@
119 # Public inheritable functions
120 #
121
122 +# @FUNCTION: font_src_install
123 +# @DESCRIPTION:
124 +# The font src_install function, which is exported.
125 font_src_install() {
126 local suffix commondoc
127
128 @@ -101,12 +132,18 @@
129 done
130 }
131
132 +# @FUNCTION: font_pkg_setup
133 +# @DESCRIPTION:
134 +# The font pkg_setup function, which is exported.
135 font_pkg_setup() {
136 # make sure we get no collisions
137 # setup is not the nicest place, but preinst doesn't cut it
138 [[ -e "${FONTDIR}/fonts.cache-1" ]] && rm -f "${FONTDIR}/fonts.cache-1"
139 }
140
141 +# @FUNCTION: font_pkg_postinst
142 +# @DESCRIPTION:
143 +# The font pkg_postinst function, which is exported.
144 font_pkg_postinst() {
145 # unreadable font files = fontconfig segfaults
146 find "${ROOT}"usr/share/fonts/ -type f '!' -perm 0644 -print0 \
147 @@ -121,6 +158,9 @@
148 fi
149 }
150
151 +# @FUNCTION: font_pkg_postrm
152 +# @DESCRIPTION:
153 +# The font pkg_postrm function, which is exported.
154 font_pkg_postrm() {
155 # unreadable font files = fontconfig segfaults
156 find "${ROOT}"usr/share/fonts/ -type f '!' -perm 0644 -print0 \
157
158
159
160 --
161 gentoo-commits@l.g.o mailing list