From 1d23576a710a154a650068969d285256bb45482e Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 10 Apr 2014 09:47:31 +0200 Subject: php-pear: fix xml.so is shared only with php 5.5+ --- pear.sh | 9 ++++++--- peardev.sh | 2 +- pecl.sh | 9 ++++++--- php-pear.spec | 7 +++++-- 4 files changed, 18 insertions(+), 9 deletions(-) diff --git a/pear.sh b/pear.sh index aa2c1a9..1847471 100644 --- a/pear.sh +++ b/pear.sh @@ -1,8 +1,11 @@ #!/bin/sh +EXT="-d extension=posix.so" +DIR=$(/usr/bin/php -r 'echo ini_get("extension_dir");') +if [ -f $DIR/xml.so ] ; then + EXT="$EXT -d extension=xml.so" +fi exec /usr/bin/php -C \ - -n \ - -d extension=posix.so \ - -d extension=xml.so \ + -n $EXT \ -d include_path=/usr/share/pear \ -d date.timezone=UTC \ -d output_buffering=1 \ diff --git a/peardev.sh b/peardev.sh index 340c31b..dfc2778 100644 --- a/peardev.sh +++ b/peardev.sh @@ -1,5 +1,5 @@ #!/bin/sh -exec /usr/bin/php -C -q \ +exec /usr/bin/php -C \ -d memory_limit="-1" \ -d include_path=/usr/share/pear \ -d date.timezone=UTC \ diff --git a/pecl.sh b/pecl.sh index 7c56e2c..cb55ef9 100644 --- a/pecl.sh +++ b/pecl.sh @@ -1,8 +1,11 @@ #!/bin/sh +EXT="-d extension=posix.so" +DIR=$(/usr/bin/php -r 'echo ini_get("extension_dir");') +if [ -f $DIR/xml.so ] ; then + EXT="$EXT -d extension=xml.so" +fi exec /usr/bin/php -C \ - -n \ - -d extension=posix.so \ - -d extension=xml.so \ + -n $EXT \ -d include_path=/usr/share/pear \ -d date.timezone=UTC \ -d output_buffering=1 \ diff --git a/php-pear.spec b/php-pear.spec index 5c367c3..0ececc9 100644 --- a/php-pear.spec +++ b/php-pear.spec @@ -17,7 +17,7 @@ Summary: PHP Extension and Application Repository framework Name: php-pear Version: 1.9.4 -Release: 25%{?dist} +Release: 26%{?dist} Epoch: 1 # PEAR, Archive_Tar, XML_Util are BSD # Console_Getopt is PHP @@ -322,6 +322,9 @@ fi %changelog +* Thu Apr 10 2014 Remi Collet 1:1.9.4-26 +- fix xml.so is shared only with php 5.5+ + * Wed Apr 9 2014 Remi Collet 1:1.9.4-25 - only enable needed extensions for pear/pecl commands - fix typo in pear man page @@ -381,7 +384,7 @@ fi - move data to /usr/share/pear-data - provides all package.xml -* Tue Aug 15 2012 Remi Collet 1:1.9.4-10 +* Wed Aug 15 2012 Remi Collet 1:1.9.4-10 - enforce test_dir on update * Mon Aug 13 2012 Remi Collet 1:1.9.4-9 -- cgit