diff options
author | pgj <pgj@FreeBSD.org> | 2010-01-03 07:18:07 +0800 |
---|---|---|
committer | pgj <pgj@FreeBSD.org> | 2010-01-03 07:18:07 +0800 |
commit | 4ceb8d9ade95422b2bac7de6e9e8ee415e5183c2 (patch) | |
tree | dc7cf233391921cbe485957a30ee118c8299a8e4 /textproc | |
parent | 454bea27cbcc349eac8a9935f8c8bd2fa452b955 (diff) | |
download | freebsd-ports-gnome-4ceb8d9ade95422b2bac7de6e9e8ee415e5183c2.tar.gz freebsd-ports-gnome-4ceb8d9ade95422b2bac7de6e9e8ee415e5183c2.tar.zst freebsd-ports-gnome-4ceb8d9ade95422b2bac7de6e9e8ee415e5183c2.zip |
TagSoup is a Haskell library for extracting information out of
unstructured HTML code, sometimes known as tag-soup. The HTML does not
have to be well formed, or render properly within any particular
framework. This library is for situations where the author of the HTML
is not cooperating with the person trying to extract the information, but
is also not trying to hide the information.
WWW: http://www-users.cs.york.ac.uk/~ndm/tagsoup/
PR: ports/142183
Submitted by: Jacula Modyun <jacula(at)gmail.com>
Diffstat (limited to 'textproc')
-rw-r--r-- | textproc/Makefile | 1 | ||||
-rw-r--r-- | textproc/hs-tagsoup/Makefile | 83 | ||||
-rw-r--r-- | textproc/hs-tagsoup/distinfo | 3 | ||||
-rw-r--r-- | textproc/hs-tagsoup/pkg-descr | 8 | ||||
-rw-r--r-- | textproc/hs-tagsoup/pkg-plist | 24 |
5 files changed, 119 insertions, 0 deletions
diff --git a/textproc/Makefile b/textproc/Makefile index aa0b0a0326a4..acfec289680f 100644 --- a/textproc/Makefile +++ b/textproc/Makefile @@ -220,6 +220,7 @@ SUBDIR += hs-highlighting-kate-ghc SUBDIR += hs-polyparse-ghc SUBDIR += hs-stringsearch + SUBDIR += hs-tagsoup SUBDIR += hsb-aspell SUBDIR += htdig SUBDIR += html diff --git a/textproc/hs-tagsoup/Makefile b/textproc/hs-tagsoup/Makefile new file mode 100644 index 000000000000..9d574ae11486 --- /dev/null +++ b/textproc/hs-tagsoup/Makefile @@ -0,0 +1,83 @@ +# New ports collection makefile for: hs-tagsoup +# Date created: December 20 2009 +# Whom: Giuseppe Pilichi aka Jacula Modyun <jacula@gmail.com> +# +# $FreeBSD$ +# + +PORTNAME= tagsoup +PORTVERSION= 0.6 +CATEGORIES= textproc haskell +MASTER_SITES= http://hackage.haskell.org/packages/archive/${PORTNAME}/${PORTVERSION}/ +PKGNAMEPREFIX= hs- + +MAINTAINER= jacula@gmail.com +COMMENT= A Haskell library for extracting information from HTML documents + +BUILD_DEPENDS+= ghc:${PORTSDIR}/lang/ghc +RUN_DEPENDS+= ghc:${PORTSDIR}/lang/ghc +LIB_DEPENDS+= gmp.8:${PORTSDIR}/math/libgmp4 + +GHC_VERSION= 6.10.4 +TAGSOUP_VERSION= ${PORTVERSION} + +GHC_CMD= ${LOCALBASE}/bin/ghc +SETUP_CMD= ./setup + +DATADIR= ${PREFIX}/share/${DISTNAME} +PORTDATA= * + +DOCSDIR= ${PREFIX}/share/doc/${DISTNAME} +TAGSOUP_LIBDIR_REL= lib/${DISTNAME} + +PLIST_SUB= GHC_VERSION=${GHC_VERSION} \ + TAGSOUP_VERSION=${TAGSOUP_VERSION} \ + TAGSOUP_LIBDIR_REL=${TAGSOUP_LIBDIR_REL} + +.if defined(NOPORTDOCS) +PLIST_SUB+= NOPORTDOCS="" +.else +PLIST_SUB+= NOPORTDOCS="@comment " +.endif + +.if !defined(NOPORTDOCS) + +PORT_HADDOCK!= (cd ${.CURDIR}/../../lang/ghc && ${MAKE} -V PORT_HADDOCK) +.if !empty(PORT_HADDOCK:M?0) +BUILD_DEPENDS+= haddock:${PORTSDIR}/devel/hs-haddock +.endif +BUILD_DEPENDS+= HsColour:${PORTSDIR}/print/hs-hscolour + +HSCOLOUR_VERSION= 1.15 +HSCOLOUR_DATADIR= ${PREFIX}/share/hscolour-${HSCOLOUR_VERSION} + +PORTDOCS= * +.endif + +.SILENT: + +do-configure: + cd ${WRKSRC} && ${GHC_CMD} --make Setup.hs -o setup -package Cabal \ + && ${SETUP_CMD} configure --haddock-options=-w --prefix=${PREFIX} + +do-build: + cd ${WRKSRC} && ${SETUP_CMD} build \ + && ${SETUP_CMD} register --gen-script + +.if !defined(NOPORTDOCS) + cd ${WRKSRC} && ${SETUP_CMD} haddock --hyperlink-source --executables \ + --hscolour-css=${HSCOLOUR_DATADIR}/hscolour.css +.endif + +do-install: + cd ${WRKSRC} && ${SETUP_CMD} install \ + && ${INSTALL_SCRIPT} register.sh ${PREFIX}/${TAGSOUP_LIBDIR_REL}/register.sh +.if !defined(NOPORTDATA) + ${MKDIR} ${DATADIR} && cd ${WRKSRC} && ${INSTALL_DATA} ${WRKSRC}/tagsoup.htm ${DATADIR} \ + && ${COPYTREE_SHARE} Example ${DATADIR} +.endif + +post-install: + ${RM} -f ${PREFIX}/lib/ghc-${GHC_VERSION}/package.conf.old + +.include <bsd.port.mk> diff --git a/textproc/hs-tagsoup/distinfo b/textproc/hs-tagsoup/distinfo new file mode 100644 index 000000000000..2b47434c1f71 --- /dev/null +++ b/textproc/hs-tagsoup/distinfo @@ -0,0 +1,3 @@ +MD5 (tagsoup-0.6.tar.gz) = 4db416463189292609b4cd3d0e867ccd +SHA256 (tagsoup-0.6.tar.gz) = 4331accd178fd5d4ca6dd9debe39da245f44be44a70134453441b4ef14683a78 +SIZE (tagsoup-0.6.tar.gz) = 21627 diff --git a/textproc/hs-tagsoup/pkg-descr b/textproc/hs-tagsoup/pkg-descr new file mode 100644 index 000000000000..d17760e1e693 --- /dev/null +++ b/textproc/hs-tagsoup/pkg-descr @@ -0,0 +1,8 @@ +TagSoup is a Haskell library for extracting information out of +unstructured HTML code, sometimes known as tag-soup. The HTML does not +have to be well formed, or render properly within any particular +framework. This library is for situations where the author of the HTML +is not cooperating with the person trying to extract the information, but +is also not trying to hide the information. + +WWW: http://www-users.cs.york.ac.uk/~ndm/tagsoup/ diff --git a/textproc/hs-tagsoup/pkg-plist b/textproc/hs-tagsoup/pkg-plist new file mode 100644 index 000000000000..09d7184eb3a9 --- /dev/null +++ b/textproc/hs-tagsoup/pkg-plist @@ -0,0 +1,24 @@ +@comment $FreeBSD$ +bin/tagsoup +%%TAGSOUP_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/HStagsoup-%%TAGSOUP_VERSION%%.o +%%TAGSOUP_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Text/HTML/Download.hi +%%TAGSOUP_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Text/HTML/TagSoup.hi +%%TAGSOUP_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Text/HTML/TagSoup/Entity.hi +%%TAGSOUP_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Text/HTML/TagSoup/Match.hi +%%TAGSOUP_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Text/HTML/TagSoup/Parser.hi +%%TAGSOUP_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Text/HTML/TagSoup/Render.hi +%%TAGSOUP_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Text/HTML/TagSoup/Tree.hi +%%TAGSOUP_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Text/HTML/TagSoup/Type.hi +%%TAGSOUP_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/libHStagsoup-%%TAGSOUP_VERSION%%.a +%%TAGSOUP_LIBDIR_REL%%/register.sh +%%NOPORTDOCS%%%%DOCSDIR%%/LICENSE +%%NOPORTDOCS%%@dirrmtry %%DOCSDIR%% +@dirrm %%TAGSOUP_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Text/HTML/TagSoup +@dirrm %%TAGSOUP_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Text/HTML +@dirrm %%TAGSOUP_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Text +@dirrm %%TAGSOUP_LIBDIR_REL%%/ghc-%%GHC_VERSION%% +@dirrm %%TAGSOUP_LIBDIR_REL%% +@exec /bin/sh %D/%%TAGSOUP_LIBDIR_REL%%/register.sh +@exec /bin/rm -f %D/lib/ghc-%%GHC_VERSION%%/package.conf.old +@unexec %D/bin/ghc-pkg unregister tagsoup +@unexec /bin/rm -f %D/lib/ghc-%%GHC_VERSION%%/package.conf.old |