com web/rmtools: replace '_' only for the configu re line: client/include/PeclExt.php
| From: | Stephen A. Zarkos | Date: | Thu, 12 Sep 2013 09:20:11 +0000 |
| Subject: | com web/rmtools: replace '_' only for the configu re line: client/include/PeclExt.php | ||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-16701@lists.php.net to get a copy of this message | ||
Commit: 01cb0b9e5dfd14869933c7aeabce6cbbbbefb316
Author: Anatol Belski <ab@php.net> Thu, 12 Sep 2013 11:20:11 +0200
Parents: ce81e97346ed24b794fc066e5dc726e089137a99
Branches: master
Link: http://git.php.net/?p=web/rmtools.git;a=commitdiff;h=01cb0b9e5dfd14869933c7aeabce6cbbbbefb316
Log:
replace '_' only for the configure line
Changed paths:
M client/include/PeclExt.php
Diff:
diff --git a/client/include/PeclExt.php b/client/include/PeclExt.php
index dc86f73..6dcfd5c 100644
--- a/client/include/PeclExt.php
+++ b/client/include/PeclExt.php
@@ -55,7 +55,7 @@ class PeclExt
/* this ext is known*/
if (is_array($config)) {
/* Correct the case where the package.xml contains different name than the config option.
- That's currently the case with zendopcache vs opcache. */
+ That's currently the case with zendopcache vs opcache and pecl_http vs. http. */
if (isset($config['real_name']) && $this->name !=
$config['real_name']) {
$new_path = dirname($this->tmp_extract_path) . '/' .
$config['real_name'] . '-' . $this->version;
if (!rename($this->tmp_extract_path, $new_path)) {
@@ -67,7 +67,7 @@ class PeclExt
}
}
- $this->name = str_replace('_', '-', strtolower($this->name));
+ $this->name = strtolower($this->name);
$this->version = strtolower($this->version);
}
@@ -154,7 +154,7 @@ class PeclExt
throw new \Exception("Unknown extention configure type, expected enable/with");
}
- $ret = ' "--' . $data['type'] . '-' . $this->name .
'=shared" ';
+ $ret = ' "--' . $data['type'] . '-' .
str_replace('_', '-', $this->name) . '=shared" ';
if (isset($data['libs']) && $data['libs']) {
$data['libs'] = !is_array($data['libs']) ? array($data['libs']) :
$data['libs'];