aboutsummaryrefslogtreecommitdiffstats
path: root/www/hs-HTTP
diff options
context:
space:
mode:
authorpgj <pgj@FreeBSD.org>2010-01-03 07:04:15 +0800
committerpgj <pgj@FreeBSD.org>2010-01-03 07:04:15 +0800
commit382b0bb0d47e0b6872e89152a2b291dbbba95853 (patch)
tree2be6c4be83a690388890ffa0871c28e6f3306b68 /www/hs-HTTP
parentf357b6113fcb8b3dd350ecf4cb69e4b736b4ca43 (diff)
downloadfreebsd-ports-gnome-382b0bb0d47e0b6872e89152a2b291dbbba95853.tar.gz
freebsd-ports-gnome-382b0bb0d47e0b6872e89152a2b291dbbba95853.tar.zst
freebsd-ports-gnome-382b0bb0d47e0b6872e89152a2b291dbbba95853.zip
The HTTP package supports client-side web programming in Haskell. It lets
you set up HTTP connections, transmitting requests and processing the responses coming back, all from within the comforts of Haskell. It's dependent on the network package to operate, but other than that, the implementation is all written in Haskell. A basic API for issuing single HTTP requests + receiving responses is provided. On top of that, a session-level abstraction is also on offer (the BrowserAction monad); it taking care of handling the management of persistent connections, proxies, state (cookies) and authentication credentials required to handle multi-step interactions with a web server. The representation of the bytes flowing across is extensible via the use of a type class, letting you pick the representation of requests and responses that best fits your use. Some pre-packaged, common instances are provided for you (ByteString, String.) WWW: http://projects.haskell.org/http/ PR: ports/142178 Submitted by: Jacula Modyun <jacula(at)gmail.com>
Diffstat (limited to 'www/hs-HTTP')
-rw-r--r--www/hs-HTTP/Makefile75
-rw-r--r--www/hs-HTTP/distinfo3
-rw-r--r--www/hs-HTTP/pkg-descr18
-rw-r--r--www/hs-HTTP/pkg-plist32
4 files changed, 128 insertions, 0 deletions
diff --git a/www/hs-HTTP/Makefile b/www/hs-HTTP/Makefile
new file mode 100644
index 000000000000..4d3b4e81c971
--- /dev/null
+++ b/www/hs-HTTP/Makefile
@@ -0,0 +1,75 @@
+# New ports collection makefile for: hs-HTTP
+# Date created: December 20 2009
+# Whom: Giuseppe Pilichi aka Jacula Modyun <jacula@gmail.com>
+#
+# $FreeBSD$
+#
+
+PORTNAME= HTTP
+PORTVERSION= 4000.0.9
+CATEGORIES= www haskell
+MASTER_SITES= http://hackage.haskell.org/packages/archive/${PORTNAME}/${PORTVERSION}/
+PKGNAMEPREFIX= hs-
+
+MAINTAINER= jacula@gmail.com
+COMMENT= A library for client-side HTTP
+
+BUILD_DEPENDS+= ghc:${PORTSDIR}/lang/ghc
+RUN_DEPENDS+= ghc:${PORTSDIR}/lang/ghc
+
+GHC_VERSION= 6.10.4
+HTTP_VERSION= ${PORTVERSION}
+
+GHC_CMD= ${LOCALBASE}/bin/ghc
+SETUP_CMD= ./setup
+
+DOCSDIR= ${PREFIX}/share/doc/${DISTNAME}
+HTTP_LIBDIR_REL= lib/${DISTNAME}
+
+PLIST_SUB= GHC_VERSION=${GHC_VERSION} \
+ HTTP_VERSION=${HTTP_VERSION} \
+ HTTP_LIBDIR_REL=${HTTP_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.lhs -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 \
+ --hscolour-css=${HSCOLOUR_DATADIR}/hscolour.css
+.endif
+
+do-install:
+ cd ${WRKSRC} && ${SETUP_CMD} install \
+ && ${INSTALL_SCRIPT} register.sh ${PREFIX}/${HTTP_LIBDIR_REL}/register.sh
+
+post-install:
+ ${RM} -f ${PREFIX}/lib/ghc-${GHC_VERSION}/package.conf.old
+
+.include <bsd.port.mk>
diff --git a/www/hs-HTTP/distinfo b/www/hs-HTTP/distinfo
new file mode 100644
index 000000000000..649ec4714a83
--- /dev/null
+++ b/www/hs-HTTP/distinfo
@@ -0,0 +1,3 @@
+MD5 (HTTP-4000.0.9.tar.gz) = bbd005935537ed8883bfefb624e8bf3c
+SHA256 (HTTP-4000.0.9.tar.gz) = 1e2b4a8b782ad1417c8755bb0d248851bc142b351366ed460e07f2945a5e95ba
+SIZE (HTTP-4000.0.9.tar.gz) = 59528
diff --git a/www/hs-HTTP/pkg-descr b/www/hs-HTTP/pkg-descr
new file mode 100644
index 000000000000..1890989c6fed
--- /dev/null
+++ b/www/hs-HTTP/pkg-descr
@@ -0,0 +1,18 @@
+The HTTP package supports client-side web programming in Haskell. It lets
+you set up HTTP connections, transmitting requests and processing the
+responses coming back, all from within the comforts of Haskell. It's
+dependent on the network package to operate, but other than that, the
+implementation is all written in Haskell.
+
+A basic API for issuing single HTTP requests + receiving responses is
+provided. On top of that, a session-level abstraction is also on offer
+(the BrowserAction monad); it taking care of handling the management of
+persistent connections, proxies, state (cookies) and authentication
+credentials required to handle multi-step interactions with a web server.
+
+The representation of the bytes flowing across is extensible via the use
+of a type class, letting you pick the representation of requests and
+responses that best fits your use. Some pre-packaged, common instances
+are provided for you (ByteString, String.)
+
+WWW: http://projects.haskell.org/http/
diff --git a/www/hs-HTTP/pkg-plist b/www/hs-HTTP/pkg-plist
new file mode 100644
index 000000000000..fe861f62c9f6
--- /dev/null
+++ b/www/hs-HTTP/pkg-plist
@@ -0,0 +1,32 @@
+@comment $FreeBSD$
+%%HTTP_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/HSHTTP-%%HTTP_VERSION%%.o
+%%HTTP_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Network/Browser.hi
+%%HTTP_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Network/BufferType.hi
+%%HTTP_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Network/HTTP.hi
+%%HTTP_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Network/HTTP/Auth.hi
+%%HTTP_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Network/HTTP/Base.hi
+%%HTTP_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Network/HTTP/Base64.hi
+%%HTTP_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Network/HTTP/Cookie.hi
+%%HTTP_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Network/HTTP/HandleStream.hi
+%%HTTP_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Network/HTTP/Headers.hi
+%%HTTP_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Network/HTTP/MD5.hi
+%%HTTP_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Network/HTTP/MD5Aux.hi
+%%HTTP_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Network/HTTP/Proxy.hi
+%%HTTP_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Network/HTTP/Stream.hi
+%%HTTP_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Network/HTTP/Utils.hi
+%%HTTP_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Network/Stream.hi
+%%HTTP_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Network/StreamDebugger.hi
+%%HTTP_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Network/StreamSocket.hi
+%%HTTP_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Network/TCP.hi
+%%HTTP_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/libHSHTTP-%%HTTP_VERSION%%.a
+%%HTTP_LIBDIR_REL%%/register.sh
+%%NOPORTDOCS%%%%DOCSDIR%%/LICENSE
+%%NOPORTDOCS%%@dirrmtry %%DOCSDIR%%
+@dirrm %%HTTP_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Network/HTTP
+@dirrm %%HTTP_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Network
+@dirrm %%HTTP_LIBDIR_REL%%/ghc-%%GHC_VERSION%%
+@dirrm %%HTTP_LIBDIR_REL%%
+@exec /bin/sh %D/%%HTTP_LIBDIR_REL%%/register.sh
+@exec /bin/rm -f %D/lib/ghc-%%GHC_VERSION%%/package.conf.old
+@unexec %D/bin/ghc-pkg unregister HTTP
+@unexec /bin/rm -f %D/lib/ghc-%%GHC_VERSION%%/package.conf.old