Bug 170472 - New port: devel/streamhtmlparser A stream html parser library from Google
Summary: New port: devel/streamhtmlparser A stream html parser library from Google
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Matthias Andree
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-08-08 03:00 UTC by HU Dong
Modified: 2012-08-15 00:00 UTC (History)
0 users

See Also:


Attachments
file.shar (3.90 KB, text/plain)
2012-08-08 03:00 UTC, HU Dong
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description HU Dong 2012-08-08 03:00:12 UTC
Description: A stream html parser library from Google

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

Redports: https://redports.org/buildarchive/20120807072717-14449/

Fix: Patch attached with submission follows:
Comment 1 Matthias Andree freebsd_committer freebsd_triage 2012-08-14 23:37:10 UTC
Responsible Changed
From-To: freebsd-ports-bugs->mandree

I'll take it.
Comment 2 dfilter service freebsd_committer freebsd_triage 2012-08-14 23:53:04 UTC
Author: mandree
Date: Tue Aug 14 22:52:54 2012
New Revision: 302535
URL: http://svn.freebsd.org/changeset/ports/302535

Log:
  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>

Added:
  head/devel/streamhtmlparser/
  head/devel/streamhtmlparser/Makefile   (contents, props changed)
  head/devel/streamhtmlparser/distinfo   (contents, props changed)
  head/devel/streamhtmlparser/pkg-descr   (contents, props changed)
  head/devel/streamhtmlparser/pkg-plist   (contents, props changed)
Modified:
  head/devel/Makefile

Modified: head/devel/Makefile
==============================================================================
--- head/devel/Makefile	Tue Aug 14 21:33:05 2012	(r302534)
+++ head/devel/Makefile	Tue Aug 14 22:52:54 2012	(r302535)
@@ -3995,6 +3995,7 @@
     SUBDIR += stormlib-ghost++
     SUBDIR += str
     SUBDIR += strace
+    SUBDIR += streamhtmlparser
     SUBDIR += stringencoders
     SUBDIR += styx
     SUBDIR += subclipse

Added: head/devel/streamhtmlparser/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/streamhtmlparser/Makefile	Tue Aug 14 22:52:54 2012	(r302535)
@@ -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>

Added: head/devel/streamhtmlparser/distinfo
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/streamhtmlparser/distinfo	Tue Aug 14 22:52:54 2012	(r302535)
@@ -0,0 +1,2 @@
+SHA256 (streamhtmlparser-0.1.tar.gz) = b9289b0d75e85a077a2d539ac7e8a5c66ffcee8f3c1f9de800ea542c66e308b2
+SIZE (streamhtmlparser-0.1.tar.gz) = 460945

Added: head/devel/streamhtmlparser/pkg-descr
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/streamhtmlparser/pkg-descr	Tue Aug 14 22:52:54 2012	(r302535)
@@ -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/

Added: head/devel/streamhtmlparser/pkg-plist
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/streamhtmlparser/pkg-plist	Tue Aug 14 22:52:54 2012	(r302535)
@@ -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
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 3 Matthias Andree freebsd_committer freebsd_triage 2012-08-14 23:54:15 UTC
State Changed
From-To: open->closed

New port added, with minor changes. Thanks!  Note that I have removed 
the SHARED non-option, so as not to confuse users with an option they 
cannot disable.  Note also that I needed to add USE_PYTHON to fix the 
build (else the Python includes would not be found) and have reformatted 
pkg-descr.