mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-26 00:55:14 +00:00
bb5196a149
variables deprecation revision WITHOUT_NLS 2013-12-13 r336337 WITH_/WITHOUT_ 2014-02-24 r345870 NOPORT(DOC|EXAMPLE)S 2014-04-19 r351587 WITH_BDB_VER 2016-05-02 r414444 OVERRIDE_LINUX_BASE_PORT 2016-09-05 r421387 WITH_OPENSSL_(BASE|PORT) 2016-06-16 r416965 While there, add an ERROR variable that works like DEV_ERROR, but for user facing errors, and move NOPORTDOCS, NOPORTEXAMPLES and WITHOUT_NLS to it. Cleanup bsd.sanity.mk a bit. Fix fallout. PR: 224613 Submitted by: mat Exp-run by: antoine Sponsored by: Absolight Differential Revision: https://reviews.freebsd.org/D13490
79 lines
2.0 KiB
Makefile
79 lines
2.0 KiB
Makefile
# $FreeBSD$
|
|
#
|
|
# Use the Comprehensive R Archive Network
|
|
#
|
|
# Feature: cran
|
|
# Usage: USES=cran or USES=cran:ARGS
|
|
# Valid ARGS: auto-plist, compiles
|
|
#
|
|
# auto-plist The pkg-plist is to be automatically generated
|
|
# compiles The port has code that needs to be compiled
|
|
#
|
|
# MAINTAINER= dbn@FreeBSD.org
|
|
|
|
.if !defined(_INCLUDE_USES_CRAN_MK)
|
|
_INCLUDE_USES_CRAN_MK= yes
|
|
|
|
MASTER_SITES?= CRAN/src/contrib CRAN_ARCHIVE/src/contrib
|
|
|
|
BUILD_DEPENDS+= ${LOCALBASE}/bin/R:math/R
|
|
RUN_DEPENDS+= ${LOCALBASE}/bin/R: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(do-test)
|
|
R_POSTCMD_CHECK_OPTIONS?= --timings
|
|
|
|
.if !exists(${LOCALBASE}/bin/pdflatex)
|
|
R_POSTCMD_CHECK_OPTIONS+= --no-manual --no-build-vignettes
|
|
.endif
|
|
|
|
do-test:
|
|
@${FIND} ${WRKSRC} \( -name '*.o' -o -name '*.so' \) -delete
|
|
@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}
|
|
R_POSTCMD_INSTALL_OPTIONS+= --install-tests
|
|
|
|
.if empty(PORT_OPTIONS:MDOCS)
|
|
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}
|
|
_USES_install+= 750:cran-auto-plist
|
|
cran-auto-plist:
|
|
@${FIND} -ds ${STAGEDIR}${PREFIX}/${R_MOD_DIR} \( -type f -or -type l \) -print | \
|
|
${SED} -E -e 's,^${STAGEDIR}${PREFIX}/?,,' >> ${TMPPLIST}
|
|
.endif
|
|
|
|
.if ${cran_ARGS:Mcompiles}
|
|
_USES_install+= 755:cran-strip
|
|
cran-strip:
|
|
${FIND} ${STAGEDIR}${PREFIX}/${R_MOD_DIR} -name '*.so' -exec ${STRIP_CMD} {} +
|
|
.include "${PORTSDIR}/math/R/compiler.mk"
|
|
.include "${USESDIR}/fortran.mk"
|
|
.else
|
|
NO_ARCH= yes
|
|
.endif
|
|
|
|
.endif #_INCLUDE_USES_CRAN_MK
|