/[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.114
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.114 2009/10/11 07:41:36 pva 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.
103fi 103fi
104 104
105SLOT="0" 105SLOT="0"
106 106
107# Set the license for the package. This can be overridden by setting 107# Set the license for the package. This can be overridden by setting
108# LICENSE after the inherit. 108# LICENSE after the inherit. Nearly all FreeDesktop-hosted X packages
109LICENSE=${PN} 109# are under the MIT license. (This is what Red Hat does in their rpms)
110LICENSE="MIT"
110 111
111# Set up shared dependencies 112# Set up shared dependencies
112if [[ -n "${SNAPSHOT}" ]]; then 113if [[ -n "${SNAPSHOT}" ]]; then
113# FIXME: What's the minimal libtool version supporting arbitrary versioning? 114# FIXME: What's the minimal libtool version supporting arbitrary versioning?
114 DEPEND="${DEPEND} 115 DEPEND="${DEPEND}
145 FONT_DIR=${FONT_DIR/ttf/TTF} 146 FONT_DIR=${FONT_DIR/ttf/TTF}
146 FONT_DIR=${FONT_DIR/otf/OTF} 147 FONT_DIR=${FONT_DIR/otf/OTF}
147 FONT_DIR=${FONT_DIR/type1/Type1} 148 FONT_DIR=${FONT_DIR/type1/Type1}
148 FONT_DIR=${FONT_DIR/speedo/Speedo} 149 FONT_DIR=${FONT_DIR/speedo/Speedo}
149 150
150 # Set up configure option 151 # Set up configure options, wrapped so ebuilds can override if need be
152 if [[ -z ${FONT_OPTIONS} ]]; then
151 FONT_OPTIONS="--with-fontdir=\"/usr/share/fonts/${FONT_DIR}\"" 153 FONT_OPTIONS="--with-fontdir=\"/usr/share/fonts/${FONT_DIR}\""
154 fi
152 155
153 if [[ -n "${FONT}" ]]; then 156 if [[ -n "${FONT}" ]]; then
154 if [[ ${PN##*-} = misc ]] || [[ ${PN##*-} = 75dpi ]] || [[ ${PN##*-} = 100dpi ]] || [[ ${PN##*-} = cyrillic ]]; then 157 if [[ ${PN##*-} = misc ]] || [[ ${PN##*-} = 75dpi ]] || [[ ${PN##*-} = 100dpi ]] || [[ ${PN##*-} = cyrillic ]]; then
155 IUSE="${IUSE} nls" 158 IUSE="${IUSE} nls"
156 fi 159 fi
344# If a font package, perform any necessary configuration steps 347# If a font package, perform any necessary configuration steps
345x-modular_font_configure() { 348x-modular_font_configure() {
346 if [[ -n "${FONT}" ]]; then 349 if [[ -n "${FONT}" ]]; then
347 # Might be worth adding an option to configure your desired font 350 # Might be worth adding an option to configure your desired font
348 # and exclude all others. Also, should this USE be nls or minimal? 351 # and exclude all others. Also, should this USE be nls or minimal?
349 if ! use nls; then 352 if has nls ${IUSE//+} && ! use nls; then
350 FONT_OPTIONS="${FONT_OPTIONS} 353 FONT_OPTIONS="${FONT_OPTIONS}
351 --disable-iso8859-2 354 --disable-iso8859-2
352 --disable-iso8859-3 355 --disable-iso8859-3
353 --disable-iso8859-4 356 --disable-iso8859-4
354 --disable-iso8859-5 357 --disable-iso8859-5
557 die "${msg}" 560 die "${msg}"
558 fi 561 fi
559 562
560 create_fonts_scale 563 create_fonts_scale
561 create_fonts_dir 564 create_fonts_dir
562 fix_font_permissions
563 create_font_cache 565 create_font_cache
564} 566}
565 567
566# @FUNCTION: remove_font_metadata 568# @FUNCTION: remove_font_metadata
567# @USAGE: 569# @USAGE:
650 fi 652 fi
651 done 653 done
652 eend 0 654 eend 0
653} 655}
654 656
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 657# @FUNCTION: create_font_cache
669# @USAGE: 658# @USAGE:
670# @DESCRIPTION: 659# @DESCRIPTION:
671# Create fonts.cache-1 files, used by the new client-side fonts 660# Create fonts.cache-1 files, used by the new client-side fonts
672# subsystem. 661# subsystem.

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

  ViewVC Help
Powered by ViewVC 1.1.20