// }}}
+/* TODO:
+ * - define endianness, to allow matchSignature("bigend") etc.
+ */
+
class OS_Guess
{
var $sysname;
* c-basic-offset: 4
* End:
*/
-?>
\ No newline at end of file
+?>
var $code = -1;
var $message = '';
var $userinfo = '';
-
- // Wait until we have a stack-groping function in PHP.
- //var $file = '';
- //var $line = 0;
-
+ var $backtrace = null;
// }}}
// {{{ constructor
$this->code = $code;
$this->mode = $mode;
$this->userinfo = $userinfo;
+ if (function_exists("debug_backtrace")) {
+ $this->backtrace = debug_backtrace();
+ }
if ($mode & PEAR_ERROR_CALLBACK) {
$this->level = E_USER_NOTICE;
$this->callback = $options;
return $this->getUserInfo();
}
+ // }}}
+ // {{{ getBacktrace()
+
+ /**
+ * Get the call backtrace from where the error was generated.
+ * Supported with PHP 4.3.0 or newer.
+ *
+ * @param int $frame (optional) what frame to fetch
+ * @return array Backtrace, or NULL if not available.
+ * @access public
+ */
+ function getBacktrace($frame = null)
+ {
+ if ($frame === null) {
+ return $this->backtrace;
+ }
+ return $this->backtrace[$frame];
+ }
+
// }}}
// {{{ addUserInfo()
// }}}
}
-?>
+?>
\ No newline at end of file
'shortcut' => 'pv',
'options' => array(),
'doc' => '
+',
+ ),
+ 'cvsdiff' => array(
+ 'summary' => 'Run a "cvs diff" for all files in a package',
+ 'function' => 'doCvsDiff',
+ 'shortcut' => 'cd',
+ 'options' => array(
+ 'quiet' => array(
+ 'shortopt' => 'q',
+ 'doc' => 'Be quiet',
+ ),
+ 'reallyquiet' => array(
+ 'shortopt' => 'Q',
+ 'doc' => 'Be really quiet',
+ ),
+ 'date' => array(
+ 'shortopt' => 'D',
+ 'doc' => 'Diff against revision of DATE',
+ 'arg' => 'DATE',
+ ),
+ 'release' => array(
+ 'shortopt' => 'R',
+ 'doc' => 'Diff against tag for package release REL',
+ 'arg' => 'REL',
+ ),
+ 'revision' => array(
+ 'shortopt' => 'r',
+ 'doc' => 'Diff against revision REV',
+ 'arg' => 'REV',
+ ),
+ 'context' => array(
+ 'shortopt' => 'c',
+ 'doc' => 'Generate context diff',
+ ),
+ 'unified' => array(
+ 'shortopt' => 'u',
+ 'doc' => 'Generate unified diff',
+ ),
+ 'ignore-case' => array(
+ 'shortopt' => 'i',
+ 'doc' => 'Ignore case, consider upper- and lower-case letters equivalent',
+ ),
+ 'ignore-whitespace' => array(
+ 'shortopt' => 'b',
+ 'doc' => 'Ignore changes in amount of white space',
+ ),
+ 'ignore-blank-lines' => array(
+ 'shortopt' => 'B',
+ 'doc' => 'Ignore changes that insert or delete blank lines',
+ ),
+ 'brief' => array(
+ 'doc' => 'Report only whether the files differ, no details',
+ ),
+ 'dry-run' => array(
+ 'shortopt' => 'n',
+ 'doc' => 'Don\'t do anything, just pretend',
+ ),
+ ),
+ 'doc' => '<package.xml>
+Compares all the files in a package. Without any options, this
+command will compare the current code with the last checked-in code.
+Using the -r or -R option you may compare the current code with that
+of a specific release.
',
),
'cvstag' => array(
'shortopt' => 'd',
'doc' => 'Remove tag',
),
+ 'dry-run' => array(
+ 'shortopt' => 'n',
+ 'doc' => 'Don\'t do anything, just pretend',
+ ),
),
- 'doc' => '
+ 'doc' => '<package.xml>
Sets a CVS tag on all files in a package. Use this command after you have
packaged a distribution tarball with the "package" command to tag what
revisions of what files were in that release. If need to fix something
foreach ($files as $file) {
$command .= ' ' . escapeshellarg($file);
}
+ if ($this->config->get('verbose') > 1) {
+ $this->output .= "+ $command\n";
+ }
$this->output .= "+ $command\n";
- if (empty($options['n'])) {
+ if (empty($options['dry-run'])) {
$fp = popen($command, "r");
while ($line = fgets($fp, 1024)) {
$this->output .= rtrim($line)."\n";
return true;
}
+ // }}}
+ // {{{ doCvsDiff()
+
+ function doCvsDiff($command, $options, $params)
+ {
+ $this->output = '';
+ if (sizeof($params) < 1) {
+ $help = $this->getHelp($command);
+ return $this->raiseError("$command: missing parameter: $help[0]");
+ }
+ $obj = new PEAR_Common;
+ $info = $obj->infoFromDescriptionFile($params[0]);
+ if (PEAR::isError($info)) {
+ return $this->raiseError($info);
+ }
+ $files = array_keys($info['filelist']);
+ $cmd = "cvs";
+ if (isset($options['quiet'])) {
+ $cmd .= ' -q';
+ unset($options['quiet']);
+ }
+ if (isset($options['reallyquiet'])) {
+ $cmd .= ' -Q';
+ unset($options['reallyquiet']);
+ }
+ if (isset($options['release'])) {
+ $cvsversion = preg_replace('/[^a-z0-9]/i', '_', $options['release']);
+ $cvstag = "RELEASE_$cvsversion";
+ $options['revision'] = $cvstag;
+ unset($options['release']);
+ }
+ $execute = true;
+ if (isset($options['dry-run'])) {
+ $execute = false;
+ unset($options['dry-run']);
+ }
+ $cmd .= ' diff';
+ // the rest of the options are passed right on to "cvs diff"
+ foreach ($options as $option => $optarg) {
+ $arg = @$this->commands[$command]['options'][$option]['arg'];
+ $short = @$this->commands[$command]['options'][$option]['shortopt'];
+ $cmd .= $short ? " -$short" : " --$option";
+ if ($arg && $optarg) {
+ $cmd .= ($short ? '' : '=') . escapeshellarg($optarg);
+ }
+ }
+ foreach ($files as $file) {
+ $cmd .= ' ' . escapeshellarg($file);
+ }
+ if ($this->config->get('verbose') > 1) {
+ $this->output .= "+ $cmd\n";
+ }
+ if ($execute) {
+ $fp = popen($cmd, "r");
+ while ($line = fgets($fp, 1024)) {
+ $this->output .= rtrim($line)."\n";
+ }
+ pclose($fp);
+ }
+ $this->ui->outputData($this->output, $command);
+ return true;
+ }
+
// }}}
// {{{ doRunTests()
server, for example if you download the DB package and the latest stable
version of DB is 1.2, the downloaded file will be DB-1.2.tgz.',
),
+ 'clear-cache' => array(
+ 'summary' => 'Clear XML-RPC Cache',
+ 'function' => 'doClearCache',
+ 'shortcut' => 'cc',
+ 'options' => array(),
+ 'doc' => '
+Clear the XML-RPC cache. See also the cache_ttl configuration
+parameter.
+',
+ ),
);
// }}}
return true;
}
+ // }}}
+ // {{{ doClearCache()
+
+ function doClearCache($command, $options, $params)
+ {
+ $cache_dir = $this->config->get('cache_dir');
+ $verbose = $this->config->get('verbose');
+ $output = '';
+ if (!($dp = @opendir($cache_dir))) {
+ return $this->raiseError("opendir($cache_dir) failed: $php_errormsg");
+ }
+ if ($verbose >= 1) {
+ $output .= "reading directory $cache_dir\n";
+ }
+ $num = 0;
+ while ($ent = readdir($dp)) {
+ if (preg_match('/^xmlrpc_cache_[a-z0-9]{32}$/', $ent)) {
+ $path = $cache_dir . DIRECTORY_SEPARATOR . $ent;
+ $ok = @unlink($path);
+ if ($ok) {
+ if ($verbose >= 2) {
+ $output .= "deleted $path\n";
+ }
+ $num++;
+ } elseif ($verbose >= 1) {
+ $output .= "failed to delete $path\n";
+ }
+ }
+ }
+ closedir($dp);
+ if ($verbose >= 1) {
+ $output .= "$num cache entries cleared\n";
+ }
+ $this->ui->outputData(rtrim($output), $command);
+ return $num;
+ }
+
// }}}
}
// PHP_ prefix is for some security, PHP protects environment
// variables starting with PHP_*.
-if (isset($_ENV['PHP_PEAR_SYSCONF_DIR'])) {
- define('PEAR_CONFIG_SYSCONFDIR', $_ENV['PHP_PEAR_SYSCONF_DIR']);
-} elseif (isset($_ENV['SystemRoot'])) {
- define('PEAR_CONFIG_SYSCONFDIR', $_ENV['SystemRoot']);
-} elseif (@is_dir(PHP_SYSCONFDIR)) {
+if (getenv('PHP_PEAR_SYSCONF_DIR')) {
+ define('PEAR_CONFIG_SYSCONFDIR', getenv('PHP_PEAR_SYSCONF_DIR'));
+} elseif (getenv('SystemRoot')) {
+ define('PEAR_CONFIG_SYSCONFDIR', getenv('SystemRoot'));
+} else {
define('PEAR_CONFIG_SYSCONFDIR', PHP_SYSCONFDIR);
}
// Default for master_server
-if (isset($_ENV['PHP_PEAR_MASTER_SERVER'])) {
- define('PEAR_CONFIG_DEFAULT_MASTER_SERVER', $_ENV['PHP_PEAR_MASTER_SERVER']);
+if (getenv('PHP_PEAR_MASTER_SERVER')) {
+ define('PEAR_CONFIG_DEFAULT_MASTER_SERVER', getenv('PHP_PEAR_MASTER_SERVER'));
} else {
define('PEAR_CONFIG_DEFAULT_MASTER_SERVER', 'pear.php.net');
}
// Default for http_proxy
-if (isset($_ENV['PHP_PEAR_HTTP_PROXY'])) {
- define('PEAR_CONFIG_DEFAULT_HTTP_PROXY', $_ENV['PHP_PEAR_HTTP_PROXY']);
-} elseif (isset($_ENV['http_proxy'])) {
- define('PEAR_CONFIG_DEFAULT_HTTP_PROXY', $_ENV['http_proxy']);
+if (getenv('PHP_PEAR_HTTP_PROXY')) {
+ define('PEAR_CONFIG_DEFAULT_HTTP_PROXY', getenv('PHP_PEAR_HTTP_PROXY'));
+} elseif (getenv('http_proxy')) {
+ define('PEAR_CONFIG_DEFAULT_HTTP_PROXY', getenv('http_proxy'));
} else {
define('PEAR_CONFIG_DEFAULT_HTTP_PROXY', '');
}
// Default for php_dir
-if (isset($_ENV['PHP_PEAR_INSTALL_DIR'])) {
- define('PEAR_CONFIG_DEFAULT_PHP_DIR', $_ENV['PHP_PEAR_INSTALL_DIR']);
+if (getenv('PHP_PEAR_INSTALL_DIR')) {
+ define('PEAR_CONFIG_DEFAULT_PHP_DIR', getenv('PHP_PEAR_INSTALL_DIR'));
} else {
if (@is_dir(PEAR_INSTALL_DIR.DIRECTORY_SEPARATOR.'lib')) {
define('PEAR_CONFIG_DEFAULT_PHP_DIR',
}
// Default for ext_dir
-if (isset($_ENV['PHP_PEAR_EXTENSION_DIR'])) {
- define('PEAR_CONFIG_DEFAULT_EXT_DIR', $_ENV['PHP_PEAR_EXTENSION_DIR']);
+if (getenv('PHP_PEAR_EXTENSION_DIR')) {
+ define('PEAR_CONFIG_DEFAULT_EXT_DIR', getenv('PHP_PEAR_EXTENSION_DIR'));
} else {
define('PEAR_CONFIG_DEFAULT_EXT_DIR', ini_get('extension_dir'));
}
// Default for doc_dir
-if (isset($_ENV['PHP_PEAR_DOC_DIR'])) {
- define('PEAR_CONFIG_DEFAULT_DOC_DIR', $_ENV['PHP_PEAR_DOC_DIR']);
+if (getenv('PHP_PEAR_DOC_DIR')) {
+ define('PEAR_CONFIG_DEFAULT_DOC_DIR', getenv('PHP_PEAR_DOC_DIR'));
} else {
define('PEAR_CONFIG_DEFAULT_DOC_DIR',
PEAR_INSTALL_DIR.DIRECTORY_SEPARATOR.'docs');
}
// Default for bin_dir
-if (isset($_ENV['PHP_PEAR_BIN_DIR'])) {
- define('PEAR_CONFIG_DEFAULT_BIN_DIR', $_ENV['PHP_PEAR_BIN_DIR']);
+if (getenv('PHP_PEAR_BIN_DIR')) {
+ define('PEAR_CONFIG_DEFAULT_BIN_DIR', getenv('PHP_PEAR_BIN_DIR'));
} else {
define('PEAR_CONFIG_DEFAULT_BIN_DIR', PHP_BINDIR);
}
// Default for data_dir
-if (isset($_ENV['PHP_PEAR_DATA_DIR'])) {
- define('PEAR_CONFIG_DEFAULT_DATA_DIR', $_ENV['PHP_PEAR_DATA_DIR']);
+if (getenv('PHP_PEAR_DATA_DIR')) {
+ define('PEAR_CONFIG_DEFAULT_DATA_DIR', getenv('PHP_PEAR_DATA_DIR'));
} else {
define('PEAR_CONFIG_DEFAULT_DATA_DIR',
PEAR_INSTALL_DIR.DIRECTORY_SEPARATOR.'data');
}
// Default for test_dir
-if (isset($_ENV['PHP_PEAR_TEST_DIR'])) {
- define('PEAR_CONFIG_DEFAULT_TEST_DIR', $_ENV['PHP_PEAR_TEST_DIR']);
+if (getenv('PHP_PEAR_TEST_DIR')) {
+ define('PEAR_CONFIG_DEFAULT_TEST_DIR', getenv('PHP_PEAR_TEST_DIR'));
} else {
define('PEAR_CONFIG_DEFAULT_TEST_DIR',
PEAR_INSTALL_DIR.DIRECTORY_SEPARATOR.'tests');
}
// Default for cache_dir
-if (isset($_ENV['PHP_PEAR_CACHE_DIR'])) {
- define('PEAR_CONFIG_DEFAULT_CACHE_DIR', $_ENV['PHP_PEAR_CACHE_DIR']);
+if (getenv('PHP_PEAR_CACHE_DIR')) {
+ define('PEAR_CONFIG_DEFAULT_CACHE_DIR', getenv('PHP_PEAR_CACHE_DIR'));
} else {
define('PEAR_CONFIG_DEFAULT_CACHE_DIR',
System::tmpdir() . DIRECTORY_SEPARATOR . 'pear' .
}
// Default for php_bin
-if (isset($_ENV['PHP_PEAR_PHP_BIN'])) {
- define('PEAR_CONFIG_DEFAULT_PHP_BIN', $_ENV['PHP_PEAR_PHP_BIN']);
+if (getenv('PHP_PEAR_PHP_BIN')) {
+ define('PEAR_CONFIG_DEFAULT_PHP_BIN', getenv('PHP_PEAR_PHP_BIN'));
} else {
define('PEAR_CONFIG_DEFAULT_PHP_BIN', PEAR_CONFIG_DEFAULT_BIN_DIR.
DIRECTORY_SEPARATOR.'php'.(OS_WINDOWS ? '.exe' : ''));
}
// Default for verbose
-if (isset($_ENV['PHP_PEAR_VERBOSE'])) {
- define('PEAR_CONFIG_DEFAULT_VERBOSE', $_ENV['PHP_PEAR_VERBOSE']);
+if (getenv('PHP_PEAR_VERBOSE')) {
+ define('PEAR_CONFIG_DEFAULT_VERBOSE', getenv('PHP_PEAR_VERBOSE'));
} else {
define('PEAR_CONFIG_DEFAULT_VERBOSE', 1);
}
// Default for preferred_state
-if (isset($_ENV['PHP_PEAR_PREFERRED_STATE'])) {
- define('PEAR_CONFIG_DEFAULT_PREFERRED_STATE', $_ENV['PHP_PEAR_PREFERRED_STATE']);
+if (getenv('PHP_PEAR_PREFERRED_STATE')) {
+ define('PEAR_CONFIG_DEFAULT_PREFERRED_STATE', getenv('PHP_PEAR_PREFERRED_STATE'));
} else {
define('PEAR_CONFIG_DEFAULT_PREFERRED_STATE', 'stable');
}
// Default for umask
-if (isset($_ENV['PHP_PEAR_UMASK'])) {
- define('PEAR_CONFIG_DEFAULT_UMASK', $_ENV['PHP_PEAR_UMASK']);
+if (getenv('PHP_PEAR_UMASK')) {
+ define('PEAR_CONFIG_DEFAULT_UMASK', getenv('PHP_PEAR_UMASK'));
} else {
- define('PEAR_CONFIG_DEFAULT_UMASK', umask());
+ define('PEAR_CONFIG_DEFAULT_UMASK', decoct(umask()));
}
// Default for cache_ttl
-if (isset($_ENV['PHP_PEAR_CACHE_TTL'])) {
- define('PEAR_CONFIG_DEFAULT_CACHE_TTL', $_ENV['PHP_PEAR_CACHE_TTL']);
+if (getenv('PHP_PEAR_CACHE_TTL')) {
+ define('PEAR_CONFIG_DEFAULT_CACHE_TTL', getenv('PHP_PEAR_CACHE_TTL'));
} else {
define('PEAR_CONFIG_DEFAULT_CACHE_TTL', 3600);
}
// Default for sig_type
-if (isset($_ENV['PHP_PEAR_SIG_TYPE'])) {
- define('PEAR_CONFIG_DEFAULT_SIG_TYPE', $_ENV['PHP_PEAR_SIG_TYPE']);
+if (getenv('PHP_PEAR_SIG_TYPE')) {
+ define('PEAR_CONFIG_DEFAULT_SIG_TYPE', getenv('PHP_PEAR_SIG_TYPE'));
} else {
define('PEAR_CONFIG_DEFAULT_SIG_TYPE', 'gpg');
}
// Default for sig_bin
-if (isset($_ENV['PHP_PEAR_SIG_BIN'])) {
- define('PEAR_CONFIG_DEFAULT_SIG_BIN', $_ENV['PHP_PEAR_SIG_BIN']);
+if (getenv('PHP_PEAR_SIG_BIN')) {
+ define('PEAR_CONFIG_DEFAULT_SIG_BIN', getenv('PHP_PEAR_SIG_BIN'));
} else {
define('PEAR_CONFIG_DEFAULT_SIG_BIN',
System::which(
}
// Default for sig_keydir
-if (isset($_ENV['PHP_PEAR_SIG_KEYDIR'])) {
- define('PEAR_CONFIG_DEFAULT_SIG_KEYDIR', $_ENV['PHP_PEAR_SIG_KEYDIR']);
+if (getenv('PHP_PEAR_SIG_KEYDIR')) {
+ define('PEAR_CONFIG_DEFAULT_SIG_KEYDIR', getenv('PHP_PEAR_SIG_KEYDIR'));
} else {
define('PEAR_CONFIG_DEFAULT_SIG_KEYDIR',
PEAR_CONFIG_SYSCONFDIR . DIRECTORY_SEPARATOR . 'pearkeys');
var $type = 'CLI';
var $lp = ''; // line prefix
- var $omode = 'plain';
var $params = array();
var $term = array(
'bold' => '',
function displayLine($text)
{
- trigger_error("Frontend::displayLine deprecated", E_USER_ERROR);
+ trigger_error("PEAR_Frontend_CLI::displayLine deprecated", E_USER_ERROR);
}
function _displayLine($text)
function display($text)
{
- trigger_error("Frontend::display deprecated", E_USER_ERROR);
+ trigger_error("PEAR_Frontend_CLI::display deprecated", E_USER_ERROR);
}
function _display($text)
function displayHeading($title)
{
- trigger_error("Frontend::displayHeading deprecated", E_USER_ERROR);
+ trigger_error("PEAR_Frontend_CLI::displayHeading deprecated", E_USER_ERROR);
}
function _displayHeading($title)
function userConfirm($prompt, $default = 'yes')
{
- trigger_error("Frontend::userConfirm not yet converted", E_USER_ERROR);
+ trigger_error("PEAR_Frontend_CLI::userConfirm not yet converted", E_USER_ERROR);
static $positives = array('y', 'yes', 'on', '1');
static $negatives = array('n', 'no', 'off', '0');
print "$this->lp$prompt [$default] : ";
function startTable($params = array())
{
- trigger_error("Frontend::startTable deprecated", E_USER_ERROR);
+ trigger_error("PEAR_Frontend_CLI::startTable deprecated", E_USER_ERROR);
}
function _startTable($params = array())
{
- $this->omode = 'table';
$params['table_data'] = array();
$params['widest'] = array(); // indexed by column
$params['highest'] = array(); // indexed by row
function tableRow($columns, $rowparams = array(), $colparams = array())
{
- trigger_error("Frontend::tableRow deprecated", E_USER_ERROR);
+ trigger_error("PEAR_Frontend_CLI::tableRow deprecated", E_USER_ERROR);
}
function _tableRow($columns, $rowparams = array(), $colparams = array())
function endTable()
{
- trigger_error("Frontend::tableRow deprecated", E_USER_ERROR);
+ trigger_error("PEAR_Frontend_CLI::tableRow deprecated", E_USER_ERROR);
}
function _endTable()
{
- $this->omode = '';
extract($this->params);
if (!empty($caption)) {
$this->_displayHeading($caption);
if (!file_exists($cachedir)) {
System::mkdir('-p '.$cachedir);
}
- $filename = $cachedir.'/xmlrpc_cache_'.$id;
+ $filename = $cachedir . DIRECTORY_SEPARATOR . 'xmlrpc_cache_' . $id;
if (!file_exists($filename)) {
return null;
};
$lastkey = key($php_val);
if ($firstkey === 0 && is_int($lastkey) &&
($lastkey + 1) == count($php_val)) {
- $is_continous = true;
+ $is_continuous = true;
reset($php_val);
$size = count($php_val);
for ($expect = 0; $expect < $size; $expect++, next($php_val)) {
if (key($php_val) !== $expect) {
- $is_continous = false;
+ $is_continuous = false;
break;
}
}
- if ($is_continous) {
+ if ($is_continuous) {
reset($php_val);
$arr = array();
while (list($k, $v) = each($php_val)) {
break;
}
}
- // fall though if not numerical and continous
+ // fall though if not numerical and continuous
case "object":
$arr = array();
while (list($k, $v) = each($php_val)) {
// XXX FIXME honor safe mode
$path_delim = OS_WINDOWS ? ';' : ':';
- $exe_suffix = OS_WINDOWS ? '.exe' : '';
+ $exe_suffixes = OS_WINDOWS ? array('.exe','.bat','.cmd','.com') : array('');
$path_elements = explode($path_delim, getenv('PATH'));
- foreach ($path_elements as $dir) {
- $file = $dir . DIRECTORY_SEPARATOR . $program . $exe_suffix;
- if (@is_file($file) && @$pear_is_executable($file)) {
- return $file;
+ foreach ($exe_suffixes as $suff) {
+ foreach ($path_elements as $dir) {
+ $file = $dir . DIRECTORY_SEPARATOR . $program . $suff;
+ if (@is_file($file) && @$pear_is_executable($file)) {
+ return $file;
+ }
}
}
return $fallback;
}
}
-?>
\ No newline at end of file
+?>
</maintainer>
</maintainers>
<release>
- <version>1.0b3</version>
+ <version>1.0.1</version>
<state>stable</state>
- <date>2002-12-13</date>
+ <date>2003-01-10</date>
<notes>
-* fixed "info" shortcut (conflicted with "install")
-* added "php_bin" config parameter
-* all "non-personal" config parameters now use
- environment variables for defaults (very useful
- to override the default php_dir on Windows!)
+* PEAR_Error class has call backtrace available by
+ calling getBacktrace(). Available if used with
+ PHP 4.3 or newer.
+
+* PEAR_Config class uses getenv() rather than $_ENV
+ to read environment variables.
+
+* System::which() Windows fix, now looks for
+ exe/bat/cmd/com suffixes rather than just exe
+
+* Added "pear cvsdiff" command
+
+* Windows output buffering bugfix for "pear" command
</notes>
<filelist>
<file role="data" name="package.dtd"/>
</deps>
</release>
<changelog>
+ <release>
+ <version>1.0</version>
+ <state>stable</state>
+ <date>2002-12-27</date>
+ <notes>
+ * set default cache_ttl to 1 hour
+ * added "clear-cache" command
+ </notes>
+ <deps>
+ <dep type="php" rel="ge" version="4.1"/>
+ <dep type="pkg" rel="ge" version="0.4">Archive_Tar</dep>
+ <dep type="pkg" rel="ge" version="0.11">Console_Getopt</dep>
+ </deps>
+ </release>
+ <release>
+ <version>1.0b3</version>
+ <state>stable</state>
+ <date>2002-12-13</date>
+ <notes>
+ * fixed "info" shortcut (conflicted with "install")
+ * added "php_bin" config parameter
+ * all "non-personal" config parameters now use
+ environment variables for defaults (very useful
+ to override the default php_dir on Windows!)
+ </notes>
+ <deps>
+ <dep type="php" rel="ge" version="4.1"/>
+ <dep type="pkg" rel="ge" version="0.4">Archive_Tar</dep>
+ <dep type="pkg" rel="ge" version="0.11">Console_Getopt</dep>
+ </deps>
+ </release>
<release>
<version>1.0b2</version>
<state>stable</state>
<!--
- $Id: package.dtd,v 1.27.4.2 2002-12-13 02:14:22 ssb Exp $
+ $Id: package.dtd,v 1.27.4.3 2003-02-15 20:28:50 ssb Exp $
- This is the PEAR package description, version 1.0b9.
+ This is the PEAR package description, version 1.0.
It should be used with the informal public identifier:
- "-//PHP Group//DTD PEAR Package 1.0b10//EN//XML"
+ "-//PHP Group//DTD PEAR Package 1.0//EN//XML"
Copyright (c) 1997-2002 The PHP Group
REM Authors: Alexander Merz (alexmerz@php.net)
REM ----------------------------------------------------------------------
REM
-REM $Id: pear.bat,v 1.11 2002/12/13 02:10:23 ssb Exp $
+REM $Id: pear.bat,v 1.12 2003/01/03 00:17:41 phanto Exp $
REM change this lines to match the paths of your system
REM -------------------
set BIN_DIR=@bin_dir@
set PEAR_PATH=@include_path@
-%PHP_BIN% -C -d output_buffer=1 -d include_path=%PEAR_PATH% -f %BIN_DIR%\pear -- %1 %2 %3 %4 %5 %6 %7 %8 %9
+%PHP_BIN% -C -d output_buffering=1 -d include_path=%PEAR_PATH% -f %BIN_DIR%\pear -- %1 %2 %3 %4 %5 %6 %7 %8 %9
@ECHO ON
#!/bin/sh
-PHP="@php_bin@"
-test "$PHP" = '@'php_bin'@' && PHP=php
-exec $PHP -C -q -d output_buffering=1 $0 $@
+
+# first find which PHP binary to use
+if test "x$PHP_PEAR_PHP_BIN" != "x"; then
+ PHP="$PHP_PEAR_PHP_BIN"
+else
+ if test "@php_bin@" = '@'php_bin'@'; then
+ PHP=php
+ else
+ PHP="@php_bin@"
+ fi
+fi
+
+# then look for the right pear include dir
+if test "x$PHP_PEAR_INSTALL_DIR" != "x"; then
+ INC="-d include_path=$PHP_PEAR_INSTALL_DIR"
+else
+ if test "@php_dir@" = '@'php_dir'@'; then
+ INC=""
+ else
+ INC="-d include_path=@php_dir@"
+ fi
+fi
+
+exec $PHP -C -q $INC -d output_buffering=1 $0 $@
<?php
//
// +----------------------------------------------------------------------+