/[gentoo-x86]/eclass/x-modular.eclass
Gentoo

Diff of /eclass/x-modular.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.109 Revision 1.111
1# Copyright 1999-2005 Gentoo Foundation 1# Copyright 1999-2005 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/x-modular.eclass,v 1.109 2009/05/14 12:40:55 remi Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/x-modular.eclass,v 1.111 2009/08/22 20:12:42 dirtyepic Exp $
4# 4#
5# @ECLASS: x-modular.eclass 5# @ECLASS: x-modular.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# Donnie Berkholz <dberkholz@gentoo.org>, x11@gentoo.org 7# Donnie Berkholz <dberkholz@gentoo.org>, x11@gentoo.org
8# @BLURB: Reduces code duplication in the modularized X11 ebuilds. 8# @BLURB: Reduces code duplication in the modularized X11 ebuilds.
145 FONT_DIR=${FONT_DIR/ttf/TTF} 145 FONT_DIR=${FONT_DIR/ttf/TTF}
146 FONT_DIR=${FONT_DIR/otf/OTF} 146 FONT_DIR=${FONT_DIR/otf/OTF}
147 FONT_DIR=${FONT_DIR/type1/Type1} 147 FONT_DIR=${FONT_DIR/type1/Type1}
148 FONT_DIR=${FONT_DIR/speedo/Speedo} 148 FONT_DIR=${FONT_DIR/speedo/Speedo}
149 149
150 # Set up configure option 150 # Set up configure options, wrapped so ebuilds can override if need be
151 if [[ -z ${FONT_OPTIONS} ]]; then
151 FONT_OPTIONS="--with-fontdir=\"/usr/share/fonts/${FONT_DIR}\"" 152 FONT_OPTIONS="--with-fontdir=\"/usr/share/fonts/${FONT_DIR}\""
153 fi
152 154
153 if [[ -n "${FONT}" ]]; then 155 if [[ -n "${FONT}" ]]; then
154 if [[ ${PN##*-} = misc ]] || [[ ${PN##*-} = 75dpi ]] || [[ ${PN##*-} = 100dpi ]] || [[ ${PN##*-} = cyrillic ]]; then 156 if [[ ${PN##*-} = misc ]] || [[ ${PN##*-} = 75dpi ]] || [[ ${PN##*-} = 100dpi ]] || [[ ${PN##*-} = cyrillic ]]; then
155 IUSE="${IUSE} nls" 157 IUSE="${IUSE} nls"
156 fi 158 fi
434 ${PN/proto/}docdir=/usr/share/doc/${PF} \ 436 ${PN/proto/}docdir=/usr/share/doc/${PF} \
435 DESTDIR="${D}" \ 437 DESTDIR="${D}" \
436 install \ 438 install \
437 || die 439 || die
438 else 440 else
441 # FIXME: Drop after X fonts stop running fc-cache during install, bug #278221
442 [[ -n ${FONT} ]] && addpredict /var/cache/fontconfig
439 make \ 443 make \
440 DESTDIR="${D}" \ 444 DESTDIR="${D}" \
441 install \ 445 install \
442 || die 446 || die
443 fi 447 fi
557 die "${msg}" 561 die "${msg}"
558 fi 562 fi
559 563
560 create_fonts_scale 564 create_fonts_scale
561 create_fonts_dir 565 create_fonts_dir
562 fix_font_permissions
563 create_font_cache 566 create_font_cache
564} 567}
565 568
566# @FUNCTION: remove_font_metadata 569# @FUNCTION: remove_font_metadata
567# @USAGE: 570# @USAGE:
650 fi 653 fi
651 done 654 done
652 eend 0 655 eend 0
653} 656}
654 657
655# @FUNCTION: fix_font_permissions
656# @USAGE:
657# @DESCRIPTION:
658# Font files should have 644 permissions. Ensure this is the case.
659fix_font_permissions() {
660 ebegin "Fixing permissions"
661 for DIR in ${FONT_DIR}; do
662 find "${ROOT}"/usr/share/fonts/${DIR} -type f -name 'font.*' \
663 -exec chmod 0644 {} \;
664 done
665 eend 0
666}
667
668# @FUNCTION: create_font_cache 658# @FUNCTION: create_font_cache
669# @USAGE: 659# @USAGE:
670# @DESCRIPTION: 660# @DESCRIPTION:
671# Create fonts.cache-1 files, used by the new client-side fonts 661# Create fonts.cache-1 files, used by the new client-side fonts
672# subsystem. 662# subsystem.

Legend:
Removed from v.1.109  
changed lines
  Added in v.1.111

  ViewVC Help
Powered by ViewVC 1.1.20