public
Created

  • Download Gist
Builder.diff
Diff
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
Index: PEAR/Builder.php
===================================================================
--- PEAR/Builder.php (revision 312817)
+++ PEAR/Builder.php (working copy)
@@ -288,12 +288,24 @@
}
// Find config. outside of normal path - e.g. config.m4
+ $tempDir = '';
foreach (array_keys($pkg->getInstallationFileList()) as $item) {
- if (stristr($item, 'config.')) {
- $dir .= DIRECTORY_SEPARATOR . dirname($item);
+ $fileBaseName = basename($item);
+
+ // the next line is more or less or guess
+ if (!stristr($fileBaseName, 'config.')) {
+ continue;
+ }
+ $tempDir = DIRECTORY_SEPARATOR . dirname($item);
+
+ // If the file is not config.m4, we keep looking.
+ if (strtolower($fileBaseName) == 'config.m4') {
break;
}
}
+ if (!empty($tempDir)) {
+ $dir .= $tempDir;
+ }
$old_cwd = getcwd();
if (!file_exists($dir) || !is_dir($dir) || !chdir($dir)) {
@@ -513,4 +525,4 @@
}
return PEAR_Common::log($level, $msg);
}
-}
\ No newline at end of file
+}

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.