diff options
author | obraun <obraun@FreeBSD.org> | 2008-03-01 05:08:51 +0800 |
---|---|---|
committer | obraun <obraun@FreeBSD.org> | 2008-03-01 05:08:51 +0800 |
commit | a7c7a46cca735ba1efc6c6c9684eedfa25f5fd5a (patch) | |
tree | a62436e8c430ff1e14943b38c7d444fb4ed27742 | |
parent | 3e7b0f7fdea98248a8ee021c6ffd0c257f2c51f9 (diff) | |
download | freebsd-ports-gnome-a7c7a46cca735ba1efc6c6c9684eedfa25f5fd5a.tar.gz freebsd-ports-gnome-a7c7a46cca735ba1efc6c6c9684eedfa25f5fd5a.tar.zst freebsd-ports-gnome-a7c7a46cca735ba1efc6c6c9684eedfa25f5fd5a.zip |
* Add SLAVE option in order to install documentation for lang/ghc.
* Remove documentation. It's now available through devel/hs-haddock-docs.
* add devel/readline dependency if already installed.
PR: ports/120975
Submitted by: Jacula Modyun <jacula@gmail.com>
-rw-r--r-- | devel/hs-haddock/Makefile | 60 | ||||
-rw-r--r-- | devel/hs-haddock/pkg-descr | 9 | ||||
-rw-r--r-- | devel/hs-haddock/pkg-plist | 45 |
3 files changed, 60 insertions, 54 deletions
diff --git a/devel/hs-haddock/Makefile b/devel/hs-haddock/Makefile index d2bed9ef0f51..c861fe0ec878 100644 --- a/devel/hs-haddock/Makefile +++ b/devel/hs-haddock/Makefile @@ -13,53 +13,53 @@ PKGNAMEPREFIX= hs- MAINTAINER= haskell@FreeBSD.org COMMENT= A documentation tool for Haskell +.if !defined(SLAVE) BUILD_DEPENDS= ghc:${PORTSDIR}/lang/ghc -.if !defined(NOPORTDOCS) -BUILD_DEPENDS+= ${LOCALBASE}/share/sgml/docbook/dsssl/modular:${PORTSDIR}/textproc/dsssl-docbook-modular \ - docbook<2:${PORTSDIR}/textproc/docbook \ - ${LOCALBASE}/share/sgml/iso8879:${PORTSDIR}/textproc/iso8879 \ - ${LOCALBASE}/share/sgml/docbook/3.1:${PORTSDIR}/textproc/docbook-310 \ - ${LOCALBASE}/share/xsl/docbook/catalog:${PORTSDIR}/textproc/docbook-xsl \ - jade:${PORTSDIR}/textproc/jade \ - xsltproc:${PORTSDIR}/textproc/libxslt +.if exists(${LOCALBASE}/lib/libreadline.so.5) +LIB_DEPENDS+= readline.5:${PORTSDIR}/devel/readline +.endif + +.else +NO_PKG_REGISTER= .endif WRKSRC= ${WRKDIR}/${DISTNAME:S/-src//g} -CONFIGURE_ARGS= --prefix=${PREFIX} -USE_GMAKE= yes -USE_AUTOTOOLS= autoconf:261:env -GHC_VERSION= 6.8.2 +GHC_VERSION= 6.8.2 +HADDOCK_VERSION= ${PORTVERSION} + +CABAL_CMD= runghc Setup.lhs -PLIST_SUB+= HADDOCK_VERSION=${PORTVERSION} GHC_VERSION=${GHC_VERSION} -PORTDOCS= * +DATADIR= ${PREFIX}/share/${DISTNAME} +HADDOCK_LIBDIR_REL= lib/${DISTNAME} +DOCSDIR= ${PREFIX}/share/doc/${DISTNAME} -post-patch: - @${REINPLACE_CMD} -e 's|/usr/local/share/sgml/catalog||' ${WRKSRC}/doc/configure.ac +PLIST_SUB= GHC_VERSION=${GHC_VERSION} \ + DATADIR_REL=${DATADIR_REL} \ + HADDOCK_LIBDIR_REL=${HADDOCK_LIBDIR_REL} \ + HADDOCK_VERSION=${HADDOCK_VERSION} \ + DOCSDIR_REL=${DOCSDIR_REL} + +.SILENT: do-configure: - cd ${WRKSRC} && runhaskell Setup.lhs configure --ghc ${CONFIGURE_ARGS} -.if !defined(NOPORTDOCS) - cd ${WRKSRC}/doc && ${AUTOCONF} && ./configure ${CONFIGURE_ARGS} -.endif + cd ${WRKSRC} && ${CABAL_CMD} configure --ghc --prefix=${PREFIX} do-build: - cd ${WRKSRC} && runhaskell Setup.lhs build - -post-build: -.if !defined(NOPORTDOCS) - @(cd ${WRKSRC}/doc && \ - ${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} html) + cd ${WRKSRC} && ${CABAL_CMD} build +.if !defined(SLAVE) + cd ${WRKSRC} && ${CABAL_CMD} register --gen-script .endif do-install: - cd ${WRKSRC} && runhaskell Setup.lhs install + cd ${WRKSRC} && ${CABAL_CMD} install post-install: - @${STRIP_CMD} ${PREFIX}/bin/haddock -.if !defined(NOPORTDOCS) - @(cd ${WRKSRC}/doc && ${CP} -R haddock ${PREFIX}/share/doc) + ${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 <bsd.port.mk> diff --git a/devel/hs-haddock/pkg-descr b/devel/hs-haddock/pkg-descr index 2504df29fb2c..51e5466f6a41 100644 --- a/devel/hs-haddock/pkg-descr +++ b/devel/hs-haddock/pkg-descr @@ -1,8 +1,11 @@ Haddock is a tool for automatically generating documentation from annotated Haskell source code. The documentation generated by Haddock is fully hyperlinked. +Haddock can generate documentation in multiple formats; currently HTML +is implemented, and there is partial support for generating DocBook. +author: Simon Marlow, David Waern +maintainer: David Waern <david.waern@gmail.com> +license: BSD3 +exposed-modules: Distribution.Haddock WWW: http://www.haskell.org/haddock/ - --- Oliver Braun -obraun@informatik.unibw-muenchen.de diff --git a/devel/hs-haddock/pkg-plist b/devel/hs-haddock/pkg-plist index cfe44902057e..4c3f560b60c3 100644 --- a/devel/hs-haddock/pkg-plist +++ b/devel/hs-haddock/pkg-plist @@ -1,23 +1,26 @@ bin/haddock -lib/haddock-%%HADDOCK_VERSION%%/ghc-%%GHC_VERSION%%/Distribution/Haddock.hi -lib/haddock-%%HADDOCK_VERSION%%/ghc-%%GHC_VERSION%%/HShaddock-%%HADDOCK_VERSION%%.o -lib/haddock-%%HADDOCK_VERSION%%/ghc-%%GHC_VERSION%%/Haddock/Exception.hi -lib/haddock-%%HADDOCK_VERSION%%/ghc-%%GHC_VERSION%%/Haddock/InterfaceFile.hi -lib/haddock-%%HADDOCK_VERSION%%/ghc-%%GHC_VERSION%%/Haddock/Types.hi -lib/haddock-%%HADDOCK_VERSION%%/ghc-%%GHC_VERSION%%/libHShaddock-%%HADDOCK_VERSION%%.a -share/doc/haddock-%%HADDOCK_VERSION%%/LICENSE -share/haddock-%%HADDOCK_VERSION%%/html/haddock-DEBUG.css -share/haddock-%%HADDOCK_VERSION%%/html/haddock-util.js -share/haddock-%%HADDOCK_VERSION%%/html/haddock.css -share/haddock-%%HADDOCK_VERSION%%/html/haskell_icon.gif -share/haddock-%%HADDOCK_VERSION%%/html/minus.gif -share/haddock-%%HADDOCK_VERSION%%/html/plus.gif -@dirrm lib/haddock-%%HADDOCK_VERSION%%/ghc-%%GHC_VERSION%%/Haddock -@dirrm lib/haddock-%%HADDOCK_VERSION%%/ghc-%%GHC_VERSION%%/Distribution -@dirrm lib/haddock-%%HADDOCK_VERSION%%/ghc-%%GHC_VERSION%% -@dirrm lib/haddock-%%HADDOCK_VERSION%% -@dirrm share/doc/haddock-%%HADDOCK_VERSION%% -@dirrm share/haddock-%%HADDOCK_VERSION%%/html -@dirrm share/haddock-%%HADDOCK_VERSION%% +%%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/Exception.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%%/libHShaddock-%%HADDOCK_VERSION%%.a +%%HADDOCK_LIBDIR_REL%%/register.sh +%%DOCSDIR%%/LICENSE +%%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%% +@dirrm %%DOCSDIR%% +@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 %D/%%HADDOCK_LIBDIR_REL%%/register.sh @exec rm -f %D/lib/ghc-%%GHC_VERSION%%/package.conf.old -@unexec rm -f %D/lib/ghc-%%GHC_VERSION%%/package.conf.old +@unexec if [ -x %D/bin/ghc-pkg ]; then %D/bin/ghc-pkg unregister haddock || /usr/bin/true; fi +@unexec if [ -f %D/lib/ghc-%%GHC_VERSION%%/package.conf.old ]; then rm -f %D/lib/ghc-%%GHC_VERSION%%/package.conf.old || /usr/bin/true; fi |