aboutsummaryrefslogtreecommitdiff
path: root/devel/hs-safe
diff options
context:
space:
mode:
authorGabor Pali <pgj@FreeBSD.org>2010-01-02 22:59:58 +0000
committerGabor Pali <pgj@FreeBSD.org>2010-01-02 22:59:58 +0000
commit4151fdbbf380b5ea5481269c00279811ccd8f275 (patch)
tree14fef83767f29760015adc48b8531c121f2c5805 /devel/hs-safe
parent086316c4aa4686dddf4c675f1b7960659f1f39b0 (diff)
downloadports-4151fdbbf380b5ea5481269c00279811ccd8f275.tar.gz
ports-4151fdbbf380b5ea5481269c00279811ccd8f275.zip
Notes
Diffstat (limited to 'devel/hs-safe')
-rw-r--r--devel/hs-safe/Makefile75
-rw-r--r--devel/hs-safe/distinfo3
-rw-r--r--devel/hs-safe/pkg-descr8
-rw-r--r--devel/hs-safe/pkg-plist13
4 files changed, 99 insertions, 0 deletions
diff --git a/devel/hs-safe/Makefile b/devel/hs-safe/Makefile
new file mode 100644
index 000000000000..dc6f77d085e1
--- /dev/null
+++ b/devel/hs-safe/Makefile
@@ -0,0 +1,75 @@
+# New ports collection makefile for: hs-safe
+# Date created: December 20 2009
+# Whom: Giuseppe Pilichi aka Jacula Modyun <jacula@gmail.com>
+#
+# $FreeBSD$
+#
+
+PORTNAME= safe
+PORTVERSION= 0.2
+CATEGORIES= devel haskell
+MASTER_SITES= http://hackage.haskell.org/packages/archive/${PORTNAME}/${PORTVERSION}/
+PKGNAMEPREFIX= hs-
+
+MAINTAINER= jacula@gmail.com
+COMMENT= A Haskell library for safe (pattern match free) functions
+
+BUILD_DEPENDS+= ghc:${PORTSDIR}/lang/ghc
+RUN_DEPENDS+= ghc:${PORTSDIR}/lang/ghc
+
+GHC_VERSION= 6.10.4
+SAFE_VERSION= ${PORTVERSION}
+
+GHC_CMD= ${LOCALBASE}/bin/ghc
+SETUP_CMD= ./setup
+
+DOCSDIR= ${PREFIX}/share/doc/${DISTNAME}
+SAFE_LIBDIR_REL= lib/${DISTNAME}
+
+PLIST_SUB= GHC_VERSION=${GHC_VERSION} \
+ SAFE_VERSION=${SAFE_VERSION} \
+ SAFE_LIBDIR_REL=${SAFE_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 \
+ --hscolour-css=${HSCOLOUR_DATADIR}/hscolour.css
+.endif
+
+do-install:
+ cd ${WRKSRC} && ${SETUP_CMD} install \
+ && ${INSTALL_SCRIPT} register.sh ${PREFIX}/${SAFE_LIBDIR_REL}/register.sh
+
+post-install:
+ ${RM} -f ${PREFIX}/lib/ghc-${GHC_VERSION}/package.conf.old
+
+.include <bsd.port.mk>
diff --git a/devel/hs-safe/distinfo b/devel/hs-safe/distinfo
new file mode 100644
index 000000000000..931ffeaa4316
--- /dev/null
+++ b/devel/hs-safe/distinfo
@@ -0,0 +1,3 @@
+MD5 (safe-0.2.tar.gz) = e5331578ea7e0b68ed1ea4df923a23ca
+SHA256 (safe-0.2.tar.gz) = 73b9a247c3ba8092236c8c912687399778ff31bf3df42d707563a1528a6fc0e0
+SIZE (safe-0.2.tar.gz) = 3557
diff --git a/devel/hs-safe/pkg-descr b/devel/hs-safe/pkg-descr
new file mode 100644
index 000000000000..381c4a0f6a1d
--- /dev/null
+++ b/devel/hs-safe/pkg-descr
@@ -0,0 +1,8 @@
+Partial functions from the Haskell base library, such as head and !!, modified
+to return more descriptive error messages, programmer defined error messages,
+Maybe wrapped results and default values.
+
+These functions can be used to reduce the number of unsafe pattern matches in
+your code.
+
+WWW: http://www-users.cs.york.ac.uk/~ndm/safe/
diff --git a/devel/hs-safe/pkg-plist b/devel/hs-safe/pkg-plist
new file mode 100644
index 000000000000..f69bcafd8767
--- /dev/null
+++ b/devel/hs-safe/pkg-plist
@@ -0,0 +1,13 @@
+@comment $FreeBSD$
+%%SAFE_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/HSsafe-%%SAFE_VERSION%%.o
+%%SAFE_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Safe.hi
+%%SAFE_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/libHSsafe-%%SAFE_VERSION%%.a
+%%SAFE_LIBDIR_REL%%/register.sh
+%%NOPORTDOCS%%%%DOCSDIR%%/LICENSE
+%%NOPORTDOCS%%@dirrmtry %%DOCSDIR%%
+@dirrm %%SAFE_LIBDIR_REL%%/ghc-%%GHC_VERSION%%
+@dirrm %%SAFE_LIBDIR_REL%%
+@exec /bin/sh %D/%%SAFE_LIBDIR_REL%%/register.sh
+@exec /bin/rm -f %D/lib/ghc-%%GHC_VERSION%%/package.conf.old
+@unexec %D/bin/ghc-pkg unregister safe
+@unexec /bin/rm -f %D/lib/ghc-%%GHC_VERSION%%/package.conf.old