/[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.104
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.104 2009/02/14 18:37:34 maekke 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}
419 # Make sure docs get compressed 419 # Make sure docs get compressed
420 prepalldocs 420 prepalldocs
421 421
422 # Don't install libtool archives for server modules 422 # Don't install libtool archives for server modules
423 if [[ -e ${D}/usr/$(get_libdir)/xorg/modules ]]; then 423 if [[ -e ${D}/usr/$(get_libdir)/xorg/modules ]]; then
424 find ${D}/usr/$(get_libdir)/xorg/modules -name '*.la' \ 424 find "${D}"/usr/$(get_libdir)/xorg/modules -name '*.la' \
425 | xargs rm -f 425 | xargs rm -f
426 fi 426 fi
427 427
428 if [[ -n "${FONT}" ]]; then 428 if [[ -n "${FONT}" ]]; then
429 remove_font_metadata 429 remove_font_metadata
532 for DIR in ${FONT_DIR}; do 532 for DIR in ${FONT_DIR}; do
533 if [[ "${DIR}" != "Speedo" ]] && \ 533 if [[ "${DIR}" != "Speedo" ]] && \
534 [[ "${DIR}" != "CID" ]] ; then 534 [[ "${DIR}" != "CID" ]] ; then
535 # Delete font metadata files 535 # Delete font metadata files
536 # fonts.scale, fonts.dir, fonts.cache-1 536 # fonts.scale, fonts.dir, fonts.cache-1
537 rm -f ${D}/usr/share/fonts/${DIR}/fonts.{scale,dir,cache-1} 537 rm -f "${D}"/usr/share/fonts/${DIR}/fonts.{scale,dir,cache-1}
538 fi 538 fi
539 done 539 done
540} 540}
541 541
542# @FUNCTION: install_driver_hwdata 542# @FUNCTION: install_driver_hwdata
581 # NOTE: There is no way to regenerate Speedo/CID fonts.scale 581 # NOTE: There is no way to regenerate Speedo/CID fonts.scale
582 # <dberkholz@gentoo.org> 2 August 2004 582 # <dberkholz@gentoo.org> 2 August 2004
583 if [[ "${x/encodings}" = "${x}" ]] \ 583 if [[ "${x/encodings}" = "${x}" ]] \
584 && [[ -n "$(find ${x} -iname '*.[pot][ft][abcf]' -print)" ]]; then 584 && [[ -n "$(find ${x} -iname '*.[pot][ft][abcf]' -print)" ]]; then
585 mkfontscale \ 585 mkfontscale \
586 -a ${ROOT}/usr/share/fonts/encodings/encodings.dir \ 586 -a "${ROOT}"/usr/share/fonts/encodings/encodings.dir \
587 -- ${x} 587 -- ${x}
588 fi 588 fi
589 done 589 done
590 eend 0 590 eend 0
591} 591}
601 [[ -z "$(ls ${x}/)" ]] && continue 601 [[ -z "$(ls ${x}/)" ]] && continue
602 [[ "$(ls ${x}/)" = "fonts.cache-1" ]] && continue 602 [[ "$(ls ${x}/)" = "fonts.cache-1" ]] && continue
603 603
604 if [[ "${x/encodings}" = "${x}" ]]; then 604 if [[ "${x/encodings}" = "${x}" ]]; then
605 mkfontdir \ 605 mkfontdir \
606 -e ${ROOT}/usr/share/fonts/encodings \ 606 -e "${ROOT}"/usr/share/fonts/encodings \
607 -e ${ROOT}/usr/share/fonts/encodings/large \ 607 -e "${ROOT}"/usr/share/fonts/encodings/large \
608 -- ${x} 608 -- ${x}
609 fi 609 fi
610 done 610 done
611 eend 0 611 eend 0
612} 612}
616# @DESCRIPTION: 616# @DESCRIPTION:
617# Font files should have 644 permissions. Ensure this is the case. 617# Font files should have 644 permissions. Ensure this is the case.
618fix_font_permissions() { 618fix_font_permissions() {
619 ebegin "Fixing permissions" 619 ebegin "Fixing permissions"
620 for DIR in ${FONT_DIR}; do 620 for DIR in ${FONT_DIR}; do
621 find ${ROOT}/usr/share/fonts/${DIR} -type f -name 'font.*' \ 621 find "${ROOT}"/usr/share/fonts/${DIR} -type f -name 'font.*' \
622 -exec chmod 0644 {} \; 622 -exec chmod 0644 {} \;
623 done 623 done
624 eend 0 624 eend 0
625} 625}
626 626

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

  ViewVC Help
Powered by ViewVC 1.1.20