aboutsummaryrefslogtreecommitdiffstats
path: root/devel/hs-haddock
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 /devel/hs-haddock
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 'devel/hs-haddock')
-rw-r--r--devel/hs-haddock/Makefile58
-rw-r--r--devel/hs-haddock/pkg-plist43
2 files changed, 23 insertions, 78 deletions
diff --git a/devel/hs-haddock/Makefile b/devel/hs-haddock/Makefile
index 526afbf8a325..a820ad72e6fc 100644
--- a/devel/hs-haddock/Makefile
+++ b/devel/hs-haddock/Makefile
@@ -8,39 +8,15 @@ PORTNAME= haddock
PORTVERSION= 2.4.2
PORTREVISION= 1
CATEGORIES= devel haskell
-MASTER_SITES= http://www.haskell.org/haddock/dist/ \
- http://hackage.haskell.org/packages/archive/${PORTNAME}/${PORTVERSION}/
-PKGNAMEPREFIX= hs-
MAINTAINER= haskell@FreeBSD.org
COMMENT= A documentation tool for Haskell
-.if !defined(SLAVE)
-BUILD_DEPENDS= ghc:${PORTSDIR}/lang/ghc \
- hs-ghc-paths>=0.1.0.5:${PORTSDIR}/devel/hs-ghc-paths
-RUN_DEPENDS= ghc:${PORTSDIR}/lang/ghc \
- hs-ghc-paths>=0.1.0.5:${PORTSDIR}/devel/hs-ghc-paths
-LIB_DEPENDS= gmp.10:${PORTSDIR}/math/gmp
-.else
-NO_PKG_REGISTER=
-.endif
-
-WRKSRC= ${WRKDIR}/${DISTNAME:S/-src//g}
-
-GHC_VERSION= 6.10.4
-HADDOCK_VERSION= ${PORTVERSION}
+USE_HACKAGE= ghc-paths
-CABAL_CMD= runghc Setup.lhs
+EXECUTABLE= haddock
-DATADIR= ${PREFIX}/share/${DISTNAME}
-HADDOCK_LIBDIR_REL= lib/${DISTNAME}
-DOCSDIR= ${PREFIX}/share/doc/${DISTNAME}
-
-PLIST_SUB= GHC_VERSION=${GHC_VERSION} \
- DATADIR_REL=${DATADIR_REL} \
- HADDOCK_LIBDIR_REL=${HADDOCK_LIBDIR_REL} \
- HADDOCK_VERSION=${HADDOCK_VERSION} \
- DOCSDIR_REL=${DOCSDIR_REL}
+PORTDATA= *
.include <bsd.port.pre.mk>
@@ -59,31 +35,9 @@ IGNORE+= \t the ${LOCALBASE}/bin/haddock executable, for the WITH_HADDOCK\n
IGNORE+= \t option was set in it. You have to set the WITHOUT_HADDOCK\n
IGNORE+= \t options in lang/ghc before to install devel/hs-haddock.\n\c
.endif
+.else
+GHC_CMD= ghc
.endif
-.SILENT:
-
-post-patch:
- @${REINPLACE_CMD} -e 's|/usr/local|${LOCALBASE}|g' \
- ${WRKSRC}/doc/configure.ac
-
-do-configure:
- cd ${WRKSRC} && ${CABAL_CMD} configure --ghc --prefix=${PREFIX}
-
-do-build:
- cd ${WRKSRC} && ${CABAL_CMD} build
-.if !defined(SLAVE)
- cd ${WRKSRC} && ${CABAL_CMD} register --gen-script
-.endif
-
-do-install:
- cd ${WRKSRC} && ${CABAL_CMD} install
-
-post-install:
- ${STRIP_CMD} ${PREFIX}/bin/haddock
-.if !defined(SLAVE)
- ${INSTALL_SCRIPT} ${WRKSRC}/register.sh ${PREFIX}/${HADDOCK_LIBDIR_REL}/register.sh
-.endif
- @${RM} -f ${PREFIX}/lib/ghc-${GHC_VERSION}/package.conf.old
-
+.include "${.CURDIR}/../../lang/ghc/bsd.cabal.mk"
.include <bsd.port.post.mk>
diff --git a/devel/hs-haddock/pkg-plist b/devel/hs-haddock/pkg-plist
index c38e4b2b0a98..b3c29ec7ce95 100644
--- a/devel/hs-haddock/pkg-plist
+++ b/devel/hs-haddock/pkg-plist
@@ -1,32 +1,23 @@
@comment $FreeBSD$
bin/haddock
-%%HADDOCK_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Distribution/Haddock.hi
-%%HADDOCK_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/HShaddock-%%HADDOCK_VERSION%%.o
-%%HADDOCK_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Haddock/DocName.hi
-%%HADDOCK_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Haddock/Exception.hi
-%%HADDOCK_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Haddock/GHC/Utils.hi
-%%HADDOCK_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Haddock/InterfaceFile.hi
-%%HADDOCK_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Haddock/Types.hi
-%%HADDOCK_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Haddock/Utils.hi
-%%HADDOCK_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/libHShaddock-%%HADDOCK_VERSION%%.a
-%%HADDOCK_LIBDIR_REL%%/register.sh
+%%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Distribution/Haddock.hi
+%%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/HS%%PORTNAME%%-%%PORTVERSION%%.o
+%%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Haddock/DocName.hi
+%%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Haddock/Exception.hi
+%%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Haddock/GHC/Utils.hi
+%%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Haddock/InterfaceFile.hi
+%%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Haddock/Types.hi
+%%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Haddock/Utils.hi
+%%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/libHS%%PORTNAME%%-%%PORTVERSION%%.a
+%%LIBDIR_REL%%/register.sh
%%DOCSDIR%%/LICENSE
-%%DATADIR_REL%%/html/frames.html
-%%DATADIR_REL%%/html/haddock-DEBUG.css
-%%DATADIR_REL%%/html/haddock-util.js
-%%DATADIR_REL%%/html/haddock.css
-%%DATADIR_REL%%/html/haskell_icon.gif
-%%DATADIR_REL%%/html/minus.gif
-%%DATADIR_REL%%/html/plus.gif
-@dirrm %%DATADIR_REL%%/html
-@dirrm %%DATADIR_REL%%
@dirrmtry %%DOCSDIR%%
-@dirrm %%HADDOCK_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Haddock/GHC
-@dirrm %%HADDOCK_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Haddock
-@dirrm %%HADDOCK_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Distribution
-@dirrm %%HADDOCK_LIBDIR_REL%%/ghc-%%GHC_VERSION%%
-@dirrm %%HADDOCK_LIBDIR_REL%%
-@exec /bin/sh %%LOCALBASE%%/%%HADDOCK_LIBDIR_REL%%/register.sh
+@dirrm %%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Haddock/GHC
+@dirrm %%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Haddock
+@dirrm %%LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Distribution
+@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 %%LOCALBASE%%/bin/ghc-pkg unregister haddock
+@unexec %%LOCALBASE%%/bin/ghc-pkg unregister %%PORTNAME%%-%%PORTVERSION%%
@unexec /bin/rm -f %D/lib/ghc-%%GHC_VERSION%%/package.conf.old