cvs: pear-core / package-PEAR.xml package2.xml /PEAR Builder.php

From: Date: Sun, 07 Jan 2007 16:11:25 +0000
Subject: cvs: pear-core / package-PEAR.xml package2.xml /PEAR Builder.php
Groups: php.pear.cvs php.pear.core 
Request: Send a blank email to pear-core+get-5334@lists.php.net to get a copy of this message
cellog Sun Jan 7 16:11:25 2007 UTC Modified files: /pear-core package-PEAR.xml package2.xml /pear-core/PEAR Builder.php Log: * fix Bug #9660: dependency sorting on installation does not always work * fix Bug #9688: [PATCH] Fix build of PECL extensions http://cvs.php.net/viewvc.cgi/pear-core/package-PEAR.xml?r1=1.411&r2=1.412&diff_format=u Index: pear-core/package-PEAR.xml diff -u pear-core/package-PEAR.xml:1.411 pear-core/package-PEAR.xml:1.412 --- pear-core/package-PEAR.xml:1.411 Wed Dec 20 19:34:03 2006 +++ pear-core/package-PEAR.xml Sun Jan 7 16:11:25 2007 @@ -83,7 +83,8 @@ <license>PHP License</license> <state>beta</state> <notes> - * + * fix Bug #9660: dependency sorting on installation does not always work + * fix Bug #9688: [PATCH] Fix build of PECL extensions </notes> <provides type="class" name="OS_Guess"/> <provides type="class" name="System"/> http://cvs.php.net/viewvc.cgi/pear-core/package2.xml?r1=1.306&r2=1.307&diff_format=u Index: pear-core/package2.xml diff -u pear-core/package2.xml:1.306 pear-core/package2.xml:1.307 --- pear-core/package2.xml:1.306 Wed Dec 20 19:34:03 2006 +++ pear-core/package2.xml Sun Jan 7 16:11:25 2007 @@ -89,6 +89,7 @@ <license uri="http://www.php.net/license">PHP License</license> <notes> * fix Bug #9660: dependency sorting on installation does not always work + * fix Bug #9688: [PATCH] Fix build of PECL extensions </notes> <contents> <dir name="/"> http://cvs.php.net/viewvc.cgi/pear-core/PEAR/Builder.php?r1=1.29&r2=1.30&diff_format=u Index: pear-core/PEAR/Builder.php diff -u pear-core/PEAR/Builder.php:1.29 pear-core/PEAR/Builder.php:1.30 --- pear-core/PEAR/Builder.php:1.29 Sun Mar 5 21:09:18 2006 +++ pear-core/PEAR/Builder.php Sun Jan 7 16:11:25 2007 @@ -16,9 +16,12 @@ * @author Greg Beaver <cellog@php.net> * @copyright 1997-2006 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: Builder.php,v 1.29 2006/03/05 21:09:18 cellog Exp $ + * @version CVS: $Id: Builder.php,v 1.30 2007/01/07 16:11:25 cellog Exp $ * @link http://pear.php.net/package/PEAR * @since File available since Release 0.1 + * + * TODO: log output parameters in PECL command line + * TODO: msdev path in configuration */ /** @@ -50,6 +53,10 @@ var $extensions_built = array(); + /** + * @var string Used for reporting when it is not possible to pass function + * via extra parameter, e.g. log, msdevCallback + */ var $current_callback = null; // used for msdev builds @@ -83,6 +90,7 @@ { if (is_object($descfile)) { $pkg = $descfile; + $descfile = $pkg->getPackageFile(); } else { $pf = &new PEAR_PackageFile($this->config, $this->debug); $pkg = &$pf->fromPackageFile($descfile, PEAR_VALIDATE_NORMAL); @@ -90,12 +98,22 @@ return $pkg; } } - $dir = dirname($pkg->getArchiveFile()); + $dir = dirname($descfile); $old_cwd = getcwd(); if (!file_exists($dir) || !is_dir($dir) || !chdir($dir)) { return $this->raiseError("could not chdir to $dir"); } + // packages that were in a .tar have the packagefile in this directory + $vdir = $pkg->getPackage() . '-' . $pkg->getVersion(); + if (file_exists($dir) && is_dir($vdir)) { + if (chdir($vdir)) { + $dir = getcwd(); + } else { + return $this->raiseError("could not chdir to " . realpath($vdir)); + } + } + $this->log(2, "building in $dir"); $dsp = $pkg->getPackage().'.dsp'; @@ -103,9 +121,8 @@ return $this->raiseError("The DSP $dsp does not exist."); } // XXX TODO: make release build type configurable - $command = 'msdev '.$dsp.' /MAKE "'.$info['package']. ' - Release"'; + $command = 'msdev '.$dsp.' /MAKE "'.$pkg->getPackage(). ' - Release"'; - $this->current_callback = $callback; $err = $this->_runCommand($command, array(&$this, 'msdevCallback')); if (PEAR::isError($err)) { return $err; @@ -169,6 +186,7 @@ if (!$this->_firstline) $this->_firstline = $data; $this->_lastline = $data; + call_user_func($this->current_callback, $what, $data); } // }}} @@ -242,6 +260,7 @@ */ function build($descfile, $callback = null) { + $this->current_callback = $callback; if (PEAR_OS == "Windows") { return $this->_build_win32($descfile,$callback); } @@ -269,7 +288,6 @@ } $dir = getcwd(); $this->log(2, "building in $dir"); - $this->current_callback = $callback; putenv('PATH=' . $this->config->get('bin_dir') . ':' . getenv('PATH')); $err = $this->_runCommand("phpize", array(&$this, 'phpizeCallback')); if (PEAR::isError($err)) {

« previous php.pear.core (#5334) next »