| 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.74 2006/08/28 16:07:30 dberkholz Exp $ |
3 | # $Header: /var/cvsroot/gentoo-x86/eclass/x-modular.eclass,v 1.75 2006/09/05 23:40:42 dberkholz 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. |
| … | |
… | |
| 356 | |
356 | |
| 357 | # Don't install overlapping fonts.* files |
357 | # Don't install overlapping fonts.* files |
| 358 | # Generate them instead when possible |
358 | # Generate them instead when possible |
| 359 | if [[ -n "${FONT}" ]]; then |
359 | if [[ -n "${FONT}" ]]; then |
| 360 | remove_font_metadata |
360 | remove_font_metadata |
|
|
361 | fi |
|
|
362 | |
|
|
363 | if [[ -n "${DRIVER}" ]]; then |
|
|
364 | install_driver_hwdata |
| 361 | fi |
365 | fi |
| 362 | } |
366 | } |
| 363 | |
367 | |
| 364 | x-modular_pkg_preinst() { |
368 | x-modular_pkg_preinst() { |
| 365 | if [[ -n "${FONT}" ]]; then |
369 | if [[ -n "${FONT}" ]]; then |
| … | |
… | |
| 433 | if [[ "${DIR}" != "Speedo" ]] && \ |
437 | if [[ "${DIR}" != "Speedo" ]] && \ |
| 434 | [[ "${DIR}" != "CID" ]] ; then |
438 | [[ "${DIR}" != "CID" ]] ; then |
| 435 | # Delete font metadata files |
439 | # Delete font metadata files |
| 436 | # fonts.scale, fonts.dir, fonts.cache-1 |
440 | # fonts.scale, fonts.dir, fonts.cache-1 |
| 437 | rm -f ${D}/usr/share/fonts/${DIR}/fonts.{scale,dir,cache-1} |
441 | rm -f ${D}/usr/share/fonts/${DIR}/fonts.{scale,dir,cache-1} |
|
|
442 | fi |
|
|
443 | done |
|
|
444 | } |
|
|
445 | |
|
|
446 | # Installs device-to-driver mappings for system-config-display |
|
|
447 | # and anything else that uses hwdata |
|
|
448 | install_driver_hwdata() { |
|
|
449 | insinto /usr/share/hwdata/videoaliases |
|
|
450 | for i in "${FILESDIR}"/*.xinf; do |
|
|
451 | # We need this for the case when none exist, |
|
|
452 | # so *.xinf doesn't expand |
|
|
453 | if [[ -e $i ]]; then |
|
|
454 | doins $i |
| 438 | fi |
455 | fi |
| 439 | done |
456 | done |
| 440 | } |
457 | } |
| 441 | |
458 | |
| 442 | discover_font_dirs() { |
459 | discover_font_dirs() { |