From 3c932bae2a907499d40f01c4c473c85db4ca3d95 Mon Sep 17 00:00:00 2001 From: pgj Date: Tue, 12 Jan 2010 22:03:14 +0000 Subject: This Haskell library lets you write SCGI programs. This package reuses the cgi package API, making it very easy to port CGI programs to SCGI. WWW: http://github.com/esessoms/scgi PR: ports/142499 Submitted by: Jacula Modyun --- www/Makefile | 1 + www/hs-scgi/Makefile | 77 +++++++++++++++++++++++++++++++++++++++++++++++++++ www/hs-scgi/distinfo | 3 ++ www/hs-scgi/pkg-descr | 4 +++ www/hs-scgi/pkg-plist | 14 ++++++++++ 5 files changed, 99 insertions(+) create mode 100644 www/hs-scgi/Makefile create mode 100644 www/hs-scgi/distinfo create mode 100644 www/hs-scgi/pkg-descr create mode 100644 www/hs-scgi/pkg-plist diff --git a/www/Makefile b/www/Makefile index 67f76e76a3ba..6c4616114c4d 100644 --- a/www/Makefile +++ b/www/Makefile @@ -292,6 +292,7 @@ SUBDIR += hs-cgi SUBDIR += hs-fastcgi SUBDIR += hs-oeis + SUBDIR += hs-scgi SUBDIR += hs-http-server SUBDIR += hs-url SUBDIR += htdump diff --git a/www/hs-scgi/Makefile b/www/hs-scgi/Makefile new file mode 100644 index 000000000000..1613c1c34d75 --- /dev/null +++ b/www/hs-scgi/Makefile @@ -0,0 +1,77 @@ +# New ports collection makefile for: hs-scgi +# Date created: December 20 2009 +# Whom: Giuseppe Pilichi aka Jacula Modyun +# +# $FreeBSD$ +# + +PORTNAME= scgi +PORTVERSION= 0.3.1 +CATEGORIES= www haskell +MASTER_SITES= http://hackage.haskell.org/packages/archive/${PORTNAME}/${PORTVERSION}/ +PKGNAMEPREFIX= hs- + +MAINTAINER= jacula@gmail.com +COMMENT= A Haskell library for writing SCGI programs + +BUILD_DEPENDS+= ghc:${PORTSDIR}/lang/ghc \ + hs-cgi>=3000.0.0:${PORTSDIR}/www/hs-cgi +RUN_DEPENDS+= ghc:${PORTSDIR}/lang/ghc \ + hs-cgi>=3000.0.0:${PORTSDIR}/www/hs-cgi + +GHC_VERSION= 6.10.4 +SCGI_VERSION= ${PORTVERSION} + +GHC_CMD= ${LOCALBASE}/bin/ghc +SETUP_CMD= ./setup + +DOCSDIR= ${PREFIX}/share/doc/${DISTNAME} +SCGI_LIBDIR_REL= lib/${DISTNAME} + +PLIST_SUB= GHC_VERSION=${GHC_VERSION} \ + SCGI_VERSION=${SCGI_VERSION} \ + SCGI_LIBDIR_REL=${SCGI_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}/${SCGI_LIBDIR_REL}/register.sh + +post-install: + ${RM} -f ${PREFIX}/lib/ghc-${GHC_VERSION}/package.conf.old + +.include diff --git a/www/hs-scgi/distinfo b/www/hs-scgi/distinfo new file mode 100644 index 000000000000..4406cf412f5f --- /dev/null +++ b/www/hs-scgi/distinfo @@ -0,0 +1,3 @@ +MD5 (scgi-0.3.1.tar.gz) = 460f4f35a1a8ade0f7be86b5e4fd891b +SHA256 (scgi-0.3.1.tar.gz) = 05e0a311f98e673b7dba5d9f56534ac86c53819582131010442e637c0fbd8505 +SIZE (scgi-0.3.1.tar.gz) = 13957 diff --git a/www/hs-scgi/pkg-descr b/www/hs-scgi/pkg-descr new file mode 100644 index 000000000000..ef953544baeb --- /dev/null +++ b/www/hs-scgi/pkg-descr @@ -0,0 +1,4 @@ +This Haskell library lets you write SCGI programs. This package reuses +the cgi package API, making it very easy to port CGI programs to SCGI. + +WWW: http://github.com/esessoms/scgi diff --git a/www/hs-scgi/pkg-plist b/www/hs-scgi/pkg-plist new file mode 100644 index 000000000000..ec8e865a60dd --- /dev/null +++ b/www/hs-scgi/pkg-plist @@ -0,0 +1,14 @@ +@comment $FreeBSD$ +%%SCGI_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/HSscgi-%%SCGI_VERSION%%.o +%%SCGI_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Network/SCGI.hi +%%SCGI_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/libHSscgi-%%SCGI_VERSION%%.a +%%SCGI_LIBDIR_REL%%/register.sh +%%NOPORTDOCS%%%%DOCSDIR%%/COPYING +%%NOPORTDOCS%%@dirrmtry %%DOCSDIR%% +@dirrm %%SCGI_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Network +@dirrm %%SCGI_LIBDIR_REL%%/ghc-%%GHC_VERSION%% +@dirrm %%SCGI_LIBDIR_REL%% +@exec /bin/sh %D/%%SCGI_LIBDIR_REL%%/register.sh +@exec /bin/rm -f %D/lib/ghc-%%GHC_VERSION%%/package.conf.old +@unexec %D/bin/ghc-pkg unregister scgi +@unexec /bin/rm -f %D/lib/ghc-%%GHC_VERSION%%/package.conf.old -- cgit