* [gentoo-commits] gentoo-x86 commit in eclass: font.eclass
@ 2008-01-08 17:57 Peter Volkov (pva)
0 siblings, 0 replies; 25+ messages in thread
From: Peter Volkov (pva) @ 2008-01-08 17:57 UTC (permalink / raw
To: gentoo-commits
pva 08/01/08 17:57:43
Modified: font.eclass
Log:
Third stage of fixing bug #201834.
Revision Changes Path
1.36 eclass/font.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/font.eclass?rev=1.36&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/font.eclass?rev=1.36&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/font.eclass?r1=1.35&r2=1.36
Index: font.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/font.eclass,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -r1.35 -r1.36
--- font.eclass 8 Jan 2008 17:12:23 -0000 1.35
+++ font.eclass 8 Jan 2008 17:57:43 -0000 1.36
@@ -1,6 +1,6 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/font.eclass,v 1.35 2008/01/08 17:12:23 pva Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/font.eclass,v 1.36 2008/01/08 17:57:43 pva Exp $
# Author: foser <foser@gentoo.org>
@@ -22,7 +22,7 @@
FONTDIR=/usr/share/fonts/${FONT_PN} # This is where the fonts are installed
-FONT_CONF="" # Space delimited list of fontconfig-2.4 file(s) to install
+FONT_CONF=( "" ) # Array, which element(s) is(are) path(s) of fontconfig-2.4 file(s) to install
DOCS="" # Docs to install
@@ -61,10 +61,10 @@
font_fontconfig() {
local conffile
- if [[ -n ${FONT_CONF} ]]; then
+ if [[ -n ${FONT_CONF[@]} ]]; then
if has_version '>=media-libs/fontconfig-2.4'; then
insinto /etc/fonts/conf.avail/
- for conffile in ${FONT_CONF[@]}; do
+ for conffile in "${FONT_CONF[@]}"; do
[[ -e ${conffile} ]] && doins ${conffile}
done
fi
--
gentoo-commits@lists.gentoo.org mailing list
^ permalink raw reply [flat|nested] 25+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: font.eclass
@ 2010-09-30 3:46 Ryan Hill (dirtyepic)
0 siblings, 0 replies; 25+ messages in thread
From: Ryan Hill (dirtyepic) @ 2010-09-30 3:46 UTC (permalink / raw
To: gentoo-commits
dirtyepic 10/09/30 03:46:11
Modified: font.eclass
Log:
Minor cleanups, eclass-manpages updates.
Revision Changes Path
1.52 eclass/font.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/font.eclass?rev=1.52&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/font.eclass?rev=1.52&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/font.eclass?r1=1.51&r2=1.52
Index: font.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/font.eclass,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -r1.51 -r1.52
--- font.eclass 9 Jul 2010 03:44:19 -0000 1.51
+++ font.eclass 30 Sep 2010 03:46:11 -0000 1.52
@@ -1,6 +1,6 @@
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/font.eclass,v 1.51 2010/07/09 03:44:19 dirtyepic Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/font.eclass,v 1.52 2010/09/30 03:46:11 dirtyepic Exp $
# @ECLASS: font.eclass
# @MAINTAINER:
@@ -12,19 +12,23 @@
EXPORT_FUNCTIONS pkg_setup src_install pkg_postinst pkg_postrm
# @ECLASS-VARIABLE: FONT_SUFFIX
+# @DEFAULT_UNSET
+# @REQUIRED
# @DESCRIPTION:
# Space delimited list of font suffixes to install.
-FONT_SUFFIX=${FONT_SUFFIX:=}
+FONT_SUFFIX=${FONT_SUFFIX:-}
# @ECLASS-VARIABLE: FONT_S
+# @DEFAULT_UNSET
+# @REQUIRED
# @DESCRIPTION:
# Working directory containing the fonts.
-FONT_S=${FONT_S:=${S}}
+FONT_S=${FONT_S:-${S}}
# @ECLASS-VARIABLE: FONT_PN
# @DESCRIPTION:
# Font name (ie. last part of FONTDIR).
-FONT_PN=${FONT_PN:=${PN}}
+FONT_PN=${FONT_PN:-${PN}}
# @ECLASS-VARIABLE: FONTDIR
# @DESCRIPTION:
@@ -32,13 +36,17 @@
FONTDIR=${FONTDIR:-/usr/share/fonts/${FONT_PN}}
# @ECLASS-VARIABLE: FONT_CONF
+# @DEFAULT_UNSET
# @DESCRIPTION:
# Array containing fontconfig conf files to install.
FONT_CONF=( "" )
# @ECLASS-VARIABLE: DOCS
+# @DEFAULT_UNSET
# @DESCRIPTION:
# Space delimited list of docs to install.
+# We always install these:
+# COPYRIGHT README{,.txt} NEWS AUTHORS BUGS ChangeLog FONTLOG.txt
DOCS=${DOCS:-}
IUSE="X"
@@ -105,14 +113,14 @@
fi
done
# if the file is a generated file then we know this is a font dir (as
- # opposed to something like encodings or util) and a candidate for
+ # opposed to something like encodings or util) and a candidate for
# removal. if it's not generated then it's an "otherfile".
${generated} && candidate=true || otherfile=true
# if the directory is both a candidate for removal and contains at
# least one "otherfile" then don't remove it.
[[ ${candidate} == ${otherfile} ]] && break
done
- # if we only have generated files, purge the directory.
+ # if in the end we only have generated files, purge the directory.
if [[ ${candidate} == true && ${otherfile} == false ]]; then
# we don't want to remove fonts.alias files that were installed by
# media-fonts/font-alias. any other fonts.alias files will have
@@ -128,6 +136,28 @@
eend 0
}
+# @FUNCTION: font_pkg_setup
+# @DESCRIPTION:
+# The font pkg_setup function.
+# Collision protection and Prefix compat for eapi < 3.
+font_pkg_setup() {
+ # Prefix compat
+ case ${EAPI:-0} in
+ 0|1|2)
+ if ! use prefix; then
+ EPREFIX=
+ ED=${D}
+ EROOT=${ROOT}
+ [[ ${EROOT} = */ ]] || EROOT+="/"
+ fi
+ ;;
+ esac
+
+ # make sure we get no collisions
+ # setup is not the nicest place, but preinst doesn't cut it
+ [[ -e "${EROOT}/${FONTDIR}/fonts.cache-1" ]] && rm -f "${EROOT}/${FONTDIR}/fonts.cache-1"
+}
+
# @FUNCTION: font_src_install
# @DESCRIPTION:
# The font src_install function.
@@ -157,28 +187,6 @@
done
}
-# @FUNCTION: font_pkg_setup
-# @DESCRIPTION:
-# The font pkg_setup function.
-# Collision protection and Prefix compat for eapi < 3.
-font_pkg_setup() {
- # Prefix compat
- case ${EAPI:-0} in
- 0|1|2)
- if ! use prefix; then
- EPREFIX=
- ED=${D}
- EROOT=${ROOT}
- [[ ${EROOT} = */ ]] || EROOT+="/"
- fi
- ;;
- esac
-
- # make sure we get no collisions
- # setup is not the nicest place, but preinst doesn't cut it
- [[ -e "${EROOT}/${FONTDIR}/fonts.cache-1" ]] && rm -f "${EROOT}/${FONTDIR}/fonts.cache-1"
-}
-
# @FUNCTION: font_pkg_postinst
# @DESCRIPTION:
# The font pkg_postinst function.
^ permalink raw reply [flat|nested] 25+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: font.eclass
@ 2010-07-09 3:44 Ryan Hill (dirtyepic)
0 siblings, 0 replies; 25+ messages in thread
From: Ryan Hill (dirtyepic) @ 2010-07-09 3:44 UTC (permalink / raw
To: gentoo-commits
dirtyepic 10/07/09 03:44:19
Modified: font.eclass
Log:
When cleaning up generated files leave any fonts.alias from media-fonts/font-alias alone. Add documentation. (bug #315369)
Revision Changes Path
1.51 eclass/font.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/font.eclass?rev=1.51&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/font.eclass?rev=1.51&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/font.eclass?r1=1.50&r2=1.51
Index: font.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/font.eclass,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -r1.50 -r1.51
--- font.eclass 15 May 2010 05:25:32 -0000 1.50
+++ font.eclass 9 Jul 2010 03:44:19 -0000 1.51
@@ -1,6 +1,6 @@
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/font.eclass,v 1.50 2010/05/15 05:25:32 dirtyepic Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/font.eclass,v 1.51 2010/07/09 03:44:19 dirtyepic Exp $
# @ECLASS: font.eclass
# @MAINTAINER:
@@ -86,28 +86,43 @@
# Remove font directories containing only generated files.
font_cleanup_dirs() {
local genfiles="encodings.dir fonts.alias fonts.cache-1 fonts.dir fonts.scale"
+ # fonts.alias isn't generated but it's a special case (see below).
local d f g generated candidate otherfile
- ebegin "Purging empty font directories"
+ ebegin "Cleaning up font directories"
find -L "${EROOT}"usr/share/fonts/ -type d -print0 | while read -d $'\0' d; do
candidate=false
otherfile=false
for f in "${d}"/*; do
generated=false
+ # make sure this is a file and not a subdir
[[ -e ${f} || -L ${f} ]] || continue
for g in ${genfiles}; do
if [[ ${f##*/} == ${g} ]]; then
+ # this is a generated file
generated=true
break
fi
done
+ # if the file is a generated file then we know this is a font dir (as
+ # opposed to something like encodings or util) and a candidate for
+ # removal. if it's not generated then it's an "otherfile".
${generated} && candidate=true || otherfile=true
- [[ ${candidate} == ${otherfile} ]] && break # both are true, keep the dir
+ # if the directory is both a candidate for removal and contains at
+ # least one "otherfile" then don't remove it.
+ [[ ${candidate} == ${otherfile} ]] && break
done
+ # if we only have generated files, purge the directory.
if [[ ${candidate} == true && ${otherfile} == false ]]; then
- ebegin "Removing ${d}"
- rm -rf "${d}"
- eend $?
+ # we don't want to remove fonts.alias files that were installed by
+ # media-fonts/font-alias. any other fonts.alias files will have
+ # already been unmerged with their packages.
+ for g in ${genfiles}; do
+ [[ ${g} != fonts.alias && ( -e ${d}/${g} || -L ${d}/${g} ) ]] \
+ && rm "${d}"/${g}
+ done
+ # if there's nothing left remove the directory
+ find "${d}" -maxdepth 0 -type d -empty -exec rmdir '{}' \;
fi
done
eend 0
^ permalink raw reply [flat|nested] 25+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: font.eclass
@ 2010-05-15 5:25 Ryan Hill (dirtyepic)
0 siblings, 0 replies; 25+ messages in thread
From: Ryan Hill (dirtyepic) @ 2010-05-15 5:25 UTC (permalink / raw
To: gentoo-commits
dirtyepic 10/05/15 05:25:32
Modified: font.eclass
Log:
Improve documentation.
Revision Changes Path
1.50 eclass/font.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/font.eclass?rev=1.50&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/font.eclass?rev=1.50&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/font.eclass?r1=1.49&r2=1.50
Index: font.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/font.eclass,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -r1.49 -r1.50
--- font.eclass 20 Apr 2010 04:06:59 -0000 1.49
+++ font.eclass 15 May 2010 05:25:32 -0000 1.50
@@ -1,13 +1,10 @@
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/font.eclass,v 1.49 2010/04/20 04:06:59 dirtyepic Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/font.eclass,v 1.50 2010/05/15 05:25:32 dirtyepic Exp $
# @ECLASS: font.eclass
# @MAINTAINER:
-# fonts@gentoo.org
-
-# Author: Tomáš Chvátal <scarabeus@gentoo.org>
-# Author: foser <foser@gentoo.org>
+# fonts@gentoo.org
# @BLURB: Eclass to make font installation uniform
inherit eutils
@@ -16,32 +13,32 @@
# @ECLASS-VARIABLE: FONT_SUFFIX
# @DESCRIPTION:
-# Space delimited list of font suffixes to install
+# Space delimited list of font suffixes to install.
FONT_SUFFIX=${FONT_SUFFIX:=}
# @ECLASS-VARIABLE: FONT_S
# @DESCRIPTION:
-# Dir containing the fonts
+# Working directory containing the fonts.
FONT_S=${FONT_S:=${S}}
# @ECLASS-VARIABLE: FONT_PN
# @DESCRIPTION:
-# Last part of $FONTDIR
+# Font name (ie. last part of FONTDIR).
FONT_PN=${FONT_PN:=${PN}}
# @ECLASS-VARIABLE: FONTDIR
# @DESCRIPTION:
-# This is where the fonts are installed
+# Full path to installation directory.
FONTDIR=${FONTDIR:-/usr/share/fonts/${FONT_PN}}
# @ECLASS-VARIABLE: FONT_CONF
# @DESCRIPTION:
-# Array, which element(s) is(are) path(s) of fontconfig-2.4 file(s) to install
+# Array containing fontconfig conf files to install.
FONT_CONF=( "" )
# @ECLASS-VARIABLE: DOCS
# @DESCRIPTION:
-# Docs to install
+# Space delimited list of docs to install.
DOCS=${DOCS:-}
IUSE="X"
@@ -54,9 +51,8 @@
# @FUNCTION: font_xfont_config
# @DESCRIPTION:
-# Creates the Xfont files.
+# Generate Xorg font files (mkfontscale/mkfontdir).
font_xfont_config() {
- # create Xfont files
if has X ${IUSE//+} && use X ; then
ebegin "Creating fonts.scale & fonts.dir"
rm -f "${ED}${FONTDIR}"/fonts.{dir,scale}
@@ -66,15 +62,15 @@
-e ${EPREFIX}/usr/share/fonts/encodings/large \
"${ED}${FONTDIR}"
eend $?
- if [ -e "${FONT_S}/fonts.alias" ] ; then
- doins "${FONT_S}/fonts.alias"
+ if [[ -e ${FONT_S}/fonts.alias ]] ; then
+ doins "${FONT_S}"/fonts.alias
fi
fi
}
# @FUNCTION: font_fontconfig
# @DESCRIPTION:
-# Installs the fontconfig config files of FONT_CONF.
+# Install fontconfig conf files given in FONT_CONF.
font_fontconfig() {
local conffile
if [[ -n ${FONT_CONF[@]} ]]; then
@@ -87,8 +83,7 @@
# @FUNCTION: font_cleanup_dirs
# @DESCRIPTION:
-# Remove any font directories only containing generated files.
-# Runs in pkg_postrm.
+# Remove font directories containing only generated files.
font_cleanup_dirs() {
local genfiles="encodings.dir fonts.alias fonts.cache-1 fonts.dir fonts.scale"
local d f g generated candidate otherfile
@@ -150,7 +145,7 @@
# @FUNCTION: font_pkg_setup
# @DESCRIPTION:
# The font pkg_setup function.
-# Collision portection and Prefix compat for eapi < 3.
+# Collision protection and Prefix compat for eapi < 3.
font_pkg_setup() {
# Prefix compat
case ${EAPI:-0} in
@@ -172,7 +167,6 @@
# @FUNCTION: font_pkg_postinst
# @DESCRIPTION:
# The font pkg_postinst function.
-# Update global font cache and fix permissions.
font_pkg_postinst() {
# unreadable font files = fontconfig segfaults
find "${EROOT}"usr/share/fonts/ -type f '!' -perm 0644 -print0 \
@@ -203,7 +197,6 @@
# @FUNCTION: font_pkg_postrm
# @DESCRIPTION:
# The font pkg_postrm function.
-# Updates global font cache
font_pkg_postrm() {
font_cleanup_dirs
^ permalink raw reply [flat|nested] 25+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: font.eclass
@ 2010-04-20 4:06 Ryan Hill (dirtyepic)
0 siblings, 0 replies; 25+ messages in thread
From: Ryan Hill (dirtyepic) @ 2010-04-20 4:06 UTC (permalink / raw
To: gentoo-commits
dirtyepic 10/04/20 04:06:59
Modified: font.eclass
Log:
Add new function font_cleanup_dirs, called in pkg_postrm, to clean up font directories that only contain generated files (bug #315369). Based on code taken from xorg-2.eclass. Note that due to portage caching pkg_postrm, currently installed font packages will not trigger this code until the second time they are reinstalled.
Revision Changes Path
1.49 eclass/font.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/font.eclass?rev=1.49&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/font.eclass?rev=1.49&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/font.eclass?r1=1.48&r2=1.49
Index: font.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/font.eclass,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -r1.48 -r1.49
--- font.eclass 9 Feb 2010 17:15:08 -0000 1.48
+++ font.eclass 20 Apr 2010 04:06:59 -0000 1.49
@@ -1,6 +1,6 @@
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/font.eclass,v 1.48 2010/02/09 17:15:08 scarabeus Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/font.eclass,v 1.49 2010/04/20 04:06:59 dirtyepic Exp $
# @ECLASS: font.eclass
# @MAINTAINER:
@@ -85,6 +85,39 @@
fi
}
+# @FUNCTION: font_cleanup_dirs
+# @DESCRIPTION:
+# Remove any font directories only containing generated files.
+# Runs in pkg_postrm.
+font_cleanup_dirs() {
+ local genfiles="encodings.dir fonts.alias fonts.cache-1 fonts.dir fonts.scale"
+ local d f g generated candidate otherfile
+
+ ebegin "Purging empty font directories"
+ find -L "${EROOT}"usr/share/fonts/ -type d -print0 | while read -d $'\0' d; do
+ candidate=false
+ otherfile=false
+ for f in "${d}"/*; do
+ generated=false
+ [[ -e ${f} || -L ${f} ]] || continue
+ for g in ${genfiles}; do
+ if [[ ${f##*/} == ${g} ]]; then
+ generated=true
+ break
+ fi
+ done
+ ${generated} && candidate=true || otherfile=true
+ [[ ${candidate} == ${otherfile} ]] && break # both are true, keep the dir
+ done
+ if [[ ${candidate} == true && ${otherfile} == false ]]; then
+ ebegin "Removing ${d}"
+ rm -rf "${d}"
+ eend $?
+ fi
+ done
+ eend 0
+}
+
# @FUNCTION: font_src_install
# @DESCRIPTION:
# The font src_install function.
@@ -172,6 +205,8 @@
# The font pkg_postrm function.
# Updates global font cache
font_pkg_postrm() {
+ font_cleanup_dirs
+
# unreadable font files = fontconfig segfaults
find "${EROOT}"usr/share/fonts/ -type f '!' -perm 0644 -print0 \
| xargs -0 chmod -v 0644 2>/dev/null
^ permalink raw reply [flat|nested] 25+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: font.eclass
@ 2010-02-09 17:15 Tomas Chvatal (scarabeus)
0 siblings, 0 replies; 25+ messages in thread
From: Tomas Chvatal (scarabeus) @ 2010-02-09 17:15 UTC (permalink / raw
To: gentoo-commits
scarabeus 10/02/09 17:15:09
Modified: font.eclass
Log:
Introduce fonts.eclass supporting eapi up to 3. Per disscussion on -dev.
Revision Changes Path
1.48 eclass/font.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/font.eclass?rev=1.48&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/font.eclass?rev=1.48&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/font.eclass?r1=1.47&r2=1.48
Index: font.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/font.eclass,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -r1.47 -r1.48
--- font.eclass 11 Oct 2009 11:44:42 -0000 1.47
+++ font.eclass 9 Feb 2010 17:15:08 -0000 1.48
@@ -1,37 +1,33 @@
-# Copyright 1999-2007 Gentoo Foundation
+# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/font.eclass,v 1.47 2009/10/11 11:44:42 maekke Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/font.eclass,v 1.48 2010/02/09 17:15:08 scarabeus Exp $
# @ECLASS: font.eclass
# @MAINTAINER:
# fonts@gentoo.org
-#
+
+# Author: Tomáš Chvátal <scarabeus@gentoo.org>
# Author: foser <foser@gentoo.org>
# @BLURB: Eclass to make font installation uniform
inherit eutils
-
EXPORT_FUNCTIONS pkg_setup src_install pkg_postinst pkg_postrm
-#
-# Variable declarations
-#
-
# @ECLASS-VARIABLE: FONT_SUFFIX
# @DESCRIPTION:
# Space delimited list of font suffixes to install
-FONT_SUFFIX=${FONT_SUFFIX:-}
+FONT_SUFFIX=${FONT_SUFFIX:=}
# @ECLASS-VARIABLE: FONT_S
# @DESCRIPTION:
# Dir containing the fonts
-FONT_S=${S}
+FONT_S=${FONT_S:=${S}}
# @ECLASS-VARIABLE: FONT_PN
# @DESCRIPTION:
# Last part of $FONTDIR
-FONT_PN=${FONT_PN:-${PN}}
+FONT_PN=${FONT_PN:=${PN}}
# @ECLASS-VARIABLE: FONTDIR
# @DESCRIPTION:
@@ -50,70 +46,52 @@
IUSE="X"
-DEPEND="X? ( x11-apps/mkfontdir
- media-fonts/encodings )
- media-libs/fontconfig"
-
-#
-# Public functions
-#
+DEPEND="X? (
+ x11-apps/mkfontdir
+ media-fonts/encodings
+ )
+ >=media-libs/fontconfig-2.4.0"
# @FUNCTION: font_xfont_config
# @DESCRIPTION:
# Creates the Xfont files.
font_xfont_config() {
# create Xfont files
- if use X ; then
- einfo "Creating fonts.scale & fonts.dir ..."
- rm -f "${D}${FONTDIR}"/fonts.{dir,scale}
- mkfontscale "${D}${FONTDIR}"
+ if has X ${IUSE//+} && use X ; then
+ ebegin "Creating fonts.scale & fonts.dir"
+ rm -f "${ED}${FONTDIR}"/fonts.{dir,scale}
+ mkfontscale "${ED}${FONTDIR}"
mkfontdir \
- -e /usr/share/fonts/encodings \
- -e /usr/share/fonts/encodings/large \
- "${D}${FONTDIR}"
+ -e ${EPREFIX}/usr/share/fonts/encodings \
+ -e ${EPREFIX}/usr/share/fonts/encodings/large \
+ "${ED}${FONTDIR}"
+ eend $?
if [ -e "${FONT_S}/fonts.alias" ] ; then
doins "${FONT_S}/fonts.alias"
fi
fi
}
-# @FUNCTION: font_xft_config
-# @DESCRIPTION:
-# Creates the fontconfig cache if necessary.
-font_xft_config() {
- if ! has_version '>=media-libs/fontconfig-2.4'; then
- # create fontconfig cache
- einfo "Creating fontconfig cache ..."
- fc-cache -sf "${D}${FONTDIR}"
- fi
-}
-
# @FUNCTION: font_fontconfig
# @DESCRIPTION:
# Installs the fontconfig config files of FONT_CONF.
font_fontconfig() {
local conffile
if [[ -n ${FONT_CONF[@]} ]]; then
- if has_version '>=media-libs/fontconfig-2.4'; then
- insinto /etc/fonts/conf.avail/
- for conffile in "${FONT_CONF[@]}"; do
- [[ -e ${conffile} ]] && doins ${conffile}
- done
- fi
+ insinto /etc/fonts/conf.avail/
+ for conffile in "${FONT_CONF[@]}"; do
+ [[ -e ${conffile} ]] && doins ${conffile}
+ done
fi
}
-#
-# Public inheritable functions
-#
-
# @FUNCTION: font_src_install
# @DESCRIPTION:
-# The font src_install function, which is exported.
+# The font src_install function.
font_src_install() {
local suffix commondoc
- cd "${FONT_S}"
+ pushd "${FONT_S}" > /dev/null
insinto "${FONTDIR}"
@@ -124,11 +102,11 @@
rm -f fonts.{dir,scale} encodings.dir
font_xfont_config
- font_xft_config
font_fontconfig
- cd "${S}"
- dodoc ${DOCS} 2> /dev/null
+ popd > /dev/null
+
+ [[ -n ${DOCS} ]] && { dodoc ${DOCS} || die "docs installation failed" ; }
# install common docs
for commondoc in COPYRIGHT README{,.txt} NEWS AUTHORS BUGS ChangeLog FONTLOG.txt; do
@@ -138,60 +116,69 @@
# @FUNCTION: font_pkg_setup
# @DESCRIPTION:
-# The font pkg_setup function, which is exported.
+# The font pkg_setup function.
+# Collision portection and Prefix compat for eapi < 3.
font_pkg_setup() {
+ # Prefix compat
+ case ${EAPI:-0} in
+ 0|1|2)
+ if ! use prefix; then
+ EPREFIX=
+ ED=${D}
+ EROOT=${ROOT}
+ [[ ${EROOT} = */ ]] || EROOT+="/"
+ fi
+ ;;
+ esac
+
# make sure we get no collisions
# setup is not the nicest place, but preinst doesn't cut it
- [[ -e "${FONTDIR}/fonts.cache-1" ]] && rm -f "${FONTDIR}/fonts.cache-1"
+ [[ -e "${EROOT}/${FONTDIR}/fonts.cache-1" ]] && rm -f "${EROOT}/${FONTDIR}/fonts.cache-1"
}
# @FUNCTION: font_pkg_postinst
# @DESCRIPTION:
-# The font pkg_postinst function, which is exported.
+# The font pkg_postinst function.
+# Update global font cache and fix permissions.
font_pkg_postinst() {
# unreadable font files = fontconfig segfaults
- find "${ROOT}"usr/share/fonts/ -type f '!' -perm 0644 -print0 \
+ find "${EROOT}"usr/share/fonts/ -type f '!' -perm 0644 -print0 \
| xargs -0 chmod -v 0644 2>/dev/null
if [[ -n ${FONT_CONF[@]} ]]; then
- if has_version '>=media-libs/fontconfig-2.4'; then
- local conffile
- echo
- elog "The following fontconfig configuration files have been installed:"
- elog
- for conffile in "${FONT_CONF[@]}"; do
- if [[ -e ${ROOT}etc/fonts/conf.avail/$(basename ${conffile}) ]]; then
- elog " $(basename ${conffile})"
- fi
- done
- elog
- elog "Use \`eselect fontconfig\` to enable/disable them."
- echo
- fi
- fi
-
- if has_version '>=media-libs/fontconfig-2.4'; then
- if [[ ${ROOT} == "/" ]]; then
- ebegin "Updating global fontcache"
- fc-cache -fs
- eend $?
- fi
+ local conffile
+ echo
+ elog "The following fontconfig configuration files have been installed:"
+ elog
+ for conffile in "${FONT_CONF[@]}"; do
+ if [[ -e ${EROOT}etc/fonts/conf.avail/$(basename ${conffile}) ]]; then
+ elog " $(basename ${conffile})"
+ fi
+ done
+ elog
+ elog "Use \`eselect fontconfig\` to enable/disable them."
+ echo
+ fi
+
+ if [[ ${ROOT} == / ]]; then
+ ebegin "Updating global fontcache"
+ fc-cache -fs
+ eend $?
fi
}
# @FUNCTION: font_pkg_postrm
# @DESCRIPTION:
-# The font pkg_postrm function, which is exported.
+# The font pkg_postrm function.
+# Updates global font cache
font_pkg_postrm() {
# unreadable font files = fontconfig segfaults
- find "${ROOT}"usr/share/fonts/ -type f '!' -perm 0644 -print0 \
+ find "${EROOT}"usr/share/fonts/ -type f '!' -perm 0644 -print0 \
| xargs -0 chmod -v 0644 2>/dev/null
- if has_version '>=media-libs/fontconfig-2.4'; then
- if [[ ${ROOT} == "/" ]]; then
- ebegin "Updating global fontcache"
- fc-cache -fs
- eend $?
- fi
+ if [[ ${ROOT} == / ]]; then
+ ebegin "Updating global fontcache"
+ fc-cache -fs
+ eend $?
fi
}
^ permalink raw reply [flat|nested] 25+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: font.eclass
@ 2009-10-11 11:44 Markus Meier (maekke)
0 siblings, 0 replies; 25+ messages in thread
From: Markus Meier (maekke) @ 2009-10-11 11:44 UTC (permalink / raw
To: gentoo-commits
maekke 09/10/11 11:44:43
Modified: font.eclass
Log:
whitespace
Revision Changes Path
1.47 eclass/font.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/font.eclass?rev=1.47&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/font.eclass?rev=1.47&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/font.eclass?r1=1.46&r2=1.47
Index: font.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/font.eclass,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -r1.46 -r1.47
--- font.eclass 13 Sep 2009 04:47:34 -0000 1.46
+++ font.eclass 11 Oct 2009 11:44:42 -0000 1.47
@@ -1,6 +1,6 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/font.eclass,v 1.46 2009/09/13 04:47:34 dirtyepic Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/font.eclass,v 1.47 2009/10/11 11:44:42 maekke Exp $
# @ECLASS: font.eclass
# @MAINTAINER:
@@ -169,7 +169,7 @@
echo
fi
fi
-
+
if has_version '>=media-libs/fontconfig-2.4'; then
if [[ ${ROOT} == "/" ]]; then
ebegin "Updating global fontcache"
^ permalink raw reply [flat|nested] 25+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: font.eclass
@ 2009-09-13 4:47 Ryan Hill (dirtyepic)
0 siblings, 0 replies; 25+ messages in thread
From: Ryan Hill (dirtyepic) @ 2009-09-13 4:47 UTC (permalink / raw
To: gentoo-commits
dirtyepic 09/09/13 04:47:35
Modified: font.eclass
Log:
Allow variables to be defined before inheriting.
Revision Changes Path
1.46 eclass/font.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/font.eclass?rev=1.46&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/font.eclass?rev=1.46&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/font.eclass?r1=1.45&r2=1.46
Index: font.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/font.eclass,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -r1.45 -r1.46
--- font.eclass 7 Sep 2009 21:07:11 -0000 1.45
+++ font.eclass 13 Sep 2009 04:47:34 -0000 1.46
@@ -1,6 +1,6 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/font.eclass,v 1.45 2009/09/07 21:07:11 dirtyepic Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/font.eclass,v 1.46 2009/09/13 04:47:34 dirtyepic Exp $
# @ECLASS: font.eclass
# @MAINTAINER:
@@ -21,7 +21,7 @@
# @ECLASS-VARIABLE: FONT_SUFFIX
# @DESCRIPTION:
# Space delimited list of font suffixes to install
-FONT_SUFFIX=""
+FONT_SUFFIX=${FONT_SUFFIX:-}
# @ECLASS-VARIABLE: FONT_S
# @DESCRIPTION:
@@ -31,12 +31,12 @@
# @ECLASS-VARIABLE: FONT_PN
# @DESCRIPTION:
# Last part of $FONTDIR
-FONT_PN=${PN}
+FONT_PN=${FONT_PN:-${PN}}
# @ECLASS-VARIABLE: FONTDIR
# @DESCRIPTION:
# This is where the fonts are installed
-FONTDIR=/usr/share/fonts/${FONT_PN}
+FONTDIR=${FONTDIR:-/usr/share/fonts/${FONT_PN}}
# @ECLASS-VARIABLE: FONT_CONF
# @DESCRIPTION:
@@ -46,7 +46,7 @@
# @ECLASS-VARIABLE: DOCS
# @DESCRIPTION:
# Docs to install
-DOCS=""
+DOCS=${DOCS:-}
IUSE="X"
@@ -195,4 +195,3 @@
fi
fi
}
-
^ permalink raw reply [flat|nested] 25+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: font.eclass
@ 2009-09-07 21:07 Ryan Hill (dirtyepic)
0 siblings, 0 replies; 25+ messages in thread
From: Ryan Hill (dirtyepic) @ 2009-09-07 21:07 UTC (permalink / raw
To: gentoo-commits
dirtyepic 09/09/07 21:07:11
Modified: font.eclass
Log:
Tell the user if we've installed any config files and how to use them.
Revision Changes Path
1.45 eclass/font.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/font.eclass?rev=1.45&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/font.eclass?rev=1.45&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/font.eclass?r1=1.44&r2=1.45
Index: font.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/font.eclass,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -r1.44 -r1.45
--- font.eclass 8 Feb 2009 18:22:39 -0000 1.44
+++ font.eclass 7 Sep 2009 21:07:11 -0000 1.45
@@ -1,6 +1,6 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/font.eclass,v 1.44 2009/02/08 18:22:39 pva Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/font.eclass,v 1.45 2009/09/07 21:07:11 dirtyepic Exp $
# @ECLASS: font.eclass
# @MAINTAINER:
@@ -11,6 +11,9 @@
inherit eutils
+
+EXPORT_FUNCTIONS pkg_setup src_install pkg_postinst pkg_postrm
+
#
# Variable declarations
#
@@ -150,6 +153,23 @@
find "${ROOT}"usr/share/fonts/ -type f '!' -perm 0644 -print0 \
| xargs -0 chmod -v 0644 2>/dev/null
+ if [[ -n ${FONT_CONF[@]} ]]; then
+ if has_version '>=media-libs/fontconfig-2.4'; then
+ local conffile
+ echo
+ elog "The following fontconfig configuration files have been installed:"
+ elog
+ for conffile in "${FONT_CONF[@]}"; do
+ if [[ -e ${ROOT}etc/fonts/conf.avail/$(basename ${conffile}) ]]; then
+ elog " $(basename ${conffile})"
+ fi
+ done
+ elog
+ elog "Use \`eselect fontconfig\` to enable/disable them."
+ echo
+ fi
+ fi
+
if has_version '>=media-libs/fontconfig-2.4'; then
if [[ ${ROOT} == "/" ]]; then
ebegin "Updating global fontcache"
@@ -176,4 +196,3 @@
fi
}
-EXPORT_FUNCTIONS src_install pkg_setup pkg_postinst pkg_postrm
^ permalink raw reply [flat|nested] 25+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: font.eclass
@ 2009-02-08 18:22 Peter Volkov (pva)
0 siblings, 0 replies; 25+ messages in thread
From: Peter Volkov (pva) @ 2009-02-08 18:22 UTC (permalink / raw
To: gentoo-commits
pva 09/02/08 18:22:39
Modified: font.eclass
Log:
Fixed unquoted variables, bug #258164, thank Markus Meier for report.
Revision Changes Path
1.44 eclass/font.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/font.eclass?rev=1.44&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/font.eclass?rev=1.44&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/font.eclass?r1=1.43&r2=1.44
Index: font.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/font.eclass,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -r1.43 -r1.44
--- font.eclass 12 Jan 2009 22:54:46 -0000 1.43
+++ font.eclass 8 Feb 2009 18:22:39 -0000 1.44
@@ -1,6 +1,6 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/font.eclass,v 1.43 2009/01/12 22:54:46 maekke Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/font.eclass,v 1.44 2009/02/08 18:22:39 pva Exp $
# @ECLASS: font.eclass
# @MAINTAINER:
@@ -151,7 +151,7 @@
| xargs -0 chmod -v 0644 2>/dev/null
if has_version '>=media-libs/fontconfig-2.4'; then
- if [ ${ROOT} == "/" ]; then
+ if [[ ${ROOT} == "/" ]]; then
ebegin "Updating global fontcache"
fc-cache -fs
eend $?
@@ -168,7 +168,7 @@
| xargs -0 chmod -v 0644 2>/dev/null
if has_version '>=media-libs/fontconfig-2.4'; then
- if [ ${ROOT} == "/" ]; then
+ if [[ ${ROOT} == "/" ]]; then
ebegin "Updating global fontcache"
fc-cache -fs
eend $?
^ permalink raw reply [flat|nested] 25+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: font.eclass
@ 2009-01-12 22:54 Markus Meier (maekke)
0 siblings, 0 replies; 25+ messages in thread
From: Markus Meier (maekke) @ 2009-01-12 22:54 UTC (permalink / raw
To: gentoo-commits
maekke 09/01/12 22:54:46
Modified: font.eclass
Log:
whitespace
Revision Changes Path
1.43 eclass/font.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/font.eclass?rev=1.43&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/font.eclass?rev=1.43&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/font.eclass?r1=1.42&r2=1.43
Index: font.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/font.eclass,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -r1.42 -r1.43
--- font.eclass 6 Jan 2009 19:24:06 -0000 1.42
+++ font.eclass 12 Jan 2009 22:54:46 -0000 1.43
@@ -1,6 +1,6 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/font.eclass,v 1.42 2009/01/06 19:24:06 grobian Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/font.eclass,v 1.43 2009/01/12 22:54:46 maekke Exp $
# @ECLASS: font.eclass
# @MAINTAINER:
@@ -23,31 +23,31 @@
# @ECLASS-VARIABLE: FONT_S
# @DESCRIPTION:
# Dir containing the fonts
-FONT_S=${S}
+FONT_S=${S}
# @ECLASS-VARIABLE: FONT_PN
# @DESCRIPTION:
# Last part of $FONTDIR
-FONT_PN=${PN}
+FONT_PN=${PN}
# @ECLASS-VARIABLE: FONTDIR
# @DESCRIPTION:
# This is where the fonts are installed
-FONTDIR=/usr/share/fonts/${FONT_PN}
+FONTDIR=/usr/share/fonts/${FONT_PN}
# @ECLASS-VARIABLE: FONT_CONF
# @DESCRIPTION:
# Array, which element(s) is(are) path(s) of fontconfig-2.4 file(s) to install
-FONT_CONF=( "" )
+FONT_CONF=( "" )
# @ECLASS-VARIABLE: DOCS
# @DESCRIPTION:
# Docs to install
-DOCS=""
+DOCS=""
IUSE="X"
-DEPEND="X? ( x11-apps/mkfontdir
+DEPEND="X? ( x11-apps/mkfontdir
media-fonts/encodings )
media-libs/fontconfig"
^ permalink raw reply [flat|nested] 25+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: font.eclass
@ 2009-01-06 19:24 Fabian Groffen (grobian)
0 siblings, 0 replies; 25+ messages in thread
From: Fabian Groffen (grobian) @ 2009-01-06 19:24 UTC (permalink / raw
To: gentoo-commits
grobian 09/01/06 19:24:06
Modified: font.eclass
Log:
Remove seemingly stray comment
Revision Changes Path
1.42 eclass/font.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/font.eclass?rev=1.42&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/font.eclass?rev=1.42&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/font.eclass?r1=1.41&r2=1.42
Index: font.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/font.eclass,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -r1.41 -r1.42
--- font.eclass 2 Jan 2009 09:42:26 -0000 1.41
+++ font.eclass 6 Jan 2009 19:24:06 -0000 1.42
@@ -1,6 +1,6 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/font.eclass,v 1.41 2009/01/02 09:42:26 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/font.eclass,v 1.42 2009/01/06 19:24:06 grobian Exp $
# @ECLASS: font.eclass
# @MAINTAINER:
@@ -81,7 +81,6 @@
if ! has_version '>=media-libs/fontconfig-2.4'; then
# create fontconfig cache
einfo "Creating fontconfig cache ..."
- # Mac OS X has fc-cache at /usr/X11R6/bin
fc-cache -sf "${D}${FONTDIR}"
fi
}
^ permalink raw reply [flat|nested] 25+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: font.eclass
@ 2009-01-02 9:42 Mike Frysinger (vapier)
0 siblings, 0 replies; 25+ messages in thread
From: Mike Frysinger (vapier) @ 2009-01-02 9:42 UTC (permalink / raw
To: gentoo-commits
vapier 09/01/02 09:42:26
Modified: font.eclass
Log:
remove fonts.dir/fonts.scale if they exist before we create them (in case they have funky read-only perms)
Revision Changes Path
1.41 eclass/font.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/font.eclass?rev=1.41&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/font.eclass?rev=1.41&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/font.eclass?r1=1.40&r2=1.41
Index: font.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/font.eclass,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -r1.40 -r1.41
--- font.eclass 1 Jan 2009 09:36:36 -0000 1.40
+++ font.eclass 2 Jan 2009 09:42:26 -0000 1.41
@@ -1,6 +1,6 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/font.eclass,v 1.40 2009/01/01 09:36:36 pva Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/font.eclass,v 1.41 2009/01/02 09:42:26 vapier Exp $
# @ECLASS: font.eclass
# @MAINTAINER:
@@ -62,6 +62,7 @@
# create Xfont files
if use X ; then
einfo "Creating fonts.scale & fonts.dir ..."
+ rm -f "${D}${FONTDIR}"/fonts.{dir,scale}
mkfontscale "${D}${FONTDIR}"
mkfontdir \
-e /usr/share/fonts/encodings \
^ permalink raw reply [flat|nested] 25+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: font.eclass
@ 2009-01-01 9:36 Peter Volkov (pva)
0 siblings, 0 replies; 25+ messages in thread
From: Peter Volkov (pva) @ 2009-01-01 9:36 UTC (permalink / raw
To: gentoo-commits
pva 09/01/01 09:36:36
Modified: font.eclass
Log:
Fixed merging with custom ROOT, bug #247968, thank Łukasz Mierzwa for report.
Revision Changes Path
1.40 eclass/font.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/font.eclass?rev=1.40&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/font.eclass?rev=1.40&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/font.eclass?r1=1.39&r2=1.40
Index: font.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/font.eclass,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -r1.39 -r1.40
--- font.eclass 19 Aug 2008 10:34:22 -0000 1.39
+++ font.eclass 1 Jan 2009 09:36:36 -0000 1.40
@@ -1,6 +1,6 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/font.eclass,v 1.39 2008/08/19 10:34:22 pva Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/font.eclass,v 1.40 2009/01/01 09:36:36 pva Exp $
# @ECLASS: font.eclass
# @MAINTAINER:
@@ -81,7 +81,7 @@
# create fontconfig cache
einfo "Creating fontconfig cache ..."
# Mac OS X has fc-cache at /usr/X11R6/bin
- HOME="/root" fc-cache -f "${D}${FONTDIR}"
+ fc-cache -sf "${D}${FONTDIR}"
fi
}
^ permalink raw reply [flat|nested] 25+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: font.eclass
@ 2008-08-19 10:34 Peter Volkov (pva)
0 siblings, 0 replies; 25+ messages in thread
From: Peter Volkov (pva) @ 2008-08-19 10:34 UTC (permalink / raw
To: gentoo-commits
pva 08/08/19 10:34:22
Modified: font.eclass
Log:
Added media-fonts/encodings into DEPEND as it's required for x11-apps/mkfontdir to work correctly.
Revision Changes Path
1.39 eclass/font.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/font.eclass?rev=1.39&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/font.eclass?rev=1.39&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/font.eclass?r1=1.38&r2=1.39
Index: font.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/font.eclass,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -r1.38 -r1.39
--- font.eclass 21 Jun 2008 06:12:45 -0000 1.38
+++ font.eclass 19 Aug 2008 10:34:22 -0000 1.39
@@ -1,6 +1,6 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/font.eclass,v 1.38 2008/06/21 06:12:45 pva Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/font.eclass,v 1.39 2008/08/19 10:34:22 pva Exp $
# @ECLASS: font.eclass
# @MAINTAINER:
@@ -47,7 +47,8 @@
IUSE="X"
-DEPEND="X? ( x11-apps/mkfontdir )
+DEPEND="X? ( x11-apps/mkfontdir
+ media-fonts/encodings )
media-libs/fontconfig"
#
^ permalink raw reply [flat|nested] 25+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: font.eclass
@ 2008-06-21 6:12 Peter Volkov (pva)
0 siblings, 0 replies; 25+ messages in thread
From: Peter Volkov (pva) @ 2008-06-21 6:12 UTC (permalink / raw
To: gentoo-commits
pva 08/06/21 06:12:45
Modified: font.eclass
Log:
Make eclass-manpages ready, bug #210933, thanks mren.
Revision Changes Path
1.38 eclass/font.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/font.eclass?rev=1.38&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/font.eclass?rev=1.38&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/font.eclass?r1=1.37&r2=1.38
Index: font.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/font.eclass,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -r1.37 -r1.38
--- font.eclass 19 May 2008 00:42:13 -0000 1.37
+++ font.eclass 21 Jun 2008 06:12:45 -0000 1.38
@@ -1,12 +1,13 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/font.eclass,v 1.37 2008/05/19 00:42:13 dirtyepic Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/font.eclass,v 1.38 2008/06/21 06:12:45 pva Exp $
-# Author: foser <foser@gentoo.org>
-
-# Font Eclass
+# @ECLASS: font.eclass
+# @MAINTAINER:
+# fonts@gentoo.org
#
-# Eclass to make font installation uniform
+# Author: foser <foser@gentoo.org>
+# @BLURB: Eclass to make font installation uniform
inherit eutils
@@ -14,17 +15,35 @@
# Variable declarations
#
-FONT_SUFFIX="" # Space delimited list of font suffixes to install
-
-FONT_S=${S} # Dir containing the fonts
-
-FONT_PN=${PN} # Last part of $FONTDIR
-
-FONTDIR=/usr/share/fonts/${FONT_PN} # This is where the fonts are installed
-
-FONT_CONF=( "" ) # Array, which element(s) is(are) path(s) of fontconfig-2.4 file(s) to install
-
-DOCS="" # Docs to install
+# @ECLASS-VARIABLE: FONT_SUFFIX
+# @DESCRIPTION:
+# Space delimited list of font suffixes to install
+FONT_SUFFIX=""
+
+# @ECLASS-VARIABLE: FONT_S
+# @DESCRIPTION:
+# Dir containing the fonts
+FONT_S=${S}
+
+# @ECLASS-VARIABLE: FONT_PN
+# @DESCRIPTION:
+# Last part of $FONTDIR
+FONT_PN=${PN}
+
+# @ECLASS-VARIABLE: FONTDIR
+# @DESCRIPTION:
+# This is where the fonts are installed
+FONTDIR=/usr/share/fonts/${FONT_PN}
+
+# @ECLASS-VARIABLE: FONT_CONF
+# @DESCRIPTION:
+# Array, which element(s) is(are) path(s) of fontconfig-2.4 file(s) to install
+FONT_CONF=( "" )
+
+# @ECLASS-VARIABLE: DOCS
+# @DESCRIPTION:
+# Docs to install
+DOCS=""
IUSE="X"
@@ -35,6 +54,9 @@
# Public functions
#
+# @FUNCTION: font_xfont_config
+# @DESCRIPTION:
+# Creates the Xfont files.
font_xfont_config() {
# create Xfont files
if use X ; then
@@ -50,6 +72,9 @@
fi
}
+# @FUNCTION: font_xft_config
+# @DESCRIPTION:
+# Creates the fontconfig cache if necessary.
font_xft_config() {
if ! has_version '>=media-libs/fontconfig-2.4'; then
# create fontconfig cache
@@ -59,6 +84,9 @@
fi
}
+# @FUNCTION: font_fontconfig
+# @DESCRIPTION:
+# Installs the fontconfig config files of FONT_CONF.
font_fontconfig() {
local conffile
if [[ -n ${FONT_CONF[@]} ]]; then
@@ -75,6 +103,9 @@
# Public inheritable functions
#
+# @FUNCTION: font_src_install
+# @DESCRIPTION:
+# The font src_install function, which is exported.
font_src_install() {
local suffix commondoc
@@ -101,12 +132,18 @@
done
}
+# @FUNCTION: font_pkg_setup
+# @DESCRIPTION:
+# The font pkg_setup function, which is exported.
font_pkg_setup() {
# make sure we get no collisions
# setup is not the nicest place, but preinst doesn't cut it
[[ -e "${FONTDIR}/fonts.cache-1" ]] && rm -f "${FONTDIR}/fonts.cache-1"
}
+# @FUNCTION: font_pkg_postinst
+# @DESCRIPTION:
+# The font pkg_postinst function, which is exported.
font_pkg_postinst() {
# unreadable font files = fontconfig segfaults
find "${ROOT}"usr/share/fonts/ -type f '!' -perm 0644 -print0 \
@@ -121,6 +158,9 @@
fi
}
+# @FUNCTION: font_pkg_postrm
+# @DESCRIPTION:
+# The font pkg_postrm function, which is exported.
font_pkg_postrm() {
# unreadable font files = fontconfig segfaults
find "${ROOT}"usr/share/fonts/ -type f '!' -perm 0644 -print0 \
--
gentoo-commits@lists.gentoo.org mailing list
^ permalink raw reply [flat|nested] 25+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: font.eclass
@ 2008-05-19 0:42 Ryan Hill (dirtyepic)
0 siblings, 0 replies; 25+ messages in thread
From: Ryan Hill (dirtyepic) @ 2008-05-19 0:42 UTC (permalink / raw
To: gentoo-commits
dirtyepic 08/05/19 00:42:13
Modified: font.eclass
Log:
Add FONTLOG.txt to commondoc.
Revision Changes Path
1.37 eclass/font.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/font.eclass?rev=1.37&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/font.eclass?rev=1.37&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/font.eclass?r1=1.36&r2=1.37
Index: font.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/font.eclass,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -r1.36 -r1.37
--- font.eclass 8 Jan 2008 17:57:43 -0000 1.36
+++ font.eclass 19 May 2008 00:42:13 -0000 1.37
@@ -1,6 +1,6 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/font.eclass,v 1.36 2008/01/08 17:57:43 pva Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/font.eclass,v 1.37 2008/05/19 00:42:13 dirtyepic Exp $
# Author: foser <foser@gentoo.org>
@@ -96,7 +96,7 @@
dodoc ${DOCS} 2> /dev/null
# install common docs
- for commondoc in COPYRIGHT README NEWS AUTHORS BUGS ChangeLog; do
+ for commondoc in COPYRIGHT README{,.txt} NEWS AUTHORS BUGS ChangeLog FONTLOG.txt; do
[[ -s ${commondoc} ]] && dodoc ${commondoc}
done
}
--
gentoo-commits@lists.gentoo.org mailing list
^ permalink raw reply [flat|nested] 25+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: font.eclass
@ 2008-01-08 17:12 Peter Volkov (pva)
0 siblings, 0 replies; 25+ messages in thread
From: Peter Volkov (pva) @ 2008-01-08 17:12 UTC (permalink / raw
To: gentoo-commits
pva 08/01/08 17:12:23
Modified: font.eclass
Log:
First stage of fixing bug #201834.
Revision Changes Path
1.35 eclass/font.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/font.eclass?rev=1.35&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/font.eclass?rev=1.35&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/font.eclass?r1=1.34&r2=1.35
Index: font.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/font.eclass,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -r1.34 -r1.35
--- font.eclass 10 Dec 2007 23:58:17 -0000 1.34
+++ font.eclass 8 Jan 2008 17:12:23 -0000 1.35
@@ -1,6 +1,6 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/font.eclass,v 1.34 2007/12/10 23:58:17 dirtyepic Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/font.eclass,v 1.35 2008/01/08 17:12:23 pva Exp $
# Author: foser <foser@gentoo.org>
@@ -16,11 +16,11 @@
FONT_SUFFIX="" # Space delimited list of font suffixes to install
-FONT_S="${S}" # Dir containing the fonts
+FONT_S=${S} # Dir containing the fonts
-FONT_PN="${PN}" # Last part of $FONTDIR
+FONT_PN=${PN} # Last part of $FONTDIR
-FONTDIR="/usr/share/fonts/${FONT_PN}" # This is where the fonts are installed
+FONTDIR=/usr/share/fonts/${FONT_PN} # This is where the fonts are installed
FONT_CONF="" # Space delimited list of fontconfig-2.4 file(s) to install
@@ -64,7 +64,7 @@
if [[ -n ${FONT_CONF} ]]; then
if has_version '>=media-libs/fontconfig-2.4'; then
insinto /etc/fonts/conf.avail/
- for conffile in ${FONT_CONF}; do
+ for conffile in ${FONT_CONF[@]}; do
[[ -e ${conffile} ]] && doins ${conffile}
done
fi
--
gentoo-commits@lists.gentoo.org mailing list
^ permalink raw reply [flat|nested] 25+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: font.eclass
@ 2007-12-10 23:58 Ryan Hill (dirtyepic)
0 siblings, 0 replies; 25+ messages in thread
From: Ryan Hill (dirtyepic) @ 2007-12-10 23:58 UTC (permalink / raw
To: gentoo-commits
dirtyepic 07/12/10 23:58:18
Modified: font.eclass
Log:
Misquoted FONT_CONF prevented use of multiple fontconfig files. Bug #201834 by pva.
Revision Changes Path
1.34 eclass/font.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/font.eclass?rev=1.34&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/font.eclass?rev=1.34&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/font.eclass?r1=1.33&r2=1.34
Index: font.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/font.eclass,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -r1.33 -r1.34
--- font.eclass 19 Sep 2007 02:48:20 -0000 1.33
+++ font.eclass 10 Dec 2007 23:58:17 -0000 1.34
@@ -1,6 +1,6 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/font.eclass,v 1.33 2007/09/19 02:48:20 dirtyepic Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/font.eclass,v 1.34 2007/12/10 23:58:17 dirtyepic Exp $
# Author: foser <foser@gentoo.org>
@@ -64,7 +64,7 @@
if [[ -n ${FONT_CONF} ]]; then
if has_version '>=media-libs/fontconfig-2.4'; then
insinto /etc/fonts/conf.avail/
- for conffile in "${FONT_CONF}"; do
+ for conffile in ${FONT_CONF}; do
[[ -e ${conffile} ]] && doins ${conffile}
done
fi
--
gentoo-commits@gentoo.org mailing list
^ permalink raw reply [flat|nested] 25+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: font.eclass
@ 2007-09-19 2:48 Ryan Hill (dirtyepic)
0 siblings, 0 replies; 25+ messages in thread
From: Ryan Hill (dirtyepic) @ 2007-09-19 2:48 UTC (permalink / raw
To: gentoo-commits
dirtyepic 07/09/19 02:48:21
Modified: font.eclass
Log:
BSD xargs doesn't do -r.
Revision Changes Path
1.33 eclass/font.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/font.eclass?rev=1.33&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/font.eclass?rev=1.33&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/font.eclass?r1=1.32&r2=1.33
Index: font.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/font.eclass,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -r1.32 -r1.33
--- font.eclass 16 Sep 2007 20:00:56 -0000 1.32
+++ font.eclass 19 Sep 2007 02:48:20 -0000 1.33
@@ -1,6 +1,6 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/font.eclass,v 1.32 2007/09/16 20:00:56 dirtyepic Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/font.eclass,v 1.33 2007/09/19 02:48:20 dirtyepic Exp $
# Author: foser <foser@gentoo.org>
@@ -110,7 +110,7 @@
font_pkg_postinst() {
# unreadable font files = fontconfig segfaults
find "${ROOT}"usr/share/fonts/ -type f '!' -perm 0644 -print0 \
- | xargs -r -0 chmod -v 0644
+ | xargs -0 chmod -v 0644 2>/dev/null
if has_version '>=media-libs/fontconfig-2.4'; then
if [ ${ROOT} == "/" ]; then
@@ -124,7 +124,7 @@
font_pkg_postrm() {
# unreadable font files = fontconfig segfaults
find "${ROOT}"usr/share/fonts/ -type f '!' -perm 0644 -print0 \
- | xargs -r -0 chmod -v 0644
+ | xargs -0 chmod -v 0644 2>/dev/null
if has_version '>=media-libs/fontconfig-2.4'; then
if [ ${ROOT} == "/" ]; then
--
gentoo-commits@gentoo.org mailing list
^ permalink raw reply [flat|nested] 25+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: font.eclass
@ 2007-09-16 20:00 Ryan Hill (dirtyepic)
0 siblings, 0 replies; 25+ messages in thread
From: Ryan Hill (dirtyepic) @ 2007-09-16 20:00 UTC (permalink / raw
To: gentoo-commits
dirtyepic 07/09/16 20:00:57
Modified: font.eclass
Log:
Handle ${ROOT} and whitespace, suggested by vapier.
Revision Changes Path
1.32 eclass/font.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/font.eclass?rev=1.32&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/font.eclass?rev=1.32&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/font.eclass?r1=1.31&r2=1.32
Index: font.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/font.eclass,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -r1.31 -r1.32
--- font.eclass 16 Sep 2007 07:07:52 -0000 1.31
+++ font.eclass 16 Sep 2007 20:00:56 -0000 1.32
@@ -1,6 +1,6 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/font.eclass,v 1.31 2007/09/16 07:07:52 dirtyepic Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/font.eclass,v 1.32 2007/09/16 20:00:56 dirtyepic Exp $
# Author: foser <foser@gentoo.org>
@@ -109,14 +109,8 @@
font_pkg_postinst() {
# unreadable font files = fontconfig segfaults
- badperms="$( find /usr/share/fonts/ -type f \! -perm 0644 -print )"
- if [[ -n ${badperms} ]]; then
- echo
- for fontfile in ${badperms}; do
- ewarn $( chmod -v 0644 ${fontfile} )
- done
- echo
- fi
+ find "${ROOT}"usr/share/fonts/ -type f '!' -perm 0644 -print0 \
+ | xargs -r -0 chmod -v 0644
if has_version '>=media-libs/fontconfig-2.4'; then
if [ ${ROOT} == "/" ]; then
@@ -129,14 +123,8 @@
font_pkg_postrm() {
# unreadable font files = fontconfig segfaults
- badperms="$( find /usr/share/fonts/ -type f \! -perm 0644 -print )"
- if [[ -n ${badperms} ]]; then
- echo
- for fontfile in ${badperms}; do
- ewarn $( chmod -v 0644 ${fontfile} )
- done
- echo
- fi
+ find "${ROOT}"usr/share/fonts/ -type f '!' -perm 0644 -print0 \
+ | xargs -r -0 chmod -v 0644
if has_version '>=media-libs/fontconfig-2.4'; then
if [ ${ROOT} == "/" ]; then
--
gentoo-commits@gentoo.org mailing list
^ permalink raw reply [flat|nested] 25+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: font.eclass
@ 2007-09-16 7:07 Ryan Hill (dirtyepic)
0 siblings, 0 replies; 25+ messages in thread
From: Ryan Hill (dirtyepic) @ 2007-09-16 7:07 UTC (permalink / raw
To: gentoo-commits
dirtyepic 07/09/16 07:07:52
Modified: font.eclass
Log:
Hopefully the last permission handling change - now reports when changing a file's permissions, emulates chmod -c, and is all pretty-like. Thanks to dberkholz for the suggestion.
Revision Changes Path
1.31 eclass/font.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/font.eclass?rev=1.31&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/font.eclass?rev=1.31&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/font.eclass?r1=1.30&r2=1.31
Index: font.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/font.eclass,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -r1.30 -r1.31
--- font.eclass 16 Sep 2007 06:21:05 -0000 1.30
+++ font.eclass 16 Sep 2007 07:07:52 -0000 1.31
@@ -1,6 +1,6 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/font.eclass,v 1.30 2007/09/16 06:21:05 dirtyepic Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/font.eclass,v 1.31 2007/09/16 07:07:52 dirtyepic Exp $
# Author: foser <foser@gentoo.org>
@@ -108,8 +108,15 @@
}
font_pkg_postinst() {
- find /usr/share/fonts/ -type f \! -perm 0644 -print0 \
- | xargs -0 chmod 0644 2&>/dev/null
+ # unreadable font files = fontconfig segfaults
+ badperms="$( find /usr/share/fonts/ -type f \! -perm 0644 -print )"
+ if [[ -n ${badperms} ]]; then
+ echo
+ for fontfile in ${badperms}; do
+ ewarn $( chmod -v 0644 ${fontfile} )
+ done
+ echo
+ fi
if has_version '>=media-libs/fontconfig-2.4'; then
if [ ${ROOT} == "/" ]; then
@@ -121,8 +128,15 @@
}
font_pkg_postrm() {
- find /usr/share/fonts/ -type f \! -perm 0644 -print0 \
- | xargs -0 chmod 0644 2&>/dev/null
+ # unreadable font files = fontconfig segfaults
+ badperms="$( find /usr/share/fonts/ -type f \! -perm 0644 -print )"
+ if [[ -n ${badperms} ]]; then
+ echo
+ for fontfile in ${badperms}; do
+ ewarn $( chmod -v 0644 ${fontfile} )
+ done
+ echo
+ fi
if has_version '>=media-libs/fontconfig-2.4'; then
if [ ${ROOT} == "/" ]; then
--
gentoo-commits@gentoo.org mailing list
^ permalink raw reply [flat|nested] 25+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: font.eclass
@ 2007-09-16 6:21 Ryan Hill (dirtyepic)
0 siblings, 0 replies; 25+ messages in thread
From: Ryan Hill (dirtyepic) @ 2007-09-16 6:21 UTC (permalink / raw
To: gentoo-commits
dirtyepic 07/09/16 06:21:05
Modified: font.eclass
Log:
Move permission checking to postinst/postrm, and check everything in /usr/share/fonts rather than just the current package.
Revision Changes Path
1.30 eclass/font.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/font.eclass?rev=1.30&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/font.eclass?rev=1.30&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/font.eclass?r1=1.29&r2=1.30
Index: font.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/font.eclass,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -r1.29 -r1.30
--- font.eclass 16 Sep 2007 02:20:05 -0000 1.29
+++ font.eclass 16 Sep 2007 06:21:05 -0000 1.30
@@ -1,6 +1,6 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/font.eclass,v 1.29 2007/09/16 02:20:05 dirtyepic Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/font.eclass,v 1.30 2007/09/16 06:21:05 dirtyepic Exp $
# Author: foser <foser@gentoo.org>
@@ -84,8 +84,6 @@
for suffix in ${FONT_SUFFIX}; do
doins *.${suffix}
- # ensure fonts are world readable to prevent fontconfig segfaults
- chmod 0644 ${D}${FONTDIR}/*.${suffix}
done
rm -f fonts.{dir,scale} encodings.dir
@@ -110,6 +108,9 @@
}
font_pkg_postinst() {
+ find /usr/share/fonts/ -type f \! -perm 0644 -print0 \
+ | xargs -0 chmod 0644 2&>/dev/null
+
if has_version '>=media-libs/fontconfig-2.4'; then
if [ ${ROOT} == "/" ]; then
ebegin "Updating global fontcache"
@@ -120,6 +121,9 @@
}
font_pkg_postrm() {
+ find /usr/share/fonts/ -type f \! -perm 0644 -print0 \
+ | xargs -0 chmod 0644 2&>/dev/null
+
if has_version '>=media-libs/fontconfig-2.4'; then
if [ ${ROOT} == "/" ]; then
ebegin "Updating global fontcache"
--
gentoo-commits@gentoo.org mailing list
^ permalink raw reply [flat|nested] 25+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: font.eclass
@ 2007-09-16 2:20 Ryan Hill (dirtyepic)
0 siblings, 0 replies; 25+ messages in thread
From: Ryan Hill (dirtyepic) @ 2007-09-16 2:20 UTC (permalink / raw
To: gentoo-commits
dirtyepic 07/09/16 02:20:05
Modified: font.eclass
Log:
Forgot to remove -v flag from chmod.
Revision Changes Path
1.29 eclass/font.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/font.eclass?rev=1.29&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/font.eclass?rev=1.29&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/font.eclass?r1=1.28&r2=1.29
Index: font.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/font.eclass,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -r1.28 -r1.29
--- font.eclass 16 Sep 2007 02:18:04 -0000 1.28
+++ font.eclass 16 Sep 2007 02:20:05 -0000 1.29
@@ -1,6 +1,6 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/font.eclass,v 1.28 2007/09/16 02:18:04 dirtyepic Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/font.eclass,v 1.29 2007/09/16 02:20:05 dirtyepic Exp $
# Author: foser <foser@gentoo.org>
@@ -85,7 +85,7 @@
for suffix in ${FONT_SUFFIX}; do
doins *.${suffix}
# ensure fonts are world readable to prevent fontconfig segfaults
- chmod -v 0644 ${D}${FONTDIR}/*.${suffix}
+ chmod 0644 ${D}${FONTDIR}/*.${suffix}
done
rm -f fonts.{dir,scale} encodings.dir
--
gentoo-commits@gentoo.org mailing list
^ permalink raw reply [flat|nested] 25+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: font.eclass
@ 2007-09-16 2:18 Ryan Hill (dirtyepic)
0 siblings, 0 replies; 25+ messages in thread
From: Ryan Hill (dirtyepic) @ 2007-09-16 2:18 UTC (permalink / raw
To: gentoo-commits
dirtyepic 07/09/16 02:18:04
Modified: font.eclass
Log:
Do permission setting in ${D} rather than ${WORKDIR}.
Revision Changes Path
1.28 eclass/font.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/font.eclass?rev=1.28&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/font.eclass?rev=1.28&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/font.eclass?r1=1.27&r2=1.28
Index: font.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/font.eclass,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -r1.27 -r1.28
--- font.eclass 16 Aug 2007 00:54:11 -0000 1.27
+++ font.eclass 16 Sep 2007 02:18:04 -0000 1.28
@@ -1,6 +1,6 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/font.eclass,v 1.27 2007/08/16 00:54:11 dirtyepic Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/font.eclass,v 1.28 2007/09/16 02:18:04 dirtyepic Exp $
# Author: foser <foser@gentoo.org>
@@ -83,9 +83,9 @@
insinto "${FONTDIR}"
for suffix in ${FONT_SUFFIX}; do
- # ensure fonts are world readable to prevent fontconfig segfaults
- chmod 0644 *.${suffix}
doins *.${suffix}
+ # ensure fonts are world readable to prevent fontconfig segfaults
+ chmod -v 0644 ${D}${FONTDIR}/*.${suffix}
done
rm -f fonts.{dir,scale} encodings.dir
--
gentoo-commits@gentoo.org mailing list
^ permalink raw reply [flat|nested] 25+ messages in thread
end of thread, other threads:[~2010-09-30 3:46 UTC | newest]
Thread overview: 25+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-08 17:57 [gentoo-commits] gentoo-x86 commit in eclass: font.eclass Peter Volkov (pva)
-- strict thread matches above, loose matches on Subject: below --
2010-09-30 3:46 Ryan Hill (dirtyepic)
2010-07-09 3:44 Ryan Hill (dirtyepic)
2010-05-15 5:25 Ryan Hill (dirtyepic)
2010-04-20 4:06 Ryan Hill (dirtyepic)
2010-02-09 17:15 Tomas Chvatal (scarabeus)
2009-10-11 11:44 Markus Meier (maekke)
2009-09-13 4:47 Ryan Hill (dirtyepic)
2009-09-07 21:07 Ryan Hill (dirtyepic)
2009-02-08 18:22 Peter Volkov (pva)
2009-01-12 22:54 Markus Meier (maekke)
2009-01-06 19:24 Fabian Groffen (grobian)
2009-01-02 9:42 Mike Frysinger (vapier)
2009-01-01 9:36 Peter Volkov (pva)
2008-08-19 10:34 Peter Volkov (pva)
2008-06-21 6:12 Peter Volkov (pva)
2008-05-19 0:42 Ryan Hill (dirtyepic)
2008-01-08 17:12 Peter Volkov (pva)
2007-12-10 23:58 Ryan Hill (dirtyepic)
2007-09-19 2:48 Ryan Hill (dirtyepic)
2007-09-16 20:00 Ryan Hill (dirtyepic)
2007-09-16 7:07 Ryan Hill (dirtyepic)
2007-09-16 6:21 Ryan Hill (dirtyepic)
2007-09-16 2:20 Ryan Hill (dirtyepic)
2007-09-16 2:18 Ryan Hill (dirtyepic)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox