/[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.106
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.106 2009/03/03 16:26:20 remi 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}
391# @DESCRIPTION: 391# @DESCRIPTION:
392# Install a built package to ${D}, performing any necessary steps. 392# Install a built package to ${D}, performing any necessary steps.
393# Creates a ChangeLog from git if using live ebuilds. 393# Creates a ChangeLog from git if using live ebuilds.
394x-modular_src_install() { 394x-modular_src_install() {
395 # Install everything to ${XDIR} 395 # Install everything to ${XDIR}
396 if [[ ${CATEGORY} = x11-proto ]]; then
396 make \ 397 make \
398 ${PN/proto/}docdir=/usr/share/doc/${PF} \
397 DESTDIR="${D}" \ 399 DESTDIR="${D}" \
398 install \ 400 install \
399 || die 401 || die
402 else
403 make \
404 DESTDIR="${D}" \
405 install \
406 || die
407 fi
400# Shouldn't be necessary in XDIR=/usr 408# Shouldn't be necessary in XDIR=/usr
401# einstall forces datadir, so we need to re-force it 409# einstall forces datadir, so we need to re-force it
402# datadir=${XDIR}/share \ 410# datadir=${XDIR}/share \
403# mandir=${XDIR}/share/man \ 411# mandir=${XDIR}/share/man \
404 412
407 git log ${GIT_TREE} > "${S}"/ChangeLog 415 git log ${GIT_TREE} > "${S}"/ChangeLog
408 popd 416 popd
409 fi 417 fi
410 418
411 if [[ -e ${S}/ChangeLog ]]; then 419 if [[ -e ${S}/ChangeLog ]]; then
412 dodoc ${S}/ChangeLog 420 dodoc "${S}"/ChangeLog
413 fi 421 fi
414# @VARIABLE: DOCS 422# @VARIABLE: DOCS
415# @DESCRIPTION: 423# @DESCRIPTION:
416# Any documentation to install 424# Any documentation to install
417 [[ -n ${DOCS} ]] && dodoc ${DOCS} 425 [[ -n ${DOCS} ]] && dodoc ${DOCS}
418 426
419 # Make sure docs get compressed
420 prepalldocs
421
422 # Don't install libtool archives for server modules 427 # Don't install libtool archives for server modules
423 if [[ -e ${D}/usr/$(get_libdir)/xorg/modules ]]; then 428 if [[ -e ${D}/usr/$(get_libdir)/xorg/modules ]]; then
424 find ${D}/usr/$(get_libdir)/xorg/modules -name '*.la' \ 429 find "${D}"/usr/$(get_libdir)/xorg/modules -name '*.la' \
425 | xargs rm -f 430 | xargs rm -f
426 fi 431 fi
427 432
428 if [[ -n "${FONT}" ]]; then 433 if [[ -n "${FONT}" ]]; then
429 remove_font_metadata 434 remove_font_metadata
532 for DIR in ${FONT_DIR}; do 537 for DIR in ${FONT_DIR}; do
533 if [[ "${DIR}" != "Speedo" ]] && \ 538 if [[ "${DIR}" != "Speedo" ]] && \
534 [[ "${DIR}" != "CID" ]] ; then 539 [[ "${DIR}" != "CID" ]] ; then
535 # Delete font metadata files 540 # Delete font metadata files
536 # fonts.scale, fonts.dir, fonts.cache-1 541 # fonts.scale, fonts.dir, fonts.cache-1
537 rm -f ${D}/usr/share/fonts/${DIR}/fonts.{scale,dir,cache-1} 542 rm -f "${D}"/usr/share/fonts/${DIR}/fonts.{scale,dir,cache-1}
538 fi 543 fi
539 done 544 done
540} 545}
541 546
542# @FUNCTION: install_driver_hwdata 547# @FUNCTION: install_driver_hwdata
581 # NOTE: There is no way to regenerate Speedo/CID fonts.scale 586 # NOTE: There is no way to regenerate Speedo/CID fonts.scale
582 # <dberkholz@gentoo.org> 2 August 2004 587 # <dberkholz@gentoo.org> 2 August 2004
583 if [[ "${x/encodings}" = "${x}" ]] \ 588 if [[ "${x/encodings}" = "${x}" ]] \
584 && [[ -n "$(find ${x} -iname '*.[pot][ft][abcf]' -print)" ]]; then 589 && [[ -n "$(find ${x} -iname '*.[pot][ft][abcf]' -print)" ]]; then
585 mkfontscale \ 590 mkfontscale \
586 -a ${ROOT}/usr/share/fonts/encodings/encodings.dir \ 591 -a "${ROOT}"/usr/share/fonts/encodings/encodings.dir \
587 -- ${x} 592 -- ${x}
588 fi 593 fi
589 done 594 done
590 eend 0 595 eend 0
591} 596}
601 [[ -z "$(ls ${x}/)" ]] && continue 606 [[ -z "$(ls ${x}/)" ]] && continue
602 [[ "$(ls ${x}/)" = "fonts.cache-1" ]] && continue 607 [[ "$(ls ${x}/)" = "fonts.cache-1" ]] && continue
603 608
604 if [[ "${x/encodings}" = "${x}" ]]; then 609 if [[ "${x/encodings}" = "${x}" ]]; then
605 mkfontdir \ 610 mkfontdir \
606 -e ${ROOT}/usr/share/fonts/encodings \ 611 -e "${ROOT}"/usr/share/fonts/encodings \
607 -e ${ROOT}/usr/share/fonts/encodings/large \ 612 -e "${ROOT}"/usr/share/fonts/encodings/large \
608 -- ${x} 613 -- ${x}
609 fi 614 fi
610 done 615 done
611 eend 0 616 eend 0
612} 617}
616# @DESCRIPTION: 621# @DESCRIPTION:
617# Font files should have 644 permissions. Ensure this is the case. 622# Font files should have 644 permissions. Ensure this is the case.
618fix_font_permissions() { 623fix_font_permissions() {
619 ebegin "Fixing permissions" 624 ebegin "Fixing permissions"
620 for DIR in ${FONT_DIR}; do 625 for DIR in ${FONT_DIR}; do
621 find ${ROOT}/usr/share/fonts/${DIR} -type f -name 'font.*' \ 626 find "${ROOT}"/usr/share/fonts/${DIR} -type f -name 'font.*' \
622 -exec chmod 0644 {} \; 627 -exec chmod 0644 {} \;
623 done 628 done
624 eend 0 629 eend 0
625} 630}
626 631

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

  ViewVC Help
Powered by ViewVC 1.1.20