pear for php

git-svn-id: svn://svn.openwrt.org/openwrt/packages@7521 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
pavlov 2007-06-07 17:44:59 +00:00
parent b41e7a725e
commit 2e0034da7c
2 changed files with 101 additions and 0 deletions

39
lang/php-pear/Makefile Normal file
View File

@ -0,0 +1,39 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=php-pear
PKG_VERSION:=1.5.4
PKG_RELEASE:=1
PKG_SOURCE:=PEAR-$(PKG_VERSION).tgz
PKG_SOURCE_URL:=http://download.pear.php.net/package
PKG_MD5SUM:=06432c4768fdd7df2c4982c973d3f429
PKG_CAT:=zcat
PKG_BUILD_DIR:=$(BUILD_DIR)/PEAR-$(PKG_VERSION)
PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
include $(INCLUDE_DIR)/package.mk
define Package/php-pear
DEPENDS:=+php5
SECTION:=lang
CATEGORY:=Languages
TITLE:=php-pear
DESCRIPTION:=\
php-pear
URL:=http://pear.php.net
endef
define Build/Configure
endef
define Build/Compile
endef
define Package/php-pear/install
$(INSTALL_DIR) $(1)/usr/lib/php
$(CP) -a $(PKG_BUILD_DIR)/PEAR.php $(PKG_BUILD_DIR)/PEAR \
$(1)/usr/lib/php
endef
$(eval $(call BuildPackage,php-pear))

View File

@ -0,0 +1,62 @@
--- PEAR-1.5.4/PEAR.php 2007-05-07 23:10:49.000000000 -0500
+++ PEAR-1.5.4/PEAR.php.new 2007-05-23 16:36:05.699498250 -0500
@@ -278,7 +278,8 @@
*/
function isError($data, $code = null)
{
- if (is_a($data, 'PEAR_Error')) {
+ //if (is_a($data, 'PEAR_Error')) {
+ if ( $data instanceof PEAR_Error ) {
if (is_null($code)) {
return true;
} elseif (is_string($code)) {
@@ -334,7 +335,8 @@
function setErrorHandling($mode = null, $options = null)
{
- if (isset($this) && is_a($this, 'PEAR')) {
+ //if (isset($this) && is_a($this, 'PEAR')) {
+ if ( isset($this) && $this instanceof PEAR ) {
$setmode = &$this->_default_error_mode;
$setoptions = &$this->_default_error_options;
} else {
@@ -588,7 +590,8 @@
$code = null,
$userinfo = null)
{
- if (isset($this) && is_a($this, 'PEAR')) {
+ //if (isset($this) && is_a($this, 'PEAR')) {
+ if ( isset($this) && $this instanceof PEAR ) {
$a = &$this->raiseError($message, $code, null, null, $userinfo);
return $a;
} else {
@@ -686,7 +689,8 @@
function pushErrorHandling($mode, $options = null)
{
$stack = &$GLOBALS['_PEAR_error_handler_stack'];
- if (isset($this) && is_a($this, 'PEAR')) {
+ //if (isset($this) && is_a($this, 'PEAR')) {
+ if (isset($this) && $this instanceof PEAR ) {
$def_mode = &$this->_default_error_mode;
$def_options = &$this->_default_error_options;
} else {
@@ -695,7 +699,8 @@
}
$stack[] = array($def_mode, $def_options);
- if (isset($this) && is_a($this, 'PEAR')) {
+ //if (isset($this) && is_a($this, 'PEAR')) {
+ if (isset($this) && $this instanceof PEAR ) {
$this->setErrorHandling($mode, $options);
} else {
PEAR::setErrorHandling($mode, $options);
@@ -720,7 +725,8 @@
array_pop($stack);
list($mode, $options) = $stack[sizeof($stack) - 1];
array_pop($stack);
- if (isset($this) && is_a($this, 'PEAR')) {
+ //if (isset($this) && is_a($this, 'PEAR')) {
+ if (isset($this) && $this instanceof PEAR ) {
$this->setErrorHandling($mode, $options);
} else {
PEAR::setErrorHandling($mode, $options);