diff options
author | dbn <dbn@FreeBSD.org> | 2013-11-28 02:56:43 +0800 |
---|---|---|
committer | dbn <dbn@FreeBSD.org> | 2013-11-28 02:56:43 +0800 |
commit | 2a38a4b34a96fce90b1b730ac00b621e0e81f40f (patch) | |
tree | 75749e5a75551a5b29335357c10f4c95a9dc23da /Mk | |
parent | 19c623e8bad27bd88eefae617903f5411f12fa88 (diff) | |
download | freebsd-ports-gnome-2a38a4b34a96fce90b1b730ac00b621e0e81f40f.tar.gz freebsd-ports-gnome-2a38a4b34a96fce90b1b730ac00b621e0e81f40f.tar.zst freebsd-ports-gnome-2a38a4b34a96fce90b1b730ac00b621e0e81f40f.zip |
Add stage support to Mk/bsd.cran.mk and all USE_R_MOD ports (aka R-cran-*).
Since this patch converts all affected ports, bsd.cran.mk no longer supports
NO_STAGE and errors out if NO_STAGE is set.
Exp-run: ports/184216
Reviewed by: bdrewery
Approved by: portsmgr, wen
Diffstat (limited to 'Mk')
-rw-r--r-- | Mk/bsd.cran.mk | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/Mk/bsd.cran.mk b/Mk/bsd.cran.mk index 5b82c1f0588c..5353449ec1a6 100644 --- a/Mk/bsd.cran.mk +++ b/Mk/bsd.cran.mk @@ -27,7 +27,8 @@ RUN_DEPENDS+= ${LOCALBASE}/bin/R:${PORTSDIR}/math/R PKGNAMEPREFIX?= R-cran- -R_MOD_DIR?= lib/R/library/${PORTNAME} +R_LIB_DIR= lib/R/library +R_MOD_DIR?= ${R_LIB_DIR}/${PORTNAME} PLIST_SUB+= R_MOD_DIR=${R_MOD_DIR} WRKSRC?= ${WRKDIR}/${PORTNAME} @@ -41,6 +42,12 @@ R_POSTCMD_CHECK_OPTIONS?= --timings R_POSTCMD_CHECK_OPTIONS+= --no-manual --no-rebuild-vignettes .endif +.if defined(NO_STAGE) +check-makevars:: + @${ECHO_MSG} "Makefile error: USE_R_MOD cannot be used with NO_STAGE" + @${FALSE} +.endif + regression-test: build @cd ${WRKDIR} ; ${SETENV} ${MAKE_ENV} _R_CHECK_FORCE_SUGGESTS_=FALSE \ ${R_COMMAND} ${R_PRECMD_CHECK_OPTIONS} CMD check \ @@ -48,6 +55,7 @@ regression-test: build .endif .if !target(do-install) +R_POSTCMD_INSTALL_OPTIONS+= -l ${STAGEDIR}${PREFIX}/${R_LIB_DIR} .if defined(NOPORTDATA) R_POSTCMD_INSTALL_OPTIONS+= --no-data --no-demo .else @@ -59,6 +67,7 @@ R_POSTCMD_INSTALL_OPTIONS+= --no-docs --no-html .endif do-install: + @${MKDIR} ${STAGEDIR}${PREFIX}/${R_LIB_DIR} @cd ${WRKDIR} ; ${SETENV} ${MAKE_ENV} ${R_COMMAND} \ ${R_PRECMD_INSTALL_OPTIONS} CMD INSTALL \ ${R_POSTCMD_INSTALL_OPTIONS} ${PORTNAME} @@ -67,10 +76,10 @@ do-install: .if defined(R_MOD_AUTOPLIST) .if !target(post-install-script) post-install-script: - @${FIND} -ds ${PREFIX}/${R_MOD_DIR} \( -type f -or -type l \) -print | \ - ${SED} -E -e 's,^${PREFIX}/?,,' >> ${TMPPLIST} - @${FIND} -ds ${PREFIX}/${R_MOD_DIR} -type d -print | ${SED} -E -e \ - 's,^${PREFIX}/?,@dirrm ,' >> ${TMPPLIST} + @${FIND} -ds ${STAGEDIR}${PREFIX}/${R_MOD_DIR} \( -type f -or -type l \) -print | \ + ${SED} -E -e 's,^${STAGEDIR}${PREFIX}/?,,' >> ${TMPPLIST} + @${FIND} -ds ${STAGEDIR}${PREFIX}/${R_MOD_DIR} -type d -print | ${SED} -E -e \ + 's,^${STAGEDIR}${PREFIX}/?,@dirrm ,' >> ${TMPPLIST} .endif .endif |