/[gentoo-x86]/eclass/xorg-2.eclass
Gentoo

Diff of /eclass/xorg-2.eclass

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

Revision 1.47 Revision 1.51
1# Copyright 1999-2011 Gentoo Foundation 1# Copyright 1999-2011 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/xorg-2.eclass,v 1.47 2011/08/22 04:46:32 vapier Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/xorg-2.eclass,v 1.51 2011/11/01 13:51:05 chithanh Exp $
4 4
5# @ECLASS: xorg-2.eclass 5# @ECLASS: xorg-2.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# x11@gentoo.org 7# x11@gentoo.org
8# @AUTHOR: 8# @AUTHOR:
107XORG_EAUTORECONF_ARCHES="x86-interix ppc-aix x86-winnt" 107XORG_EAUTORECONF_ARCHES="x86-interix ppc-aix x86-winnt"
108EAUTORECONF_DEPEND+=" 108EAUTORECONF_DEPEND+="
109 >=sys-devel/libtool-2.2.6a 109 >=sys-devel/libtool-2.2.6a
110 sys-devel/m4" 110 sys-devel/m4"
111if [[ ${PN} != util-macros ]] ; then 111if [[ ${PN} != util-macros ]] ; then
112 EAUTORECONF_DEPEND+=" >=x11-misc/util-macros-1.14.0" 112 EAUTORECONF_DEPEND+=" >=x11-misc/util-macros-1.15.0"
113 # Required even by xorg-server 113 # Required even by xorg-server
114 [[ ${PN} == "font-util" ]] || EAUTORECONF_DEPEND+=" >=media-fonts/font-util-1.2.0" 114 [[ ${PN} == "font-util" ]] || EAUTORECONF_DEPEND+=" >=media-fonts/font-util-1.2.0"
115fi 115fi
116WANT_AUTOCONF="latest" 116WANT_AUTOCONF="latest"
117WANT_AUTOMAKE="latest" 117WANT_AUTOMAKE="latest"
408 # @DESCRIPTION: 408 # @DESCRIPTION:
409 # Array of an additional options to pass to configure. 409 # Array of an additional options to pass to configure.
410 # @DEFAULT_UNSET 410 # @DEFAULT_UNSET
411 if [[ $(declare -p XORG_CONFIGURE_OPTIONS 2>&-) != "declare -a"* ]]; then 411 if [[ $(declare -p XORG_CONFIGURE_OPTIONS 2>&-) != "declare -a"* ]]; then
412 # fallback to CONFIGURE_OPTIONS, deprecated. 412 # fallback to CONFIGURE_OPTIONS, deprecated.
413 [[ -n "${CONFIGURE_OPTIONS}" ]] && \ 413 if [[ -n "${CONFIGURE_OPTIONS}" ]]; then
414 ewarn "QA: CONFIGURE_OPTIONS are deprecated. Please migrate to XORG_CONFIGURE_OPTIONS to preserve namespace." 414 eqawarn "CONFIGURE_OPTIONS are deprecated. Please migrate to XORG_CONFIGURE_OPTIONS"
415 eqawarn "to preserve namespace."
416 fi
417
415 local xorgconfadd=(${CONFIGURE_OPTIONS}) 418 local xorgconfadd=(${CONFIGURE_OPTIONS})
416 else 419 else
417 local xorgconfadd=("${XORG_CONFIGURE_OPTIONS[@]}") 420 local xorgconfadd=("${XORG_CONFIGURE_OPTIONS[@]}")
418 fi 421 fi
419 422
473# Run X-specific post-installation tasks on the live filesystem. The 476# Run X-specific post-installation tasks on the live filesystem. The
474# only task right now is some setup for font packages. 477# only task right now is some setup for font packages.
475xorg-2_pkg_postinst() { 478xorg-2_pkg_postinst() {
476 debug-print-function ${FUNCNAME} "$@" 479 debug-print-function ${FUNCNAME} "$@"
477 480
478 [[ -n ${FONT} ]] && setup_fonts "$@" 481 if [[ -n ${FONT} ]]; then
482 create_fonts_scale
483 create_fonts_dir
484 font_pkg_postinst "$@"
485 fi
479} 486}
480 487
481# @FUNCTION: xorg-2_pkg_postrm 488# @FUNCTION: xorg-2_pkg_postrm
482# @DESCRIPTION: 489# @DESCRIPTION:
483# Run X-specific post-removal tasks on the live filesystem. The only 490# Run X-specific post-removal tasks on the live filesystem. The only
484# task right now is some cleanup for font packages. 491# task right now is some cleanup for font packages.
485xorg-2_pkg_postrm() { 492xorg-2_pkg_postrm() {
486 debug-print-function ${FUNCNAME} "$@" 493 debug-print-function ${FUNCNAME} "$@"
487 494
488 [[ -n ${FONT} ]] && font_pkg_postrm "$@" 495 if [[ -n ${FONT} ]]; then
489} 496 # if we're doing an upgrade, postinst will do
490 497 if [[ ${EAPI} -lt 4 || -z ${REPLACED_BY_VERSION} ]]; then
491# @FUNCTION: setup_fonts
492# @DESCRIPTION:
493# Generates needed files for fonts and fixes font permissions
494setup_fonts() {
495 debug-print-function ${FUNCNAME} "$@"
496
497 create_fonts_scale 498 create_fonts_scale
498 create_fonts_dir 499 create_fonts_dir
499 font_pkg_postinst 500 font_pkg_postrm "$@"
501 fi
502 fi
500} 503}
501 504
502# @FUNCTION: remove_font_metadata 505# @FUNCTION: remove_font_metadata
503# @DESCRIPTION: 506# @DESCRIPTION:
504# Don't let the package install generated font files that may overlap 507# Don't let the package install generated font files that may overlap
517# Create fonts.scale file, used by the old server-side fonts subsystem. 520# Create fonts.scale file, used by the old server-side fonts subsystem.
518create_fonts_scale() { 521create_fonts_scale() {
519 debug-print-function ${FUNCNAME} "$@" 522 debug-print-function ${FUNCNAME} "$@"
520 523
521 if [[ ${FONT_DIR} != Speedo && ${FONT_DIR} != CID ]]; then 524 if [[ ${FONT_DIR} != Speedo && ${FONT_DIR} != CID ]]; then
522 ebegin "Generating font.scale" 525 ebegin "Generating fonts.scale"
523 mkfontscale \ 526 mkfontscale \
524 -a "${EROOT}/usr/share/fonts/encodings/encodings.dir" \ 527 -a "${EROOT}/usr/share/fonts/encodings/encodings.dir" \
525 -- "${EROOT}/usr/share/fonts/${FONT_DIR}" 528 -- "${EROOT}/usr/share/fonts/${FONT_DIR}"
526 eend $? 529 eend $?
527 fi 530 fi

Legend:
Removed from v.1.47  
changed lines
  Added in v.1.51

  ViewVC Help
Powered by ViewVC 1.1.20