openbsd-ports/www/drush/patches/patch-includes_environment_inc

36 lines
1.9 KiB
Plaintext

$OpenBSD: patch-includes_environment_inc,v 1.2 2012/04/09 16:12:12 espie Exp $
--- includes/environment.inc.orig Thu Apr 5 04:56:38 2012
+++ includes/environment.inc Mon Apr 9 18:07:00 2012
@@ -133,30 +133,7 @@ function drush_environment_lib() {
function drush_environment_table_lib() {
// Try using the PEAR installed version of Console_Table.
- $tablefile = 'Console/Table.php';
- if (@file_get_contents($tablefile, FILE_USE_INCLUDE_PATH) === FALSE) {
- $lib = drush_get_option('lib', DRUSH_BASE_PATH . '/lib');
- $tablefile = $lib . '/Console_Table-' . DRUSH_TABLE_VERSION . '/Table.php';
- // If it is not already present, download Console Table.
- if (!drush_file_not_empty($tablefile)) {
- // Attempt to remove the old Console Table file, from the legacy location.
- // TODO: Remove this (and associated .git.ignore) in Drush 6.x.
- $tablefile_legacy = DRUSH_BASE_PATH . '/includes/table.inc';
- if (drush_file_not_empty($tablefile_legacy)) {
- drush_op('unlink', $tablefile_legacy);
- }
-
- // Download and extract Console_Table, and confirm success.
- if (drush_lib_fetch(DRUSH_PEAR_BASE_URL . 'Console_Table-' . DRUSH_TABLE_VERSION . '.tgz')) {
- // Remove unneccessary package.xml file which ends up in /lib.
- drush_op('unlink', $lib . '/package.xml');
- }
- if (!drush_file_not_empty($tablefile)) {
- return drush_bootstrap_error('DRUSH_TABLES_LIB_NOT_FOUND', dt("Drush needs a copy of the PEAR Console_Table library in order to function, and the attempt to download this file automatically failed. To continue you will need to download the !version package from http://pear.php.net/package/Console_Table, extract it into !lib directory, such that Table.php exists at !tablefile.", array('!version' => DRUSH_TABLE_VERSION, '!tablefile' => $tablefile, '!lib' => $lib)));
- }
- }
- }
- require_once $tablefile;
+ require_once 'table.inc';
}
/**