com web/rmtools: fixes to ext name trick with config.w32: client/data/config/pecl/exts.ini client/include/PeclExt.php client/script/pecl.php
| From: | Stephen A. Zarkos | Date: | Thu, 19 Sep 2013 18:28:34 +0000 |
| Subject: | com web/rmtools: fixes to ext name trick with config.w32: client/data/config/pecl/exts.ini client/include/PeclExt.php client/script/pecl.php | ||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-16658@lists.php.net to get a copy of this message | ||
Commit: d4a11b526fe22a8672a766d704dc557fdab887c2
Author: Anatol Belski <ab@php.net> Thu, 19 Sep 2013 20:28:34 +0200
Parents: 174cc59a480867683aac40267fa9cacf4d80ef60
Branches: master
Link: http://git.php.net/?p=web/rmtools.git;a=commitdiff;h=d4a11b526fe22a8672a766d704dc557fdab887c2
Log:
fixes to ext name trick with config.w32
Changed paths:
M client/data/config/pecl/exts.ini
M client/include/PeclExt.php
M client/script/pecl.php
Diff:
diff --git a/client/data/config/pecl/exts.ini b/client/data/config/pecl/exts.ini
index 17b6152..f94e203 100644
--- a/client/data/config/pecl/exts.ini
+++ b/client/data/config/pecl/exts.ini
@@ -26,6 +26,8 @@
; libs[]= - library dependencies array
; exts[]= - extension dependencies array
; opts[]= - additional configure options dependency array
+; no_conf= - ignore the main config option, like --enable-myext. Useful to override it with
opts[]=.
+; Value is ignored, just set it..
;
[ssh2]
@@ -258,20 +260,24 @@ exts[]=
opts[]=
[oci8-x86]
+real_name=oci8_12c
type=with
libs[]=
exts[]=
;opts[]=--with-oci8=C:\pecl-dep-libs\oracle\x86\instantclient_10_2\sdk,shared
;opts[]=--with-oci8-11g=C:\pecl-dep-libs\oracle\x86\instantclient_11_2\sdk,shared
opts[]=--with-oci8-12c=C:\pecl-dep-libs\oracle\x86\instantclient_12_1\sdk,shared
+no_conf=1
[oci8-x64]
+real_name=oci8_12c
type=with
libs[]=
exts[]=
;opts[]=--with-oci8=C:\pecl-dep-libs\oracle\x64\instantclient_10_2\sdk,shared
;opts[]=--with-oci8-11g=C:\pecl-dep-libs\oracle\x64\instantclient_11_2\sdk,shared
opts[]=--with-oci8-12c=C:\pecl-dep-libs\oracle\x64\instantclient_12_1\sdk,shared
+no_conf=1
[fann]
type=with
@@ -336,3 +342,15 @@ libs[]=
exts[]=
opts[]=
+[couchbase]
+type=with
+libs[]=libcouchbase
+exts[]=
+opts[]=
+
+[perl]
+type=with
+libs[]=perl
+exts[]=
+opts[]=
+
diff --git a/client/include/PeclExt.php b/client/include/PeclExt.php
index d47e932...b000f9d 100644
--- a/client/include/PeclExt.php
+++ b/client/include/PeclExt.php
@@ -23,6 +23,7 @@ class PeclExt
protected $package_xml = NULL;
protected $configure_data = NULL;
protected $non_core_ext_deps = array();
+ protected $pkg_config = NULL;
public function __construct($pkg_path, $build)
{
@@ -92,8 +93,10 @@ class PeclExt
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;
+
+ rmdir_rf($new_path);
if (!rename($this->tmp_extract_path, $new_path)) {
- throw new Exception('Package name conflict, different names in package.xml and
config.w32.. Tried to solve but failed.');
+ throw new \Exception('Package name conflict, different names in package.xml and
config.w32. Tried to solve but failed.');
}
$this->tmp_extract_path = $new_path;
@@ -261,6 +264,8 @@ class PeclExt
$data['opts'] = array();
}
+ $ignore_main_opt = $ignore_main_opt || isset($data['no_conf']);
+
if (!$ignore_main_opt) {
$ret .= ' "' . $main_opt . '=shared" ';
}
@@ -366,6 +371,10 @@ if (!function_exists('rmtools\combinations')) {
{
$config = NULL;
+ if ($this->pkg_config) {
+ return $this->pkg_config;
+ }
+
$known_path = __DIR__ . '/../data/config/pecl/exts.ini';
$exts = parse_ini_file($known_path, true, INI_SCANNER_RAW);
@@ -386,6 +395,8 @@ if (!function_exists('rmtools\combinations')) {
}
}
+ $this->pkg_config = $config;
+
return $config;
}
diff --git a/client/script/pecl.php b/client/script/pecl.php
index f412df6..974be97 100644
--- a/client/script/pecl.php
+++ b/client/script/pecl.php
@@ -170,7 +170,7 @@ foreach ($builds as $build_name) {
$build->configure($ext_conf_line);
}
- if (!preg_match(',^\|\s+' .. $ext->getName() . '\s+\|\s+shared\s+\|,Sm',
$build->log_configure)) {
+ if (!preg_match(',^\|\s+' . preg_quote($ext->getName()) .
'\s+\|\s+shared\s+\|,Sm', $build->log_configure)) {
throw new Exception($ext->getName() . ' is not enabled, skip make phase');
}