diff options
author | SVN Migration <svn@php.net> | 2001-08-08 15:06:09 +0000 |
---|---|---|
committer | SVN Migration <svn@php.net> | 2001-08-08 15:06:09 +0000 |
commit | 22909a77ef3489ef6be3c860d0002ea66c4436f0 (patch) | |
tree | 480ca7c565161cc36eddc9f8eee073ef10be3019 /pear/scripts | |
parent | 2f6cd308f9a8c53e0ce359603f4746b27bc32356 (diff) | |
download | php-git-PRE_METHOD_DEREFERENCE_PATCH.tar.gz |
This commit was manufactured by cvs2svn to create tagPRE_METHOD_DEREFERENCE_PATCH
'PRE_METHOD_DEREFERENCE_PATCH'.
Diffstat (limited to 'pear/scripts')
-rw-r--r-- | pear/scripts/pear.in | 116 | ||||
-rw-r--r-- | pear/scripts/pearize.in | 172 | ||||
-rw-r--r-- | pear/scripts/php-config.in | 23 | ||||
-rwxr-xr-x | pear/scripts/phpextdist | 27 | ||||
-rw-r--r-- | pear/scripts/phpize.in | 31 |
5 files changed, 0 insertions, 369 deletions
diff --git a/pear/scripts/pear.in b/pear/scripts/pear.in deleted file mode 100644 index 08adc72573..0000000000 --- a/pear/scripts/pear.in +++ /dev/null @@ -1,116 +0,0 @@ -#!@prefix@/bin/php -Cq -<?php // -*- C++ -*- -// -// +----------------------------------------------------------------------+ -// | PHP version 4.0 | -// +----------------------------------------------------------------------+ -// | Copyright (c) 1997-2001 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 '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} != DIRECTORY_SEPARATOR) { - usage (new PEAR_Error("no absolute path (ej. /usr/lib/php)\n")); - } - $ext_dir = $param; - break; - case 'p': - if ($param{0} != DIRECTORY_SEPARATOR) { - usage (new PEAR_Error("no absolute path (ej. /usr/lib/php)\n")); - } - $script_dir = $param; - break; - case 'd': - if ($param{0} != DIRECTORY_SEPARATOR) { - usage (new PEAR_Error("no absolute path (ej. /usr/lib/php)\n")); - } - $doc_dir = $param; - break; - } -} - -$verbose = (isset($verbose)) ? $verbose : 1; -$script_dir = (isset($script_dir)) ? $script_dir : PEAR_INSTALL_DIR; -$ext_dir = (isset($ext_dir)) ? $ext_dir : 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 '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". - " install <package file>\n". - " package [package info file]\n". - "\n"); - fclose($stderr); - exit; -} - -?> diff --git a/pear/scripts/pearize.in b/pear/scripts/pearize.in deleted file mode 100644 index 332f3333aa..0000000000 --- a/pear/scripts/pearize.in +++ /dev/null @@ -1,172 +0,0 @@ -#!@prefix@/bin/php -Cq -<?php // -*- PHP -*- - -main($argc, $argv, $HTTP_ENV_VARS); - -// {{{ main() - -function main(&$argc, &$argv, &$env) -{ - $file = check_options($argc, $argv, $env); - parse_package_file($file); - make_makefile_in($env); -} - -// }}} -// {{{ check_options() - -function check_options(&$argc, &$argv, &$env) -{ - $file = $argv[1]; - if (empty($file)) { - $file = "package.xml"; - } - return $file; -} - -// }}} -// {{{ make_makefile_in() - -function make_makefile_in(&$env) -{ - global $libdata; - if (sizeof($libdata) == 0) { - exit; - } elseif (sizeof($libdata) > 1) { - die("No support yet for multiple libraries in one package.\n"); - } - - $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"); - } - - foreach ($libdata as $lib => $info) { - extract($info); - $_who = $env["USER"]; - $_when = gmdate('Y-m-d h:i'); - fwrite($wp, "\ -# This file was generated by `pearize' by $_who at $_when GMT -INCLUDES = $includes -LTLIBRARY_NAME = lib{$lib}.la -LTLIBRARY_SOURCES = $sources -LTLIBRARY_SHARED_NAME = {$lib}.la -LTLIBRARY_SHARED_LIBADD = $libadd - -include \$(top_srcdir)/build/dynlib.mk -"); - } - fclose($wp); - print "done.\n"; -} - -// }}} -// {{{ parse_package_file() - -function parse_package_file($file) -{ - global $in_file, $curlib, $curelem, $libdata, $cdata; - - $in_file = false; - $curlib = ''; - $curelem = ''; - $libdata = array(); - $cdata = 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; - switch ($elem) { - case "File": { - switch ($attrs['Role']) { - case "ext": { - $in_file = true; - $cdata = array(); - break; - } - case "php": default: { - break; - } - } - 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; - 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; - } - } -} - -// }}} -// {{{ cdata_handler() - -function cdata_handler($xp, $data) -{ - global $curelem, $cdata; - switch ($curelem) { - 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/php-config.in b/pear/scripts/php-config.in deleted file mode 100644 index 62acb5ac68..0000000000 --- a/pear/scripts/php-config.in +++ /dev/null @@ -1,23 +0,0 @@ -#! /bin/sh - -prefix="@prefix@" -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;; -*) - echo "Usage: $0 [--prefix|--includes|--extension-dir]" - 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 |