summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--88.patch25
-rw-r--r--php-pear.spec9
2 files changed, 32 insertions, 2 deletions
diff --git a/88.patch b/88.patch
new file mode 100644
index 0000000..9dd01d7
--- /dev/null
+++ b/88.patch
@@ -0,0 +1,25 @@
+From 203b4a30289abf865123f2c23eb4edd4725a0dca Mon Sep 17 00:00:00 2001
+From: Remi Collet <remi@remirepo.net>
+Date: Wed, 13 Mar 2019 16:15:56 +0100
+Subject: [PATCH] Only add bin_dir to PATH if not already there
+
+Fix https://bugs.php.net/75852
+---
+ PEAR/Builder.php | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/PEAR/Builder.php b/PEAR/Builder.php
+index 91348c726..eb5e90e72 100644
+--- a/PEAR/Builder.php
++++ b/PEAR/Builder.php
+@@ -307,7 +307,9 @@ function build($descfile, $callback = null)
+
+ $dir = getcwd();
+ $this->log(2, "building in $dir");
+- putenv('PATH=' . $this->config->get('bin_dir') . ':' . getenv('PATH'));
++ if (!preg_match('@(^|:)' . $this->config->get('bin_dir') . '(:|$)@', getenv('PATH'))) {
++ putenv('PATH=' . $this->config->get('bin_dir') . ':' . getenv('PATH'));
++ }
+ $err = $this->_runCommand($this->config->get('php_prefix')
+ . "phpize" .
+ $this->config->get('php_suffix'),
diff --git a/php-pear.spec b/php-pear.spec
index 9637105..9629aea 100644
--- a/php-pear.spec
+++ b/php-pear.spec
@@ -40,7 +40,7 @@
Summary: PHP Extension and Application Repository framework
Name: %{?scl_prefix}php-pear
Version: 1.10.8
-Release: 1%{?dist}
+Release: 2%{?dist}
Epoch: 1
# PEAR, PEAR_Manpages, Archive_Tar, XML_Util, Console_Getopt are BSD
# Structures_Graph is LGPLv3+
@@ -61,6 +61,8 @@ Source23: http://pear.php.net/get/Structures_Graph-%{structver}.tgz
Source24: http://pear.php.net/get/XML_Util-%{xmlutil}.tgz
Source25: http://pear.php.net/get/PEAR_Manpages-%{manpages}.tgz
+Patch0: https://patch-diff.githubusercontent.com/raw/pear/pear-core/pull/88.patch
+
BuildArch: noarch
BuildRequires: %{?scl_prefix}php(language) > 5.4
BuildRequires: %{?scl_prefix}php-cli
@@ -276,7 +278,7 @@ install -m 644 -D macros.pear \
# apply patches on installed PEAR tree
pushd %{buildroot}%{peardir}
-: no patch
+patch -p1 <%{PATCH0}
popd
# Why this file here ?
@@ -462,6 +464,9 @@ fi
%changelog
+* Wed Mar 13 2019 Remi Collet <remi@remirepo.net> - 1:1.10.8-2
+- test build for https://github.com/pear/pear-core/pull/88
+
* Fri Feb 8 2019 Remi Collet <remi@remirepo.net> - 1:1.10.8-1
- update PEAR to 1.10.8
- source generated from github tag