Lines 9-15
Link Here
|
9 |
|
9 |
|
10 |
inherit eutils |
10 |
inherit eutils |
11 |
|
11 |
|
12 |
EXPORT_FUNCTIONS pkg_setup src_install pkg_postinst pkg_postrm |
12 |
EXPORT_FUNCTIONS pkg_setup src_install pkg_preinst pkg_postinst pkg_postrm |
13 |
|
13 |
|
14 |
# @ECLASS-VARIABLE: FONT_SUFFIX |
14 |
# @ECLASS-VARIABLE: FONT_SUFFIX |
15 |
# @DEFAULT_UNSET |
15 |
# @DEFAULT_UNSET |
Lines 25-30
Link Here
|
25 |
# Working directory containing the fonts. |
25 |
# Working directory containing the fonts. |
26 |
FONT_S=${FONT_S:-${S}} |
26 |
FONT_S=${FONT_S:-${S}} |
27 |
|
27 |
|
|
|
28 |
# @ECLASS-VARIABLE: FONT_SLOT |
29 |
# @DEFAULT_UNSET |
30 |
# @REQUIRED |
31 |
# @DESCRIPTION: |
32 |
# Slot of the installed font package |
33 |
FONT_SLOT=${FONT_SLOT:-${SLOT}} |
34 |
|
28 |
# @ECLASS-VARIABLE: FONT_PN |
35 |
# @ECLASS-VARIABLE: FONT_PN |
29 |
# @DESCRIPTION: |
36 |
# @DESCRIPTION: |
30 |
# Font name (ie. last part of FONTDIR). |
37 |
# Font name (ie. last part of FONTDIR). |
Lines 35-40
Link Here
|
35 |
# Full path to installation directory. |
42 |
# Full path to installation directory. |
36 |
FONTDIR=${FONTDIR:-/usr/share/fonts/${FONT_PN}} |
43 |
FONTDIR=${FONTDIR:-/usr/share/fonts/${FONT_PN}} |
37 |
|
44 |
|
|
|
45 |
# @ECLASS-VARIABLE: FONT_X11_CONF |
46 |
# @DEFAULT_UNSET |
47 |
# @REQUIRED |
48 |
# @DESCRIPTION: |
49 |
# X11 config file containing the additional fontpath element. |
50 |
FONT_X11_CONF=${FONT_X11_CONF:-/etc/X11/xorg.conf.d/90-${FONT_PN}-${FONT_SLOT}.conf} |
51 |
|
38 |
# @ECLASS-VARIABLE: FONT_CONF |
52 |
# @ECLASS-VARIABLE: FONT_CONF |
39 |
# @DEFAULT_UNSET |
53 |
# @DEFAULT_UNSET |
40 |
# @DESCRIPTION: |
54 |
# @DESCRIPTION: |
Lines 74-79
Link Here
|
74 |
if [[ -e ${FONT_S}/fonts.alias ]] ; then |
88 |
if [[ -e ${FONT_S}/fonts.alias ]] ; then |
75 |
doins "${FONT_S}"/fonts.alias |
89 |
doins "${FONT_S}"/fonts.alias |
76 |
fi |
90 |
fi |
|
|
91 |
# this is not epreix compatible, as is the default FONTDIR |
92 |
# are (massive) multiple entries in fontpath problematic? |
93 |
if [[ -n ${FONT_X11_CONF} ]] && |
94 |
[[ ${FONTDIR} != /usr/share/fonts/75dpi ]] && |
95 |
[[ ${FONTDIR} != /usr/share/fonts/100dpi ]] && |
96 |
[[ ${FONTDIR} != /usr/share/fonts/misc ]] && |
97 |
[[ ${FONTDIR} != /usr/share/fonts/TTF ]] && |
98 |
[[ ${FONTDIR} != /usr/share/fonts/OTF ]] && |
99 |
[[ ${FONTDIR} != /usr/share/fonts/TYPE1 ]] ; then |
100 |
{ |
101 |
echo "Section \"Files\"" |
102 |
echo " FontPath \"${FONTDIR}\"" |
103 |
echo "EndSection" |
104 |
} > ${T}/$(basename ${FONT_X11_CONF}) |
105 |
insinto /etc/X11/xorg.conf.d |
106 |
doins ${T}/$(basename ${FONT_X11_CONF}) |
107 |
fi |
77 |
fi |
108 |
fi |
78 |
} |
109 |
} |
79 |
|
110 |
|
Lines 188-193
Link Here
|
188 |
done |
219 |
done |
189 |
} |
220 |
} |
190 |
|
221 |
|
|
|
222 |
# @FUNCTION: font_pkg_preinst |
223 |
# @DESCRIPTION: |
224 |
# The font pkg_preinst function. |
225 |
font_pkg_preinst() { |
226 |
if has X ${USE} && [[ -n "${FONT_X11_CONF}" ]] && |
227 |
! [[ -e ${EROOT}${FONT_X11_CONF} ]] ; then |
228 |
elog "A new path element has been added to x11 fontpath." |
229 |
elog "Either restart your x11 sessions or run" |
230 |
elog "xset fp+ ${FONTDIR} ; xset fp rehash" |
231 |
fi |
232 |
} |
233 |
|
191 |
# @FUNCTION: font_pkg_postinst |
234 |
# @FUNCTION: font_pkg_postinst |
192 |
# @DESCRIPTION: |
235 |
# @DESCRIPTION: |
193 |
# The font pkg_postinst function. |
236 |
# The font pkg_postinst function. |