/[gentoo-x86]/eclass/depend.php.eclass
Gentoo

Diff of /eclass/depend.php.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.23 Revision 1.24
1# Copyright 1999-2007 Gentoo Foundation 1# Copyright 1999-2007 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/depend.php.eclass,v 1.23 2008/01/06 19:30:24 swegener Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/depend.php.eclass,v 1.24 2008/02/11 20:47:35 armin76 Exp $
4 4
5# Author: Stuart Herbert <stuart@gentoo.org> 5# Author: Stuart Herbert <stuart@gentoo.org>
6# Author: Luca Longinotti <chtekk@gentoo.org> 6# Author: Luca Longinotti <chtekk@gentoo.org>
7# Author: Jakub Moc <jakub@gentoo.org> (documentation) 7# Author: Jakub Moc <jakub@gentoo.org> (documentation)
8 8
630if [[ $# -lt 1 ]] ; then 630if [[ $# -lt 1 ]] ; then
631 echo "$0: at least one argument needed" 1>&2 631 echo "$0: at least one argument needed" 1>&2
632 exit 1 632 exit 1
633fi 633fi
634 634
635phpdocdir="${D}/usr/share/doc/${CATEGORY}/${PF}/" 635phpdocdir="/usr/share/doc/${CATEGORY}/${PF}/"
636
637if [[ ! -d "${phpdocdir}" ]] ; then
638 install -d "${phpdocdir}"
639fi
640 636
641for x in $@ ; do 637for x in $@ ; do
642 if [[ -s "${x}" ]] ; then 638 if [[ -s "${x}" ]] ; then
643 install -m0644 "${x}" "${phpdocdir}" 639 insinto "${phpdocdir}"
640 doins "${x}"
644 gzip -f -9 "${phpdocdir}/${x##*/}" 641 gzip -f -9 "${D}/${phpdocdir}/${x##*/}"
645 elif [[ ! -e "${x}" ]] ; then 642 elif [[ ! -e "${x}" ]] ; then
646 echo "dodoc-php: ${x} does not exist" 1>&2 643 echo "dodoc-php: ${x} does not exist" 1>&2
647 fi 644 fi
648done 645done
649} 646}
647
648# @FUNCTION: dohtml-php
649# @USAGE: <list of html docs>
650# @DESCRIPTION:
651# Alternative to dohtml function for use in our PHP eclasses and ebuilds.
652# Stored here because depend.php gets always sourced everywhere in the PHP
653# ebuilds and eclasses. It simply is dohtml with a changed path to the docs.
654# NOTE: No support for [-a|-A|-p|-x] options is provided!
655dohtml-php() {
656if [[ $# -lt 1 ]] ; then
657 echo "$0: at least one argument needed" 1>&2
658 exit 1
659fi
660
661phphtmldir="/usr/share/doc/${CATEGORY}/${PF}/html"
662
663for x in $@ ; do
664 if [[ -s "${x}" ]] ; then
665 insinto "${phphtmldir}"
666 doins "${x}"
667 elif [[ ! -e "${x}" ]] ; then
668 echo "dohtml-php: ${x} does not exist" 1>&2
669 fi
670done
671}

Legend:
Removed from v.1.23  
changed lines
  Added in v.1.24

  ViewVC Help
Powered by ViewVC 1.1.20