Index: install-pear.php =================================================================== --- install-pear.php (revision 310301) +++ install-pear.php (working copy) @@ -79,6 +79,9 @@ $debug = 1; } elseif ($arg == '--extremedebug') { $debug = 2; + } elseif ($arg == '-m') { + $man_dir = $argv[$i+1]; + $i++; } } @@ -121,6 +124,11 @@ $config->set('www_dir', $www_dir, 'default'); } +// Manual pages +if (!empty($man_dir)) { + $config->set('man_dir', $man_dir, 'default'); +} + // Downloaded files if (!empty($download_dir)) { $config->set('download_dir', $download_dir, 'default'); @@ -144,6 +152,9 @@ if (empty($cfg_dir)) { $config->set('cfg_dir', $with_dir . $ds . 'cfg', 'default'); } + if (empty($man_dir)) { + $config->set('man_dir', $with_dir $ds . 'local' . $ds . 'man', 'default'); + } if (!is_writable($config->get('cache_dir'))) { include_once 'System.php'; $cdir = System::mktemp(array('-d', 'pear')); Index: PEAR/Start.php =================================================================== --- PEAR/Start.php (revision 310301) +++ PEAR/Start.php (working copy) @@ -10,6 +10,7 @@ var $data_dir; var $cfg_dir; var $www_dir; + var $man_dir; var $install_pfc; var $corePackages = array( @@ -46,6 +47,7 @@ 'data_dir', 'cfg_dir', 'www_dir', + 'man_dir', 'test_dir', 'temp_dir', 'download_dir', @@ -64,6 +66,7 @@ 'data_dir' => 'Data directory', 'cfg_dir' => 'User-modifiable configuration files directory', 'www_dir' => 'Public Web Files directory', + 'man_dir' => 'System manual pages directory', 'test_dir' => 'Tests directory', 'pear_conf' => 'Name of configuration file', ); @@ -104,6 +107,7 @@ $this->data_dir = '$prefix' . $slash . 'data'; $this->test_dir = '$prefix' . $slash . 'tests'; $this->www_dir = '$prefix' . $slash . 'www'; + $this->man_dir = '$prefix' . $slash . 'man'; $this->cfg_dir = '$prefix' . $slash . 'cfg'; $this->pear_conf = PEAR_CONFIG_SYSCONFDIR . '\\pear.ini'; /* @@ -156,6 +160,7 @@ $this->cfg_dir = '$prefix/cfg'; $this->data_dir = '$prefix/data'; $this->test_dir = '$prefix/tests'; + $this->man_dir = '$prefix/man'; // check if the user has installed PHP with PHP or GNU layout if (@is_dir("$this->prefix/lib/php/.registry")) { $this->php_dir = '$prefix/lib/php'; Index: PEAR/Config.php =================================================================== --- PEAR/Config.php (revision 310301) +++ PEAR/Config.php (working copy) @@ -142,6 +142,18 @@ $PEAR_INSTALL_DIR.DIRECTORY_SEPARATOR.'www'); } +// Default for man_dir +if (getenv('PHP_PEAR_MAN_DIR')) { + define('PEAR_CONFIG_DEFAULT_MAN_DIR', getenv('PHP_PEAR_MAN_DIR')); +} else { + if (defined('PHP_MANDIR')) { // Added in PHP5.3.7 + define('PEAR_CONFIG_DEFAULT_MAN_DIR', PHP_MANDIR); + } else { + define('PEAR_CONFIG_DEFAULT_MAN_DIR', PHP_PREFIX . DIRECTORY_SEPARATOR . + 'local' . DIRECTORY_SEPARATOR .'man'); + } +} + // Default for test_dir if (getenv('PHP_PEAR_TEST_DIR')) { define('PEAR_CONFIG_DEFAULT_TEST_DIR', getenv('PHP_PEAR_TEST_DIR')); @@ -440,6 +452,13 @@ 'prompt' => 'PEAR www files directory', 'group' => 'File Locations (Advanced)', ), + 'man_dir' => array( + 'type' => 'directory', + 'default' => PEAR_CONFIG_DEFAULT_MAN_DIR, + 'doc' => 'directory where unix manual pages are installed', + 'prompt' => 'Systems manpage files directory', + 'group' => 'File Locations (Advanced)', + ), 'test_dir' => array( 'type' => 'directory', 'default' => PEAR_CONFIG_DEFAULT_TEST_DIR, Index: PEAR/Installer/Role/Man.php =================================================================== --- PEAR/Installer/Role/Man.php (revision 0) +++ PEAR/Installer/Role/Man.php (revision 0) @@ -0,0 +1,28 @@ + + * @copyright 2011 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version SVN: $Id: $ + * @link http://pear.php.net/package/PEAR + * @since File available since Release 1.10.0 + */ + +/** + * @category pear + * @package PEAR + * @author Hannes Magnusson + * @copyright 2011 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version Release: @package_version@ + * @link http://pear.php.net/package/PEAR + * @since Class available since Release 1.10.0 + */ +class PEAR_Installer_Role_Man extends PEAR_Installer_Role_Common {} +?> Index: PEAR/Installer/Role/Man.xml =================================================================== --- PEAR/Installer/Role/Man.xml (revision 0) +++ PEAR/Installer/Role/Man.xml (revision 0) @@ -0,0 +1,11 @@ + + 1 + 1 + man_dir + 1 + + + + + + Index: PEAR/Command/Config.php =================================================================== --- PEAR/Command/Config.php (revision 310301) +++ PEAR/Command/Config.php (working copy) @@ -354,6 +354,7 @@ $config->set('download_dir', $windows ? "$root\\pear\\download" : "$root/pear/download"); $config->set('temp_dir', $windows ? "$root\\pear\\temp" : "$root/pear/temp"); $config->set('bin_dir', $windows ? "$root\\pear" : "$root/pear"); + $config->set('man_dir', $windows ? "$root\\pear\\man" : "$root/pear/man"); $config->writeConfigFile(); $this->_showConfig($config); $this->ui->outputData('Successfully created default configuration file "' . $params[1] . '"', @@ -410,4 +411,4 @@ return false; } -} \ No newline at end of file +} Index: package2.xml =================================================================== --- package2.xml (revision 310301) +++ package2.xml (working copy) @@ -104,6 +104,7 @@ pecl install --with-option=dir memcached This allows for customized setups while still having the benefit of using the pear installer. (pear will not remember the configure params for the next upgrade) + * A new man_dir role, and configure option, to be used to install unix manual pages @@ -219,6 +220,10 @@ + + + + @@ -883,4 +888,4 @@ - \ No newline at end of file +