aboutsummaryrefslogtreecommitdiffstats
path: root/devel
diff options
context:
space:
mode:
authorpgj <pgj@FreeBSD.org>2010-01-13 06:06:50 +0800
committerpgj <pgj@FreeBSD.org>2010-01-13 06:06:50 +0800
commit884958a2162490da241b0ee7a03ffe0c281f89bf (patch)
tree21527121ada9f07ae52202d1c5eb02b363c12470 /devel
parentaacb24bc4b48d799c83faf54e11056465b9297f7 (diff)
downloadfreebsd-ports-gnome-884958a2162490da241b0ee7a03ffe0c281f89bf.tar.gz
freebsd-ports-gnome-884958a2162490da241b0ee7a03ffe0c281f89bf.tar.zst
freebsd-ports-gnome-884958a2162490da241b0ee7a03ffe0c281f89bf.zip
The "convertible" Haskell package provides a typeclass with a single
function that is designed to help convert between different types: numeric values, dates and times, and the like. WWW: http://hackage.haskell.org/cgi-bin/hackage-scripts/package/convertible PR: ports/142501 Submitted by: Jacula Modyun <jacula(at)gmail.com>
Diffstat (limited to 'devel')
-rw-r--r--devel/Makefile1
-rw-r--r--devel/hs-convertible/Makefile75
-rw-r--r--devel/hs-convertible/distinfo3
-rw-r--r--devel/hs-convertible/pkg-descr17
-rw-r--r--devel/hs-convertible/pkg-plist23
5 files changed, 119 insertions, 0 deletions
diff --git a/devel/Makefile b/devel/Makefile
index f75ae6bc1ebd..f29a3c00141e 100644
--- a/devel/Makefile
+++ b/devel/Makefile
@@ -541,6 +541,7 @@
SUBDIR += hs-binary-ghc
SUBDIR += hs-c2hs
SUBDIR += hs-checkers
+ SUBDIR += hs-convertible
SUBDIR += hs-cpphs
SUBDIR += hs-deepseq
SUBDIR += hs-dlist
diff --git a/devel/hs-convertible/Makefile b/devel/hs-convertible/Makefile
new file mode 100644
index 000000000000..43951c50acc1
--- /dev/null
+++ b/devel/hs-convertible/Makefile
@@ -0,0 +1,75 @@
+# New ports collection makefile for: hs-convertible
+# Date created: December 20 2009
+# Whom: Giuseppe Pilichi aka Jacula Modyun <jacula@gmail.com>
+#
+# $FreeBSD$
+#
+
+PORTNAME= convertible
+PORTVERSION= 1.0.7
+CATEGORIES= devel haskell
+MASTER_SITES= http://hackage.haskell.org/packages/archive/${PORTNAME}/${PORTVERSION}/
+PKGNAMEPREFIX= hs-
+
+MAINTAINER= jacula@gmail.com
+COMMENT= Haskell type classes and instances for converting between types
+
+BUILD_DEPENDS+= ghc:${PORTSDIR}/lang/ghc
+RUN_DEPENDS+= ghc:${PORTSDIR}/lang/ghc
+
+GHC_VERSION= 6.10.4
+CONVERTIBLE_VERSION= ${PORTVERSION}
+
+GHC_CMD= ${LOCALBASE}/bin/ghc
+SETUP_CMD= ./setup
+
+DOCSDIR= ${PREFIX}/share/doc/${DISTNAME}
+CONVERTIBLE_LIBDIR_REL= lib/${DISTNAME}
+
+PLIST_SUB= GHC_VERSION=${GHC_VERSION} \
+ CONVERTIBLE_VERSION=${CONVERTIBLE_VERSION} \
+ CONVERTIBLE_LIBDIR_REL=${CONVERTIBLE_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}/${CONVERTIBLE_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-convertible/distinfo b/devel/hs-convertible/distinfo
new file mode 100644
index 000000000000..e8876f62343d
--- /dev/null
+++ b/devel/hs-convertible/distinfo
@@ -0,0 +1,3 @@
+MD5 (convertible-1.0.7.tar.gz) = 0d761732237244b4fa9761425b544d1b
+SHA256 (convertible-1.0.7.tar.gz) = 4b4f1a16cbfd849b7c26f97389a9a82d413f31d7de83b4a3dd7154c8eb8bb80b
+SIZE (convertible-1.0.7.tar.gz) = 20167
diff --git a/devel/hs-convertible/pkg-descr b/devel/hs-convertible/pkg-descr
new file mode 100644
index 000000000000..ece6cb601063
--- /dev/null
+++ b/devel/hs-convertible/pkg-descr
@@ -0,0 +1,17 @@
+The "convertible" Haskell package provides a typeclass with a single
+function that is designed to help convert between different types:
+numeric values, dates and times, and the like.
+
+The conversions perform bounds checking and return a pure Either value.
+This means that you need not remember which specific function performs
+the conversion you desire.
+
+Also included in the package are optional instances that provide
+conversion for various numeric and time types, as well as utilities for
+writing your own instances.
+
+Finally, there is a function that will raise an exception on
+bounds-checking violation, or return a bare value otherwise, implemented
+in terms of the safer function described above.
+
+WWW: http://hackage.haskell.org/cgi-bin/hackage-scripts/package/convertible
diff --git a/devel/hs-convertible/pkg-plist b/devel/hs-convertible/pkg-plist
new file mode 100644
index 000000000000..78d0e6dce76c
--- /dev/null
+++ b/devel/hs-convertible/pkg-plist
@@ -0,0 +1,23 @@
+@comment $FreeBSD$
+%%CONVERTIBLE_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Data/Convertible.hi
+%%CONVERTIBLE_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Data/Convertible/Base.hi
+%%CONVERTIBLE_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Data/Convertible/Instances.hi
+%%CONVERTIBLE_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Data/Convertible/Instances/C.hi
+%%CONVERTIBLE_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Data/Convertible/Instances/Map.hi
+%%CONVERTIBLE_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Data/Convertible/Instances/Num.hi
+%%CONVERTIBLE_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Data/Convertible/Instances/Time.hi
+%%CONVERTIBLE_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Data/Convertible/Utils.hi
+%%CONVERTIBLE_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/HSconvertible-%%CONVERTIBLE_VERSION%%.o
+%%CONVERTIBLE_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/libHSconvertible-%%CONVERTIBLE_VERSION%%.a
+%%CONVERTIBLE_LIBDIR_REL%%/register.sh
+%%NOPORTDOCS%%%%DOCSDIR%%/COPYRIGHT
+%%NOPORTDOCS%%@dirrmtry %%DOCSDIR%%
+@dirrm %%CONVERTIBLE_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Data/Convertible/Instances
+@dirrm %%CONVERTIBLE_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Data/Convertible
+@dirrm %%CONVERTIBLE_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Data
+@dirrm %%CONVERTIBLE_LIBDIR_REL%%/ghc-%%GHC_VERSION%%
+@dirrm %%CONVERTIBLE_LIBDIR_REL%%
+@exec /bin/sh %D/%%CONVERTIBLE_LIBDIR_REL%%/register.sh
+@exec /bin/rm -f %D/lib/ghc-%%GHC_VERSION%%/package.conf.old
+@unexec %D/bin/ghc-pkg unregister convertible
+@unexec /bin/rm -f %D/lib/ghc-%%GHC_VERSION%%/package.conf.old