Gentoo Archives: gentoo-commits

From: "Ryan Hill (dirtyepic)" <dirtyepic@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in eclass: font.eclass
Date: Thu, 30 Sep 2010 03:46:21
Message-Id: 20100930034611.8A4B92004C@flycatcher.gentoo.org
1 dirtyepic 10/09/30 03:46:11
2
3 Modified: font.eclass
4 Log:
5 Minor cleanups, eclass-manpages updates.
6
7 Revision Changes Path
8 1.52 eclass/font.eclass
9
10 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/font.eclass?rev=1.52&view=markup
11 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/font.eclass?rev=1.52&content-type=text/plain
12 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/font.eclass?r1=1.51&r2=1.52
13
14 Index: font.eclass
15 ===================================================================
16 RCS file: /var/cvsroot/gentoo-x86/eclass/font.eclass,v
17 retrieving revision 1.51
18 retrieving revision 1.52
19 diff -u -r1.51 -r1.52
20 --- font.eclass 9 Jul 2010 03:44:19 -0000 1.51
21 +++ font.eclass 30 Sep 2010 03:46:11 -0000 1.52
22 @@ -1,6 +1,6 @@
23 # Copyright 1999-2010 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.51 2010/07/09 03:44:19 dirtyepic Exp $
26 +# $Header: /var/cvsroot/gentoo-x86/eclass/font.eclass,v 1.52 2010/09/30 03:46:11 dirtyepic Exp $
27
28 # @ECLASS: font.eclass
29 # @MAINTAINER:
30 @@ -12,19 +12,23 @@
31 EXPORT_FUNCTIONS pkg_setup src_install pkg_postinst pkg_postrm
32
33 # @ECLASS-VARIABLE: FONT_SUFFIX
34 +# @DEFAULT_UNSET
35 +# @REQUIRED
36 # @DESCRIPTION:
37 # Space delimited list of font suffixes to install.
38 -FONT_SUFFIX=${FONT_SUFFIX:=}
39 +FONT_SUFFIX=${FONT_SUFFIX:-}
40
41 # @ECLASS-VARIABLE: FONT_S
42 +# @DEFAULT_UNSET
43 +# @REQUIRED
44 # @DESCRIPTION:
45 # Working directory containing the fonts.
46 -FONT_S=${FONT_S:=${S}}
47 +FONT_S=${FONT_S:-${S}}
48
49 # @ECLASS-VARIABLE: FONT_PN
50 # @DESCRIPTION:
51 # Font name (ie. last part of FONTDIR).
52 -FONT_PN=${FONT_PN:=${PN}}
53 +FONT_PN=${FONT_PN:-${PN}}
54
55 # @ECLASS-VARIABLE: FONTDIR
56 # @DESCRIPTION:
57 @@ -32,13 +36,17 @@
58 FONTDIR=${FONTDIR:-/usr/share/fonts/${FONT_PN}}
59
60 # @ECLASS-VARIABLE: FONT_CONF
61 +# @DEFAULT_UNSET
62 # @DESCRIPTION:
63 # Array containing fontconfig conf files to install.
64 FONT_CONF=( "" )
65
66 # @ECLASS-VARIABLE: DOCS
67 +# @DEFAULT_UNSET
68 # @DESCRIPTION:
69 # Space delimited list of docs to install.
70 +# We always install these:
71 +# COPYRIGHT README{,.txt} NEWS AUTHORS BUGS ChangeLog FONTLOG.txt
72 DOCS=${DOCS:-}
73
74 IUSE="X"
75 @@ -105,14 +113,14 @@
76 fi
77 done
78 # if the file is a generated file then we know this is a font dir (as
79 - # opposed to something like encodings or util) and a candidate for
80 + # opposed to something like encodings or util) and a candidate for
81 # removal. if it's not generated then it's an "otherfile".
82 ${generated} && candidate=true || otherfile=true
83 # if the directory is both a candidate for removal and contains at
84 # least one "otherfile" then don't remove it.
85 [[ ${candidate} == ${otherfile} ]] && break
86 done
87 - # if we only have generated files, purge the directory.
88 + # if in the end we only have generated files, purge the directory.
89 if [[ ${candidate} == true && ${otherfile} == false ]]; then
90 # we don't want to remove fonts.alias files that were installed by
91 # media-fonts/font-alias. any other fonts.alias files will have
92 @@ -128,6 +136,28 @@
93 eend 0
94 }
95
96 +# @FUNCTION: font_pkg_setup
97 +# @DESCRIPTION:
98 +# The font pkg_setup function.
99 +# Collision protection and Prefix compat for eapi < 3.
100 +font_pkg_setup() {
101 + # Prefix compat
102 + case ${EAPI:-0} in
103 + 0|1|2)
104 + if ! use prefix; then
105 + EPREFIX=
106 + ED=${D}
107 + EROOT=${ROOT}
108 + [[ ${EROOT} = */ ]] || EROOT+="/"
109 + fi
110 + ;;
111 + esac
112 +
113 + # make sure we get no collisions
114 + # setup is not the nicest place, but preinst doesn't cut it
115 + [[ -e "${EROOT}/${FONTDIR}/fonts.cache-1" ]] && rm -f "${EROOT}/${FONTDIR}/fonts.cache-1"
116 +}
117 +
118 # @FUNCTION: font_src_install
119 # @DESCRIPTION:
120 # The font src_install function.
121 @@ -157,28 +187,6 @@
122 done
123 }
124
125 -# @FUNCTION: font_pkg_setup
126 -# @DESCRIPTION:
127 -# The font pkg_setup function.
128 -# Collision protection and Prefix compat for eapi < 3.
129 -font_pkg_setup() {
130 - # Prefix compat
131 - case ${EAPI:-0} in
132 - 0|1|2)
133 - if ! use prefix; then
134 - EPREFIX=
135 - ED=${D}
136 - EROOT=${ROOT}
137 - [[ ${EROOT} = */ ]] || EROOT+="/"
138 - fi
139 - ;;
140 - esac
141 -
142 - # make sure we get no collisions
143 - # setup is not the nicest place, but preinst doesn't cut it
144 - [[ -e "${EROOT}/${FONTDIR}/fonts.cache-1" ]] && rm -f "${EROOT}/${FONTDIR}/fonts.cache-1"
145 -}
146 -
147 # @FUNCTION: font_pkg_postinst
148 # @DESCRIPTION:
149 # The font pkg_postinst function.