summaryrefslogtreecommitdiff
path: root/math
diff options
context:
space:
mode:
authorGabor Pali <pgj@FreeBSD.org>2010-01-12 21:46:22 +0000
committerGabor Pali <pgj@FreeBSD.org>2010-01-12 21:46:22 +0000
commitebd9acd340cbf0a732c174c86ddbd72aab49f339 (patch)
tree5ae29f2dd8a78514de99e52d12c0a67cfda25a8c /math
parentHaskell MemoTrie provides a basis for memoized functions over some (diff)
vector-space provides classes and generic operations for vector spaces
and affine spaces in Haskell. It also defines a type of infinite towers of generalized derivatives. A generalized derivative is a linear transformation rather than one of the common concrete representations (scalars, vectors, matrices, etc). WWW: http://haskell.org/haskellwiki/vector-space PR: ports/142492 Submitted by: Jacula Modyun <jacula(at)gmail.com>
Notes
Notes: svn path=/head/; revision=247746
Diffstat (limited to 'math')
-rw-r--r--math/Makefile1
-rw-r--r--math/hs-vector-space/Makefile77
-rw-r--r--math/hs-vector-space/distinfo3
-rw-r--r--math/hs-vector-space/pkg-descr7
-rw-r--r--math/hs-vector-space/pkg-plist21
5 files changed, 109 insertions, 0 deletions
diff --git a/math/Makefile b/math/Makefile
index 5ff847b3faa0..176f34fae8fd 100644
--- a/math/Makefile
+++ b/math/Makefile
@@ -119,6 +119,7 @@
SUBDIR += hs-mwc-random
SUBDIR += hs-probability
SUBDIR += hs-statistics
+ SUBDIR += hs-vector-space
SUBDIR += igraph
SUBDIR += isabelle
SUBDIR += itl
diff --git a/math/hs-vector-space/Makefile b/math/hs-vector-space/Makefile
new file mode 100644
index 000000000000..3e4171e5e5d9
--- /dev/null
+++ b/math/hs-vector-space/Makefile
@@ -0,0 +1,77 @@
+# New ports collection makefile for: hs-vector-space
+# Date created: December 20 2009
+# Whom: Giuseppe Pilichi aka Jacula Modyun <jacula@gmail.com>
+#
+# $FreeBSD$
+#
+
+PORTNAME= vector-space
+PORTVERSION= 0.5.7
+CATEGORIES= math haskell
+MASTER_SITES= http://hackage.haskell.org/packages/archive/${PORTNAME}/${PORTVERSION}/
+PKGNAMEPREFIX= hs-
+
+MAINTAINER= jacula@gmail.com
+COMMENT= Vector & affine spaces, linear maps, and derivatives in Haskell
+
+BUILD_DEPENDS+= ghc:${PORTSDIR}/lang/ghc \
+ hs-MemoTrie>=0.4.2:${PORTSDIR}/devel/hs-MemoTrie
+RUN_DEPENDS+= ghc:${PORTSDIR}/lang/ghc \
+ hs-MemoTrie>=0.4.2:${PORTSDIR}/devel/hs-MemoTrie
+
+GHC_VERSION= 6.10.4
+VECTORSPACE_VERSION= ${PORTVERSION}
+
+GHC_CMD= ${LOCALBASE}/bin/ghc
+SETUP_CMD= ./setup
+
+DOCSDIR= ${PREFIX}/share/doc/${DISTNAME}
+VECTORSPACE_LIBDIR_REL= lib/${DISTNAME}
+
+PLIST_SUB= GHC_VERSION=${GHC_VERSION} \
+ VECTORSPACE_VERSION=${VECTORSPACE_VERSION} \
+ VECTORSPACE_LIBDIR_REL=${VECTORSPACE_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}/${VECTORSPACE_LIBDIR_REL}/register.sh
+
+post-install:
+ ${RM} -f ${PREFIX}/lib/ghc-${GHC_VERSION}/package.conf.old
+
+.include <bsd.port.mk>
diff --git a/math/hs-vector-space/distinfo b/math/hs-vector-space/distinfo
new file mode 100644
index 000000000000..b9087fab3797
--- /dev/null
+++ b/math/hs-vector-space/distinfo
@@ -0,0 +1,3 @@
+MD5 (vector-space-0.5.7.tar.gz) = 15f6e4a4653569779049488127044225
+SHA256 (vector-space-0.5.7.tar.gz) = c7f6e9468b4c9667bbac0b7470264d32d9e1f6e0afdc975d066c350f778f0a13
+SIZE (vector-space-0.5.7.tar.gz) = 16124
diff --git a/math/hs-vector-space/pkg-descr b/math/hs-vector-space/pkg-descr
new file mode 100644
index 000000000000..d15547dd2b7e
--- /dev/null
+++ b/math/hs-vector-space/pkg-descr
@@ -0,0 +1,7 @@
+vector-space provides classes and generic operations for vector spaces
+and affine spaces in Haskell. It also defines a type of infinite towers
+of generalized derivatives. A generalized derivative is a linear
+transformation rather than one of the common concrete representations
+(scalars, vectors, matrices, etc).
+
+WWW: http://haskell.org/haskellwiki/vector-space
diff --git a/math/hs-vector-space/pkg-plist b/math/hs-vector-space/pkg-plist
new file mode 100644
index 000000000000..820165d2e1f6
--- /dev/null
+++ b/math/hs-vector-space/pkg-plist
@@ -0,0 +1,21 @@
+@comment $FreeBSD$
+%%VECTORSPACE_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Data/AdditiveGroup.hi
+%%VECTORSPACE_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Data/AffineSpace.hi
+%%VECTORSPACE_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Data/Basis.hi
+%%VECTORSPACE_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Data/Cross.hi
+%%VECTORSPACE_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Data/Derivative.hi
+%%VECTORSPACE_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Data/LinearMap.hi
+%%VECTORSPACE_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Data/Maclaurin.hi
+%%VECTORSPACE_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Data/NumInstances.hi
+%%VECTORSPACE_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Data/VectorSpace.hi
+%%VECTORSPACE_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/HSvector-space-%%VECTORSPACE_VERSION%%.o
+%%VECTORSPACE_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/libHSvector-space-%%VECTORSPACE_VERSION%%.a
+%%VECTORSPACE_LIBDIR_REL%%/register.sh
+%%NOPORTDOCS%%@dirrmtry %%DOCSDIR%%
+@dirrm %%VECTORSPACE_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Data
+@dirrm %%VECTORSPACE_LIBDIR_REL%%/ghc-%%GHC_VERSION%%
+@dirrm %%VECTORSPACE_LIBDIR_REL%%
+@exec /bin/sh %D/%%VECTORSPACE_LIBDIR_REL%%/register.sh
+@exec /bin/rm -f %D/lib/ghc-%%GHC_VERSION%%/package.conf.old
+@unexec %D/bin/ghc-pkg unregister vector-space
+@unexec /bin/rm -f %D/lib/ghc-%%GHC_VERSION%%/package.conf.old