Add new port devel/streamhtmlparser.

Implementation of an html and javascript context scanner with no
lookahead. Its purpose is to scan an html document and provide context
information at any point within the input stream. An example of a user
of this scanner would be an auto escaping templating system, which would
require html context information at very specific points within the html
stream. The implementation is based on a simplified state machine of
HTML4.1 and javascript. The code also contains C++ and python bindings.

WWW: http://code.google.com/p/streamhtmlparser/

PR:		ports/170472
Submitted by:	HU Dong <itechbear@gmail.com>
This commit is contained in:
Matthias Andree 2012-08-14 22:52:54 +00:00
parent 313192e015
commit 34ef8f82d0
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=302535
5 changed files with 84 additions and 0 deletions

View file

@ -3995,6 +3995,7 @@
SUBDIR += stormlib-ghost++
SUBDIR += str
SUBDIR += strace
SUBDIR += streamhtmlparser
SUBDIR += stringencoders
SUBDIR += styx
SUBDIR += subclipse

View file

@ -0,0 +1,54 @@
# New ports collection makefile for: streamhtmlparser
# Date created: 7 August 2012
# Whom: HU Dong <itechbear@gmail.com>
#
# $FreeBSD$
#
PORTNAME= streamhtmlparser
PORTVERSION= 0.1
CATEGORIES= devel
MASTER_SITES= ${MASTER_SITE_GOOGLE_CODE}
MAINTAINER= itechbear@gmail.com
COMMENT= C/C++/Python streaming HTML parser library from Google
GNU_CONFIGURE= yes
USE_GMAKE= yes
USE_LDCONFIG= yes
CONFIGURE_ARGS+=--enable-shared
OPTIONS_DEFINE= DOCS STATIC PYBINDINGS
PYBINDINGS_DESC=Install Python bindings
STATIC_DESC= Install static library
OPTIONS_DEFAULT=STATIC
.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MPYBINDINGS}
USE_PYTHON= yes
CONFIGURE_ARGS+=--enable-python
CFLAGS+= -I${PYTHON_INCLUDEDIR}
PLIST_SUB+= PYBINDINGS=""
.else
CONFIGURE_ARGS+=--disable-python
PLIST_SUB+= PYBINDINGS="@comment "
.endif
.if ${PORT_OPTIONS:MSTATIC}
CONFIGURE_ARGS+=--enable-static
PLIST_SUB+= STATIC=""
.else
CONFIGURE_ARGS+=--disable-static
PLIST_SUB+= STATIC="@comment "
.endif
.include <bsd.port.pre.mk>
post-patch:
@${REINPLACE_CMD} -e 's|^docdir.*|docdir = ${DOCSDIR}|' ${WRKSRC}/Makefile.in
.if defined(NOPORTDOCS)
@${REINPLACE_CMD} -E -e '/^install-data-am/,/^$$/ s,install-dist_docDATA,,g' ${WRKSRC}/Makefile.in
.endif
.include <bsd.port.post.mk>

View file

@ -0,0 +1,2 @@
SHA256 (streamhtmlparser-0.1.tar.gz) = b9289b0d75e85a077a2d539ac7e8a5c66ffcee8f3c1f9de800ea542c66e308b2
SIZE (streamhtmlparser-0.1.tar.gz) = 460945

View file

@ -0,0 +1,9 @@
Implementation of an html and javascript context scanner with no
lookahead. Its purpose is to scan an html document and provide context
information at any point within the input stream. An example of a user
of this scanner would be an auto escaping templating system, which would
require html context information at very specific points within the html
stream. The implementation is based on a simplified state machine of
HTML4.1 and javascript. The code also contains C++ and python bindings.
WWW: http://code.google.com/p/streamhtmlparser/

View file

@ -0,0 +1,18 @@
%%PYBINDINGS%%%%PYTHON_SITELIBDIR%%/py_streamhtmlparser.so
%%STATIC%%lib/libstreamhtmlparser.a
lib/libstreamhtmlparser.so
lib/libstreamhtmlparser.so.0
%%PORTDOCS%%%%DOCSDIR%%/AUTHORS
%%PORTDOCS%%%%DOCSDIR%%/COPYING
%%PORTDOCS%%%%DOCSDIR%%/ChangeLog
%%PORTDOCS%%%%DOCSDIR%%/INSTALL
%%PORTDOCS%%%%DOCSDIR%%/NEWS
%%PORTDOCS%%%%DOCSDIR%%/README
%%PORTDOCS%%@dirrm %%DOCSDIR%%
%%PORTDOCS%%@unexec %D/%%DOCSDIR%% 2>/dev/null || true
include/streamhtmlparser/statemachine.h
include/streamhtmlparser/jsparser.h
include/streamhtmlparser/htmlparser.h
include/streamhtmlparser/htmlparser_cpp.h
@dirrm include/streamhtmlparser
@unexec %D/include/streamhtmlparser 2>/dev/null || true