| 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.48 2011/09/12 13:50:57 mgorny 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: |
| … | |
… | |
| 107 | XORG_EAUTORECONF_ARCHES="x86-interix ppc-aix x86-winnt" |
107 | XORG_EAUTORECONF_ARCHES="x86-interix ppc-aix x86-winnt" |
| 108 | EAUTORECONF_DEPEND+=" |
108 | EAUTORECONF_DEPEND+=" |
| 109 | >=sys-devel/libtool-2.2.6a |
109 | >=sys-devel/libtool-2.2.6a |
| 110 | sys-devel/m4" |
110 | sys-devel/m4" |
| 111 | if [[ ${PN} != util-macros ]] ; then |
111 | if [[ ${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" |
| 115 | fi |
115 | fi |
| 116 | WANT_AUTOCONF="latest" |
116 | WANT_AUTOCONF="latest" |
| 117 | WANT_AUTOMAKE="latest" |
117 | WANT_AUTOMAKE="latest" |
| … | |
… | |
| 476 | # Run X-specific post-installation tasks on the live filesystem. The |
476 | # Run X-specific post-installation tasks on the live filesystem. The |
| 477 | # only task right now is some setup for font packages. |
477 | # only task right now is some setup for font packages. |
| 478 | xorg-2_pkg_postinst() { |
478 | xorg-2_pkg_postinst() { |
| 479 | debug-print-function ${FUNCNAME} "$@" |
479 | debug-print-function ${FUNCNAME} "$@" |
| 480 | |
480 | |
| 481 | [[ -n ${FONT} ]] && setup_fonts "$@" |
481 | if [[ -n ${FONT} ]]; then |
|
|
482 | create_fonts_scale |
|
|
483 | create_fonts_dir |
|
|
484 | font_pkg_postinst "$@" |
|
|
485 | fi |
| 482 | } |
486 | } |
| 483 | |
487 | |
| 484 | # @FUNCTION: xorg-2_pkg_postrm |
488 | # @FUNCTION: xorg-2_pkg_postrm |
| 485 | # @DESCRIPTION: |
489 | # @DESCRIPTION: |
| 486 | # 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 |
| 487 | # task right now is some cleanup for font packages. |
491 | # task right now is some cleanup for font packages. |
| 488 | xorg-2_pkg_postrm() { |
492 | xorg-2_pkg_postrm() { |
| 489 | debug-print-function ${FUNCNAME} "$@" |
493 | debug-print-function ${FUNCNAME} "$@" |
| 490 | |
494 | |
| 491 | [[ -n ${FONT} ]] && font_pkg_postrm "$@" |
495 | if [[ -n ${FONT} ]]; then |
| 492 | } |
496 | # if we're doing an upgrade, postinst will do |
| 493 | |
497 | if [[ ${EAPI} -lt 4 || -z ${REPLACED_BY_VERSION} ]]; then |
| 494 | # @FUNCTION: setup_fonts |
|
|
| 495 | # @DESCRIPTION: |
|
|
| 496 | # Generates needed files for fonts and fixes font permissions |
|
|
| 497 | setup_fonts() { |
|
|
| 498 | debug-print-function ${FUNCNAME} "$@" |
|
|
| 499 | |
|
|
| 500 | create_fonts_scale |
498 | create_fonts_scale |
| 501 | create_fonts_dir |
499 | create_fonts_dir |
| 502 | font_pkg_postinst |
500 | font_pkg_postrm "$@" |
|
|
501 | fi |
|
|
502 | fi |
| 503 | } |
503 | } |
| 504 | |
504 | |
| 505 | # @FUNCTION: remove_font_metadata |
505 | # @FUNCTION: remove_font_metadata |
| 506 | # @DESCRIPTION: |
506 | # @DESCRIPTION: |
| 507 | # 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 |
| … | |
… | |
| 520 | # 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. |
| 521 | create_fonts_scale() { |
521 | create_fonts_scale() { |
| 522 | debug-print-function ${FUNCNAME} "$@" |
522 | debug-print-function ${FUNCNAME} "$@" |
| 523 | |
523 | |
| 524 | if [[ ${FONT_DIR} != Speedo && ${FONT_DIR} != CID ]]; then |
524 | if [[ ${FONT_DIR} != Speedo && ${FONT_DIR} != CID ]]; then |
| 525 | ebegin "Generating font.scale" |
525 | ebegin "Generating fonts.scale" |
| 526 | mkfontscale \ |
526 | mkfontscale \ |
| 527 | -a "${EROOT}/usr/share/fonts/encodings/encodings.dir" \ |
527 | -a "${EROOT}/usr/share/fonts/encodings/encodings.dir" \ |
| 528 | -- "${EROOT}/usr/share/fonts/${FONT_DIR}" |
528 | -- "${EROOT}/usr/share/fonts/${FONT_DIR}" |
| 529 | eend $? |
529 | eend $? |
| 530 | fi |
530 | fi |