summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis Dupeyron <calchan@gentoo.org>2012-03-05 17:23:05 +0000
committerDenis Dupeyron <calchan@gentoo.org>2012-03-05 17:23:05 +0000
commitca1e96dce608df6c71e0977b1b6d1a07c03ce326 (patch)
tree4ebb7c7cbdea52207df5bdb974b0b6364848f989 /dev-lang/R
parentStable on amd64 fixing bug #406947 (diff)
downloadgentoo-2-ca1e96dce608df6c71e0977b1b6d1a07c03ce326.tar.gz
gentoo-2-ca1e96dce608df6c71e0977b1b6d1a07c03ce326.tar.bz2
gentoo-2-ca1e96dce608df6c71e0977b1b6d1a07c03ce326.zip
Version bump. Add patches to fix handling of library writability and package updates.
(Portage version: 2.1.10.49/cvs/Linux x86_64)
Diffstat (limited to 'dev-lang/R')
-rw-r--r--dev-lang/R/ChangeLog10
-rw-r--r--dev-lang/R/R-2.14.2.ebuild159
-rw-r--r--dev-lang/R/files/R-2.14.2-library-writability.patch40
-rw-r--r--dev-lang/R/files/R-2.14.2-prune-package-update.patch25
-rw-r--r--dev-lang/R/metadata.xml8
5 files changed, 239 insertions, 3 deletions
diff --git a/dev-lang/R/ChangeLog b/dev-lang/R/ChangeLog
index 43fccc72ab44..0db08c2f0f33 100644
--- a/dev-lang/R/ChangeLog
+++ b/dev-lang/R/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for dev-lang/R
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-lang/R/ChangeLog,v 1.195 2012/02/27 02:55:58 bicatali Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/R/ChangeLog,v 1.196 2012/03/05 17:23:05 calchan Exp $
+
+*R-2.14.2 (05 Mar 2012)
+
+ 05 Mar 2012; Denis Dupeyron <calchan@gentoo.org> +R-2.14.2.ebuild,
+ +files/R-2.14.2-library-writability.patch,
+ +files/R-2.14.2-prune-package-update.patch, metadata.xml:
+ Version bump. Add patches to fix handling of library writability and package
+ updates.
27 Feb 2012; Sébastien Fabbro <bicatali@gentoo.org> R-2.14.1.ebuild,
+files/R-2.14.1-warnings-buffer-overflow.patch:
diff --git a/dev-lang/R/R-2.14.2.ebuild b/dev-lang/R/R-2.14.2.ebuild
new file mode 100644
index 000000000000..235605c092b7
--- /dev/null
+++ b/dev-lang/R/R-2.14.2.ebuild
@@ -0,0 +1,159 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/R/R-2.14.2.ebuild,v 1.1 2012/03/05 17:23:05 calchan Exp $
+
+EAPI=4
+
+inherit bash-completion-r1 autotools eutils flag-o-matic fortran-2 versionator
+
+DESCRIPTION="Language and environment for statistical computing and graphics"
+HOMEPAGE="http://www.r-project.org/"
+SRC_URI="mirror://cran/src/base/R-2/${P}.tar.gz
+ bash-completion? ( mirror://gentoo/R.bash_completion.bz2 )"
+
+LICENSE="|| ( GPL-2 GPL-3 ) LGPL-2.1"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
+IUSE="bash-completion cairo doc icu java jpeg lapack minimal nls openmp perl png profile readline static-libs tiff tk X"
+REQUIRED_USE="png? ( || ( cairo X ) ) jpeg? ( || ( cairo X ) ) tiff? ( || ( cairo X ) )"
+
+CDEPEND="app-arch/bzip2
+ app-text/ghostscript-gpl
+ dev-libs/libpcre
+ virtual/blas
+ virtual/fortran
+ cairo? ( x11-libs/cairo[X] x11-libs/pango )
+ icu? ( dev-libs/icu )
+ jpeg? ( virtual/jpeg )
+ lapack? ( virtual/lapack )
+ perl? ( dev-lang/perl )
+ png? ( media-libs/libpng )
+ readline? ( sys-libs/readline )
+ tk? ( dev-lang/tk )
+ X? ( x11-libs/libXmu x11-misc/xdg-utils )"
+
+DEPEND="${CDEPEND}
+ dev-util/pkgconfig
+ doc? (
+ virtual/latex-base
+ dev-texlive/texlive-fontsrecommended
+ )"
+
+RDEPEND="${CDEPEND}
+ ( || ( <sys-libs/zlib-1.2.5.1-r1 >=sys-libs/zlib-1.2.5.1-r2[minizip] ) )
+ app-arch/xz-utils
+ java? ( >=virtual/jre-1.5 )"
+
+RESTRICT="minimal? ( test )"
+
+R_DIR="${EPREFIX}/usr/$(get_libdir)/${PN}"
+
+pkg_setup() {
+ if use openmp; then
+ FORTRAN_NEED_OPENMP=1
+ tc-has-openmp || die "Please enable openmp support in your compiler"
+ fi
+ fortran-2_pkg_setup
+ filter-ldflags -Wl,-Bdirect -Bdirect
+ # avoid using existing R installation
+ unset R_HOME
+}
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${PN}-2.11.1-parallel.patch \
+ "${FILESDIR}"/${PN}-2.12.1-ldflags.patch \
+ "${FILESDIR}"/${PN}-2.13.1-zlib_header_fix.patch \
+ "${FILESDIR}"/${PN}-2.14.1-tiff.patch \
+ "${FILESDIR}"/${PN}-2.14.1-rmath-shared.patch \
+ "${FILESDIR}"/${PN}-2.14.1-warnings-buffer-overflow.patch \
+ "${FILESDIR}"/${PN}-2.14.2-library-writability.patch \
+ "${FILESDIR}"/${PN}-2.14.2-prune-package-update.patch
+
+ # fix packages.html for doc (bug #205103)
+ sed -i \
+ -e "s:../../../library:../../../../$(get_libdir)/R/library:g" \
+ src/library/tools/R/Rd.R || die
+
+ # fix Rscript path when installed (bug #221061)
+ sed -i \
+ -e "s:-DR_HOME='\"\$(rhome)\"':-DR_HOME='\"${R_DIR}\"':" \
+ src/unix/Makefile.in || die "sed unix Makefile failed"
+
+ # fix HTML links to manual (bug #273957)
+ sed -i \
+ -e 's:\.\./manual/:manual/:g' \
+ $(grep -Flr ../manual/ doc) || die "sed for HTML links failed"
+
+ use lapack && \
+ export LAPACK_LIBS="$(pkg-config --libs lapack)"
+
+ if use X; then
+ export R_BROWSER="$(type -p xdg-open)"
+ export R_PDFVIEWER="$(type -p xdg-open)"
+ fi
+ use perl && \
+ export PERL5LIB="${S}/share/perl:${PERL5LIB:+:}${PERL5LIB}"
+ AT_M4DIR=m4 eaclocal
+ eautoconf
+}
+
+src_configure() {
+ econf \
+ --enable-byte-compiled-packages \
+ --enable-R-shlib \
+ --with-system-zlib \
+ --with-system-bzlib \
+ --with-system-pcre \
+ --with-system-xz \
+ --with-blas="$(pkg-config --libs blas)" \
+ --docdir="${EPREFIX}/usr/share/doc/${PF}" \
+ rdocdir="${EPREFIX}/usr/share/doc/${PF}" \
+ $(use_enable nls) \
+ $(use_enable openmp) \
+ $(use_enable profile R-profiling) \
+ $(use_enable profile memory-profiling) \
+ $(use_enable static-libs static) \
+ $(use_enable static-libs R-static-lib) \
+ $(use_with cairo) \
+ $(use_with icu ICU) \
+ $(use_with jpeg jpeglib) \
+ $(use_with lapack) \
+ $(use_with !minimal recommended-packages) \
+ $(use_with png libpng) \
+ $(use_with readline) \
+ $(use_with tiff libtiff) \
+ $(use_with tk tcltk) \
+ $(use_with X x)
+}
+
+src_compile(){
+ export VARTEXFONTS="${T}/fonts"
+ emake
+ emake -C src/nmath/standalone shared $(use static-libs && echo static)
+ use doc && emake info pdf
+}
+
+src_install() {
+ default
+ emake -C src/nmath/standalone DESTDIR="${D}" install
+
+ if use doc; then
+ emake DESTDIR="${D}" install-info install-pdf
+ dosym ../manual /usr/share/doc/${PF}/html/manual
+ fi
+
+ cat > 99R <<-EOF
+ LDPATH=${R_DIR}/lib
+ R_HOME=${R_DIR}
+ EOF
+ doenvd 99R
+ use bash-completion && dobashcomp "${WORKDIR}"/R.bash_completion
+}
+
+pkg_postinst() {
+ if use java; then
+ einfo "Re-initializing java paths for ${P}"
+ R CMD javareconf
+ fi
+}
diff --git a/dev-lang/R/files/R-2.14.2-library-writability.patch b/dev-lang/R/files/R-2.14.2-library-writability.patch
new file mode 100644
index 000000000000..3e6cabf654cc
--- /dev/null
+++ b/dev-lang/R/files/R-2.14.2-library-writability.patch
@@ -0,0 +1,40 @@
+Index: src/library/utils/R/packages2.R
+===================================================================
+--- src/library/utils/R/packages2.R (revision 58532)
++++ src/library/utils/R/packages2.R (working copy)
+@@ -229,8 +229,8 @@
+ domain = NA, immediate. = TRUE)
+ userdir <- unlist(strsplit(Sys.getenv("R_LIBS_USER"),
+ .Platform$path.sep))[1L]
+- if(interactive() && !file.exists(userdir)) {
+- msg <- gettext("Would you like to create a personal library\n%s\nto install packages into?")
++ if(interactive()) {
++ msg <- gettext("Would you like to use a personal library instead?")
+ if(.Platform$OS.type == "windows") {
+ ans <- winDialog("yesno", sprintf(msg, sQuote(userdir)))
+ if(ans != "YES") stop("unable to install packages")
+@@ -239,10 +239,21 @@
+ if(substr(ans, 1L, 1L) == "n")
+ stop("unable to install packages")
+ }
+- if(!dir.create(userdir, recursive = TRUE))
+- stop("unable to create ", sQuote(userdir))
+ lib <- userdir
+- .libPaths(c(userdir, .libPaths()))
++ if(!file.exists(userdir)) {
++ msg <- gettext("Would you like to create a personal library\n%s\nto install packages into?")
++ if(.Platform$OS.type == "windows") {
++ ans <- winDialog("yesno", sprintf(msg, sQuote(userdir)))
++ if(ans != "YES") stop("unable to install packages")
++ } else {
++ ans <- readline(paste(sprintf(msg, userdir), " (y/n) "))
++ if(substr(ans, 1L, 1L) == "n")
++ stop("unable to install packages")
++ }
++ if(!dir.create(userdir, recursive = TRUE))
++ stop("unable to create ", sQuote(userdir))
++ .libPaths(c(userdir, .libPaths()))
++ }
+ } else stop("unable to install packages")
+ }
+
diff --git a/dev-lang/R/files/R-2.14.2-prune-package-update.patch b/dev-lang/R/files/R-2.14.2-prune-package-update.patch
new file mode 100644
index 000000000000..8b4b76916e1d
--- /dev/null
+++ b/dev-lang/R/files/R-2.14.2-prune-package-update.patch
@@ -0,0 +1,25 @@
+Index: src/library/utils/R/packages.R
+===================================================================
+--- src/library/utils/R/packages.R (revision 58579)
++++ src/library/utils/R/packages.R (working copy)
+@@ -323,6 +323,20 @@
+ oldPkgs <- old.packages(lib.loc = lib.loc,
+ contriburl = contriburl, method = method,
+ available = available, checkBuilt = checkBuilt)
++ ## prune package versions which are invisible to require()
++ if(!is.null(oldPkgs)) {
++ pkg <- 0
++ while(pkg < nrow(oldPkgs)) {
++ pkg <- pkg + 1
++ if(find.package(oldPkgs[pkg], lib.loc = lib.loc) != find.package(oldPkgs[pkg], lib.loc = oldPkgs[pkg,2])) {
++ warning(sprintf("package '%s' in library '%s' will not be updated",
++ oldPkgs[pkg], oldPkgs[pkg, 2]),
++ call. = FALSE, immediate. = TRUE)
++ oldPkgs <- oldPkgs[-pkg, , drop = FALSE]
++ pkg <- pkg - 1
++ }
++ }
++ }
+ if(is.null(oldPkgs))
+ return(invisible())
+ } else if (!(is.matrix(oldPkgs) && is.character(oldPkgs)))
diff --git a/dev-lang/R/metadata.xml b/dev-lang/R/metadata.xml
index 915e03f5b95e..5d205a8da7fb 100644
--- a/dev-lang/R/metadata.xml
+++ b/dev-lang/R/metadata.xml
@@ -1,8 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
- <herd>sci-mathematics</herd>
- <longdescription lang="en">
+<herd>sci-mathematics</herd>
+<maintainer>
+ <email>calchan@gentoo.org</email>
+ <name>Denis Dupeyron</name>
+</maintainer>
+<longdescription lang="en">
R is GNU S, a system for statistical computation and graphics. It
consists of a language plus a run-time environment with graphics, a
debugger, access to certain system functions, and the ability to run