pear for php
authorTim Yardley <lst@openwrt.org>
Thu, 7 Jun 2007 17:44:59 +0000 (17:44 +0000)
committerTim Yardley <lst@openwrt.org>
Thu, 7 Jun 2007 17:44:59 +0000 (17:44 +0000)
SVN-Revision: 7521

lang/php-pear/Makefile [new file with mode: 0644]
lang/php-pear/patches/000-remove_deprecation_messages.patch [new file with mode: 0644]

diff --git a/lang/php-pear/Makefile b/lang/php-pear/Makefile
new file mode 100644 (file)
index 0000000..0c67833
--- /dev/null
@@ -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 (file)
index 0000000..0f79cfc
--- /dev/null
@@ -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);