From cc2d61d6626b1531d30d1317e560f5647e914e0f Mon Sep 17 00:00:00 2001
From: Prach Pongpanich <prachpub@gmail.com>
Date: Tue, 4 Feb 2014 01:12:50 +0700
Subject: [PATCH] Support Zend extensions

---
 lib/perl/Debian/Debhelper/Buildsystem/phppear.pm | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/lib/perl/Debian/Debhelper/Buildsystem/phppear.pm b/lib/perl/Debian/Debhelper/Buildsystem/phppear.pm
index 4e03bfe..2541d38 100644
--- a/lib/perl/Debian/Debhelper/Buildsystem/phppear.pm
+++ b/lib/perl/Debian/Debhelper/Buildsystem/phppear.pm
@@ -168,7 +168,7 @@ sub pre_building_step {
 		if (!$this->{phppkginfo_package_type}) {
 			$this->{phppkginfo_package_type} = $this->_phppkginfo('-d package_type .');
 		}
-		if ($this->{phppkginfo_package_type} !~ /^(php|extsrc)$/) {
+		if ($this->{phppkginfo_package_type} !~ /^(php|extsrc|zendextsrc)$/) {
 			error('PEAR package type not supported: "'.$this->{phppkginfo_package_type}.'"');
 		}
 	}
@@ -187,7 +187,7 @@ sub configure {
 			'-e', 's/md5sum="[^"]*"//',
 			'-e', 's/sha1sum="[^"]*"//',
 			$this->_get_peardir()."/package.xml");
-		if ($this->{phppkginfo_package_type} eq 'extsrc') { # PECL
+		if (($this->{phppkginfo_package_type} eq 'extsrc') || ($this->{phppkginfo_package_type} eq 'zendextsrc')) { # PECL
 			$this->_set_sourcedir($this->_get_peardir());
 			$this->doit_in_sourcedir('phpize');
 			$this->SUPER::configure();
@@ -200,7 +200,7 @@ sub build {
 	my $this=shift;
 	$this->mkdir_builddir();
 	if (-e $this->get_sourcepath("package.xml") || -e $this->get_sourcepath("package2.xml")) {
-		if ($this->{phppkginfo_package_type} eq 'extsrc') { # PECL
+		if (($this->{phppkginfo_package_type} eq 'extsrc') || ($this->{phppkginfo_package_type} eq 'zendextsrc')) { # PECL
 			$this->_set_sourcedir($this->_get_peardir());
 			$this->SUPER::build();
 			$this->_set_sourcedir('.');
@@ -267,7 +267,7 @@ sub install {
 sub test {
 	my $this=shift;
 	if (-e $this->get_sourcepath("package.xml") || -e $this->get_sourcepath("package2.xml")) {
-		if ($this->{phppkginfo_package_type} eq 'extsrc') { # PECL
+		if (($this->{phppkginfo_package_type} eq 'extsrc') || ($this->{phppkginfo_package_type} eq 'zendextsrc')) { # PECL
 			$ENV{'NO_INTERACTION'} = '1';
 			$this->SUPER::test();
 		}
@@ -277,7 +277,7 @@ sub test {
 sub clean {
 	my $this=shift;
 	if (-e $this->get_sourcepath("package.xml") || -e $this->get_sourcepath("package2.xml")) {
-		if ($this->{phppkginfo_package_type} eq 'extsrc') { # PECL
+		if (($this->{phppkginfo_package_type} eq 'extsrc') || ($this->{phppkginfo_package_type} eq 'zendextsrc')) { # PECL
 			$this->_set_sourcedir($this->_get_peardir());
 			$this->SUPER::clean();
 			$this->doit_in_sourcedir('phpize', '--clean');
-- 
1.8.5.1

