aboutsummaryrefslogtreecommitdiffstats
path: root/Mk
diff options
context:
space:
mode:
authordbn <dbn@FreeBSD.org>2013-12-28 18:28:40 +0800
committerdbn <dbn@FreeBSD.org>2013-12-28 18:28:40 +0800
commit73b16c18ce434585aeb3497fed4dd824d127b0bd (patch)
tree8d0f3f2f1eae811733e7cf9c6eb644ab6da66df7 /Mk
parentc54958aa0d54379fcc5b0a60c1149ddc266936fe (diff)
downloadfreebsd-ports-gnome-73b16c18ce434585aeb3497fed4dd824d127b0bd.tar.gz
freebsd-ports-gnome-73b16c18ce434585aeb3497fed4dd824d127b0bd.tar.zst
freebsd-ports-gnome-73b16c18ce434585aeb3497fed4dd824d127b0bd.zip
Convert Mk/bsd.cran.mk to the Uses framework.
PR: ports/184699 Reviewed by: bapt Approved by: portmgr (bdrewery), wen (maintainer, timeout > 2 weeks)
Diffstat (limited to 'Mk')
-rw-r--r--Mk/Uses/cran.mk190
-rw-r--r--Mk/bsd.cran.mk85
-rw-r--r--Mk/bsd.port.mk6
3 files changed, 190 insertions, 91 deletions
diff --git a/Mk/Uses/cran.mk b/Mk/Uses/cran.mk
new file mode 100644
index 000000000000..5bcf2f75d35e
--- /dev/null
+++ b/Mk/Uses/cran.mk
@@ -0,0 +1,190 @@
+# $FreeBSD$
+#
+# Use the Comprehensive R Archive Network
+#
+# MAINTAINER= wen@FreeBSD.org
+#
+# Feature: cran
+# Usage: USES=cran or USES=cran:ARGS
+# Valid ARGS: auto-plist
+#
+# auto-plist The pkg-plist can be automatically compiled
+
+.if !defined(_INCLUDE_USES_CRAN_MK)
+_INCLUDE_USES_CRAN_MK= yes
+
+VALID_ARGS= auto-plist
+
+MASTER_SITE_CRAN+= http://ftp.ctex.org/mirrors/CRAN/src/contrib/ \
+ http://cran.rakanu.com/src/contrib/ \
+ http://cran.ms.unimelb.edu.au/src/contrib/ \
+ http://mirror.its.dal.ca/cran/src/contrib/ \
+ http://mirrors.dotsrc.org/cran/src/contrib/ \
+ http://cran.univ-lyon1.fr/src/contrib/ \
+ http://ftp5.gwdg.de/pub/misc/cran/src/contrib/ \
+ http://cran.stat.unipd.it/src/contrib/ \
+ http://cran.md.tsukuba.ac.jp/src/contrib/ \
+ http://mirrors.ibiblio.org/pub/mirrors/CRAN/src/contrib/ \
+ http://cran.cnr.berkeley.edu/src/contrib/
+MASTER_SITE_CRAN_ARCHIVE+= ${MASTER_SITE_CRAN:S,$,Archive/${PORTNAME}/,}
+
+MASTER_SITES?= ${MASTER_SITE_CRAN} ${MASTER_SITE_CRAN_ARCHIVE}
+
+USE_FORTRAN= yes
+BUILD_DEPENDS+= ${LOCALBASE}/bin/R:${PORTSDIR}/math/R
+RUN_DEPENDS+= ${LOCALBASE}/bin/R:${PORTSDIR}/math/R
+
+PKGNAMEPREFIX?= R-cran-
+
+R_LIB_DIR= lib/R/library
+R_MOD_DIR?= ${R_LIB_DIR}/${PORTNAME}
+PLIST_SUB+= R_MOD_DIR=${R_MOD_DIR}
+WRKSRC?= ${WRKDIR}/${PORTNAME}
+
+NO_BUILD= yes
+R_COMMAND= ${LOCALBASE}/bin/R
+
+.if !target(regression-test)
+R_POSTCMD_CHECK_OPTIONS?= --timings
+
+.if !exists(${LOCALBASE}/bin/pdflatex)
+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 \
+ ${R_POSTCMD_CHECK_OPTIONS} ${PORTNAME}
+.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
+R_POSTCMD_INSTALL_OPTIONS+= --install-tests
+.endif
+
+.if defined(NOPORTDOCS)
+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}
+.endif
+
+.if ${cran_ARGS:Mauto-plist}
+.if !target(post-install-script)
+post-install-script:
+ @${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
+
+.endif #_INCLUDE_USES_CRAN_MK
+# $FreeBSD$
+#
+# Use the Comprehensive R Archive Network
+#
+# MAINTAINER= wen@FreeBSD.org
+#
+# Feature: cran
+# Usage: USES=cran or USES=cran:ARGS
+# Valid ARGS: auto-plist
+#
+# auto-plist The pkg-plist can be automatically compiled
+
+.if !defined(_INCLUDE_USES_CRAN_MK)
+_INCLUDE_USES_CRAN_MK= yes
+
+VALID_ARGS= auto-plist
+
+MASTER_SITE_CRAN+= http://ftp.ctex.org/mirrors/CRAN/src/contrib/ \
+ http://cran.rakanu.com/src/contrib/ \
+ http://cran.ms.unimelb.edu.au/src/contrib/ \
+ http://mirror.its.dal.ca/cran/src/contrib/ \
+ http://mirrors.dotsrc.org/cran/src/contrib/ \
+ http://cran.univ-lyon1.fr/src/contrib/ \
+ http://ftp5.gwdg.de/pub/misc/cran/src/contrib/ \
+ http://cran.stat.unipd.it/src/contrib/ \
+ http://cran.md.tsukuba.ac.jp/src/contrib/ \
+ http://mirrors.ibiblio.org/pub/mirrors/CRAN/src/contrib/ \
+ http://cran.cnr.berkeley.edu/src/contrib/
+MASTER_SITE_CRAN_ARCHIVE+= ${MASTER_SITE_CRAN:S,$,Archive/${PORTNAME}/,}
+
+MASTER_SITES?= ${MASTER_SITE_CRAN} ${MASTER_SITE_CRAN_ARCHIVE}
+
+USE_FORTRAN= yes
+BUILD_DEPENDS+= ${LOCALBASE}/bin/R:${PORTSDIR}/math/R
+RUN_DEPENDS+= ${LOCALBASE}/bin/R:${PORTSDIR}/math/R
+
+PKGNAMEPREFIX?= R-cran-
+
+R_LIB_DIR= lib/R/library
+R_MOD_DIR?= ${R_LIB_DIR}/${PORTNAME}
+PLIST_SUB+= R_MOD_DIR=${R_MOD_DIR}
+WRKSRC?= ${WRKDIR}/${PORTNAME}
+
+NO_BUILD= yes
+R_COMMAND= ${LOCALBASE}/bin/R
+
+.if !target(regression-test)
+R_POSTCMD_CHECK_OPTIONS?= --timings
+
+.if !exists(${LOCALBASE}/bin/pdflatex)
+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 \
+ ${R_POSTCMD_CHECK_OPTIONS} ${PORTNAME}
+.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
+R_POSTCMD_INSTALL_OPTIONS+= --install-tests
+.endif
+
+.if defined(NOPORTDOCS)
+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}
+.endif
+
+.if ${cran_ARGS:Mauto-plist}
+.if !target(post-install-script)
+post-install-script:
+ @${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
+
+.endif #_INCLUDE_USES_CRAN_MK
diff --git a/Mk/bsd.cran.mk b/Mk/bsd.cran.mk
deleted file mode 100644
index 5353449ec1a6..000000000000
--- a/Mk/bsd.cran.mk
+++ /dev/null
@@ -1,85 +0,0 @@
-# Date created: 2009-01-25
-# Whom: Wen Heping <wenheping@gmail.com>
-#
-# $FreeBSD$
-#
-
-CRAN_Include_MAINTAINER= wen@FreeBSD.org
-
-MASTER_SITE_CRAN+= http://ftp.ctex.org/mirrors/CRAN/src/contrib/ \
- http://cran.rakanu.com/src/contrib/ \
- http://cran.ms.unimelb.edu.au/src/contrib/ \
- http://mirror.its.dal.ca/cran/src/contrib/ \
- http://mirrors.dotsrc.org/cran/src/contrib/ \
- http://cran.univ-lyon1.fr/src/contrib/ \
- http://ftp5.gwdg.de/pub/misc/cran/src/contrib/ \
- http://cran.stat.unipd.it/src/contrib/ \
- http://cran.md.tsukuba.ac.jp/src/contrib/ \
- http://mirrors.ibiblio.org/pub/mirrors/CRAN/src/contrib/ \
- http://cran.cnr.berkeley.edu/src/contrib/
-MASTER_SITE_CRAN_ARCHIVE+= ${MASTER_SITE_CRAN:S,$,Archive/${PORTNAME}/,}
-
-MASTER_SITES?= ${MASTER_SITE_CRAN} ${MASTER_SITE_CRAN_ARCHIVE}
-
-USE_FORTRAN= yes
-BUILD_DEPENDS+= ${LOCALBASE}/bin/R:${PORTSDIR}/math/R
-RUN_DEPENDS+= ${LOCALBASE}/bin/R:${PORTSDIR}/math/R
-
-PKGNAMEPREFIX?= R-cran-
-
-R_LIB_DIR= lib/R/library
-R_MOD_DIR?= ${R_LIB_DIR}/${PORTNAME}
-PLIST_SUB+= R_MOD_DIR=${R_MOD_DIR}
-WRKSRC?= ${WRKDIR}/${PORTNAME}
-
-NO_BUILD= yes
-R_COMMAND= ${LOCALBASE}/bin/R
-
-.if !target(regression-test)
-R_POSTCMD_CHECK_OPTIONS?= --timings
-
-.if !exists(${LOCALBASE}/bin/pdflatex)
-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 \
- ${R_POSTCMD_CHECK_OPTIONS} ${PORTNAME}
-.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
-R_POSTCMD_INSTALL_OPTIONS+= --install-tests
-.endif
-
-.if defined(NOPORTDOCS)
-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}
-.endif
-
-.if defined(R_MOD_AUTOPLIST)
-.if !target(post-install-script)
-post-install-script:
- @${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
-
diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk
index 9a3cb07bf13c..3f6479fadac1 100644
--- a/Mk/bsd.port.mk
+++ b/Mk/bsd.port.mk
@@ -414,8 +414,6 @@ FreeBSD_MAINTAINER= portmgr@FreeBSD.org
# Implies inclusion of bsd.python.mk. (Also see
# that file for more information on USE_PYTHON_*
# and USE_PYDISTUTILS).
-# USE_R_MOD - If set, this port uses the Comprehensive R Archive Network.
-# See bsd.cran.mk for more details.
# USE_RUBY - If set, this port relies on the Ruby language.
# Implies inclusion of bsd.ruby.mk. (Also see
# that file for more information on USE_RUBY_*).
@@ -1428,10 +1426,6 @@ PKGCOMPATDIR?= ${LOCALBASE}/lib/compat/pkg
.include "${PORTSDIR}/Mk/bsd.java.mk"
.endif
-.if defined(USE_R_MOD)
-.include "${PORTSDIR}/Mk/bsd.cran.mk"
-.endif
-
.if defined(USE_RUBY) || defined(USE_LIBRUBY)
.include "${PORTSDIR}/Mk/bsd.ruby.mk"
.endif