X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=WEB-INF%2Flib%2Fpear%2FPEAR%2FBuilder.php;h=94b09f08d6a0e6a4687d408a98028ea9afa41b7c;hb=a8084d2e767dd2ea7e57f2348a27d4fc2da42a6f;hp=90f3a1455524a48454e2d3dd17ea5897b6789660;hpb=9a23a8c0a51b7ec38a96f525484134f3cb85dc7e;p=timetracker.git diff --git a/WEB-INF/lib/pear/PEAR/Builder.php b/WEB-INF/lib/pear/PEAR/Builder.php index 90f3a145..94b09f08 100644 --- a/WEB-INF/lib/pear/PEAR/Builder.php +++ b/WEB-INF/lib/pear/PEAR/Builder.php @@ -10,7 +10,6 @@ * @author Greg Beaver * @copyright 1997-2009 The Authors * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: Builder.php 313024 2011-07-06 19:51:24Z dufuz $ * @link http://pear.php.net/package/PEAR * @since File available since Release 0.1 * @@ -23,6 +22,7 @@ */ require_once 'PEAR/Common.php'; require_once 'PEAR/PackageFile.php'; +require_once 'System.php'; /** * Class to handle building (compiling) extensions. @@ -33,7 +33,7 @@ require_once 'PEAR/PackageFile.php'; * @author Greg Beaver * @copyright 1997-2009 The Authors * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.4 + * @version Release: 1.10.1 * @link http://pear.php.net/package/PEAR * @since Class available since PHP 4.0.2 * @see http://pear.php.net/manual/en/core.ppm.pear-builder.php @@ -63,9 +63,9 @@ class PEAR_Builder extends PEAR_Common * * @access public */ - function PEAR_Builder(&$ui) + function __construct(&$ui) { - parent::PEAR_Common(); + parent::__construct(); $this->setFrontendObject($ui); } @@ -79,7 +79,7 @@ class PEAR_Builder extends PEAR_Common $pkg = $descfile; $descfile = $pkg->getPackageFile(); } else { - $pf = &new PEAR_PackageFile($this->config, $this->debug); + $pf = new PEAR_PackageFile($this->config, $this->debug); $pkg = &$pf->fromPackageFile($descfile, PEAR_VALIDATE_NORMAL); if (PEAR::isError($pkg)) { return $pkg; @@ -242,7 +242,7 @@ class PEAR_Builder extends PEAR_Common */ function build($descfile, $callback = null) { - if (preg_match('/(\\/|\\\\|^)([^\\/\\\\]+)?php(.+)?$/', + if (preg_match('/(\\/|\\\\|^)([^\\/\\\\]+)?php([^\\/\\\\]+)?$/', $this->config->get('php_bin'), $matches)) { if (isset($matches[2]) && strlen($matches[2]) && trim($matches[2]) != trim($this->config->get('php_prefix'))) { @@ -279,7 +279,7 @@ class PEAR_Builder extends PEAR_Common $this->addTempFile($dir); } } else { - $pf = &new PEAR_PackageFile($this->config); + $pf = new PEAR_PackageFile($this->config); $pkg = &$pf->fromPackageFile($descfile, PEAR_VALIDATE_NORMAL); if (PEAR::isError($pkg)) { return $pkg; @@ -322,6 +322,16 @@ class PEAR_Builder extends PEAR_Common // {{{ start of interactive part $configure_command = "$dir/configure"; + + $phpConfigName = $this->config->get('php_prefix') + . 'php-config' + . $this->config->get('php_suffix'); + $phpConfigPath = System::which($phpConfigName); + if ($phpConfigPath !== false) { + $configure_command .= ' --with-php-config=' + . $phpConfigPath; + } + $configure_options = $pkg->getConfigureOptions(); if ($configure_options) { foreach ($configure_options as $o) { @@ -375,7 +385,7 @@ class PEAR_Builder extends PEAR_Common if (!file_exists($build_dir) || !is_dir($build_dir) || !chdir($build_dir)) { return $this->raiseError("could not chdir to $build_dir"); } - putenv('PHP_PEAR_VERSION=1.9.4'); + putenv('PHP_PEAR_VERSION=1.10.1'); foreach ($to_run as $cmd) { $err = $this->_runCommand($cmd, $callback); if (PEAR::isError($err)) { @@ -476,7 +486,7 @@ class PEAR_Builder extends PEAR_Common return ($exitcode == 0); } - function log($level, $msg) + function log($level, $msg, $append_crlf = true) { if ($this->current_callback) { if ($this->debug >= $level) { @@ -484,6 +494,6 @@ class PEAR_Builder extends PEAR_Common } return; } - return PEAR_Common::log($level, $msg); + return parent::log($level, $msg, $append_crlf); } -} \ No newline at end of file +}