svn: /pear/pear-core/trunk/PEAR/ Builder.php

From: Date: Tue, 31 May 2011 02:55:54 +0000
Subject: svn: /pear/pear-core/trunk/PEAR/ Builder.php
Groups: php.pear.cvs php.pear.core 
Request: Send a blank email to pear-core+get-9912@lists.php.net to get a copy of this message
dufuz Tue, 31 May 2011 02:55:54 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=311616 Log: Fixed a bug with extensions not providing their config.m4 and co in the root directory of their pecl package but rather in a sub directory, such as xhprof. [dufuz] # Merge from tag PEAR-1.9.3 Changed paths: U pear/pear-core/trunk/PEAR/Builder.php Modified: pear/pear-core/trunk/PEAR/Builder.php =================================================================== --- pear/pear-core/trunk/PEAR/Builder.php 2011-05-31 02:55:30 UTC (rev 311615) +++ pear/pear-core/trunk/PEAR/Builder.php 2011-05-31 02:55:54 UTC (rev 311616) @@ -287,6 +287,14 @@ $dir = dirname($descfile); } + // Find config. outside of normal path - e.g. config.m4 + foreach (array_keys($pkg->getInstallationFileList()) as $item) { + if (stristr($item, 'config.')) { + $dir .= DIRECTORY_SEPARATOR . dirname($item); + break; + } + } + $old_cwd = getcwd(); if (!file_exists($dir) || !is_dir($dir) || !chdir($dir)) { return $this->raiseError("could not chdir to $dir"); @@ -412,6 +420,7 @@ . "php-config" . $this->config->get('php_suffix') . " --prefix"); $this->_harvestInstDir($prefix, $inst_dir . DIRECTORY_SEPARATOR . $prefix, $built_files); + chdir($old_cwd); return $built_files; } @@ -433,10 +442,12 @@ if ($what != 'cmdoutput') { return; } + $this->log(1, rtrim($data)); if (preg_match('/You should update your .aclocal.m4/', $data)) { return; } + $matches = array(); if (preg_match('/^\s+(\S[^:]+):\s+(\d{8})/', $data, $matches)) { $member = preg_replace('/[^a-z]/', '_', strtolower($matches[1]));

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