diff options
author | Gabor Pali <pgj@FreeBSD.org> | 2013-04-15 13:11:37 +0000 |
---|---|---|
committer | Gabor Pali <pgj@FreeBSD.org> | 2013-04-15 13:11:37 +0000 |
commit | 0be147caf61264929726886e588533f3f2ea4a33 (patch) | |
tree | 0dd14264cb6cf3844afd40ff22ef299782ca6908 /lang/ghc | |
parent | - Update to 0.85 (diff) |
- Unbreak hs- ports when lang/ghc installed without haddock, the
documentation tool (which is installed by default)
Reported by: lev
Reviewed by: ashish
Approved by: portmgr (tabthorpe)
Obtained from: FreeBSD Haskell
Notes
Notes:
svn path=/head/; revision=315803
Diffstat (limited to 'lang/ghc')
-rw-r--r-- | lang/ghc/bsd.cabal.mk | 23 | ||||
-rw-r--r-- | lang/ghc/bsd.cabal.options.mk | 1 |
2 files changed, 9 insertions, 15 deletions
diff --git a/lang/ghc/bsd.cabal.mk b/lang/ghc/bsd.cabal.mk index 59978dc20a70..39ef7366e4e0 100644 --- a/lang/ghc/bsd.cabal.mk +++ b/lang/ghc/bsd.cabal.mk @@ -21,8 +21,6 @@ NO_BUILD= yes DIST_SUBDIR?= cabal -FILE_LICENSE?= LICENSE - CABAL_SETUP?= Setup.lhs SETUP_CMD?= ./setup @@ -30,7 +28,8 @@ ALEX_CMD?= ${LOCALBASE}/bin/alex HAPPY_CMD?= ${LOCALBASE}/bin/happy C2HS_CMD?= ${LOCALBASE}/bin/c2hs -CABAL_DIRS+= ${DATADIR} ${EXAMPLESDIR} ${CABAL_LIBDIR}/${CABAL_LIBSUBDIR} +CABAL_DIRS+= ${DATADIR} ${EXAMPLESDIR} ${CABAL_LIBDIR}/${CABAL_LIBSUBDIR} \ + ${DOCSDIR} GHC_HADDOCK_CMD=${LOCALBASE}/bin/haddock-ghc-${GHC_VERSION} @@ -140,6 +139,7 @@ USE_PERL5_BUILD= 5.8+ .if ${PORT_OPTIONS:MDOCS} .if !defined(XMLDOCS) +.if defined(HADDOCK_AVAILABLE) HADDOCK_OPTS= # empty .if ${PORT_OPTIONS:MHSCOLOUR} @@ -149,6 +149,7 @@ HSCOLOUR_VERSION= 1.20.3 HSCOLOUR_DATADIR= ${LOCALBASE}/share/ghc-${GHC_VERSION}/cabal/hscolour-${HSCOLOUR_VERSION} HADDOCK_OPTS+= --hyperlink-source --hscolour-css=${HSCOLOUR_DATADIR}/hscolour.css .endif # HSCOLOUR +.endif # HADDOCK_AVAILABLE .endif @@ -160,15 +161,11 @@ USE_GMAKE= yes .endif # !XMLDOCS -.if !defined(METAPORT) -PORTDOCS= * -.endif # !METAPORT - .endif # DOCS __handle_datadir__= --datadir='${DATADIR}' --datasubdir='' --docdir='${DOCSDIR}' -.if !defined(XMLDOCS) && ${PORT_OPTIONS:MDOCS} +.if defined(HADDOCK_AVAILABLE) && !defined(XMLDOCS) && ${PORT_OPTIONS:MDOCS} CONFIGURE_ARGS+= --haddock-options=-w --with-haddock=${HADDOCK_CMD} .endif @@ -235,7 +232,7 @@ do-build: .endif .if ${PORT_OPTIONS:MDOCS} -.if !defined(XMLDOCS) && !defined(STANDALONE) && ${PORT_OPTIONS:MDOCS} +.if defined(HADDOCK_AVAILABLE) && !defined(XMLDOCS) && !defined(STANDALONE) && ${PORT_OPTIONS:MDOCS} cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${SETUP_CMD} haddock ${HADDOCK_OPTS} .endif # STANDALONE .if defined(XMLDOCS) @@ -304,11 +301,7 @@ add-plist-cabal: @if [ -f ${CABAL_LIBDIR}/${CABAL_LIBSUBDIR}/register.sh ]; then \ (${ECHO_CMD} '@exec ${SH} %D/${CABAL_LIBDIR_REL}/${CABAL_LIBSUBDIR}/register.sh'; \ ${ECHO_CMD} '@unexec %D/bin/ghc-pkg unregister --force ${PORTNAME}-${PORTVERSION}') >> ${TMPPLIST}; fi -.if empty(PORT_OPTIONS:MDOCS) - @if [ -f ${DOCSDIR}/${FILE_LICENSE} ]; then \ - (${ECHO_CMD} '${DOCSDIR_REL}/${FILE_LICENSE}'; \ - ${ECHO_CMD} '@unexec ${RMDIR} "%D/${DOCSDIR_REL}" 2>/dev/null || true') >>${TMPPLIST}; fi -.else +.if defined(HADDOCK_AVAILABLE) && ${PORT_OPTIONS:MDOCS} @(${ECHO_CMD} '@exec if [ -f %D/${GHC_LIB_DOCSDIR_REL}/gen_contents_index ]; then ${LN} -s ${DOCSDIR}/html %D/${GHC_LIB_DOCSDIR_REL}/${DISTNAME} && \ cd %D/${GHC_LIB_DOCSDIR_REL} && ${RM} -f doc-index*.html && ./gen_contents_index; fi' ; \ ${ECHO_CMD} '@unexec ${RM} -f %D/${GHC_LIB_DOCSDIR_REL}/${DISTNAME}' ; \ @@ -320,7 +313,7 @@ add-plist-cabal: post-install:: .if !defined(METAPORT) -.if ${PORT_OPTIONS:MDOCS} +.if defined(HADDOCK_AVAILABLE) && ${PORT_OPTIONS:MDOCS} @if [ -f ${PREFIX}/${GHC_LIB_DOCSDIR_REL}/gen_contents_index ]; then \ ${LN} -s ${DOCSDIR}/html ${PREFIX}/${GHC_LIB_DOCSDIR_REL}/${DISTNAME} && \ cd ${PREFIX}/${GHC_LIB_DOCSDIR_REL} && \ diff --git a/lang/ghc/bsd.cabal.options.mk b/lang/ghc/bsd.cabal.options.mk index 53ad1d0da701..b222ac88fb94 100644 --- a/lang/ghc/bsd.cabal.options.mk +++ b/lang/ghc/bsd.cabal.options.mk @@ -35,6 +35,7 @@ OPTIONS_DEFINE+= PROFILE .if !exists(${GHC_CMD}) || ((exists(${HADDOCK_CMD}) && exists(${LOCALBASE}/lib/ghc-${GHC_VERSION}/html)) && !defined(NOPORTDOCS)) OPTIONS_DEFINE+= DOCS OPTIONS_DEFAULT+= DOCS +HADDOCK_AVAILABLE= yes .if (${PORTNAME} != hscolour || exists(${HSCOLOUR_CMD})) && !defined(IGNORE_HSCOLOUR) OPTIONS_DEFINE+= HSCOLOUR |