| 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/php-pear-r1.eclass,v 1.12 2006/02/02 11:53:09 sebastian Exp $ |
3 | # $Header: /var/cvsroot/gentoo-x86/eclass/php-pear-r1.eclass,v 1.13 2006/03/10 10:47:49 sebastian Exp $ |
| 4 | # |
4 | # |
| 5 | # Author: Tal Peer <coredumb@gentoo.org> |
5 | # Author: Tal Peer <coredumb@gentoo.org> |
| 6 | # Maintained by the PHP Herd <php-bugs@gentoo.org> |
6 | # Maintained by the PHP Herd <php-bugs@gentoo.org> |
| 7 | # |
7 | # |
| 8 | # The php-pear-r1 eclass provides means for an easy installation of PEAR |
8 | # The php-pear-r1 eclass provides means for an easy installation of PEAR |
| … | |
… | |
| 56 | *) die "I don't know which version of PHP packages in ${CATEGORY} require" |
56 | *) die "I don't know which version of PHP packages in ${CATEGORY} require" |
| 57 | esac |
57 | esac |
| 58 | |
58 | |
| 59 | cd "${S}" |
59 | cd "${S}" |
| 60 | mv "${WORKDIR}/package.xml" "${S}" |
60 | mv "${WORKDIR}/package.xml" "${S}" |
|
|
61 | |
| 61 | if has_version '=dev-php/PEAR-PEAR-1.3*' ; then |
62 | if has_version '=dev-php/PEAR-PEAR-1.3*' ; then |
| 62 | pear -d php_bin="${PHP_BIN}" install --nodeps --installroot="${D}" "${S}/package.xml" || die "Unable to install PEAR package" |
63 | pear -d php_bin="${PHP_BIN}" install --nodeps --installroot="${D}" "${S}/package.xml" > /dev/null || die "Unable to install PEAR package" |
| 63 | else |
64 | else |
|
|
65 | if has_version '>=dev-php/PEAR-PEAR-1.4.8' ; then |
|
|
66 | pear -d php_bin="${PHP_BIN}" install --force --loose --nodeps --offline --packagingroot="${D}" "${S}/package.xml" > /dev/null || die "Unable to install PEAR package" |
|
|
67 | else |
| 64 | pear -d php_bin="${PHP_BIN}" install --nodeps --packagingroot="${D}" "${S}/package.xml" || die "Unable to install PEAR package" |
68 | pear -d php_bin="${PHP_BIN}" install --nodeps --packagingroot="${D}" "${S}/package.xml" > /dev/null || die "Unable to install PEAR package" |
|
|
69 | fi |
| 65 | fi |
70 | fi |
|
|
71 | |
| 66 | rm -rf "${D}/usr/share/php/.channels" \ |
72 | rm -rf "${D}/usr/share/php/.channels" \ |
| 67 | "${D}/usr/share/php/.depdblock" \ |
73 | "${D}/usr/share/php/.depdblock" \ |
| 68 | "${D}/usr/share/php/.depdb" \ |
74 | "${D}/usr/share/php/.depdb" \ |
| 69 | "${D}/usr/share/php/.filemap" \ |
75 | "${D}/usr/share/php/.filemap" \ |
| 70 | "${D}/usr/share/php/.lock" \ |
76 | "${D}/usr/share/php/.lock" \ |