/[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.45 Revision 1.49
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.45 2006/02/15 21:33:15 spyderous Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/x-modular.eclass,v 1.49 2006/03/22 20:19:24 spyderous Exp $
4# 4#
5# Author: Donnie Berkholz <spyderous@gentoo.org> 5# Author: Donnie Berkholz <spyderous@gentoo.org>
6# 6#
7# This eclass is designed to reduce code duplication in the modularized X11 7# This eclass is designed to reduce code duplication in the modularized X11
8# ebuilds. 8# ebuilds.
91 >=sys-devel/m4-1.4" 91 >=sys-devel/m4-1.4"
92fi 92fi
93 93
94# If we're a font package, but not the font.alias one 94# If we're a font package, but not the font.alias one
95if [[ "${PN/#font-}" != "${PN}" ]] \ 95if [[ "${PN/#font-}" != "${PN}" ]] \
96 && [[ "${CATEGORY}" = "media-fonts" ]] \
96 && [[ "${PN}" != "font-alias" ]] \ 97 && [[ "${PN}" != "font-alias" ]] \
97 && [[ "${PN}" != "font-util" ]]; then 98 && [[ "${PN}" != "font-util" ]]; then
98 # Activate font code in the rest of the eclass 99 # Activate font code in the rest of the eclass
99 FONT="yes" 100 FONT="yes"
100 101
151 || [[ "${PN/xcursor}" != "${PN}" ]] \ 152 || [[ "${PN/xcursor}" != "${PN}" ]] \
152 ; then 153 ; then
153 DEBUGGABLE="yes" 154 DEBUGGABLE="yes"
154 IUSE="${IUSE} debug" 155 IUSE="${IUSE} debug"
155 if use debug; then 156 if use debug; then
157 if ! has splitdebug ${FEATURES}; then
156 RESTRICT="${RESTRICT} nostrip" 158 RESTRICT="${RESTRICT} nostrip"
159 fi
157 fi 160 fi
158fi 161fi
159 162
160DEPEND="${DEPEND} 163DEPEND="${DEPEND}
161 >=dev-util/pkgconfig-0.18" 164 >=dev-util/pkgconfig-0.18"
226} 229}
227 230
228x-modular_src_unpack() { 231x-modular_src_unpack() {
229 if [[ ${PN:0:11} = "xorg-server" ]] || [[ -n "${DRIVER}" ]]; then 232 if [[ ${PN:0:11} = "xorg-server" ]] || [[ -n "${DRIVER}" ]]; then
230 if gcc-specs-now; then 233 if gcc-specs-now; then
231 msg="Do not emerge ${PN} without vanilla gcc!" 234 msg="Do not emerge ${PN} without vanilla gcc specs!"
232 eerror "$msg" 235 eerror "$msg"
233 die "$msg" 236 die "$msg"
234 fi 237 fi
235 fi 238 fi
236 239
314 317
315 # Don't install libtool archives for server modules 318 # Don't install libtool archives for server modules
316 if [[ -e ${D}/usr/lib/xorg/modules ]]; then 319 if [[ -e ${D}/usr/lib/xorg/modules ]]; then
317 find ${D}/usr/lib/xorg/modules -name '*.la' \ 320 find ${D}/usr/lib/xorg/modules -name '*.la' \
318 | xargs rm -f 321 | xargs rm -f
322 fi
323
324 # Don't install overlapping fonts.* files
325 # Generate them instead when possible
326 if [[ -n "${FONT}" ]]; then
327 remove_font_metadata
319 fi 328 fi
320} 329}
321 330
322x-modular_pkg_preinst() { 331x-modular_pkg_preinst() {
323 if [[ -n "${FONT}" ]]; then 332 if [[ -n "${FONT}" ]]; then
381 390
382 create_fonts_scale 391 create_fonts_scale
383 create_fonts_dir 392 create_fonts_dir
384 fix_font_permissions 393 fix_font_permissions
385 create_font_cache 394 create_font_cache
395}
396
397remove_font_metadata() {
398 local DIR
399 for DIR in ${FONT_DIR}; do
400 if [[ "${DIR}" != "Speedo" ]] && \
401 [[ "${DIR}" != "CID" ]] ; then
402 # Delete font metadata files
403 # fonts.scale, fonts.dir, fonts.cache-1
404 rm -f ${D}/usr/share/fonts/${DIR}/fonts.{scale,dir,cache-1}
405 fi
406 done
386} 407}
387 408
388discover_font_dirs() { 409discover_font_dirs() {
389 pushd ${IMAGE}/usr/share/fonts 410 pushd ${IMAGE}/usr/share/fonts
390 FONT_DIRS="$(find . -maxdepth 1 -mindepth 1 -type d)" 411 FONT_DIRS="$(find . -maxdepth 1 -mindepth 1 -type d)"

Legend:
Removed from v.1.45  
changed lines
  Added in v.1.49

  ViewVC Help
Powered by ViewVC 1.1.20