aboutsummaryrefslogtreecommitdiffstats
path: root/math/hs-vector-space
diff options
context:
space:
mode:
authorpgj <pgj@FreeBSD.org>2010-05-13 00:33:59 +0800
committerpgj <pgj@FreeBSD.org>2010-05-13 00:33:59 +0800
commitf203c3895196ffa8b69517527e8c488cc49ada57 (patch)
treed7be6abb9940698d6dc43b1587948a03039a23b5 /math/hs-vector-space
parent965f4ecbcd1c9f6296e907af59901feeedfdc42f (diff)
downloadfreebsd-ports-gnome-f203c3895196ffa8b69517527e8c488cc49ada57.tar.gz
freebsd-ports-gnome-f203c3895196ffa8b69517527e8c488cc49ada57.tar.zst
freebsd-ports-gnome-f203c3895196ffa8b69517527e8c488cc49ada57.zip
Introduce a new (and hopefully better) ports infrastructure for Haskell Cabal
ports which makes possible the direct translation of Cabal package descriptions to FreeBSD ports. It promises both easier addition and maintenance for Cabal-based ports.
Diffstat (limited to 'math/hs-vector-space')
-rw-r--r--math/hs-vector-space/Makefile63
-rw-r--r--math/hs-vector-space/pkg-plist34
2 files changed, 19 insertions, 78 deletions
diff --git a/math/hs-vector-space/Makefile b/math/hs-vector-space/Makefile
index 3e4171e5e5d9..659aa63454cf 100644
--- a/math/hs-vector-space/Makefile
+++ b/math/hs-vector-space/Makefile
@@ -8,70 +8,11 @@
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
+USE_HACKAGE= MemoTrie>=0.4.2
+.include "${.CURDIR}/../../lang/ghc/bsd.cabal.mk"
.include <bsd.port.mk>
diff --git a/math/hs-vector-space/pkg-plist b/math/hs-vector-space/pkg-plist
index 820165d2e1f6..022de4c9d03e 100644
--- a/math/hs-vector-space/pkg-plist
+++ b/math/hs-vector-space/pkg-plist
@@ -1,21 +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
+%%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Data/AdditiveGroup.hi
+%%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Data/AffineSpace.hi
+%%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Data/Basis.hi
+%%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Data/Cross.hi
+%%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Data/Derivative.hi
+%%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Data/LinearMap.hi
+%%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Data/Maclaurin.hi
+%%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Data/NumInstances.hi
+%%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Data/VectorSpace.hi
+%%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/HS%%PORTNAME%%-%%PORTVERSION%%.o
+%%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/libHS%%PORTNAME%%-%%PORTVERSION%%.a
+%%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
+@dirrm %%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Data
+@dirrm %%LIBDIR_REL%%/ghc-%%GHC_VERSION%%
+@dirrm %%LIBDIR_REL%%
+@exec /bin/sh %D/%%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 %D/bin/ghc-pkg unregister %%PORTNAME%%-%%PORTVERSION%%
@unexec /bin/rm -f %D/lib/ghc-%%GHC_VERSION%%/package.conf.old