diff options
author | pgj <pgj@FreeBSD.org> | 2014-01-10 05:32:12 +0800 |
---|---|---|
committer | pgj <pgj@FreeBSD.org> | 2014-01-10 05:32:12 +0800 |
commit | 1e8ecc139a38c58921cfe6dbac98c727b1cefd71 (patch) | |
tree | 604f06bea271b71fb7be1993c1c2ba323b4506e1 /lang/ghc/Makefile | |
parent | 85c277ebe0c60dd6aa5be2bceb4d04e10cdf1b13 (diff) | |
download | freebsd-ports-gnome-1e8ecc139a38c58921cfe6dbac98c727b1cefd71.tar.gz freebsd-ports-gnome-1e8ecc139a38c58921cfe6dbac98c727b1cefd71.tar.zst freebsd-ports-gnome-1e8ecc139a38c58921cfe6dbac98c727b1cefd71.zip |
- Stagify lang/ghc and all the Haskell Cabal ports
- Update HACKAGE_SITE to follow changes in upstream
- MAKE_ENV now sets LC_ALL and DESTDIR for Haskell Cabal ports
- Further minor cosmetical changes: replace USE_GMAKE with USES, get rid of
${DO_NADA}, some refactoring
Obtained from: FreeBSD Haskell
Diffstat (limited to 'lang/ghc/Makefile')
-rw-r--r-- | lang/ghc/Makefile | 45 |
1 files changed, 19 insertions, 26 deletions
diff --git a/lang/ghc/Makefile b/lang/ghc/Makefile index 721335016916..f35555b721c0 100644 --- a/lang/ghc/Makefile +++ b/lang/ghc/Makefile @@ -63,7 +63,6 @@ OPTIONS_DEFINE+= BOOT OPTIONS_DEFINE+= BOOTH .endif -NO_STAGE= yes .include <bsd.port.options.mk> .if ${PORT_OPTIONS:MDYNAMIC} @@ -109,13 +108,12 @@ IGNORE= unsupported .endif # MBOOT DOCSDIR= ${PREFIX}/share/doc/${DISTNAME} -GHC_LIBDIR= ${PREFIX}/lib/ghc-${GHC_VERSION} +GHC_LIBDIR= ${STAGEDIR}${PREFIX}/lib/ghc-${GHC_VERSION} GHC_LIBDIR_REL= lib/ghc-${GHC_VERSION} PLIST_SUB+= GHC_VERSION=${GHC_VERSION} GHC_LIBDIR=${GHC_LIBDIR_REL} -HACKAGE_SITE?= http://hackage.haskell.org/ -HACKAGE_ARCH?= packages/archive/ +HACKAGE_SITE?= http://hackage.haskell.org/package/ CONFIGURE_ARGS= --with-gcc=${CC} \ --with-ld=${LD} \ @@ -172,15 +170,13 @@ MAKE_ENV+= TMPDIR=${TMPDIR} .if empty(PORT_OPTIONS:MBOOTH) -MASTER_SITES+= ${HACKAGE_SITE}${HACKAGE_ARCH}hscolour/${HSCOLOUR_VERSION}/:docs +MASTER_SITES+= ${HACKAGE_SITE}hscolour-${HSCOLOUR_VERSION}/:docs DISTFILES+= hscolour-${HSCOLOUR_VERSION}.tar.gz:docs EXTRACT_ONLY= ${_DISTFILES:C/hscolour.*$//g} .endif # MBOOTH -MAN1= ghc.1 - .if empty(PORT_OPTIONS:MBOOTH) SLAVES_PREFIX= ${WRKDIR}/slaves_prefix @@ -235,27 +231,27 @@ post-extract: post-install-script: @${FIND} -ds ${GHC_LIBDIR} -type f -print | ${SED} -E -e \ '/^${GHC_LIBDIR:C/\//\\\//g}\/package.conf.d\/package\.cache/d' -e \ - 's,^${PREFIX}/?,,' >> ${TMPPLIST} - @${FIND} -ds ${DOCSDIR} -type f -print | ${SED} -E -e \ - '/^${DOCSDIR:C/\//\\\//g}\/html\/libraries\/doc-index-[^.]+\.html/d' -e \ - '/^${DOCSDIR:C/\//\\\//g}\/html\/libraries\/index[^\/.]*\.html/d' -e \ - '/^${DOCSDIR:C/\//\\\//g}\/html\/libraries\/[^\/]+\.png/d' -e \ - 's,^${PREFIX}/?,,' >> ${TMPPLIST} + 's,^${STAGEDIR}${PREFIX}/?,,' >> ${TMPPLIST} + @${FIND} -ds ${STAGEDIR}${DOCSDIR} -type f -print | ${SED} -E -e \ + '/^${STAGEDIR:C/\//\\\//g}${DOCSDIR:C/\//\\\//g}\/html\/libraries\/doc-index-[^.]+\.html/d' -e \ + '/^${STAGEDIR:C/\//\\\//g}${DOCSDIR:C/\//\\\//g}\/html\/libraries\/index[^\/.]*\.html/d' -e \ + '/^${STAGEDIR:C/\//\\\//g}${DOCSDIR:C/\//\\\//g}\/html\/libraries\/[^\/]+\.png/d' -e \ + 's,^${STAGEDIR}${PREFIX}/?,,' >> ${TMPPLIST} .if ${PORT_OPTIONS:MDOCS} # Cleanup the indexen created by gen_contents_index @${ECHO} "@unexec ${RM} -f %D/${DOCSDIR_REL}/html/libraries/doc-index-*.html" >> ${TMPPLIST} @${ECHO} "@unexec ${RM} -f %D/${DOCSDIR_REL}/html/libraries/index*.html" >> ${TMPPLIST} @${ECHO} "@unexec ${RM} -f %D/${DOCSDIR_REL}/html/libraries/*.png" >> ${TMPPLIST} .endif + @${ECHO} '@unexec ${RM} -f %D/${GHC_LIBDIR_REL}/package.conf.d/package.cache' >>${TMPPLIST} @${ECHO} "@exec %D/bin/ghc-pkg recache" >>${TMPPLIST} .if ${PORT_OPTIONS:MDOCS} @${ECHO} '@exec ${SH} -c "cd %D/${DOCSDIR_REL}/html/libraries && ./gen_contents_index"' >> ${TMPPLIST} .endif - @${ECHO} '@unexec ${RM} -f %D/${GHC_LIBDIR_REL}/package.conf.d/package.cache' >>${TMPPLIST} - @${FIND} -ds ${DOCSDIR} -type d -print | ${SED} -E -e \ - 's,^${PREFIX}/?,@dirrm ,' >> ${TMPPLIST} + @${FIND} -ds ${STAGEDIR}${DOCSDIR} -type d -print | ${SED} -E -e \ + 's,^${STAGEDIR}${PREFIX}/?,@dirrm ,' >> ${TMPPLIST} @${FIND} -ds ${GHC_LIBDIR} -type d -print | ${SED} -E -e \ - 's,^${PREFIX}/?,@dirrm ,' >> ${TMPPLIST} + 's,^${STAGEDIR}${PREFIX}/?,@dirrm ,' >> ${TMPPLIST} #post-build: # @(cd ${WRKSRC} && ${GMAKE} binary-dist) @@ -316,16 +312,13 @@ pre-configure: post-install: # cabalised hs-foo-ghc ports - @${MKDIR} ${PREFIX}/lib/cabal/ghc-${GHC_VERSION} - @${MKDIR} ${PREFIX}/share/cabal/ghc-${GHC_VERSION} - @${MKDIR} ${PREFIX}/share/doc/cabal/ghc-${GHC_VERSION} - @${MKDIR} ${PREFIX}/share/examples/cabal/ghc-${GHC_VERSION} -.if ${PORT_OPTIONS:MDOCS} - cd ${DOCSDIR}/html/libraries && ./gen_contents_index -.endif - @${RM} -f ${PREFIX}/bin/haddock + @${MKDIR} ${STAGEDIR}${PREFIX}/lib/cabal/ghc-${GHC_VERSION} + @${MKDIR} ${STAGEDIR}${PREFIX}/share/cabal/ghc-${GHC_VERSION} + @${MKDIR} ${STAGEDIR}${PREFIX}/share/doc/cabal/ghc-${GHC_VERSION} + @${MKDIR} ${STAGEDIR}${PREFIX}/share/examples/cabal/ghc-${GHC_VERSION} + @${RM} -f ${STAGEDIR}${PREFIX}/bin/haddock .if ${PORT_OPTIONS:MDOCS} - @${LN} -sf ${PREFIX}/bin/haddock-ghc-${GHC_VERSION} ${PREFIX}/bin/haddock + @${LN} -sf haddock-ghc-${GHC_VERSION} ${STAGEDIR}${PREFIX}/bin/haddock .endif .include <bsd.port.mk> |