/[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.101 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.101 2008/06/13 16:40:21 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.
193 # (#120057) Enabling DRI in drivers requires that the server was built with 193 # (#120057) Enabling DRI in drivers requires that the server was built with
194 # support for it 194 # support for it
195 if [[ -n "${DRIVER}" ]]; then 195 if [[ -n "${DRIVER}" ]]; then
196 if has dri ${IUSE} && use dri; then 196 if has dri ${IUSE} && use dri; then
197 einfo "Checking for direct rendering capabilities ..." 197 einfo "Checking for direct rendering capabilities ..."
198 if ! built_with_use x11-base/xorg-server dri; then 198 if ! built_with_use --missing true x11-base/xorg-server dri; then
199 die "You must build x11-base/xorg-server with USE=dri." 199 die "You must build x11-base/xorg-server with USE=dri."
200 fi 200 fi
201 fi 201 fi
202 fi 202 fi
203} 203}
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}
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 make \ 396 make \
397 DESTDIR="${D}" \ 397 DESTDIR="${D}" \
398 install 398 install \
399 || die
399# Shouldn't be necessary in XDIR=/usr 400# Shouldn't be necessary in XDIR=/usr
400# einstall forces datadir, so we need to re-force it 401# einstall forces datadir, so we need to re-force it
401# datadir=${XDIR}/share \ 402# datadir=${XDIR}/share \
402# mandir=${XDIR}/share/man \ 403# mandir=${XDIR}/share/man \
403 404
406 git log ${GIT_TREE} > "${S}"/ChangeLog 407 git log ${GIT_TREE} > "${S}"/ChangeLog
407 popd 408 popd
408 fi 409 fi
409 410
410 if [[ -e ${S}/ChangeLog ]]; then 411 if [[ -e ${S}/ChangeLog ]]; then
411 dodoc ${S}/ChangeLog 412 dodoc "${S}"/ChangeLog
412 fi 413 fi
413# @VARIABLE: DOCS 414# @VARIABLE: DOCS
414# @DESCRIPTION: 415# @DESCRIPTION:
415# Any documentation to install 416# Any documentation to install
416 [[ -n ${DOCS} ]] && dodoc ${DOCS} 417 [[ -n ${DOCS} ]] && dodoc ${DOCS}
418 # Make sure docs get compressed 419 # Make sure docs get compressed
419 prepalldocs 420 prepalldocs
420 421
421 # Don't install libtool archives for server modules 422 # Don't install libtool archives for server modules
422 if [[ -e ${D}/usr/$(get_libdir)/xorg/modules ]]; then 423 if [[ -e ${D}/usr/$(get_libdir)/xorg/modules ]]; then
423 find ${D}/usr/$(get_libdir)/xorg/modules -name '*.la' \ 424 find "${D}"/usr/$(get_libdir)/xorg/modules -name '*.la' \
424 | xargs rm -f 425 | xargs rm -f
425 fi 426 fi
426 427
427 if [[ -n "${FONT}" ]]; then 428 if [[ -n "${FONT}" ]]; then
428 remove_font_metadata 429 remove_font_metadata
531 for DIR in ${FONT_DIR}; do 532 for DIR in ${FONT_DIR}; do
532 if [[ "${DIR}" != "Speedo" ]] && \ 533 if [[ "${DIR}" != "Speedo" ]] && \
533 [[ "${DIR}" != "CID" ]] ; then 534 [[ "${DIR}" != "CID" ]] ; then
534 # Delete font metadata files 535 # Delete font metadata files
535 # fonts.scale, fonts.dir, fonts.cache-1 536 # fonts.scale, fonts.dir, fonts.cache-1
536 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}
537 fi 538 fi
538 done 539 done
539} 540}
540 541
541# @FUNCTION: install_driver_hwdata 542# @FUNCTION: install_driver_hwdata
580 # NOTE: There is no way to regenerate Speedo/CID fonts.scale 581 # NOTE: There is no way to regenerate Speedo/CID fonts.scale
581 # <dberkholz@gentoo.org> 2 August 2004 582 # <dberkholz@gentoo.org> 2 August 2004
582 if [[ "${x/encodings}" = "${x}" ]] \ 583 if [[ "${x/encodings}" = "${x}" ]] \
583 && [[ -n "$(find ${x} -iname '*.[pot][ft][abcf]' -print)" ]]; then 584 && [[ -n "$(find ${x} -iname '*.[pot][ft][abcf]' -print)" ]]; then
584 mkfontscale \ 585 mkfontscale \
585 -a ${ROOT}/usr/share/fonts/encodings/encodings.dir \ 586 -a "${ROOT}"/usr/share/fonts/encodings/encodings.dir \
586 -- ${x} 587 -- ${x}
587 fi 588 fi
588 done 589 done
589 eend 0 590 eend 0
590} 591}
600 [[ -z "$(ls ${x}/)" ]] && continue 601 [[ -z "$(ls ${x}/)" ]] && continue
601 [[ "$(ls ${x}/)" = "fonts.cache-1" ]] && continue 602 [[ "$(ls ${x}/)" = "fonts.cache-1" ]] && continue
602 603
603 if [[ "${x/encodings}" = "${x}" ]]; then 604 if [[ "${x/encodings}" = "${x}" ]]; then
604 mkfontdir \ 605 mkfontdir \
605 -e ${ROOT}/usr/share/fonts/encodings \ 606 -e "${ROOT}"/usr/share/fonts/encodings \
606 -e ${ROOT}/usr/share/fonts/encodings/large \ 607 -e "${ROOT}"/usr/share/fonts/encodings/large \
607 -- ${x} 608 -- ${x}
608 fi 609 fi
609 done 610 done
610 eend 0 611 eend 0
611} 612}
615# @DESCRIPTION: 616# @DESCRIPTION:
616# Font files should have 644 permissions. Ensure this is the case. 617# Font files should have 644 permissions. Ensure this is the case.
617fix_font_permissions() { 618fix_font_permissions() {
618 ebegin "Fixing permissions" 619 ebegin "Fixing permissions"
619 for DIR in ${FONT_DIR}; do 620 for DIR in ${FONT_DIR}; do
620 find ${ROOT}/usr/share/fonts/${DIR} -type f -name 'font.*' \ 621 find "${ROOT}"/usr/share/fonts/${DIR} -type f -name 'font.*' \
621 -exec chmod 0644 {} \; 622 -exec chmod 0644 {} \;
622 done 623 done
623 eend 0 624 eend 0
624} 625}
625 626

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

  ViewVC Help
Powered by ViewVC 1.1.20