summaryrefslogtreecommitdiff
path: root/pear/scripts
diff options
context:
space:
mode:
authorSVN Migration <svn@php.net>2002-02-04 20:44:25 +0000
committerSVN Migration <svn@php.net>2002-02-04 20:44:25 +0000
commit7162eb219af50c180b8d15fab9009ba85af7ce44 (patch)
treef51a672d3c15b605196896952e4dc222007c464b /pear/scripts
parent8535164f21b6dc551a519b0e5f11cbd6bd72a2b0 (diff)
downloadphp-git-BEFORE_NEW_OBJECT_MODEL.tar.gz
This commit was manufactured by cvs2svn to create tagBEFORE_NEW_OBJECT_MODEL
'BEFORE_NEW_OBJECT_MODEL'.
Diffstat (limited to 'pear/scripts')
-rw-r--r--pear/scripts/pear-get.in58
-rwxr-xr-xpear/scripts/pear.bat31
-rw-r--r--pear/scripts/pear.in58
-rw-r--r--pear/scripts/pearcmd-common.php197
-rw-r--r--pear/scripts/pearcmd-help.php9
-rw-r--r--pear/scripts/pearcmd-info.php9
-rw-r--r--pear/scripts/pearcmd-install.php33
-rw-r--r--pear/scripts/pearcmd-list.php20
-rw-r--r--pear/scripts/pearcmd-package.php15
-rw-r--r--pear/scripts/pearcmd-remote-list.php24
-rw-r--r--pear/scripts/pearcmd-show-config.php16
-rw-r--r--pear/scripts/pearcmd-uninstall.php26
-rw-r--r--pear/scripts/pearize.in225
-rw-r--r--pear/scripts/pearwin.php150
-rw-r--r--pear/scripts/php-config.in26
-rwxr-xr-xpear/scripts/phpextdist27
-rw-r--r--pear/scripts/phpize.in31
-rwxr-xr-xpear/scripts/phptar.in236
18 files changed, 0 insertions, 1191 deletions
diff --git a/pear/scripts/pear-get.in b/pear/scripts/pear-get.in
deleted file mode 100644
index 5ff308de03..0000000000
--- a/pear/scripts/pear-get.in
+++ /dev/null
@@ -1,58 +0,0 @@
-#!@prefix@/bin/php -Cq
-<?php // -*- PHP -*-
-//
-// +----------------------------------------------------------------------+
-// | PHP Version 4 |
-// +----------------------------------------------------------------------+
-// | Copyright (c) 1997-2002 The PHP Group |
-// +----------------------------------------------------------------------+
-// | This source file is subject to version 2.02 of the PHP license, |
-// | that is bundled with this package in the file LICENSE, and is |
-// | available at through the world-wide-web at |
-// | http://www.php.net/license/2_02.txt. |
-// | If you did not receive a copy of the PHP license and are unable to |
-// | obtain it through the world-wide-web, please send a note to |
-// | license@php.net so we can mail you a copy immediately. |
-// +----------------------------------------------------------------------+
-// | Authors: Stig Bakken <ssb@fast.no> |
-// | Tomas V.V.Cox <cox@idecnet.com> |
-// +----------------------------------------------------------------------+
-//
-
-require_once 'PEAR.php';
-require_once 'PEAR/Remote.php';
-
-error_reporting(E_ALL & ~E_NOTICE);
-
-$subcommands = array(
- 'help' => 'help [command]',
- 'install' => 'install [-r] <package file/name>',
- 'upgrade' => 'upgrade [-r] <package file/name>',
- 'list' => 'list',
- 'info' => 'info <package name>',
-);
-
-$shortcuts = array(
- 'list' => 'remote-list',
- 'upgrade' => 'install',
-);
-
-$command_options = array(
- 'install' => 'fr',
-);
-
-include "pearcmd-common.php";
-
-if (isset($shortcuts[$command])) {
- $realcommand = $shortcuts[$command];
-} else {
- $realcommand = $command;
-}
-
-if (isset($subcommands[$command])) {
- include "pearcmd-$realcommand.php";
-} elseif (!$store_default_config && !$store_user_config) {
- usage();
-}
-
-?>
diff --git a/pear/scripts/pear.bat b/pear/scripts/pear.bat
deleted file mode 100755
index 4a818ef4be..0000000000
--- a/pear/scripts/pear.bat
+++ /dev/null
@@ -1,31 +0,0 @@
-@ECHO OFF
-
-REM ----------------------------------------------------------------------
-REM PHP version 4.0
-REM ----------------------------------------------------------------------
-REM Copyright (c) 1997-2002 The PHP Group
-REM ----------------------------------------------------------------------
-REM This source file is subject to version 2.02 of the PHP license,
-REM that is bundled with this package in the file LICENSE, and is
-REM available at through the world-wide-web at
-REM http://www.php.net/license/2_02.txt.
-REM If you did not receive a copy of the PHP license and are unable to
-REM obtain it through the world-wide-web, please send a note to
-REM license@php.net so we can mail you a copy immediately.
-REM ----------------------------------------------------------------------
-REM Authors: Alexander Merz (alexmerz@php.net)
-REM ----------------------------------------------------------------------
-REM
-REM $Id: pear.bat,v 1.4 2001/10/13 06:22:09 mj Exp $
-
-REM change this four lines to match the paths of your system
-REM -------------------
-set PHP_PATH=c:\php
-set PEAR_INSTALL_DIR=c:\php\pear
-set PEAR_EXTENSION_DIR=c:\php\extensions
-set PEAR_DOC_DIR=c:\php\pear
-REM -------------------
-set DIRECTORY_SEPARATOR=\
-
-%PHP_PATH%\php.exe -q %PEAR_INSTALL_DIR%\scripts\pearwin.php %1 %2 %3 %4 %5 %6
-@ECHO ON \ No newline at end of file
diff --git a/pear/scripts/pear.in b/pear/scripts/pear.in
deleted file mode 100644
index d7bb854b53..0000000000
--- a/pear/scripts/pear.in
+++ /dev/null
@@ -1,58 +0,0 @@
-#!@prefix@/bin/php -Cq
-<?php // -*- PHP -*-
-//
-// +----------------------------------------------------------------------+
-// | PHP Version 4 |
-// +----------------------------------------------------------------------+
-// | Copyright (c) 1997-2002 The PHP Group |
-// +----------------------------------------------------------------------+
-// | This source file is subject to version 2.02 of the PHP license, |
-// | that is bundled with this package in the file LICENSE, and is |
-// | available at through the world-wide-web at |
-// | http://www.php.net/license/2_02.txt. |
-// | If you did not receive a copy of the PHP license and are unable to |
-// | obtain it through the world-wide-web, please send a note to |
-// | license@php.net so we can mail you a copy immediately. |
-// +----------------------------------------------------------------------+
-// | Authors: Stig Bakken <ssb@fast.no> |
-// | Tomas V.V.Cox <cox@idecnet.com> |
-// +----------------------------------------------------------------------+
-//
-
-require_once 'PEAR.php';
-require_once 'PEAR/Common.php';
-require_once 'PEAR/Registry.php';
-
-error_reporting(E_ALL & ~E_NOTICE);
-
-$subcommands = array(
- 'help' => 'help [command]',
- 'uninstall' => 'uninstall [-r] <package name>',
- 'package' => 'package [package info file]',
- 'info' => 'info',
- 'list' => 'list',
- 'show-config' => 'show-config',
-);
-
-$command_options = array(
- "list" => "v",
- "uninstall" => "fr",
-);
-
-include "pearcmd-common.php";
-
-if (isset($subcommands[$command])) {
- include "pearcmd-$command.php";
-} elseif (!$store_default_config && !$store_user_config) {
- usage();
-}
-
-/*
- * Local variables:
- * tab-width: 4
- * c-basic-offset: 4
- * indent-tabs-mode: nil
- * End:
- */
-
-?>
diff --git a/pear/scripts/pearcmd-common.php b/pear/scripts/pearcmd-common.php
deleted file mode 100644
index 6293532451..0000000000
--- a/pear/scripts/pearcmd-common.php
+++ /dev/null
@@ -1,197 +0,0 @@
-<?php
-
-require_once "PEAR/Config.php";
-require_once "Console/Getopt.php";
-
-$progname = basename($argv[0]);
-
-PEAR::setErrorHandling(PEAR_ERROR_PRINT, "$progname: %s\n");
-
-$argv = Console_Getopt::readPHPArgv();
-if (PEAR::isError($argv)) {
- die($argv->getMessage());
-}
-$options = Console_Getopt::getopt($argv, "c:C:d:D:h?sSqu:v");
-if (PEAR::isError($options)) {
- usage($options);
-}
-
-if (OS_WINDOWS) {
- $pear_default_config = PHP_SYSCONFDIR.DIRECTORY_SEPARATOR.'pearsys.ini';
- $pear_user_config = PHP_SYSCONFDIR.DIRECTORY_SEPARATOR.'pear.ini';
-} else {
- $pear_default_config = PHP_SYSCONFDIR.DIRECTORY_SEPARATOR.'pear.conf';
- $pear_user_config = getenv('HOME').DIRECTORY_SEPARATOR.'.pearrc';
-}
-
-$opts = $options[0];
-
-foreach ($opts as $opt) {
- switch ($opt[0]) {
- case 'c':
- $pear_user_config = $opt[1];
- break;
- case 'C':
- $pear_default_config = $opt[1];
- break;
- }
-}
-
-$config = new PEAR_Config($pear_user_config, $pear_default_config);
-$store_user_config = false;
-$store_default_config = false;
-$verbose = 1;
-
-foreach ($opts as $opt) {
- $param = $opt[1];
- switch ($opt[0]) {
- case 'd':
- list($key, $value) = explode('=', $param);
- $config->set($key, $value);
- break;
- case 'D':
- list($key, $value) = explode('=', $param);
- $config->set($key, $value, true);
- break;
- case 's':
- $store_user_config = true;
- break;
- case 'S':
- $store_default_config = true;
- break;
- case 'u':
- $config->toDefault($param);
- break;
- case 'v':
- $verbose++;
- break;
- case 'q':
- $verbose--;
- break;
- }
-}
-
-if ($store_default_config) {
- if (@is_writeable($pear_default_config)) {
- $config->writeConfigFile($pear_default_config, 'default');
- } else {
- die("You don't have write access to $pear_default_config, exiting!\n");
- }
-}
-
-if ($store_user_config) {
- $config->writeConfigFile($pear_user_config, 'userdefined');
-}
-
-$fallback_config = array(
- 'master_server' => 'pear.php.net',
- 'php_dir' => PEAR_INSTALL_DIR,
- 'ext_dir' => PEAR_EXTENSION_DIR,
- 'doc_dir' => PHP_DATADIR . DIRECTORY_SEPARATOR . 'pear' .
- DIRECTORY_SEPARATOR . 'doc',
- 'verbose' => true,
-);
-$fallback_done = array();
-
-foreach ($fallback_config as $key => $value) {
- if (!$config->isDefined($key)) {
- $config->set($key, $value);
- $fallback_done[$key] = true;
- }
-}
-
-//$verbose = $config->get("verbose");
-$script_dir = $config->get("php_dir");
-$ext_dir = $config->get("ext_dir");
-$doc_dir = $config->get("doc_dir");
-
-$command = (isset($options[1][1])) ? $options[1][1] : null;
-$rest = array_slice($options[1], 2);
-
-if (isset($command_options[$command])) {
- $tmp = Console_Getopt::getopt($rest, $command_options[$command]);
- if (PEAR::isError($tmp)) {
- usage($tmp);
- }
- $cmdopts = $tmp[0];
- $cmdargs = $tmp[1];
-} else {
- $cmdopts = array();
- $cmdargs = $rest;
-}
-
-// {{{ usage()
-
-function usage($error = null, $helpsubject = null)
-{
- global $progname, $subcommands;
- $stderr = fopen('php://stderr', 'w');
- if (PEAR::isError($error)) {
- fputs($stderr, $error->getMessage());
- } elseif ($error !== null) {
- fputs($stderr, $error);
- }
- fputs($stderr,
- "Usage: $progname [options] command [command-options] <parameters>\n");
- if ($helpsubject == "options") {
- fputs($stderr,
- "Options:\n".
- " -v increase verbosity level (default 1)\n".
- " -q be quiet, decrease verbosity level\n".
- " -c file find user configuration in `file'\n".
- " -C file find system configuration in `file'\n".
- " -d foo=bar set user config variable `foo' to `bar'\n".
- " -D foo=bar set system config variable `foo' to `bar'\n".
- " -s store user configuration\n".
- " -S store system configuration\n".
- " -u foo unset `foo' in the user configuration\n".
- " -h, -? display help/usage (this message)\n");
- } else {
- fputs($stderr, "Type \"$progname help options\" to list all options.\n");
- }
- fputs($stderr, "Commands:".implode("\n ", $subcommands) . "\n");
- fclose($stderr);
- exit;
-}
-
-// }}}
-// {{{ present_array()
-
-function present_array(&$arr, $keys = null)
-{
- if ($keys === null) {
- $keys = array_keys($arr);
- }
- $longest_key = max(array_map("strlen", array_keys($arr))) + 2;
- $format_string = "%{$longest_key}s : %s\n";
- foreach ($keys as $k) {
- if (is_array($arr[$k])) {
- foreach ($arr[$k] as $i => $value) {
- $x = "$k #$i";
- $cont = array();
- foreach(array_keys($value) as $val) {
- $cont[] = "$val=" . $value[$val];
- }
- $v = implode(", ", $cont);
- printf($format_string, $x, $v);
- }
- continue;
- } else {
- $v = $arr[$k];
- printf($format_string, $k, $v);
- }
- }
-}
-
-// }}}
-// {{{ heading()
-
-function heading($text)
-{
- $l = strlen(trim($text));
- print rtrim($text) . "\n" . str_repeat("=", $l) . "\n";
-}
-
-// }}}
-
-?> \ No newline at end of file
diff --git a/pear/scripts/pearcmd-help.php b/pear/scripts/pearcmd-help.php
deleted file mode 100644
index 5bb8b7db9f..0000000000
--- a/pear/scripts/pearcmd-help.php
+++ /dev/null
@@ -1,9 +0,0 @@
-<?php
-
-if (isset($cmdargs[0])) {
- usage(null, $cmdargs[0]);
-} else {
- usage();
-}
-
-?> \ No newline at end of file
diff --git a/pear/scripts/pearcmd-info.php b/pear/scripts/pearcmd-info.php
deleted file mode 100644
index baa6b883be..0000000000
--- a/pear/scripts/pearcmd-info.php
+++ /dev/null
@@ -1,9 +0,0 @@
-<?php
-
-$parser = new PEAR_Common;
-$parser->setErrorHandling(PEAR_ERROR_DIE, "pear info: %s\n");
-$info = $parser->infoFromTgzFile($cmdargs[0]);
-unset($info['filelist']);
-present_array($info);
-
-?> \ No newline at end of file
diff --git a/pear/scripts/pearcmd-install.php b/pear/scripts/pearcmd-install.php
deleted file mode 100644
index 4a4a349aef..0000000000
--- a/pear/scripts/pearcmd-install.php
+++ /dev/null
@@ -1,33 +0,0 @@
-<?php
-
-include_once 'PEAR/Installer.php';
-$pkgfile = $cmdargs[0];
-$installer =& new PEAR_Installer($script_dir, $ext_dir, $doc_dir);
-$installer->setErrorHandling(PEAR_ERROR_DIE,
- basename($pkgfile) . ": %s\n");
-$installer->debug = $verbose;
-$install_options = array();
-if ($command == 'upgrade') {
- $install_options['upgrade'] = true;
-}
-foreach ($cmdopts as $opt) {
- switch ($opt[0]) {
- case 'r':
- // This option is for use by rpm and other package
- // tools that can install files etc. by itself, but
- // still needs to register the package as installed in
- // PEAR's local registry.
- $install_options['register_only'] = true;
- break;
- case 'f':
- $install_options['force'] = true;
- break;
- }
-}
-if ($installer->install($pkgfile, $install_options, $config)) {
- print "install ok\n";
-} else {
- print "install failed\n";
-}
-
-?> \ No newline at end of file
diff --git a/pear/scripts/pearcmd-list.php b/pear/scripts/pearcmd-list.php
deleted file mode 100644
index 030c0b2c98..0000000000
--- a/pear/scripts/pearcmd-list.php
+++ /dev/null
@@ -1,20 +0,0 @@
-<?php
-
-$reg = new PEAR_Registry;
-$installed = $reg->packageInfo();
-$i = $j = 0;
-heading("Installed packages:");
-foreach ($installed as $package) {
- if ($i++ % 20 == 0) {
- if ($j++ > 0) {
- print "\n";
- }
- printf("%-20s %-10s %s\n",
- "Package", "Version", "State");
- print str_repeat("-", 75)."\n";
- }
- printf("%-20s %-10s %s\n", $package['package'],
- $package['version'], $package['release_state']);
-}
-
-?>
diff --git a/pear/scripts/pearcmd-package.php b/pear/scripts/pearcmd-package.php
deleted file mode 100644
index 5cc485a937..0000000000
--- a/pear/scripts/pearcmd-package.php
+++ /dev/null
@@ -1,15 +0,0 @@
-<?php
-
-include_once 'PEAR/Packager.php';
-$pkginfofile = isset($cmdargs[0]) ? $cmdargs[0] : null;
-$packager =& new PEAR_Packager($script_dir, $ext_dir, $doc_dir);
-$packager->setErrorHandling(PEAR_ERROR_DIE, "pear page: %s\n");
-$packager->debug = $verbose;
-if (PEAR::isError($packager->Package($pkginfofile))) {
- print "\npackage failed\n";
-} else {
- print "package ok\n";
-}
-
-
-?> \ No newline at end of file
diff --git a/pear/scripts/pearcmd-remote-list.php b/pear/scripts/pearcmd-remote-list.php
deleted file mode 100644
index d30a4679fe..0000000000
--- a/pear/scripts/pearcmd-remote-list.php
+++ /dev/null
@@ -1,24 +0,0 @@
-<?php
-
-$remote = new PEAR_Remote($config);
-$result = $remote->call('package.listAll', 1);
-$i = $j = 0;
-heading("Available packages");
-foreach ($result as $package => $info) {
- if ($i++ % 20 == 0) {
- if ($j++ > 0) {
- print "\n";
- }
- printf("%-20s %-10s %-15s %s\n",
- "Package", "Stable", "Lead", "Category");
- print str_repeat("-", 75)."\n";
- }
- if (empty($info['stable'])) {
- $info['stable'] = '(none)';
- }
- $stable = (string)$info['stable'];
- printf("%-20s %-10s %-15s %s\n", $info['name'],
- $info['stable'], $info['lead'], $info['category']);
-}
-
-?> \ No newline at end of file
diff --git a/pear/scripts/pearcmd-show-config.php b/pear/scripts/pearcmd-show-config.php
deleted file mode 100644
index 0ebc70a38a..0000000000
--- a/pear/scripts/pearcmd-show-config.php
+++ /dev/null
@@ -1,16 +0,0 @@
-<?php
-
-$keys = $config->getKeys();
-foreach ($keys as $key) {
- $value = $config->get($key);
- $xi = "";
- if ($config->isDefaulted($key)) {
- $xi .= " (default)";
- }
- if (isset($fallback_done[$key])) {
- $xi .= " (built-in)";
- }
- printf("%s = %s%s\n", $key, $value, $xi);
-}
-
-?> \ No newline at end of file
diff --git a/pear/scripts/pearcmd-uninstall.php b/pear/scripts/pearcmd-uninstall.php
deleted file mode 100644
index 18f4e41931..0000000000
--- a/pear/scripts/pearcmd-uninstall.php
+++ /dev/null
@@ -1,26 +0,0 @@
-<?php
-
-include_once 'PEAR/Installer.php';
-$pkgfile = $cmdargs[0];
-$installer =& new PEAR_Installer($script_dir, $ext_dir, $doc_dir);
-$installer->setErrorHandling(PEAR_ERROR_DIE,
- basename($pkgfile) . ": %s\n");
-$installer->debug = $verbose;
-$uninstall_options = array();
-foreach ($cmdopts as $opt) {
- switch ($opt[0]) {
- case 'r':
- $uninstall_options['register_only'] = true;
- break;
- case 'f':
- $uninstall_options['force'] = true;
- break;
- }
-}
-if ($installer->uninstall($pkgfile, $uninstall_options)) {
- print "uninstall ok\n";
-} else {
- print "uninstall failed\n";
-}
-
-?>
diff --git a/pear/scripts/pearize.in b/pear/scripts/pearize.in
deleted file mode 100644
index 1a17d3f2d0..0000000000
--- a/pear/scripts/pearize.in
+++ /dev/null
@@ -1,225 +0,0 @@
-#!@prefix@/bin/php -Cq
-<?php // -*- PHP -*-
-
-main($argc, $argv, $_ENV);
-
-// {{{ main()
-
-function main(&$argc, &$argv, &$env)
-{
- global $debug;
- $debug = false;
- $file = check_options($argc, $argv, $env);
- parse_package_file($file);
- make_makefile_in($env);
-}
-
-// }}}
-// {{{ check_options()
-
-function check_options($argc, $argv, $env)
-{
- global $debug;
- array_shift($argv);
- while ($argv[0]{0} == '-' && $argv[0] != '-') {
- $opt = array_shift($argv);
- switch ($opt) {
- case '--': {
- break 2;
- }
- case '-d': {
- $debug = true;
- break;
- }
- default: {
- die("pearize: unrecognized option `$opt'\n");
- }
- }
- }
- $file = array_shift($argv);
- if (empty($file)) {
- $file = "package.xml";
- } elseif ($file == '-') {
- $file = "php://stdin";
- }
- return $file;
-}
-
-// }}}
-// {{{ make_makefile_in()
-
-function make_makefile_in(&$env)
-{
- global $libdata, $debug;
- if (sizeof($libdata) > 1) {
- die("No support yet for multiple libraries in one package.\n");
- }
-
- if ($debug) {
- $wp = fopen("php://stdout", "w");
- } else {
- $wp = @fopen("Makefile.in", "w");
- }
- if (is_resource($wp)) {
- print "Creating Makefile.in...";
- flush();
- } else {
- die("Could not create Makefile.in in current directory.\n");
- }
-
- $who = $env["USER"];
- $when = gmdate('Y-m-d h:i');
- fwrite($wp, "# This file was generated by `pearize' by $who at $when GMT\n\n");
-
- foreach ($libdata as $lib => $info) {
- extract($info);
- fwrite($wp, "\
-INCLUDES = $includes
-LTLIBRARY_NAME = lib{$lib}.la
-LTLIBRARY_SOURCES = $sources
-LTLIBRARY_SHARED_NAME = {$lib}.la
-LTLIBRARY_SHARED_LIBADD = $libadd
-");
- }
-
- if (sizeof($libdata) > 0) {
- fwrite($wp, "include \$(top_srcdir)/build/dynlib.mk\n");
- }
- fclose($wp);
- print "done.\n";
-}
-
-// }}}
-// {{{ parse_package_file()
-
-function parse_package_file($file)
-{
- global $in_file, $curlib, $curelem, $libdata, $cdata;
- global $currinstalldir, $baseinstalldir;
-
- $in_file = false;
- $curlib = '';
- $curelem = '';
- $libdata = array();
- $cdata = array();
- $baseinstalldir = array();
- $currinstalldir = array();
-
- $xp = xml_parser_create();
- xml_set_element_handler($xp, "start_handler", "end_handler");
- xml_set_character_data_handler($xp, "cdata_handler");
- xml_parser_set_option($xp, XML_OPTION_CASE_FOLDING, false);
-
- $fp = @fopen($file, "r");
- if (!is_resource($fp)) {
- die("Could not open file `$file'.\n");
- }
- while (!feof($fp)) {
- xml_parse($xp, fread($fp, 2048), feof($fp));
- }
- xml_parser_free($xp);
-}
-
-// }}}
-// {{{ start_handler()
-
-function start_handler($xp, $elem, $attrs)
-{
- global $cdata, $in_file, $curelem, $curfile, $filerole;
- global $baseinstalldir, $currinstalldir;
- switch ($elem) {
- case "file": {
- $curfile = '';
- $filerole = $attrs['role'];
- switch ($filerole) {
- case "ext": {
- $in_file = true;
- $cdata = array();
- break;
- }
- case "php": default: {
- break;
- }
- }
- break;
- }
- case "dir": {
- $cdir = $currinstalldir[sizeof($currinstalldir)-1];
- $bdir = $baseinstalldir[sizeof($baseinstalldir)-1];
- array_push($currinstalldir, "$cdir/{$attrs[name]}");
- if (isset($attrs["baseinstalldir"])) {
- array_push($baseinstalldir, "$bdir/{$attrs[baseinstalldir]}");
- } else {
- array_push($baseinstalldir, $bdir);
- }
- break;
- }
- case "includes":
- case "libname":
- case "libadd":
- case "sources": {
- $curelem = $elem;
- break;
- }
- }
-}
-
-// }}}
-// {{{ end_handler()
-
-function end_handler($xp, $elem)
-{
- global $in_file, $curlib, $curelem, $libdata, $cdata;
- global $baseinstalldir, $currinstalldir;
- switch ($elem) {
- case "file": {
- if ($in_file === true) {
- $libname = trim($cdata['libname']);
- $libdata[$libname] = array(
- "sources" => trim($cdata['sources']),
- "includes" => trim($cdata['includes']),
- "libadd" => trim($cdata['libadd']),
- );
- $in_file = false;
- }
- break;
- }
- case "dir": {
- array_pop($currinstalldir);
- array_pop($baseinstalldir);
- break;
- }
- }
-}
-
-// }}}
-// {{{ cdata_handler()
-
-function cdata_handler($xp, $data)
-{
- global $curelem, $cdata, $curfile;
- switch ($curelem) {
- case "file": {
- $curfile .= $data;
- break;
- }
- case "includes":
- case "libadd":
- case "libname":
- case "sources": {
- $cdata[$curelem] .= $data;
- break;
- }
- }
-}
-
-// }}}
-
-/*
- * Local variables:
- * tab-width: 4
- * c-basic-offset: 4
- * indent-tabs-mode: t
- * End:
- */
-?>
diff --git a/pear/scripts/pearwin.php b/pear/scripts/pearwin.php
deleted file mode 100644
index b58a8cbb6e..0000000000
--- a/pear/scripts/pearwin.php
+++ /dev/null
@@ -1,150 +0,0 @@
-<?php
-//
-// +----------------------------------------------------------------------+
-// | PHP Version 4 |
-// +----------------------------------------------------------------------+
-// | Copyright (c) 1997-2002 The PHP Group |
-// +----------------------------------------------------------------------+
-// | This source file is subject to version 2.02 of the PHP license, |
-// | that is bundled with this package in the file LICENSE, and is |
-// | available at through the world-wide-web at |
-// | http://www.php.net/license/2_02.txt. |
-// | If you did not receive a copy of the PHP license and are unable to |
-// | obtain it through the world-wide-web, please send a note to |
-// | license@php.net so we can mail you a copy immediately. |
-// +----------------------------------------------------------------------+
-// | Authors: Stig Bakken <ssb@fast.no> |
-// | Tomas V.V.Cox <cox@idecnet.com> |
-// +----------------------------------------------------------------------+
-//
-// $Id$
-
-require_once 'PEAR.php';
-require_once 'Console/Getopt.php';
-
-error_reporting(E_ALL ^ E_NOTICE);
-
-$options = Console_Getopt::getopt($argv, "h?v:e:p:d:");
-if (PEAR::isError($options)) {
- usage($options);
-}
-
-$opts = $options[0];
-foreach ($opts as $opt) {
- $param = $opt[1];
- switch ($opt[0]) {
- case 'v':
- $verbose = $param;
- break;
- case 'e':
- if ($param{0} != getenv('DIRECTORY_SEPARATOR')) {
- usage (new PEAR_Error("no absolute path (eg. /usr/lib/php)\n"));
- }
- $ext_dir = $param;
- break;
- case 'p':
- if ($param{0} != getenv('DIRECTORY_SEPARATOR')) {
- usage (new PEAR_Error("no absolute path (eg. /usr/lib/php)\n"));
- }
- $script_dir = $param;
- break;
- case 'd':
- if ($param{0} != getenv('DIRECTORY_SEPARATOR')) {
- usage (new PEAR_Error("no absolute path (eg. /usr/lib/php)\n"));
- }
- $doc_dir = $param;
- break;
- }
-}
-
-$verbose = (isset($verbose)) ? $verbose : 1;
-$script_dir = (isset($script_dir)) ? $script_dir : getenv('PEAR_INSTALL_DIR');
-$ext_dir = (isset($ext_dir)) ? $ext_dir : getenv('PEAR_EXTENSION_DIR');
-$doc_dir = (isset($doc_dir)) ? $doc_dir : '';
-
-PEAR::setErrorHandling(PEAR_ERROR_PRINT);
-$command = $options[1][1];
-
-switch ($command) {
- case 'install':
- include_once 'PEAR/Installer.php';
- $package = $options[1][2];
- $installer =& new PEAR_Installer($script_dir, $ext_dir, $doc_dir);
- $installer->debug = $verbose;
- if (PEAR::isError($installer->Install($package))) {
- print "\ninstall failed\n";
- } else {
- print "install ok\n";
- }
- break;
- case 'uninstall':
- include_once 'PEAR/Installer.php';
- $package = $options[1][2];
- $installer =& new PEAR_Installer($script_dir, $ext_dir, $doc_dir);
- $installer->debug = $verbose;
- if (PEAR::isError($installer->uninstall($package))) {
- print "\nuninstall failed\n";
- } else {
- print "uninstall ok\n";
- }
- break;
- case 'list-installed':
- include_once 'PEAR/Registry.php';
- $reg = new PEAR_Registry($script_dir);
- $installed = $reg->packageInfo();
- $i = $j = 0;
- print("Installed packages:\n");
- foreach ($installed as $package) {
- if ($i++ % 20 == 0) {
- if ($j++ > 0) {
- print "\n";
- }
- printf("%-20s %-10s %s\n",
- "Package", "Version", "State");
- print str_repeat("-", 75)."\n";
- }
- printf("%-20s %-10s %s\n", $package['package'],
- $package['version'], $package['release_state']);
- }
- break;
- case 'package':
- include_once 'PEAR/Packager.php';
- $pkginfofile = $options[1][2];
- $packager =& new PEAR_Packager($script_dir, $ext_dir, $doc_dir);
- $packager->debug = $verbose;
- if (PEAR::isError($packager->Package($pkginfofile))) {
- print "\npackage failed\n";
- } else {
- print "package ok\n";
- }
- break;
- default:
- usage();
- break;
-}
-
-function usage($obj = null)
-{
- $stderr = fopen('php://stderr', 'w');
- if ($obj !== null) {
- fputs($stderr, $obj->getMessage());
- }
- fputs($stderr,
- "Usage: pear [-v n] [-h] [-p <dir>] [-e <dir>] [-d <dir>] command <parameters>\n".
- "Options:\n".
- " -v set verbosity level to <n> (0-2, default 1)\n".
- " -p <dir> set script install dir (absolute path)\n".
- " -e <dir> set extension install dir (absolute path)\n".
- " -d <dir> set documentation dest dir (absolute path)\n".
- " -h, -? display help/usage (this message)\n".
- "Commands:\n".
- " list-installed \n".
- " install <package file>\n".
- " uninstall <package file>\n".
- " package [package info file]\n".
- "\n");
- fclose($stderr);
- exit;
-}
-
-?> \ No newline at end of file
diff --git a/pear/scripts/php-config.in b/pear/scripts/php-config.in
deleted file mode 100644
index c2f850a000..0000000000
--- a/pear/scripts/php-config.in
+++ /dev/null
@@ -1,26 +0,0 @@
-#! /bin/sh
-
-prefix="@prefix@"
-version="@VERSION@"
-includedir="@includedir@/php"
-includes="-I$includedir -I$includedir/main -I$includedir/Zend"
-if test '@TSRM_DIR@' != ''; then
- includes="$includes -I$includedir/TSRM"
-fi
-extension_dir='@EXTENSION_DIR@'
-
-case "$1" in
---prefix)
- echo $prefix;;
---includes)
- echo $includes;;
---extension-dir)
- echo $extension_dir;;
---version)
- echo $version;;
-*)
- echo "Usage: $0 [--prefix|--includes|--extension-dir|--version]"
- exit 1;;
-esac
-
-exit 0
diff --git a/pear/scripts/phpextdist b/pear/scripts/phpextdist
deleted file mode 100755
index 97df70020d..0000000000
--- a/pear/scripts/phpextdist
+++ /dev/null
@@ -1,27 +0,0 @@
-#! /bin/sh
-if test $# -lt 2; then
- echo "usage: phpextdist <extension> <version>";
- exit 1
-fi
-
-phpize=`php-config --prefix`/bin/phpize
-distname="$1-$2"
-
-if test ! -f Makefile.in || test ! -f config.m4; then
- echo "Did not find required files in current directory"
- exit 1
-fi
-
-rm -rf modules *.lo *.o *.la config.status config.cache \
-config.log libtool php_config.h config_vars.mk Makefile
-
-myname=`basename \`pwd\``
-cd ..
-cp -rp $myname $distname
-cd $distname
-$phpize
-cd ..
-tar cf $distname.tar $distname
-rm -rf $distname $distname.tar.*
-gzip --best $distname.tar
-mv $distname.tar.gz $myname
diff --git a/pear/scripts/phpize.in b/pear/scripts/phpize.in
deleted file mode 100644
index 33b5ad2cfb..0000000000
--- a/pear/scripts/phpize.in
+++ /dev/null
@@ -1,31 +0,0 @@
-#! /bin/sh
-
-prefix='@prefix@'
-phpdir="$prefix/lib/php/build"
-builddir="`pwd`"
-FILES_BUILD="dynlib.mk fastgen.sh library.mk ltlib.mk mkdep.awk program.mk rules.mk rules_common.mk rules_pear.mk shtool"
-FILES="acinclude.m4 dynlib.m4"
-
-if test ! -r config.m4; then
- echo "Cannot find config.m4. "
- echo "Make sure that you run $0 in the top level source directory of the module"
- exit 1
-fi
-
-test -d build || mkdir build
-
-(cd $phpdir && cp $FILES_BUILD $builddir/build)
-(cd $phpdir && cp $FILES $builddir)
-
-mv build/rules_pear.mk build/rules.mk
-
-sed \
--e "s#@prefix@#$prefix#" \
-< $phpdir/pear.m4 > configure.in
-
-touch install-sh mkinstalldirs missing
-
-aclocal
-autoconf
-autoheader
-libtoolize -f -c
diff --git a/pear/scripts/phptar.in b/pear/scripts/phptar.in
deleted file mode 100755
index 08361c1d0a..0000000000
--- a/pear/scripts/phptar.in
+++ /dev/null
@@ -1,236 +0,0 @@
-#!@prefix@/bin/php -Cq
-<?php // -*- PHP -*-
-
-// {{{ setup
-
-define('S_IFDIR', 0040000); // Directory
-define('S_IFCHR', 0020000); // Character device
-define('S_IFBLK', 0060000); // Block device
-define('S_IFREG', 0100000); // Regular file
-define('S_IFIFO', 0010000); // FIFO
-define('S_IFLNK', 0120000); // Symbolic link
-define('S_IFSOCK', 0140000); // Socket
-
-require_once "PEAR.php";
-require_once "Archive/Tar.php";
-require_once "Console/Getopt.php";
-
-// }}}
-// {{{ options
-
-$verbose = false;
-$op_create = false;
-$op_list = false;
-$op_extract = false;
-$use_gzip = false;
-$file = '';
-
-$progname = basename(array_shift($argv));
-
-$options = Console_Getopt::getopt($argv, "h?ctxvzf:");
-if (PEAR::isError($options)) {
- usage($options);
-}
-
-$opts = $options[0];
-foreach ($opts as $opt) {
- switch ($opt[0]) {
- case 'v': {
- $verbose = true;
- break;
- }
- case 'c': {
- $op_create = true;
- break;
- }
- case 't': {
- $op_list = true;
- break;
- }
- case 'x': {
- $op_extract = true;
- break;
- }
- case 'z': {
- $use_gzip = true;
- break;
- }
- case 'f': {
- $file = $opt[1];
- break;
- }
- case 'h':
- case '?': {
- usage();
- break;
- }
- }
-}
-
-if ($op_create + $op_list + $op_extract > 1) {
- usage("Only one of -c, -t and -x can be specified at once!");
-}
-
-if ($op_create + $op_list + $op_extract == 0) {
- usage("Please specify either -c, -t or -x!");
-}
-
-if (empty($file)) {
- if ($op_create) {
- $file = "php://stdout";
- } else {
- $file = "php://stdin";
- }
-}
-
-// }}}
-
-$tar = new Archive_Tar($file, $use_gzip);
-$tar->setErrorHandling(PEAR_ERROR_DIE, "$progname error: %s\n");
-
-if ($op_create) {
- do_create($tar, $options[1]);
- $tar->create($options[1]);
-} elseif ($op_list) {
- do_list($tar, $verbose);
-} elseif ($op_extract) {
- do_extract($tar);
-}
-
-// {{{ getrwx()
-
-function getrwx($bits) {
- $str = '';
- $str .= ($bits & 4) ? 'r' : '-';
- $str .= ($bits & 2) ? 'w' : '-';
- $str .= ($bits & 1) ? 'x' : '-';
- return $str;
-}
-
-// }}}
-// {{{ getfiletype()
-
-function getfiletype($bits) {
- static $map = array(
- '-' => S_IFREG,
- 'd' => S_IFDIR,
- 'l' => S_IFLNK,
- 'c' => S_IFCHR,
- 'b' => S_IFBLK,
- 'p' => S_IFIFO,
- 's' => S_IFSOCK,
- );
- foreach ($map as $char => $mask) {
- if ($bits & $mask) {
- return $char;
- }
- }
-}
-
-// }}}
-// {{{ getuser()
-
-function getuser($uid) {
- static $cache = array();
- if (isset($cache[$uid])) {
- return $cache[$uid];
- }
- if (function_exists("posix_getpwuid")) {
- if (is_array($user = @posix_getpwuid($uid))) {
- $cache[$uid] = $user['name'];
- return $user['name'];
- }
- }
- $cache[$uid] = $uid;
- return $uid;
-}
-
-// }}}
-// {{{ getgroup()
-
-function getgroup($gid) {
- static $cache = array();
- if (isset($cache[$gid])) {
- return $cache[$gid];
- }
- if (function_exists("posix_getgrgid")) {
- if (is_array($group = @posix_getgrgid($gid))) {
- $cache[$gid] = $group['name'];
- return $group['name'];
- }
- }
- $cache[$gid] = $gid;
- return $gid;
-}
-
-// }}}
-// {{{ do_create()
-
-function do_create(&$tar, &$files)
-{
- $tar->create($files);
-}
-
-// }}}
-// {{{ do_list()
-
-function do_list(&$tar, $verbose)
-{
- static $rwx = array(4 => 'r', 2 => 'w', 1 => 'x');
- $files = $tar->listContent();
- if (is_array($files) && sizeof($files) > 0) {
- foreach ($files as $file) {
- if ($verbose) {
- $fm = (int)$file['mode'];
- $mode = sprintf('%s%s%s%s', getfiletype($fm),
- getrwx(($fm >> 6) & 7), getrwx(($fm >> 3) & 7),
- getrwx($fm & 7));
- $owner = getuser($file['uid']) . '/' . getgroup($file['gid']);
- printf("%10s %-11s %7d %s %s\n", $mode, $owner, $file['size'],
- date('Y-m-d H:i:s', $file['mtime']), $file['filename']);
- } else {
- printf("%s\n", $file['filename']);
- }
- }
- }
-}
-
-// }}}
-// {{{ do_extract()
-
-function do_extract(&$tar, $destdir = ".")
-{
- $tar->extract($destdir);
-}
-
-// }}}
-// {{{ usage()
-
-function usage($errormsg = '')
-{
- global $progname;
- $fp = fopen("php://stderr", "w");
- if ($errormsg) {
- if (PEAR::isError($errormsg)) {
- fwrite($fp, $errormsg->getMessage() . "\n");
- } else {
- fwrite($fp, "$errormsg\n");
- }
- }
- fwrite($fp, "$progname [-h|-?] {-c|-t|-x} [-z] [-v] [-f file] [file(s)...]
-Options:
- -h, -? Show this screen
- -c Create archive
- -t List archive
- -x Extract archive
- -z Run input/output through gzip
- -f file Use <file> as input or output (default is stdin/stdout)
-
-");
- fclose($fp);
- exit;
-}
-
-// }}}
-
-?>