| 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.73 2006/08/21 00:22:52 dberkholz Exp $ |
3 | # $Header: /var/cvsroot/gentoo-x86/eclass/x-modular.eclass,v 1.76 2006/10/11 02:31:47 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. |
| … | |
… | |
| 166 | >=x11-misc/util-macros-0.99.2 |
166 | >=x11-misc/util-macros-0.99.2 |
| 167 | >=sys-devel/binutils-2.16.1-r3" |
167 | >=sys-devel/binutils-2.16.1-r3" |
| 168 | fi |
168 | fi |
| 169 | |
169 | |
| 170 | RDEPEND="${RDEPEND} |
170 | RDEPEND="${RDEPEND} |
| 171 | >=sys-apps/man-1.6b-r2 |
171 | || ( >=sys-apps/man-1.6b-r2 >=sys-apps/man-db-2.4.3-r1 ) |
| 172 | !<=x11-base/xorg-x11-6.9" |
172 | !<=x11-base/xorg-x11-6.9" |
| 173 | # Provides virtual/x11 for temporary use until packages are ported |
173 | # Provides virtual/x11 for temporary use until packages are ported |
| 174 | # x11-base/x11-env" |
174 | # x11-base/x11-env" |
| 175 | |
175 | |
| 176 | x-modular_specs_check() { |
176 | x-modular_specs_check() { |
| … | |
… | |
| 250 | x-modular_reconf_source() { |
250 | x-modular_reconf_source() { |
| 251 | # Run autoreconf for CVS snapshots only |
251 | # Run autoreconf for CVS snapshots only |
| 252 | if [[ "${SNAPSHOT}" = "yes" ]] |
252 | if [[ "${SNAPSHOT}" = "yes" ]] |
| 253 | then |
253 | then |
| 254 | # If possible, generate configure if it doesn't exist |
254 | # If possible, generate configure if it doesn't exist |
| 255 | if [ -f "${S}/configure.ac" ] |
255 | if [ -f "./configure.ac" ] |
| 256 | then |
256 | then |
| 257 | eautoreconf |
257 | eautoreconf |
| 258 | fi |
258 | fi |
| 259 | fi |
259 | fi |
| 260 | |
260 | |
| … | |
… | |
| 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() { |