diff options
author | ashish <ashish@FreeBSD.org> | 2011-08-24 01:44:59 +0800 |
---|---|---|
committer | ashish <ashish@FreeBSD.org> | 2011-08-24 01:44:59 +0800 |
commit | 1bcd43862c2c06e834118ec765f1d8d5bf447378 (patch) | |
tree | 9562db67236581a2d996a2e82690506afaf651ae /devel | |
parent | cf8c6788b111574ec88b8057993bd2e5fbdb83aa (diff) | |
download | freebsd-ports-gnome-1bcd43862c2c06e834118ec765f1d8d5bf447378.tar.gz freebsd-ports-gnome-1bcd43862c2c06e834118ec765f1d8d5bf447378.tar.zst freebsd-ports-gnome-1bcd43862c2c06e834118ec765f1d8d5bf447378.zip |
phpsh is an interactive shell for php that features readline
history, tab completion, quick access to documentation. It
was developed at Facebook and ironically, is written mostly
in python. It is open source and released under a modified
BSD license.
WWW: http://phpsh.org/
Diffstat (limited to 'devel')
-rw-r--r-- | devel/Makefile | 1 | ||||
-rw-r--r-- | devel/phpsh/Makefile | 48 | ||||
-rw-r--r-- | devel/phpsh/distinfo | 2 | ||||
-rw-r--r-- | devel/phpsh/files/patch-README.md | 23 | ||||
-rw-r--r-- | devel/phpsh/files/patch-setup.py | 36 | ||||
-rw-r--r-- | devel/phpsh/files/patch-src_doc_phpsh.1 | 23 | ||||
-rw-r--r-- | devel/phpsh/files/patch-src_doc_phpsh.1.html | 28 | ||||
-rw-r--r-- | devel/phpsh/files/patch-src_doc_phpsh.1.txt | 28 | ||||
-rw-r--r-- | devel/phpsh/files/patch-src_manual.py | 14 | ||||
-rw-r--r-- | devel/phpsh/files/patch-src_phpsh | 14 | ||||
-rw-r--r-- | devel/phpsh/files/patch-src_phpsh.php | 32 | ||||
-rw-r--r-- | devel/phpsh/files/patch-src_phpsh.py | 14 | ||||
-rw-r--r-- | devel/phpsh/pkg-descr | 7 | ||||
-rw-r--r-- | devel/phpsh/pkg-message | 5 | ||||
-rw-r--r-- | devel/phpsh/pkg-plist | 55 |
15 files changed, 330 insertions, 0 deletions
diff --git a/devel/Makefile b/devel/Makefile index 0ee26e16974c..4f8b11332f46 100644 --- a/devel/Makefile +++ b/devel/Makefile @@ -2806,6 +2806,7 @@ SUBDIR += php52-sysvshm SUBDIR += php52-tokenizer SUBDIR += phpbt + SUBDIR += phpsh SUBDIR += phptags SUBDIR += physfs SUBDIR += physfs-devel diff --git a/devel/phpsh/Makefile b/devel/phpsh/Makefile new file mode 100644 index 000000000000..02b4dd3ec388 --- /dev/null +++ b/devel/phpsh/Makefile @@ -0,0 +1,48 @@ +# New ports collection makefile for: phpsh +# Date created: 2011-08-22 +# Whom: Ashish SHUKLA <ashish@FreeBSD.org> +# +# $FreeBSD$ +# + +PORTNAME= phpsh +PORTVERSION= 20110513 +CATEGORIES= devel +MASTER_SITES= http://wahjava.users.sourceforge.net/%SUBDIR%/ \ + ${MASTER_SITE_LOCAL} +MASTER_SITE_SUBDIR= ashish + +MAINTAINER= ashish@FreeBSD.org +COMMENT= An interactive shell for PHP + +USE_BZIP2= yes +USE_PYTHON= 2.6+ +USE_PYDISTUTILS= yes +USE_PHP= pcre posix tokenizer + +WANT_PHP_CLI= yes + +PLIST_SUB= PORTNAME=${PORTNAME} + +PYDISTUTILS_PKGVERSION= 1.3 + +MAN1= phpsh.1 + +OPTIONS= PCNTL "Fork on every command (requires PHP extension pcntl)" OFF + +.include <bsd.port.options.mk> + +.if defined(WITH_PCNTL) +USE_PHP+= pcntl +.endif + +.include <bsd.port.pre.mk> + +post-patch: + @${GREP} -Rl '%%PREFIX%%' ${WRKSRC} |${XARGS} ${REINPLACE_CMD} \ + -e 's,%%PREFIX%%,${PREFIX},g' + +post-install: + @${CAT} ${PKGMESSAGE} + +.include <bsd.port.post.mk> diff --git a/devel/phpsh/distinfo b/devel/phpsh/distinfo new file mode 100644 index 000000000000..bba3d471bedc --- /dev/null +++ b/devel/phpsh/distinfo @@ -0,0 +1,2 @@ +SHA256 (phpsh-20110513.tar.bz2) = 992c74367e4ed13f1c92d2bcec680b1823ddcf9b598512d78b0f868245f8ec32 +SIZE (phpsh-20110513.tar.bz2) = 4166990 diff --git a/devel/phpsh/files/patch-README.md b/devel/phpsh/files/patch-README.md new file mode 100644 index 000000000000..98158cf021b5 --- /dev/null +++ b/devel/phpsh/files/patch-README.md @@ -0,0 +1,23 @@ + +$FreeBSD$ + +--- README.md.orig ++++ README.md +@@ -25,7 +25,7 @@ + + Installing Globally + =================== +-_Note that this install currently clobbers any previous /etc/phpsh/rc.php_ ++_Note that this install currently clobbers any previous %%PREFIX%%/etc/phpsh/rc.php_ + * `python setup.py build` + * `sudo python setup.py install` + * `phpsh` +@@ -56,7 +56,7 @@ + + Autoloading + ----------- +-* Modify /etc/phpsh/rc.php. Then: ++* Modify %%PREFIX%%/etc/phpsh/rc.php. Then: + * `cd ~/www` + * `phpsh` + * And for times when you just want vanilla php: diff --git a/devel/phpsh/files/patch-setup.py b/devel/phpsh/files/patch-setup.py new file mode 100644 index 000000000000..8c437916cde7 --- /dev/null +++ b/devel/phpsh/files/patch-setup.py @@ -0,0 +1,36 @@ + +$FreeBSD$ + +--- setup.py.orig ++++ setup.py +@@ -7,15 +7,15 @@ + sys.path.insert(0, 'src') + from phpsh import __version__ + +-if len(sys.argv) > 1 and sys.argv[1] == "build": +- build_root = os.path.dirname(os.path.realpath(__file__)) +- make_dir = os.path.join(build_root, "src/xdebug-clients/geben") +- p = Popen(["make", "-C", make_dir]) +- os.waitpid(p.pid, 0) ++### EMACS:if len(sys.argv) > 1 and sys.argv[1] == "build": ++### EMACS: build_root = os.path.dirname(os.path.realpath(__file__)) ++### EMACS: make_dir = os.path.join(build_root, "src/xdebug-clients/geben") ++### EMACS: p = Popen(["gmake", "-C", make_dir]) ++### EMACS: os.waitpid(p.pid, 0) + + # something better than this? + if os.getenv("USER") == "root": +- config_dir = "/etc/phpsh" ++ config_dir = "%%PREFIX%%/etc/phpsh" + else: + config_dir = os.getenv("HOME") + "/.phpsh" + +@@ -33,7 +33,7 @@ + "xdebug-clients/geben/LICENSE", + "xdebug-clients/geben/Makefile", + "xdebug-clients/geben/geben.el", +- "xdebug-clients/geben/geben.elc", ++### EMACS: "xdebug-clients/geben/geben.elc", + "xdebug-clients/geben/help", + "xdebug-clients/geben/tree-widget/geben/*.png"]}, + scripts=["src/phpsh", "src/dbgp-phpsh.py"], diff --git a/devel/phpsh/files/patch-src_doc_phpsh.1 b/devel/phpsh/files/patch-src_doc_phpsh.1 new file mode 100644 index 000000000000..c772a32396a0 --- /dev/null +++ b/devel/phpsh/files/patch-src_doc_phpsh.1 @@ -0,0 +1,23 @@ + +$FreeBSD$ + +--- src/doc/phpsh.1.orig ++++ src/doc/phpsh.1 +@@ -56,7 +56,7 @@ + + .TP + \-c, \-\-codebase\-mode +-Use "\-c none" to load no codebase\&. See /etc/phpsh/phpshrc\&.php for other codebase modes\&. ++Use "\-c none" to load no codebase\&. See %%PREFIX%%/etc/phpsh/phpshrc\&.php for other codebase modes\&. + .TP + \-t, \-\-test\-file + Run a saved\-phpsh\-session unit test file\&. See test/ in the phpsh distribution for examples\&. +@@ -141,7 +141,7 @@ + + .SH "CONFIGURATION" + +-Config file support was added in phpsh\-1\&.2\&. When phpsh starts up it tries to read its configuration from /etc/phpsh/config, then from $HOME/\&.phpsh/config\&. If either file is not present or not readable, it is ignored\&. Entries in the per\-user config file $HOME/\&.phpsh/config override the corresponding entries in the host\-wide config file /etc/phpsh/config\&. ++Config file support was added in phpsh\-1\&.2\&. When phpsh starts up it tries to read its configuration from %%PREFIX%%/etc/phpsh/config, then from $HOME/\&.phpsh/config\&. If either file is not present or not readable, it is ignored\&. Entries in the per\-user config file $HOME/\&.phpsh/config override the corresponding entries in the host\-wide config file %%PREFIX%%/etc/phpsh/config\&. + + The config file consists of sections containing key:value pairs\&. Lines starting with # are ignored\&. All settings are optional and have reasonable default values\&. Section names are in brackets\&. A section name must be present in the config file if any settings in that section are present\&. The following configuration settings are supported: + diff --git a/devel/phpsh/files/patch-src_doc_phpsh.1.html b/devel/phpsh/files/patch-src_doc_phpsh.1.html new file mode 100644 index 000000000000..dc9de29d30dc --- /dev/null +++ b/devel/phpsh/files/patch-src_doc_phpsh.1.html @@ -0,0 +1,28 @@ + +$FreeBSD$ + +--- src/doc/phpsh.1.html.orig ++++ src/doc/phpsh.1.html +@@ -58,7 +58,7 @@ + </b></dt> + <dd> + <p> +- Use "-c none" to load no codebase. See /etc/phpsh/phpshrc.php for ++ Use "-c none" to load no codebase. See %%PREFIX%%/etc/phpsh/phpshrc.php for + other codebase modes. + </p> + </dd> +@@ -404,11 +404,11 @@ + without X Windows by starting emacs with geben manually in another terminal.</p> + <h2><a name="_configuration"></a>CONFIGURATION</h2> + <p>Config file support was added in phpsh-1.2. When phpsh starts up it +-tries to read its configuration from /etc/phpsh/config, then from ++tries to read its configuration from %%PREFIX%%/etc/phpsh/config, then from + $HOME/.phpsh/config. If either file is not present or not readable, it + is ignored. Entries in the per-user config file $HOME/.phpsh/config + override the corresponding entries in the host-wide config file +-/etc/phpsh/config.</p> ++%%PREFIX%%/etc/phpsh/config.</p> + <p>The config file consists of sections containing key:value pairs. + Lines starting with # are ignored. All settings are optional and have + reasonable default values. Section names are in brackets. A section diff --git a/devel/phpsh/files/patch-src_doc_phpsh.1.txt b/devel/phpsh/files/patch-src_doc_phpsh.1.txt new file mode 100644 index 000000000000..75e3e8e60505 --- /dev/null +++ b/devel/phpsh/files/patch-src_doc_phpsh.1.txt @@ -0,0 +1,28 @@ + +$FreeBSD$ + +--- src/doc/phpsh.1.txt.orig ++++ src/doc/phpsh.1.txt +@@ -51,7 +51,7 @@ + ------- + -c:: + --codebase-mode:: +- Use "-c none" to load no codebase. See /etc/phpsh/phpshrc.php for ++ Use "-c none" to load no codebase. See %%PREFIX%%/etc/phpsh/phpshrc.php for + other codebase modes. + + -t:: +@@ -221,11 +221,11 @@ + CONFIGURATION + ------------- + Config file support was added in phpsh-1.2. When phpsh starts up it +-tries to read its configuration from /etc/phpsh/config, then from ++tries to read its configuration from %%PREFIX%%/etc/phpsh/config, then from + $HOME/.phpsh/config. If either file is not present or not readable, it + is ignored. Entries in the per-user config file $HOME/.phpsh/config + override the corresponding entries in the host-wide config file +-/etc/phpsh/config. ++%%PREFIX%%/etc/phpsh/config. + + The config file consists of sections containing key:value pairs. + Lines starting with # are ignored. All settings are optional and have diff --git a/devel/phpsh/files/patch-src_manual.py b/devel/phpsh/files/patch-src_manual.py new file mode 100644 index 000000000000..2af11bd2dd97 --- /dev/null +++ b/devel/phpsh/files/patch-src_manual.py @@ -0,0 +1,14 @@ + +$FreeBSD$ + +--- src/manual.py.orig ++++ src/manual.py +@@ -69,7 +69,7 @@ + manual_file = "php_manual.db" + manual_path = os.path.join(os.getenv("HOME"), ".phpsh", manual_file) + if not os.path.exists(manual_path): +- manual_path = os.path.join("/etc/phpsh", manual_file) ++ manual_path = os.path.join("%%PREFIX%%/etc/phpsh", manual_file) + conn = sqlite.connect(manual_path) + cursor = conn.cursor() + diff --git a/devel/phpsh/files/patch-src_phpsh b/devel/phpsh/files/patch-src_phpsh new file mode 100644 index 000000000000..d124e871fd9a --- /dev/null +++ b/devel/phpsh/files/patch-src_phpsh @@ -0,0 +1,14 @@ + +$FreeBSD$ + +--- src/phpsh.orig ++++ src/phpsh +@@ -10,7 +10,7 @@ + p = OptionParser(usage=usage, version="%prog " + __version__) + p.add_option("-c", "--codebase-mode", + help="""Use "-c none" to load no codebase. +-See /etc/phpsh/rc.php for other codebase modes.""") ++See %%PREFIX%%/etc/phpsh/rc.php for other codebase modes.""") + p.add_option("-t", "--test-file", + help="""Run a saved-phpsh-session unit test file. + See test/ in the phpsh distribution for examples.""") diff --git a/devel/phpsh/files/patch-src_phpsh.php b/devel/phpsh/files/patch-src_phpsh.php new file mode 100644 index 000000000000..14c5dfe93b59 --- /dev/null +++ b/devel/phpsh/files/patch-src_phpsh.php @@ -0,0 +1,32 @@ + +$FreeBSD$ + +--- src/phpsh.php.orig ++++ src/phpsh.php +@@ -10,7 +10,7 @@ + // usage: this is only called from phpsh (the python end), as: + // phpsh.php <comm-file> <codebase-mode> [-c] + // +-// use '' for default codebase-mode, define others in /etc/phpsh/rc.php ++// use '' for default codebase-mode, define others in %%PREFIX%%/etc/phpsh/rc.php + // -c turns off color + + // set the TFBENV to script +@@ -46,7 +46,7 @@ + if (file_exists($___phpsh___homerc)) { + require_once $___phpsh___homerc; + } else { +- require_once '/etc/phpsh/rc.php'; ++ require_once '%%PREFIX%%/etc/phpsh/rc.php'; + } + + $___phpsh___do_color = true; +@@ -547,7 +547,7 @@ + $err_msg = + 'Not executing input: Possible call to undefined function '. + $undefd_func."()\n". +- 'See /etc/phpsh/config.sample to disable UndefinedFunctionCheck.'; ++ 'See %%PREFIX%%/etc/phpsh/config.sample to disable UndefinedFunctionCheck.'; + } + } + if ($err_msg) { diff --git a/devel/phpsh/files/patch-src_phpsh.py b/devel/phpsh/files/patch-src_phpsh.py new file mode 100644 index 000000000000..7c8df0104c0d --- /dev/null +++ b/devel/phpsh/files/patch-src_phpsh.py @@ -0,0 +1,14 @@ + +$FreeBSD$ + +--- src/phpsh.py.orig ++++ src/phpsh.py +@@ -274,7 +274,7 @@ + self.config.add_section("Emacs") + + def read(self): +- config_files = ["/etc/phpsh/config"] ++ config_files = ["%%PREFIX%%/etc/phpsh/config"] + home = os.getenv("HOME") + if home: + homestr = home.strip() diff --git a/devel/phpsh/pkg-descr b/devel/phpsh/pkg-descr new file mode 100644 index 000000000000..e19f83746a92 --- /dev/null +++ b/devel/phpsh/pkg-descr @@ -0,0 +1,7 @@ +phpsh is an interactive shell for php that features readline +history, tab completion, quick access to documentation. It +was developed at Facebook and ironically, is written mostly +in python. It is open source and released under a modified +BSD license. + +WWW: http://phpsh.org/ diff --git a/devel/phpsh/pkg-message b/devel/phpsh/pkg-message new file mode 100644 index 000000000000..5c04a41266ee --- /dev/null +++ b/devel/phpsh/pkg-message @@ -0,0 +1,5 @@ +============================================================================== + +GEBEN functionality included in phpsh is not tested yet. Patches are welcome. + +============================================================================== diff --git a/devel/phpsh/pkg-plist b/devel/phpsh/pkg-plist new file mode 100644 index 000000000000..e138f5367ee6 --- /dev/null +++ b/devel/phpsh/pkg-plist @@ -0,0 +1,55 @@ +bin/dbgp-%%PORTNAME%%.py +bin/%%PORTNAME%% +%%ETCDIR%%/config.sample +%%ETCDIR%%/php_manual.db +%%ETCDIR%%/rc.php +%%PYTHON_SITELIBDIR%%/%%PORTNAME%%/__init__.py +%%PYTHON_SITELIBDIR%%/%%PORTNAME%%/__init__.pyc +%%PYTHON_SITELIBDIR%%/%%PORTNAME%%/__init__.pyo +%%PYTHON_SITELIBDIR%%/%%PORTNAME%%/ansicolor.py +%%PYTHON_SITELIBDIR%%/%%PORTNAME%%/ansicolor.pyc +%%PYTHON_SITELIBDIR%%/%%PORTNAME%%/ansicolor.pyo +%%PYTHON_SITELIBDIR%%/%%PORTNAME%%/cmd_util.py +%%PYTHON_SITELIBDIR%%/%%PORTNAME%%/cmd_util.pyc +%%PYTHON_SITELIBDIR%%/%%PORTNAME%%/cmd_util.pyo +%%PYTHON_SITELIBDIR%%/%%PORTNAME%%/ctags.py +%%PYTHON_SITELIBDIR%%/%%PORTNAME%%/ctags.pyc +%%PYTHON_SITELIBDIR%%/%%PORTNAME%%/ctags.pyo +%%PYTHON_SITELIBDIR%%/%%PORTNAME%%/dbgp-%%PORTNAME%%.py +%%PYTHON_SITELIBDIR%%/%%PORTNAME%%/dbgp-%%PORTNAME%%.pyc +%%PYTHON_SITELIBDIR%%/%%PORTNAME%%/dbgp-%%PORTNAME%%.pyo +%%PYTHON_SITELIBDIR%%/%%PORTNAME%%/html2text.py +%%PYTHON_SITELIBDIR%%/%%PORTNAME%%/html2text.pyc +%%PYTHON_SITELIBDIR%%/%%PORTNAME%%/html2text.pyo +%%PYTHON_SITELIBDIR%%/%%PORTNAME%%/manual.py +%%PYTHON_SITELIBDIR%%/%%PORTNAME%%/manual.pyc +%%PYTHON_SITELIBDIR%%/%%PORTNAME%%/manual.pyo +%%PYTHON_SITELIBDIR%%/%%PORTNAME%%/%%PORTNAME%%.el +%%PYTHON_SITELIBDIR%%/%%PORTNAME%%/%%PORTNAME%%.php +%%PYTHON_SITELIBDIR%%/%%PORTNAME%%/%%PORTNAME%%.py +%%PYTHON_SITELIBDIR%%/%%PORTNAME%%/%%PORTNAME%%.pyc +%%PYTHON_SITELIBDIR%%/%%PORTNAME%%/%%PORTNAME%%.pyo +%%PYTHON_SITELIBDIR%%/%%PORTNAME%%/rc.php +%%PYTHON_SITELIBDIR%%/%%PORTNAME%%/tests.py +%%PYTHON_SITELIBDIR%%/%%PORTNAME%%/tests.pyc +%%PYTHON_SITELIBDIR%%/%%PORTNAME%%/tests.pyo +%%PYTHON_SITELIBDIR%%/%%PORTNAME%%/xdebug-clients/geben/LICENSE +%%PYTHON_SITELIBDIR%%/%%PORTNAME%%/xdebug-clients/geben/Makefile +%%PYTHON_SITELIBDIR%%/%%PORTNAME%%/xdebug-clients/geben/README +%%PYTHON_SITELIBDIR%%/%%PORTNAME%%/xdebug-clients/geben/geben.el +%%PYTHON_SITELIBDIR%%/%%PORTNAME%%/xdebug-clients/geben/help +%%PYTHON_SITELIBDIR%%/%%PORTNAME%%/xdebug-clients/geben/tree-widget/geben/close.png +%%PYTHON_SITELIBDIR%%/%%PORTNAME%%/xdebug-clients/geben/tree-widget/geben/empty.png +%%PYTHON_SITELIBDIR%%/%%PORTNAME%%/xdebug-clients/geben/tree-widget/geben/end-guide.png +%%PYTHON_SITELIBDIR%%/%%PORTNAME%%/xdebug-clients/geben/tree-widget/geben/guide.png +%%PYTHON_SITELIBDIR%%/%%PORTNAME%%/xdebug-clients/geben/tree-widget/geben/handle.png +%%PYTHON_SITELIBDIR%%/%%PORTNAME%%/xdebug-clients/geben/tree-widget/geben/leaf.png +%%PYTHON_SITELIBDIR%%/%%PORTNAME%%/xdebug-clients/geben/tree-widget/geben/no-guide.png +%%PYTHON_SITELIBDIR%%/%%PORTNAME%%/xdebug-clients/geben/tree-widget/geben/no-handle.png +%%PYTHON_SITELIBDIR%%/%%PORTNAME%%/xdebug-clients/geben/tree-widget/geben/open.png +@dirrm %%PYTHON_SITELIBDIR%%/%%PORTNAME%%/xdebug-clients/geben/tree-widget/geben +@dirrm %%PYTHON_SITELIBDIR%%/%%PORTNAME%%/xdebug-clients/geben/tree-widget +@dirrm %%PYTHON_SITELIBDIR%%/%%PORTNAME%%/xdebug-clients/geben +@dirrm %%PYTHON_SITELIBDIR%%/%%PORTNAME%%/xdebug-clients +@dirrm %%PYTHON_SITELIBDIR%%/%%PORTNAME%% +@dirrm %%ETCDIR%% |