aboutsummaryrefslogtreecommitdiff
path: root/www/hs-scgi/Makefile
diff options
context:
space:
mode:
authorGabor Pali <pgj@FreeBSD.org>2010-01-12 22:03:14 +0000
committerGabor Pali <pgj@FreeBSD.org>2010-01-12 22:03:14 +0000
commit7f56f539cd6cf6fd370dccf26325b3ac7d1d3b3f (patch)
treee0d51f215bf286416a2af25ecbfc3a9631a88f6c /www/hs-scgi/Makefile
parentda34eb1b7eaa96862e03cfc0a54c410fa50d29ae (diff)
downloadports-7f56f539cd6cf6fd370dccf26325b3ac7d1d3b3f.tar.gz
ports-7f56f539cd6cf6fd370dccf26325b3ac7d1d3b3f.zip
Notes
Diffstat (limited to 'www/hs-scgi/Makefile')
-rw-r--r--www/hs-scgi/Makefile77
1 files changed, 77 insertions, 0 deletions
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 <jacula@gmail.com>
+#
+# $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 <bsd.port.mk>