diff options
author | markd <markd> | 2002-04-23 01:14:49 +0000 |
---|---|---|
committer | markd <markd> | 2002-04-23 01:14:49 +0000 |
commit | daf71e6de4f33c2f88df8cdd502086a446406e9f (patch) | |
tree | d253d206daccba9fa9dcf771789804c8e92fa889 /math/R | |
parent | 1cf278013c849b9f79e16bd882db12575d607344 (diff) | |
download | pkgsrc-daf71e6de4f33c2f88df8cdd502086a446406e9f.tar.gz |
Change MASTER_SITES to use the CRAN list.
Add support for building R extension packages as pkgsrc packages.
Bump PKGREVISION so extension packages can depend on a version of R with
this support.
Discussed with Johnny Lam.
Diffstat (limited to 'math/R')
-rw-r--r-- | math/R/Makefile | 24 | ||||
-rw-r--r-- | math/R/Makefile.extension | 42 |
2 files changed, 52 insertions, 14 deletions
diff --git a/math/R/Makefile b/math/R/Makefile index d67c998893a..c006556ca76 100644 --- a/math/R/Makefile +++ b/math/R/Makefile @@ -1,19 +1,9 @@ -# $NetBSD: Makefile,v 1.31 2002/03/13 17:37:23 fredb Exp $ +# $NetBSD: Makefile,v 1.32 2002/04/23 01:14:49 markd Exp $ DISTNAME= R-1.4.1 -PKGREVISION= 1 +PKGREVISION= 2 CATEGORIES= math -MASTER_SITES= http://lib.stat.cmu.edu/R/CRAN/src/base/ \ - http://cran.r-project.org/src/base/ \ - ftp://cran.r-project.org/pub/R/src/base/ \ - http://cran.stat.wisc.edu/src/base/ \ - http://SunSITE.auc.dk/R/src/base/ \ - ftp://ftp.u-aizu.ac.jp/pub/lang/R/CRAN/src/base/ \ - ftp://dola.snu.ac.kr/pub/R/CRAN/src/base/ \ - http://stat.ethz.ch/CRAN/src/base/ \ - http://www.stats.bris.ac.uk/R/src/base/ \ - http://cran.at.r-project.org/src/base/ \ - ftp://cran.at.r-project.org/pub/R/src/base/ +MASTER_SITES= ${MASTER_SITE_R_CRAN:=base/} EXTRACT_SUFX= .tgz MAINTAINER= jlam@netbsd.org @@ -91,12 +81,18 @@ post-install: for dir in ${INSTALL_DIRS}; do \ ${FIND} $${dir#${PREFIX}/} \( -type f -or -type l \) -print; \ done; \ - ) | ${SORT} -u >> ${PLIST_SRC} + ) | ${GREP} -v "lib/R/doc/html/packages.html" | \ + ${GREP} -v "lib/R/doc/html/search/index.txt" | \ + ${SORT} -u >> ${PLIST_SRC} ( cd ${PREFIX}; \ for dir in ${INSTALL_DIRS}; do \ ${FIND} $${dir#${PREFIX}/} -type d -print; \ done; \ ) | ${SORT} -ur | ${SED} -e "s|^|@dirrm |" >> ${PLIST_SRC} + ${ECHO} "@exec R CMD ${PERL5} %D/lib/R/share/perl/build-help.pl --htmllists 2>/dev/null" >> ${PLIST_SRC} + ${ECHO} "@exec ${CAT} %D/lib/R/library/*/CONTENTS > %D/lib/R/doc/html/search/index.txt 2>/dev/null" >> ${PLIST_SRC} + ${ECHO} "@unexec ${RM} -f %D/lib/R/doc/html/packages.html" >> ${PLIST_SRC} + ${ECHO} "@unexec ${RM} -f %D/lib/R/doc/html/search/index.txt" >> ${PLIST_SRC} .include "../../devel/readline/buildlink.mk" .include "../../devel/zlib/buildlink.mk" diff --git a/math/R/Makefile.extension b/math/R/Makefile.extension new file mode 100644 index 00000000000..a22b00484d1 --- /dev/null +++ b/math/R/Makefile.extension @@ -0,0 +1,42 @@ +# $NetBSD: Makefile.extension,v 1.1 2002/04/23 01:14:49 markd Exp $ +# +# This Makefile fragment is included by packages for R library packages. +# +# To use this Makefile fragment, simply: +# +# (1) define R_PKGNAME and R_PKGVER to the R package name and version +# for the package desired. +# (2) Include this Makefile fragment in the package Makefile, + +DISTNAME?= ${R_PKGNAME}_${R_PKGVER} +PKGNAME?= R-${R_PKGNAME}-${R_PKGVER:S/-/./} +MASTER_SITES?= ${MASTER_SITE_R_CRAN:=contrib/} +DIST_SUBDIR?= R +CATEGORIES+= math + +R_DEPENDS?= R>=1.4.1nb2 +DEPENDS+= ${R_DEPENDS}:../../math/R + +WRKSRC= ${WRKDIR}/${R_PKGNAME} +NO_BUILD= YES + +do-install: + R CMD INSTALL ${WRKDIR}/${R_PKGNAME} + +# automatically generate the PLIST +R_LIB= lib/R/library +R_INST_DIRS?= ${R_PKGNAME} + +R_PACKLIST_FILES= ( cd ${PREFIX}; for dir in ${R_INST_DIRS}; do \ + ${FIND} ${R_LIB}/$${dir} \( -type f -or -type l \) -print; done ) | ${SORT} -u +R_PACKLIST_DIRS= ( cd ${PREFIX}; for dir in ${R_INST_DIRS}; do \ + ${FIND} ${R_LIB}/$${dir} -type d -print; done ) | ${SORT} -ur | ${SED} -e "s|^|@dirrm |" +R_PACKLIST_CMDS= ( ${ECHO} '@exec R CMD ${PERL5} %D/lib/R/share/perl/build-help.pl --htmllists 2>/dev/null'; \ + ${ECHO} '@exec ${CAT} %D/lib/R/library/*/CONTENTS > %D/lib/R/doc/html/search/index.txt 2>/dev/null'; \ + ${ECHO} '@unexec R CMD ${PERL5} %D/lib/R/share/perl/build-help.pl --htmllists 2>/dev/null'; \ + ${ECHO} '@unexec ${CAT} %D/lib/R/library/*/CONTENTS > %D/lib/R/doc/html/search/index.txt 2>/dev/null' ) + +R_GENERATE_PLIST= ${R_PACKLIST_FILES}; \ + ${R_PACKLIST_DIRS}; \ + ${R_PACKLIST_CMDS} +GENERATE_PLIST+= ${R_GENERATE_PLIST}; |