mirror of
https://git.FreeBSD.org/ports.git
synced 2024-10-21 20:38:45 +00:00
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>
This commit is contained in:
parent
4151fdbbf3
commit
d2a3cc512e
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=247027
@ -288,6 +288,7 @@
|
||||
SUBDIR += horde-passwd
|
||||
SUBDIR += horde-trean
|
||||
SUBDIR += horde-wicked
|
||||
SUBDIR += hs-HTTP
|
||||
SUBDIR += htdump
|
||||
SUBDIR += html2hdml
|
||||
SUBDIR += html2wml
|
||||
|
75
www/hs-HTTP/Makefile
Normal file
75
www/hs-HTTP/Makefile
Normal file
@ -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>
|
3
www/hs-HTTP/distinfo
Normal file
3
www/hs-HTTP/distinfo
Normal file
@ -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
|
18
www/hs-HTTP/pkg-descr
Normal file
18
www/hs-HTTP/pkg-descr
Normal file
@ -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/
|
32
www/hs-HTTP/pkg-plist
Normal file
32
www/hs-HTTP/pkg-plist
Normal file
@ -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
|
Loading…
Reference in New Issue
Block a user