/[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.103 Revision 1.105
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.103 2008/11/26 23:13:24 dberkholz Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/x-modular.eclass,v 1.105 2009/02/18 18:40:52 dberkholz Exp $
4# 4#
5# @ECLASS: x-modular.eclass 5# @ECLASS: x-modular.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# Donnie Berkholz <dberkholz@gentoo.org>, x11@gentoo.org 7# Donnie Berkholz <dberkholz@gentoo.org>, x11@gentoo.org
8# @BLURB: Reduces code duplication in the modularized X11 ebuilds. 8# @BLURB: Reduces code duplication in the modularized X11 ebuilds.
227 if [[ -n ${GIT_ECLASS} ]]; then 227 if [[ -n ${GIT_ECLASS} ]]; then
228 git_src_unpack 228 git_src_unpack
229 else 229 else
230 unpack ${A} 230 unpack ${A}
231 fi 231 fi
232 cd ${S} 232 cd "${S}"
233 233
234 if [[ -n ${FONT_OPTIONS} ]]; then 234 if [[ -n ${FONT_OPTIONS} ]]; then
235 einfo "Detected font directory: ${FONT_DIR}" 235 einfo "Detected font directory: ${FONT_DIR}"
236 fi 236 fi
237} 237}
407 git log ${GIT_TREE} > "${S}"/ChangeLog 407 git log ${GIT_TREE} > "${S}"/ChangeLog
408 popd 408 popd
409 fi 409 fi
410 410
411 if [[ -e ${S}/ChangeLog ]]; then 411 if [[ -e ${S}/ChangeLog ]]; then
412 dodoc ${S}/ChangeLog 412 dodoc "${S}"/ChangeLog
413 fi 413 fi
414# @VARIABLE: DOCS 414# @VARIABLE: DOCS
415# @DESCRIPTION: 415# @DESCRIPTION:
416# Any documentation to install 416# Any documentation to install
417 [[ -n ${DOCS} ]] && dodoc ${DOCS} 417 [[ -n ${DOCS} ]] && dodoc ${DOCS}
418 418
419 # Make sure docs get compressed
420 prepalldocs
421
422 # Don't install libtool archives for server modules 419 # Don't install libtool archives for server modules
423 if [[ -e ${D}/usr/$(get_libdir)/xorg/modules ]]; then 420 if [[ -e ${D}/usr/$(get_libdir)/xorg/modules ]]; then
424 find ${D}/usr/$(get_libdir)/xorg/modules -name '*.la' \ 421 find "${D}"/usr/$(get_libdir)/xorg/modules -name '*.la' \
425 | xargs rm -f 422 | xargs rm -f
426 fi 423 fi
427 424
428 if [[ -n "${FONT}" ]]; then 425 if [[ -n "${FONT}" ]]; then
429 remove_font_metadata 426 remove_font_metadata
532 for DIR in ${FONT_DIR}; do 529 for DIR in ${FONT_DIR}; do
533 if [[ "${DIR}" != "Speedo" ]] && \ 530 if [[ "${DIR}" != "Speedo" ]] && \
534 [[ "${DIR}" != "CID" ]] ; then 531 [[ "${DIR}" != "CID" ]] ; then
535 # Delete font metadata files 532 # Delete font metadata files
536 # fonts.scale, fonts.dir, fonts.cache-1 533 # fonts.scale, fonts.dir, fonts.cache-1
537 rm -f ${D}/usr/share/fonts/${DIR}/fonts.{scale,dir,cache-1} 534 rm -f "${D}"/usr/share/fonts/${DIR}/fonts.{scale,dir,cache-1}
538 fi 535 fi
539 done 536 done
540} 537}
541 538
542# @FUNCTION: install_driver_hwdata 539# @FUNCTION: install_driver_hwdata
581 # NOTE: There is no way to regenerate Speedo/CID fonts.scale 578 # NOTE: There is no way to regenerate Speedo/CID fonts.scale
582 # <dberkholz@gentoo.org> 2 August 2004 579 # <dberkholz@gentoo.org> 2 August 2004
583 if [[ "${x/encodings}" = "${x}" ]] \ 580 if [[ "${x/encodings}" = "${x}" ]] \
584 && [[ -n "$(find ${x} -iname '*.[pot][ft][abcf]' -print)" ]]; then 581 && [[ -n "$(find ${x} -iname '*.[pot][ft][abcf]' -print)" ]]; then
585 mkfontscale \ 582 mkfontscale \
586 -a ${ROOT}/usr/share/fonts/encodings/encodings.dir \ 583 -a "${ROOT}"/usr/share/fonts/encodings/encodings.dir \
587 -- ${x} 584 -- ${x}
588 fi 585 fi
589 done 586 done
590 eend 0 587 eend 0
591} 588}
601 [[ -z "$(ls ${x}/)" ]] && continue 598 [[ -z "$(ls ${x}/)" ]] && continue
602 [[ "$(ls ${x}/)" = "fonts.cache-1" ]] && continue 599 [[ "$(ls ${x}/)" = "fonts.cache-1" ]] && continue
603 600
604 if [[ "${x/encodings}" = "${x}" ]]; then 601 if [[ "${x/encodings}" = "${x}" ]]; then
605 mkfontdir \ 602 mkfontdir \
606 -e ${ROOT}/usr/share/fonts/encodings \ 603 -e "${ROOT}"/usr/share/fonts/encodings \
607 -e ${ROOT}/usr/share/fonts/encodings/large \ 604 -e "${ROOT}"/usr/share/fonts/encodings/large \
608 -- ${x} 605 -- ${x}
609 fi 606 fi
610 done 607 done
611 eend 0 608 eend 0
612} 609}
616# @DESCRIPTION: 613# @DESCRIPTION:
617# Font files should have 644 permissions. Ensure this is the case. 614# Font files should have 644 permissions. Ensure this is the case.
618fix_font_permissions() { 615fix_font_permissions() {
619 ebegin "Fixing permissions" 616 ebegin "Fixing permissions"
620 for DIR in ${FONT_DIR}; do 617 for DIR in ${FONT_DIR}; do
621 find ${ROOT}/usr/share/fonts/${DIR} -type f -name 'font.*' \ 618 find "${ROOT}"/usr/share/fonts/${DIR} -type f -name 'font.*' \
622 -exec chmod 0644 {} \; 619 -exec chmod 0644 {} \;
623 done 620 done
624 eend 0 621 eend 0
625} 622}
626 623

Legend:
Removed from v.1.103  
changed lines
  Added in v.1.105

  ViewVC Help
Powered by ViewVC 1.1.20