From c84b021277d2c317968d5d28b624ef7d9e38cc3d Mon Sep 17 00:00:00 2001 From: Tim Yardley Date: Thu, 7 Jun 2007 17:44:59 +0000 Subject: [PATCH] pear for php SVN-Revision: 7521 --- lang/php-pear/Makefile | 39 ++++++++++++ .../000-remove_deprecation_messages.patch | 62 +++++++++++++++++++ 2 files changed, 101 insertions(+) create mode 100644 lang/php-pear/Makefile create mode 100644 lang/php-pear/patches/000-remove_deprecation_messages.patch diff --git a/lang/php-pear/Makefile b/lang/php-pear/Makefile new file mode 100644 index 000000000..0c6783362 --- /dev/null +++ b/lang/php-pear/Makefile @@ -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)) diff --git a/lang/php-pear/patches/000-remove_deprecation_messages.patch b/lang/php-pear/patches/000-remove_deprecation_messages.patch new file mode 100644 index 000000000..0f79cfcc8 --- /dev/null +++ b/lang/php-pear/patches/000-remove_deprecation_messages.patch @@ -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); -- 2.30.2