/[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.102 Revision 1.107
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.102 2008/08/25 17:10:36 dberkholz Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/x-modular.eclass,v 1.107 2009/03/03 16:28:32 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.
190# @DESCRIPTION: 190# @DESCRIPTION:
191# Ensures the server supports DRI if building a driver with DRI support 191# Ensures the server supports DRI if building a driver with DRI support
192x-modular_dri_check() { 192x-modular_dri_check() {
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 # Starting with xorg-server 1.5.3, DRI support is always enabled unless
196 # USE=minimal is set (see bug #252084)
195 if [[ -n "${DRIVER}" ]]; then 197 if [[ -n "${DRIVER}" ]]; then
196 if has dri ${IUSE} && use dri; then 198 if has dri ${IUSE} && use dri; then
197 einfo "Checking for direct rendering capabilities ..." 199 einfo "Checking for direct rendering capabilities ..."
200 if has_version '>=x11-base/xorg-server-1.5.3'; then
201 if built_with_use x11-base/xorg-server minimal; then
202 die "You must build x11-base/xorg-server with USE=-minimal."
203 fi
204 else
198 if ! built_with_use x11-base/xorg-server dri; then 205 if ! built_with_use x11-base/xorg-server dri; then
199 die "You must build x11-base/xorg-server with USE=dri." 206 die "You must build x11-base/xorg-server with USE=dri."
207 fi
200 fi 208 fi
201 fi 209 fi
202 fi 210 fi
203} 211}
204 212
227 if [[ -n ${GIT_ECLASS} ]]; then 235 if [[ -n ${GIT_ECLASS} ]]; then
228 git_src_unpack 236 git_src_unpack
229 else 237 else
230 unpack ${A} 238 unpack ${A}
231 fi 239 fi
232 cd ${S} 240 cd "${S}"
233 241
234 if [[ -n ${FONT_OPTIONS} ]]; then 242 if [[ -n ${FONT_OPTIONS} ]]; then
235 einfo "Detected font directory: ${FONT_DIR}" 243 einfo "Detected font directory: ${FONT_DIR}"
236 fi 244 fi
237} 245}
391# @DESCRIPTION: 399# @DESCRIPTION:
392# Install a built package to ${D}, performing any necessary steps. 400# Install a built package to ${D}, performing any necessary steps.
393# Creates a ChangeLog from git if using live ebuilds. 401# Creates a ChangeLog from git if using live ebuilds.
394x-modular_src_install() { 402x-modular_src_install() {
395 # Install everything to ${XDIR} 403 # Install everything to ${XDIR}
404 if [[ ${CATEGORY} = x11-proto ]]; then
396 make \ 405 make \
406 ${PN/proto/}docdir=/usr/share/doc/${PF} \
397 DESTDIR="${D}" \ 407 DESTDIR="${D}" \
398 install \ 408 install \
399 || die 409 || die
410 else
411 make \
412 DESTDIR="${D}" \
413 install \
414 || die
415 fi
400# Shouldn't be necessary in XDIR=/usr 416# Shouldn't be necessary in XDIR=/usr
401# einstall forces datadir, so we need to re-force it 417# einstall forces datadir, so we need to re-force it
402# datadir=${XDIR}/share \ 418# datadir=${XDIR}/share \
403# mandir=${XDIR}/share/man \ 419# mandir=${XDIR}/share/man \
404 420
407 git log ${GIT_TREE} > "${S}"/ChangeLog 423 git log ${GIT_TREE} > "${S}"/ChangeLog
408 popd 424 popd
409 fi 425 fi
410 426
411 if [[ -e ${S}/ChangeLog ]]; then 427 if [[ -e ${S}/ChangeLog ]]; then
412 dodoc ${S}/ChangeLog 428 dodoc "${S}"/ChangeLog
413 fi 429 fi
414# @VARIABLE: DOCS 430# @VARIABLE: DOCS
415# @DESCRIPTION: 431# @DESCRIPTION:
416# Any documentation to install 432# Any documentation to install
417 [[ -n ${DOCS} ]] && dodoc ${DOCS} 433 [[ -n ${DOCS} ]] && dodoc ${DOCS}
418 434
419 # Make sure docs get compressed
420 prepalldocs
421
422 # Don't install libtool archives for server modules 435 # Don't install libtool archives for server modules
423 if [[ -e ${D}/usr/$(get_libdir)/xorg/modules ]]; then 436 if [[ -e ${D}/usr/$(get_libdir)/xorg/modules ]]; then
424 find ${D}/usr/$(get_libdir)/xorg/modules -name '*.la' \ 437 find "${D}"/usr/$(get_libdir)/xorg/modules -name '*.la' \
425 | xargs rm -f 438 | xargs rm -f
426 fi 439 fi
427 440
428 if [[ -n "${FONT}" ]]; then 441 if [[ -n "${FONT}" ]]; then
429 remove_font_metadata 442 remove_font_metadata
532 for DIR in ${FONT_DIR}; do 545 for DIR in ${FONT_DIR}; do
533 if [[ "${DIR}" != "Speedo" ]] && \ 546 if [[ "${DIR}" != "Speedo" ]] && \
534 [[ "${DIR}" != "CID" ]] ; then 547 [[ "${DIR}" != "CID" ]] ; then
535 # Delete font metadata files 548 # Delete font metadata files
536 # fonts.scale, fonts.dir, fonts.cache-1 549 # fonts.scale, fonts.dir, fonts.cache-1
537 rm -f ${D}/usr/share/fonts/${DIR}/fonts.{scale,dir,cache-1} 550 rm -f "${D}"/usr/share/fonts/${DIR}/fonts.{scale,dir,cache-1}
538 fi 551 fi
539 done 552 done
540} 553}
541 554
542# @FUNCTION: install_driver_hwdata 555# @FUNCTION: install_driver_hwdata
581 # NOTE: There is no way to regenerate Speedo/CID fonts.scale 594 # NOTE: There is no way to regenerate Speedo/CID fonts.scale
582 # <dberkholz@gentoo.org> 2 August 2004 595 # <dberkholz@gentoo.org> 2 August 2004
583 if [[ "${x/encodings}" = "${x}" ]] \ 596 if [[ "${x/encodings}" = "${x}" ]] \
584 && [[ -n "$(find ${x} -iname '*.[pot][ft][abcf]' -print)" ]]; then 597 && [[ -n "$(find ${x} -iname '*.[pot][ft][abcf]' -print)" ]]; then
585 mkfontscale \ 598 mkfontscale \
586 -a ${ROOT}/usr/share/fonts/encodings/encodings.dir \ 599 -a "${ROOT}"/usr/share/fonts/encodings/encodings.dir \
587 -- ${x} 600 -- ${x}
588 fi 601 fi
589 done 602 done
590 eend 0 603 eend 0
591} 604}
601 [[ -z "$(ls ${x}/)" ]] && continue 614 [[ -z "$(ls ${x}/)" ]] && continue
602 [[ "$(ls ${x}/)" = "fonts.cache-1" ]] && continue 615 [[ "$(ls ${x}/)" = "fonts.cache-1" ]] && continue
603 616
604 if [[ "${x/encodings}" = "${x}" ]]; then 617 if [[ "${x/encodings}" = "${x}" ]]; then
605 mkfontdir \ 618 mkfontdir \
606 -e ${ROOT}/usr/share/fonts/encodings \ 619 -e "${ROOT}"/usr/share/fonts/encodings \
607 -e ${ROOT}/usr/share/fonts/encodings/large \ 620 -e "${ROOT}"/usr/share/fonts/encodings/large \
608 -- ${x} 621 -- ${x}
609 fi 622 fi
610 done 623 done
611 eend 0 624 eend 0
612} 625}
616# @DESCRIPTION: 629# @DESCRIPTION:
617# Font files should have 644 permissions. Ensure this is the case. 630# Font files should have 644 permissions. Ensure this is the case.
618fix_font_permissions() { 631fix_font_permissions() {
619 ebegin "Fixing permissions" 632 ebegin "Fixing permissions"
620 for DIR in ${FONT_DIR}; do 633 for DIR in ${FONT_DIR}; do
621 find ${ROOT}/usr/share/fonts/${DIR} -type f -name 'font.*' \ 634 find "${ROOT}"/usr/share/fonts/${DIR} -type f -name 'font.*' \
622 -exec chmod 0644 {} \; 635 -exec chmod 0644 {} \;
623 done 636 done
624 eend 0 637 eend 0
625} 638}
626 639

Legend:
Removed from v.1.102  
changed lines
  Added in v.1.107

  ViewVC Help
Powered by ViewVC 1.1.20