summaryrefslogtreecommitdiff
path: root/math/R/files
diff options
context:
space:
mode:
authorjlam <jlam>2008-03-07 16:11:39 +0000
committerjlam <jlam>2008-03-07 16:11:39 +0000
commit8df22416da6790ca87efffd8f387d6ddbac1f778 (patch)
tree6c7b14f2ec16c12945ddc7c7cb79619ed2a7c350 /math/R/files
parent072d40e38eeab400434a9d3d111cf1499f559f70 (diff)
downloadpkgsrc-8df22416da6790ca87efffd8f387d6ddbac1f778.tar.gz
+ Remove modifications to configure.in and configure in patch-aa and
patch-ac that altered the order in which the terminal library for readline was detected. The termcap.buildlink3.mk file (included indirectly by readline/buildlink3.mk) will do the right thing by itself. + Modify the pkg-index.tmpl INSTALL script fragment: we can just use ${PKG_PREFIX} instead of substituting for @PREFIX@ everywhere. Also refactor the commands to rebuild the package index into a shell function and give some indication to the user what is happening. + Remove chown operation in post-install that was basically cargo-culted from the very first version of R imported into pkgsrc. It's not necessary. + Support user-destdir installation. Bump the PKGREVISION to 2.
Diffstat (limited to 'math/R/files')
-rw-r--r--math/R/files/pkg-index.tmpl28
1 files changed, 16 insertions, 12 deletions
diff --git a/math/R/files/pkg-index.tmpl b/math/R/files/pkg-index.tmpl
index 4a3ddedbb71..28a834ee430 100644
--- a/math/R/files/pkg-index.tmpl
+++ b/math/R/files/pkg-index.tmpl
@@ -1,25 +1,29 @@
-# $NetBSD: pkg-index.tmpl,v 1.1 2007/03/14 11:50:34 markd Exp $
+# $NetBSD: pkg-index.tmpl,v 1.2 2008/03/07 16:11:39 jlam Exp $
#
-# Rebuild R package indexes
+# Rebuild R package indices upon installation or deinstallation of an
+# R extension.
#
+rebuild_R_pkg_indices()
+{
+ ${ECHO} "${PKGNAME}: rebuilding R package indices and help files"
+ R CMD ${PERL5} ${PKG_PREFIX}/lib/R/share/perl/build-help.pl \
+ --htmllists 2>/dev/null
+ ${CAT} ${PKG_PREFIX}/lib/R/library/*/CONTENTS \
+ > ${PKG_PREFIX}/lib/R/doc/html/search/index.txt 2>/dev/null
+}
+
case ${STAGE} in
POST-INSTALL)
- R CMD ${PERL5} @PREFIX@/lib/R/share/perl/build-help.pl --htmllists 2>/dev/null
- ${CAT} @PREFIX@/lib/R/library/*/CONTENTS > @PREFIX@/lib/R/doc/html/search/index.txt 2>/dev/null
+ rebuild_R_pkg_indices
;;
DEINSTALL)
if [ "${PKGBASE}" = "R" ] ; then
- ${RM} -f @PREFIX@/lib/R/doc/html/packages.html
- ${RM} -f @PREFIX@/lib/R/doc/html/search/index.txt
+ ${RM} -f ${PKG_PREFIX}/lib/R/doc/html/packages.html
+ ${RM} -f ${PKG_PREFIX}/lib/R/doc/html/search/index.txt
fi
;;
POST-DEINSTALL)
- if [ "${PKGBASE}" != "R" ] ; then
- R CMD ${PERL5} @PREFIX@/lib/R/share/perl/build-help.pl --htmllists 2>/dev/null
- ${CAT} @PREFIX@/lib/R/library/*/CONTENTS > @PREFIX@/lib/R/doc/html/search/index.txt 2>/dev/null
- fi
- ;;
-*)
+ [ "${PKGBASE}" = "R" ] || rebuild_R_pkg_indices
;;
esac