diff options
author | Ying-Chieh Liao <ijliao@FreeBSD.org> | 2004-08-23 06:13:12 +0000 |
---|---|---|
committer | Ying-Chieh Liao <ijliao@FreeBSD.org> | 2004-08-23 06:13:12 +0000 |
commit | ec2569e7716a67b26bdacd3d0d3fe555db197ccb (patch) | |
tree | 0676e18cf66192c7e8f60e6a64636fec0e761f4e | |
parent | f980e2ae2030625d2c695e5837454678b5fb226d (diff) |
Notes
-rw-r--r-- | devel/Makefile | 1 | ||||
-rw-r--r-- | devel/py-bison/Makefile | 46 | ||||
-rw-r--r-- | devel/py-bison/distinfo | 2 | ||||
-rw-r--r-- | devel/py-bison/files/patch-setup.py | 19 | ||||
-rw-r--r-- | devel/py-bison/pkg-descr | 24 | ||||
-rw-r--r-- | devel/py-bison/pkg-plist | 5 |
6 files changed, 97 insertions, 0 deletions
diff --git a/devel/Makefile b/devel/Makefile index ba124ed495fc..79e3e8b2567e 100644 --- a/devel/Makefile +++ b/devel/Makefile @@ -1123,6 +1123,7 @@ SUBDIR += pwlib SUBDIR += py-anonfunc SUBDIR += py-ansistyle + SUBDIR += py-bison SUBDIR += py-cheetah SUBDIR += py-ciphon SUBDIR += py-clientcookie diff --git a/devel/py-bison/Makefile b/devel/py-bison/Makefile new file mode 100644 index 000000000000..88d9f6acad31 --- /dev/null +++ b/devel/py-bison/Makefile @@ -0,0 +1,46 @@ +# ex:ts=8 +# Ports collection makefile for: py-bison +# Date created: Aug 23, 2004 +# Whom: ijliao +# +# $FreeBSD$ +# + +PORTNAME= bison +PORTVERSION= 0.1.8 +CATEGORIES= devel python +MASTER_SITES= http://www.freenet.org.nz/python/pybison/ +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} +DISTNAME= py${PORTNAME}-${PORTVERSION} + +MAINTAINER= ports@FreeBSD.org +COMMENT= Python-based parsing at the speed of C + +BUILD_DEPENDS= ${PYTHON_SITELIBDIR}/Pyrex/__init__.py:${PORTSDIR}/devel/pyrex +RUN_DEPENDS= bison:${PORTSDIR}/devel/bison + +USE_PYTHON= yes +USE_PYDISTUTILS= yes + +.if !defined(NOPORTDOCS) +DOCSDIR= ${PREFIX}/share/doc/${PKGNAMEPREFIX}${PORTNAME} +EXAMPLESDIR= ${PREFIX}/share/examples/${PKGNAMEPREFIX}${PORTNAME} +.endif + +.if !defined(NOPORTDOCS) +post-install: + @${MKDIR} ${DOCSDIR} + ${CP} -R ${WRKSRC}/doc/ ${DOCSDIR} + @${FIND} ${DOCSDIR} ! -type d | \ + ${SED} 's,^${PREFIX}/,,' >> ${TMPPLIST} + @${FIND} ${DOCSDIR} -type d | ${SORT} -r | \ + ${SED} 's,^${PREFIX}/,@dirrm ,' >> ${TMPPLIST} + @${MKDIR} ${EXAMPLESDIR} + ${CP} -R ${WRKSRC}/examples/ ${EXAMPLESDIR} + @${FIND} ${EXAMPLESDIR} ! -type d | \ + ${SED} 's,^${PREFIX}/,,' >> ${TMPPLIST} + @${FIND} ${EXAMPLESDIR} -type d | ${SORT} -r | \ + ${SED} 's,^${PREFIX}/,@dirrm ,' >> ${TMPPLIST} +.endif + +.include <bsd.port.mk> diff --git a/devel/py-bison/distinfo b/devel/py-bison/distinfo new file mode 100644 index 000000000000..65802bff6ced --- /dev/null +++ b/devel/py-bison/distinfo @@ -0,0 +1,2 @@ +MD5 (pybison-0.1.8.tar.gz) = c57ea56225c205dff1b7291d9a9f1048 +SIZE (pybison-0.1.8.tar.gz) = 115211 diff --git a/devel/py-bison/files/patch-setup.py b/devel/py-bison/files/patch-setup.py new file mode 100644 index 000000000000..7772dcbff82e --- /dev/null +++ b/devel/py-bison/files/patch-setup.py @@ -0,0 +1,19 @@ +--- setup.py.orig Sat Apr 24 10:05:41 2004 ++++ setup.py Mon Jul 26 14:20:35 2004 +@@ -24,6 +24,16 @@ + extra_link_args = [] + bison2pyscript = 'utils/bison2py' + bisondynlibModule = "src/c/bisondynlib-linux.c" ++elif sys.platform == 'freebsd4': ++ libs = [] ++ extra_link_args = [] ++ bison2pyscript = 'utils/bison2py' ++ bisondynlibModule = "src/c/bisondynlib-linux.c" ++elif sys.platform == 'freebsd5': ++ libs = [] ++ extra_link_args = [] ++ bison2pyscript = 'utils/bison2py' ++ bisondynlibModule = "src/c/bisondynlib-linux.c" + else: + print "Sorry, your platform is presently unsupported" + sys.exit(1) diff --git a/devel/py-bison/pkg-descr b/devel/py-bison/pkg-descr new file mode 100644 index 000000000000..af34108552f3 --- /dev/null +++ b/devel/py-bison/pkg-descr @@ -0,0 +1,24 @@ +PyBison is a Python binding to the Bison (yacc) and Flex (lex) +parser-generator utilities. + +It allows parsers to be quickly and easily developed as Python class +declarations, and for these parsers to take advantage of the fast and +powerful C-based Bison/Flex. + +Users write a subclass of a basic Parser object, containing a set of methods +and attributes specifying the grammar and lexical analysis rules, and taking +callbacks for providing parser input, and receiving parser target events. + +Features + * Runs at near the speed of C-based parsers, due to direct hooks into + bison-generated C code + * Full LALR(1) grammar support + * Includes a utility to convert your legacy grammar (.y) and scanner (.l) + scripts into python modules compatible with PyBison + * Easy to understand - the walkthrough and the examples will have you + writing your own parsers in minutes + * Comfortable and intuitive callback mechanisms + * Can export parse tree to XML with a simple method call + * Can reconstitute a parse tree from XML + +WWW: http://www.freenet.org.nz/python/pybison/ diff --git a/devel/py-bison/pkg-plist b/devel/py-bison/pkg-plist new file mode 100644 index 000000000000..b03243bdea79 --- /dev/null +++ b/devel/py-bison/pkg-plist @@ -0,0 +1,5 @@ +bin/bison2py +%%PYTHON_SITELIBDIR%%/bison.py +%%PYTHON_SITELIBDIR%%/bison.pyc +%%PYTHON_SITELIBDIR%%/bison.pyo +%%PYTHON_SITELIBDIR%%/bison_.so |