diff options
author | pgj <pgj@FreeBSD.org> | 2014-08-26 02:19:10 +0800 |
---|---|---|
committer | pgj <pgj@FreeBSD.org> | 2014-08-26 02:19:10 +0800 |
commit | 92aa35f715ca31e605f9b67336d27088e357edee (patch) | |
tree | d10030b42241b556d7262fe941167da38c9502e0 /lang | |
parent | 3b41994acc23cd1eedd6d7545332d455e76a914c (diff) | |
download | freebsd-ports-gnome-92aa35f715ca31e605f9b67336d27088e357edee.tar.gz freebsd-ports-gnome-92aa35f715ca31e605f9b67336d27088e357edee.tar.zst freebsd-ports-gnome-92aa35f715ca31e605f9b67336d27088e357edee.zip |
- Add support for specifying TMPDIR when building hs- ports [1]
- Rework manual pages support
- Work around a possible pkg(8) bug (see pkg #985)
PR: 192940 [1]
Reported by: marino [1]
Obtained from: FreeBSD Haskell
Diffstat (limited to 'lang')
-rw-r--r-- | lang/ghc/bsd.cabal.mk | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/lang/ghc/bsd.cabal.mk b/lang/ghc/bsd.cabal.mk index 8cfb213cbaf2..f1d1f414c9fb 100644 --- a/lang/ghc/bsd.cabal.mk +++ b/lang/ghc/bsd.cabal.mk @@ -22,7 +22,8 @@ NO_INSTALL= yes NO_MTREE= yes .endif # !METAPORT -MAKE_ENV+= LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 DESTDIR=${STAGEDIR} +MAKE_ENV+= LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 DESTDIR=${STAGEDIR} \ + TMPDIR=${TMPDIR} SETUP_CMD?= ./setup @@ -63,6 +64,7 @@ INSTALL_PORTDATA?= INSTALL_PORTEXAMPLES?= LOCALBASE?= /usr/local +TMPDIR?= ${WRKDIR}/tmp .if !defined(CABALOPTIONSMKINCLUDED) .include "bsd.cabal.options.mk" @@ -208,6 +210,7 @@ _BUILD_SETUP= ${GHC_CMD} -o ${SETUP_CMD} -package Cabal --make .if !defined(METAPORT) .if !target(do-configure) do-configure: + @${MKDIR} ${TMPDIR} @if [ -f ${WRKSRC}/Setup.hs ]; then \ cd ${WRKSRC} && ${_BUILD_SETUP} Setup.hs; fi @if [ -f ${WRKSRC}/Setup.lhs ]; then \ @@ -249,17 +252,13 @@ do-build: .endif # target(do-build) .endif # !METAPORT -.if defined(MAN1PAGES) -.for man in ${MAN1PAGES} -PLIST_FILES+= man/man1/${man}.gz +.for sect in 1 2 3 4 5 6 7 8 9 +.if defined(MAN${sect}PAGES) +.for man in ${MAN${sect}PAGES} +PLIST_FILES+= man/man${sect}/${man}.gz .endfor .endif - -.if defined(MAN5PAGES) -.for man in ${MAN5PAGES} -PLIST_FILES+= man/man5/${man}.gz .endfor -.endif .if !defined(METAPORT) .if !target(do-install) @@ -280,11 +279,13 @@ do-install: ${INSTALL_PORTEXAMPLES} .endif -.if defined(MAN1SRC) -.for man in ${MAN1PAGES} - @${INSTALL_MAN} ${WRKSRC}/${MAN1SRC}/${man} ${STAGEDIR}${MANPREFIX}/man/man1 +.for sect in 1 2 3 4 5 6 7 8 9 +.if defined(MAN${sect}SRC) +.for man in ${MAN${sect}PAGES} + @${INSTALL_MAN} ${WRKSRC}/${MAN${sect}SRC}/${man} ${STAGEDIR}${MANPREFIX}/man/man${sect} +.endfor +.endif # MAN${sect}SRC .endfor -.endif # MAN1SRC .if ${PORT_OPTIONS:MDOCS} .if !empty(XMLDOCS) @@ -298,10 +299,6 @@ do-install: .if !target(post-install-script) post-install-script: - @for dir in ${CABAL_DIRS}; do if [ -d ${STAGEDIR}$${dir} ]; then ${FIND} -ds ${STAGEDIR}$${dir} \ - -type f -print | ${SED} -E -e 's,^${STAGEDIR}${PREFIX}/?,,' >> ${TMPPLIST}; fi ; \ - if [ -d ${STAGEDIR}$${dir} ]; then ${FIND} -ds ${STAGEDIR}$${dir} \ - -type d -print | ${SED} -E -e 's,^${STAGEDIR}${PREFIX}/?,@dirrm ,' >> ${TMPPLIST}; fi ; done .if defined(EXECUTABLE) .for exe in ${EXECUTABLE} @${ECHO_CMD} 'bin/${exe}' >>${TMPPLIST} @@ -313,8 +310,11 @@ post-install-script: if [ -d ${STAGEDIR}${PREFIX}/$${dir}/cabal ]; then \ echo "@dirrmtry $${dir}/cabal" >> ${TMPPLIST}; fi ; done .endif -.endif - +.endif # EXECUTABLE + @for dir in ${CABAL_DIRS}; do if [ -d ${STAGEDIR}$${dir} ]; then ${FIND} -ds ${STAGEDIR}$${dir} \ + -type f -print | ${SED} -E -e 's,^${STAGEDIR}${PREFIX}/?,,' >> ${TMPPLIST}; fi ; \ + if [ -d ${STAGEDIR}$${dir} ]; then ${FIND} -ds ${STAGEDIR}$${dir} \ + -type d -print | ${SED} -E -e 's,^${STAGEDIR}${PREFIX}/?,@dirrm ,' >> ${TMPPLIST}; fi ; done .endif # target(post-install-script) .if !defined(METAPORT) @@ -326,9 +326,9 @@ add-plist-cabal: .endif .if defined(HADDOCK_AVAILABLE) && ${PORT_OPTIONS:MDOCS} - @(${ECHO_CMD} '@unexec ${RM} -f ${LOCALBASE}/${GHC_LIB_DOCSDIR_REL}/${DISTNAME}' ; \ + @(${ECHO_CMD} '@unexec ${RM} ${LOCALBASE}/${GHC_LIB_DOCSDIR_REL}/${DISTNAME}' ; \ ${ECHO_CMD} '@unexec cd ${LOCALBASE}/${GHC_LIB_DOCSDIR_REL} && \ - ${RM} -f doc-index*.html && ./gen_contents_index') >> ${TMPPLIST} + ${RM} doc-index*.html && ./gen_contents_index') >> ${TMPPLIST} .endif .if !defined(STANDALONE) @@ -338,7 +338,7 @@ add-plist-cabal: .if defined(HADDOCK_AVAILABLE) && ${PORT_OPTIONS:MDOCS} @(${ECHO_CMD} '@exec ${LN} -s ${DOCSDIR}/html ${LOCALBASE}/${GHC_LIB_DOCSDIR_REL}/${DISTNAME} && \ cd ${LOCALBASE}/${GHC_LIB_DOCSDIR_REL} && \ - ${RM} -f doc-index*.html && ./gen_contents_index') >> ${TMPPLIST} + ${RM} doc-index*.html && ./gen_contents_index') >> ${TMPPLIST} .endif .endif # !METAPORT |