[Pkg-php-commits] r1461 - in pear/php-xml-parser/trunk/debian: . patches source

Thomas Goirand zigo at alioth.debian.org
Sat Dec 4 08:03:50 UTC 2010


Author: zigo
Date: 2010-12-04 08:03:43 +0000 (Sat, 04 Dec 2010)
New Revision: 1461

Added:
   pear/php-xml-parser/trunk/debian/README.source
   pear/php-xml-parser/trunk/debian/patches/
   pear/php-xml-parser/trunk/debian/patches/001parser.php_compat_php_5.3.x.dpatch
   pear/php-xml-parser/trunk/debian/patches/00list
   pear/php-xml-parser/trunk/debian/source/
   pear/php-xml-parser/trunk/debian/source/format
Log:
Added new files previously missing from commit

Added: pear/php-xml-parser/trunk/debian/README.source
===================================================================
--- pear/php-xml-parser/trunk/debian/README.source	                        (rev 0)
+++ pear/php-xml-parser/trunk/debian/README.source	2010-12-04 08:03:43 UTC (rev 1461)
@@ -0,0 +1,14 @@
+This package uses dpatch to maintain a Debian correction, so
+that XML_Parser can run in PHP 5.3.x without producing warnings.
+
+To apply all patches that have been added in Debian, just do:
+
+dpatch apply-all
+
+To remove these patches, do:
+
+dpatch deapply-all
+
+Enjoy!
+
+Thomas Goirand (zigo at debian.org)

Added: pear/php-xml-parser/trunk/debian/patches/001parser.php_compat_php_5.3.x.dpatch
===================================================================
--- pear/php-xml-parser/trunk/debian/patches/001parser.php_compat_php_5.3.x.dpatch	                        (rev 0)
+++ pear/php-xml-parser/trunk/debian/patches/001parser.php_compat_php_5.3.x.dpatch	2010-12-04 08:03:43 UTC (rev 1461)
@@ -0,0 +1,39 @@
+#!/bin/sh /usr/share/dpatch/dpatch-run
+## 001parser.php_compat_php_5.3.x.dpatch by Thomas Goirand <zigo at debian.org>
+##
+## DP: This patch makes php-xml-parser work with PHP 5.3.x that is
+## DP: currently the new version in Debian. It removes a return by
+## DP: reference, and replaces ereg() calls by preg, as both are
+## DP: deprecated in php 5.3.x, which makes PHP produces some nasty
+## DP: warnings that could be annoying when outputing XML documents.
+
+ at DPATCH@
+--- php-xml-parser-1.3.2.orig/XML_Parser-1.3.2/Parser.php	2010-09-01 18:49:24.000000000 +0800
++++ php-xml-parser-1.3.2/XML_Parser-1.3.2/Parser.php	2010-09-03 17:04:52.000000000 +0800
+@@ -417,7 +417,7 @@
+         /**
+          * check, if file is a remote file
+          */
+-        if (eregi('^(http|ftp)://', substr($file, 0, 10))) {
++        if (preg_match('/^(http|ftp):\/\//i', substr($file, 0, 10))) {
+             if (!ini_get('allow_url_fopen')) {
+                 return $this->
+                 raiseError('Remote files cannot be parsed, as safe mode is enabled.',
+@@ -474,7 +474,7 @@
+         if (is_resource($fp)) {
+             $this->fp = $fp;
+             return true;
+-        } elseif (eregi('^[a-z]+://', substr($fp, 0, 10))) {
++        } elseif (preg_match('/^[a-z]+:\/\//i', substr($fp, 0, 10))) {
+             // see if it's an absolute URL (has a scheme at the beginning)
+             return $this->setInputFile($fp);
+         } elseif (file_exists($fp)) {
+@@ -613,7 +613,7 @@
+     function &raiseError($msg = null, $ecode = 0)
+     {
+         $msg = !is_null($msg) ? $msg : $this->parser;
+-        $err = &new XML_Parser_Error($msg, $ecode);
++        $err = new XML_Parser_Error($msg, $ecode);
+         return parent::raiseError($err);
+     }
+ 


Property changes on: pear/php-xml-parser/trunk/debian/patches/001parser.php_compat_php_5.3.x.dpatch
___________________________________________________________________
Added: svn:executable
   + *

Added: pear/php-xml-parser/trunk/debian/patches/00list
===================================================================
--- pear/php-xml-parser/trunk/debian/patches/00list	                        (rev 0)
+++ pear/php-xml-parser/trunk/debian/patches/00list	2010-12-04 08:03:43 UTC (rev 1461)
@@ -0,0 +1 @@
+001parser.php_compat_php_5.3.x.dpatch

Added: pear/php-xml-parser/trunk/debian/source/format
===================================================================
--- pear/php-xml-parser/trunk/debian/source/format	                        (rev 0)
+++ pear/php-xml-parser/trunk/debian/source/format	2010-12-04 08:03:43 UTC (rev 1461)
@@ -0,0 +1 @@
+1.0




More information about the Pkg-php-commits mailing list