/[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.48
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.48 2006/03/21 00:31:11 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.
151 || [[ "${PN/xcursor}" != "${PN}" ]] \ 151 || [[ "${PN/xcursor}" != "${PN}" ]] \
152 ; then 152 ; then
153 DEBUGGABLE="yes" 153 DEBUGGABLE="yes"
154 IUSE="${IUSE} debug" 154 IUSE="${IUSE} debug"
155 if use debug; then 155 if use debug; then
156 if ! has splitdebug ${FEATURES}; then
156 RESTRICT="${RESTRICT} nostrip" 157 RESTRICT="${RESTRICT} nostrip"
158 fi
157 fi 159 fi
158fi 160fi
159 161
160DEPEND="${DEPEND} 162DEPEND="${DEPEND}
161 >=dev-util/pkgconfig-0.18" 163 >=dev-util/pkgconfig-0.18"
226} 228}
227 229
228x-modular_src_unpack() { 230x-modular_src_unpack() {
229 if [[ ${PN:0:11} = "xorg-server" ]] || [[ -n "${DRIVER}" ]]; then 231 if [[ ${PN:0:11} = "xorg-server" ]] || [[ -n "${DRIVER}" ]]; then
230 if gcc-specs-now; then 232 if gcc-specs-now; then
231 msg="Do not emerge ${PN} without vanilla gcc!" 233 msg="Do not emerge ${PN} without vanilla gcc specs!"
232 eerror "$msg" 234 eerror "$msg"
233 die "$msg" 235 die "$msg"
234 fi 236 fi
235 fi 237 fi
236 238
314 316
315 # Don't install libtool archives for server modules 317 # Don't install libtool archives for server modules
316 if [[ -e ${D}/usr/lib/xorg/modules ]]; then 318 if [[ -e ${D}/usr/lib/xorg/modules ]]; then
317 find ${D}/usr/lib/xorg/modules -name '*.la' \ 319 find ${D}/usr/lib/xorg/modules -name '*.la' \
318 | xargs rm -f 320 | xargs rm -f
321 fi
322
323 # Don't install overlapping fonts.* files
324 # Generate them instead when possible
325 if [[ -n "${FONT}" ]]; then
326 remove_font_metadata
319 fi 327 fi
320} 328}
321 329
322x-modular_pkg_preinst() { 330x-modular_pkg_preinst() {
323 if [[ -n "${FONT}" ]]; then 331 if [[ -n "${FONT}" ]]; then
381 389
382 create_fonts_scale 390 create_fonts_scale
383 create_fonts_dir 391 create_fonts_dir
384 fix_font_permissions 392 fix_font_permissions
385 create_font_cache 393 create_font_cache
394}
395
396remove_font_metadata() {
397 local DIR
398 for DIR in ${FONT_DIR}; do
399 if [[ "${DIR}" != "Speedo" ]] && \
400 [[ "${DIR}" != "CID" ]] ; then
401 # Delete font metadata files
402 # fonts.scale, fonts.dir, fonts.cache-1
403 rm -f ${D}/usr/share/fonts/${DIR}/fonts.{scale,dir,cache-1}
404 fi
405 done
386} 406}
387 407
388discover_font_dirs() { 408discover_font_dirs() {
389 pushd ${IMAGE}/usr/share/fonts 409 pushd ${IMAGE}/usr/share/fonts
390 FONT_DIRS="$(find . -maxdepth 1 -mindepth 1 -type d)" 410 FONT_DIRS="$(find . -maxdepth 1 -mindepth 1 -type d)"

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

  ViewVC Help
Powered by ViewVC 1.1.20