summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Dittrich <markusle@gentoo.org>2008-08-27 23:01:41 +0000
committerMarkus Dittrich <markusle@gentoo.org>2008-08-27 23:01:41 +0000
commit53382bc95cf58d8e743e301518814870688087f9 (patch)
treeae52cc035d84270756616639cd5e1ae703cd79e9 /dev-lang/R
parentForcing bump to start using slots. (diff)
downloadgentoo-2-53382bc95cf58d8e743e301518814870688087f9.tar.gz
gentoo-2-53382bc95cf58d8e743e301518814870688087f9.tar.bz2
gentoo-2-53382bc95cf58d8e743e301518814870688087f9.zip
Added patch from Debian to fix insecure tempfile handling in javareconf (fixes bug #235822). NOTE: R-2.2.1-r1.ebuild is not vulnerable since it does not include the javereconf script. Also removed old ebuilds and removed two tests from the test suite since they fail with portage.
(Portage version: 2.2_rc8/cvs/Linux 2.6.26-SENTINEL-2 i686)
Diffstat (limited to 'dev-lang/R')
-rw-r--r--dev-lang/R/ChangeLog14
-rw-r--r--dev-lang/R/R-2.6.1-r1.ebuild9
-rw-r--r--dev-lang/R/R-2.6.2.ebuild131
-rw-r--r--dev-lang/R/R-2.7.1.ebuild17
-rw-r--r--dev-lang/R/R-2.7.2.ebuild (renamed from dev-lang/R/R-2.7.0.ebuild)44
-rw-r--r--dev-lang/R/files/R-2.7.1-test-fix.patch112
-rw-r--r--dev-lang/R/files/R-javareconf.patch32
7 files changed, 216 insertions, 143 deletions
diff --git a/dev-lang/R/ChangeLog b/dev-lang/R/ChangeLog
index 6f1459daa3a7..66d3204181be 100644
--- a/dev-lang/R/ChangeLog
+++ b/dev-lang/R/ChangeLog
@@ -1,6 +1,18 @@
# ChangeLog for dev-lang/R
# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-lang/R/ChangeLog,v 1.125 2008/07/18 12:45:45 markusle Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/R/ChangeLog,v 1.126 2008/08/27 23:01:40 markusle Exp $
+
+*R-2.7.2 (27 Aug 2008)
+
+ 27 Aug 2008; Markus Dittrich <markusle@gentoo.org>
+ +files/R-javareconf.patch, +files/R-2.7.1-test-fix.patch,
+ -2.6.1-r1.ebuild, -R-2.6.2.ebuild, -R-2.7.0.ebuild,
+ R-2.7.1.ebuild, +R-2.7.2.ebuild:
+ Added patch from Debian to fix insecure tempfile handling in
+ javareconf (fixes bug #235822). NOTE: R-2.2.1-r1.ebuild is not
+ vulnerable since it does not include the javereconf script.
+ Also removed old ebuilds and removed two tests from the test
+ suite since they fail with portage.
18 Jul 2008; Markus Dittrich <markusle@gentoo.org> R-2.7.1.ebuild:
Added missing cairo use flag (see bug #231970).
diff --git a/dev-lang/R/R-2.6.1-r1.ebuild b/dev-lang/R/R-2.6.1-r1.ebuild
index 950c7d54912c..8f190f240cf5 100644
--- a/dev-lang/R/R-2.6.1-r1.ebuild
+++ b/dev-lang/R/R-2.6.1-r1.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-lang/R/R-2.6.1-r1.ebuild,v 1.12 2008/04/15 15:27:19 armin76 Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/R/R-2.6.1-r1.ebuild,v 1.13 2008/08/27 23:01:40 markusle Exp $
inherit fortran flag-o-matic bash-completion
@@ -57,6 +57,13 @@ pkg_setup() {
use ppc64 && append-flags -mminimal-toc
}
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}"/${PN}-javareconf.patch
+}
+
+
src_compile() {
# fix packages.html for doc (bug #205103)
# check in later versions if fixed
diff --git a/dev-lang/R/R-2.6.2.ebuild b/dev-lang/R/R-2.6.2.ebuild
deleted file mode 100644
index 4ccaefc8cf00..000000000000
--- a/dev-lang/R/R-2.6.2.ebuild
+++ /dev/null
@@ -1,131 +0,0 @@
-# Copyright 1999-2008 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-lang/R/R-2.6.2.ebuild,v 1.2 2008/02/26 17:32:40 bicatali Exp $
-
-inherit fortran flag-o-matic bash-completion
-
-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 LGPL-2.1"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
-
-IUSE="doc java jpeg lapack minimal nls png readline tk X"
-
-# common depends
-CDEPEND="dev-lang/perl
- >=dev-libs/libpcre-7.3
- app-arch/bzip2
- virtual/blas
- virtual/ghostscript
- readline? ( sys-libs/readline )
- jpeg? ( media-libs/jpeg )
- png? ( media-libs/libpng )
- lapack? ( virtual/lapack )
- 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 virtual/tetex ) )"
-
-RDEPEND="${CDEPEND}
- app-arch/unzip
- app-arch/zip
- java? ( >=virtual/jre-1.5 )"
-
-R_HOME=/usr/$(get_libdir)/R
-
-pkg_setup() {
- FORTRAN="gfortran ifc g77"
- fortran_pkg_setup
- export FFLAGS="${FFLAGS:--O2}"
- [[ ${FORTRANC} = gfortran || ${FORTRANC} = if* ]] && \
- export FCFLAGS="${FCFLAGS:-${FFLAGS}}"
-
- filter-ldflags -Wl,-Bdirect -Bdirect
-
- # this is needed to properly compile additional R packages
- # (see bug #152379)
- append-flags -std=gnu99
-}
-
-src_compile() {
- # fix packages.html for doc (bug #205103)
- # check in later versions if fixed
- sed -i \
- -e "s:../../library:../../../../$(get_libdir)/R/library:g" \
- src/library/tools/R/packageshtml.R \
- || die "sed 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
-
- econf \
- --enable-R-profiling \
- --enable-memory-profiling \
- --enable-R-shlib \
- --enable-linux-lfs \
- --with-system-zlib \
- --with-system-bzlib \
- --with-system-pcre \
- --with-blas="$(pkg-config --libs blas)" \
- --docdir=/usr/share/doc/${PF} \
- rdocdir=/usr/share/doc/${PF} \
- $(use_enable nls) \
- $(use_with lapack) \
- $(use_with tk tcltk) \
- $(use_with jpeg jpeglib) \
- $(use_with !minimal recommended-packages) \
- $(use_with png libpng) \
- $(use_with readline) \
- $(use_with X x) \
- || die "econf failed"
- emake || die "emake failed"
- if use doc; then
- export VARTEXFONTS="${T}/fonts"
- emake info pdf || die "emake docs failed"
- fi
-
- emake -j1 -C src/nmath/standalone || die "emake math library failed"
-}
-
-src_install() {
- # -j1 because creates various dirs sequentially (hit should be small)
- emake -j1 DESTDIR="${D}" install || die "emake install failed"
-
- if use doc; then
- emake DESTDIR="${D}" \
- install-info install-pdf || die "emake install docs failed"
- fi
-
- emake -j1 \
- -C src/nmath/standalone \
- DESTDIR="${D}" install \
- || die "emake install math library failed"
-
- # env file
- cat > 99R <<-EOF
- LDPATH=${R_HOME}/lib
- R_HOME=${R_HOME}
- EOF
- doenvd 99R || die "doenvd failed"
-
- dobashcompletion "${WORKDIR}"/R.bash_completion
-}
-
-pkg_config() {
- if use java; then
- einfo "Re-initializing java paths for ${P}"
- R CMD javareconf
- fi
-}
diff --git a/dev-lang/R/R-2.7.1.ebuild b/dev-lang/R/R-2.7.1.ebuild
index 6beb75ad2bee..802af52e7a0f 100644
--- a/dev-lang/R/R-2.7.1.ebuild
+++ b/dev-lang/R/R-2.7.1.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-lang/R/R-2.7.1.ebuild,v 1.2 2008/07/18 12:45:45 markusle Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/R/R-2.7.1.ebuild,v 1.3 2008/08/27 23:01:40 markusle Exp $
inherit fortran flag-o-matic bash-completion
@@ -65,6 +65,15 @@ pkg_setup() {
filter-ldflags -Wl,-Bdirect -Bdirect
}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}"/${PN}-javareconf.patch
+ epatch "${FILESDIR}"/${P}-test-fix.patch
+}
+
+
src_compile() {
# fix packages.html for doc (bug #205103)
# check in later versions if fixed
@@ -116,6 +125,12 @@ src_compile() {
emake -j1 -C src/nmath/standalone || die "emake math library failed"
}
+src_test() {
+ # we need to unset R_HOME otherwise some of the diff based
+ # tests fail due to warnings in the output
+ R_HOME="" make check || die "Some of the tests failed"
+}
+
src_install() {
# -j1 because creates various dirs sequentially (hit should be small)
emake -j1 DESTDIR="${D}" install || die "emake install failed"
diff --git a/dev-lang/R/R-2.7.0.ebuild b/dev-lang/R/R-2.7.2.ebuild
index 93c357c76c6f..92d02a421a58 100644
--- a/dev-lang/R/R-2.7.0.ebuild
+++ b/dev-lang/R/R-2.7.2.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-lang/R/R-2.7.0.ebuild,v 1.2 2008/05/10 15:01:59 markusle Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/R/R-2.7.2.ebuild,v 1.1 2008/08/27 23:01:40 markusle Exp $
inherit fortran flag-o-matic bash-completion
@@ -13,7 +13,7 @@ LICENSE="GPL-2 LGPL-2.1"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
-IUSE="doc java jpeg lapack minimal nls png readline tk X"
+IUSE="doc java jpeg lapack minimal nls png readline tk X cairo"
# common depends
CDEPEND="dev-lang/perl
@@ -21,6 +21,7 @@ CDEPEND="dev-lang/perl
app-arch/bzip2
virtual/blas
virtual/ghostscript
+ cairo? ( x11-libs/cairo x11-libs/pango )
readline? ( sys-libs/readline )
jpeg? ( media-libs/jpeg )
png? ( media-libs/libpng )
@@ -38,7 +39,7 @@ RDEPEND="${CDEPEND}
app-arch/zip
java? ( >=virtual/jre-1.5 )"
-R_HOME=/usr/$(get_libdir)/R
+R_HOME=/usr/$(get_libdir)/${PN}
pkg_setup() {
FORTRAN="gfortran ifc g77"
@@ -47,11 +48,34 @@ pkg_setup() {
[[ ${FORTRANC} = gfortran || ${FORTRANC} = if* ]] && \
export FCFLAGS="${FCFLAGS:-${FFLAGS}}"
+ # make sure cairo and pango are both compiled with "X"
+ # use flag (see bug #231970)
+ if use cairo; then
+ if ( ! built_with_use x11-libs/cairo X ); then
+ eerror "x11-libs/cairo needs to be built with USE=\"X\""
+ die "Please rebuild x11-libs/cairo with USE=\"X\""
+ fi
+
+ if ( ! built_with_use x11-libs/pango X ); then
+ eerror "x11-libs/pango needs to be built with USE=\"X\""
+ die "Please rebuild x11-libs/pango with USE=\"X\""
+ fi
+ fi
+
filter-ldflags -Wl,-Bdirect -Bdirect
+}
- # this is needed to properly compile additional R packages
- # (see bug #152379)
- append-flags -std=gnu99
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}"/${PN}-javareconf.patch
+ epatch "${FILESDIR}"/${PN}-2.7.1-test-fix.patch
+}
+
+src_test() {
+ # we need to unset R_HOME otherwise some of the diff based
+ # tests fail due to warnings in the output
+ R_HOME="" make check || die "Some of the tests failed"
}
src_compile() {
@@ -62,9 +86,10 @@ src_compile() {
src/library/tools/R/packageshtml.R \
|| die "sed failed"
- # fix Rscript patch
- sed -e "s:-DR_HOME='\"\$(rhome)\"':-DR_HOME='\"/usr/lib/${PN}/\"':" \
- -i src/unix/Makefile.in || die "sed failed"
+ # fix Rscript
+ sed -i \
+ -e "s:-DR_HOME='\"\$(rhome)\"':-DR_HOME='\"${R_HOME}\"':" \
+ src/unix/Makefile.in || die "sed unix Makefile failed"
use lapack && \
export LAPACK_LIBS="$(pkg-config --libs lapack)"
@@ -92,6 +117,7 @@ src_compile() {
$(use_with !minimal recommended-packages) \
$(use_with png libpng) \
$(use_with readline) \
+ $(use_with cairo) \
$(use_with X x) \
|| die "econf failed"
emake || die "emake failed"
diff --git a/dev-lang/R/files/R-2.7.1-test-fix.patch b/dev-lang/R/files/R-2.7.1-test-fix.patch
new file mode 100644
index 000000000000..3be9bc718b77
--- /dev/null
+++ b/dev-lang/R/files/R-2.7.1-test-fix.patch
@@ -0,0 +1,112 @@
+# this patch removed two non-essential tests that fail under portage
+# - test-internet fails due to ACCESS_VIOLATION
+# - reg-plot-latin1.R fails probably due to locale mismatch
+
+diff -Naur R-2.7.1/tests/Makefile.in R-2.7.1.new/tests/Makefile.in
+--- R-2.7.1/tests/Makefile.in 2008-06-23 05:39:03.000000000 -0400
++++ R-2.7.1.new/tests/Makefile.in 2008-08-27 18:17:33.000000000 -0400
+@@ -40,7 +40,6 @@
+
+ test-src-demo = demos.R demos2.R
+ test-src-errmsgs = errormsgs.R
+-test-src-internet = internet.R
+ test-src-isas = isas-tests.R
+ test-src-primitive = primitives.R
+ test-src-random = p-r-random-tests.R
+@@ -51,21 +50,19 @@
+ reg-plot.R reg-S4.R
+ test-src-reg-auto =
+ test-src-reg = $(test-src-reg-1) $(test-src-reg-auto)
+-test-src-reg3 = reg-tests-3.R reg-plot-latin1.R
++test-src-reg3 = reg-tests-3.R
+
+ DISTFILES = Makefile.in Makefile.win README \
+ $(test-src-strict-1) $(test-src-strict-1:.R=.Rout.save) \
+ $(test-src-sloppy-1) $(test-src-sloppy-1:.R=.Rout.save) \
+ $(test-src-auto:.R=.Rin) isas-tests.Rout.save \
+ $(test-src-demo) demos.Rout.save \
+- $(test-src-internet) internet.Rout.save \
+ $(test-src-primitive) \
+ $(test-src-random) p-r-random-tests.Rout.save \
+ $(test-src-reg) $(test-src-reg3) \
+ reg-S4.Rout.save \
+ reg-IO.Rout.save reg-IO2.Rout.save reg-plot.Rout.save \
+ reg-plot.ps.save reg-tests-2.Rout.save reg-tests-3.Rout.save \
+- reg-plot-latin1.ps.save \
+ reg-win.R encodings.R utf8-regex.R \
+ errormsgs.R errormsgs.Rout.save \
+ gct-foot.R \
+@@ -89,7 +86,6 @@
+
+ test-out-demo = $(test-src-demo:.R=.Rout)
+ test-out-errmsgs = $(test-src-errmsgs:.R=.Rout)
+-test-out-internet = $(test-src-internet:.R=.Rout)
+ test-out-isas = $(test-src-isas:.R=.Rout)
+ test-out-primitive = $(test-src-primitive:.R=.Rout)
+ test-out-random = $(test-src-random:.R=.Rout)
+@@ -100,14 +96,13 @@
+
+ ## This macro is used only for dependencies
+ test-out = $(test-src:.R=.Rout) $(test-out-demo) $(test-out-gct) \
+- $(test-out-internet) \
+ $(test-out-random) $(test-out-reg) $(test-out-reg3) \
+ $(test-out-segfault) $(test-out-isas)
+
+ .SUFFIXES:
+ .SUFFIXES: .R .Rin .Rout .Rout-gct .Rout-valgct
+
+-all-basic-tests = Examples Specific Reg Internet
++all-basic-tests = Examples Specific Reg
+ all-devel-tests = Docs IsAs Random Demo Rd Primitive Regexp Segfault \
+ Standalone Packages
+
+@@ -173,24 +168,6 @@
+ -@diff reg-plot.ps $(srcdir)/reg-plot.ps.save
+ @$(ECHO) "$(ECHO_T) OK"
+
+-reg-plot-latin1.Rout: reg-plot-latin1.R
+- @rm -f $@ $@.fail
+- @$(ECHO) $(ECHO_N) "running code in '$<' ...$(ECHO_C)"
+- @$(R2) < $< > $@ 2>&1 || (mv $@ $@.fail && exit 1)
+- @$(ECHO) "$(ECHO_T) OK"
+- @if test -f $(srcdir)/$@.save ; then \
+- mv $@ $@.fail; \
+- $(ECHO) $(ECHO_N) \
+- "comparing '$@' to '$(srcdir)/$@.save' ...$(ECHO_C)"; \
+- $(RDIFF) $@.fail $(srcdir)/$@.save $(RVAL_IF_DIFF) || exit 1; \
+- mv $@.fail $@; \
+- $(ECHO) "$(ECHO_T) OK"; \
+- fi
+- @$(ECHO) $(ECHO_N) \
+- "comparing 'reg-plot-latin1.ps' to '$(srcdir)/reg-plot-latin1.ps.save' ...$(ECHO_C)"
+- -@diff reg-plot-latin1.ps $(srcdir)/reg-plot-latin1.ps.save
+- @$(ECHO) "$(ECHO_T) OK"
+-
+ .R.Rout-gct:
+ @$(ECHO) "running gctorture() + '$<'"
+ @($(ECHO) '.ptime <- proc.time(); gctorture()' ; \
+@@ -265,15 +242,6 @@
+ @$(ECHO) "running tests of error messages"
+ @$(MAKE) $(test-out-errmsgs) RVAL_IF_DIFF=0
+
+-## <NOTE>
+-## These depend on an internet connection, and the sites being up.
+-## So allow this to fail: it may be slow doing so.
+-test-Internet:
+- @$(ECHO) "running tests of Internet and socket functions"
+- @$(ECHO) " expect some differences"
+- -@$(MAKE) $(test-out-internet) RVAL_IF_DIFF=0
+-## </NOTE>
+-
+ test-IsAs:
+ @$(ECHO) "running tests of consistency of as/is.*"
+ @$(MAKE) $(test-out-isas) RVAL_IF_DIFF=1
+@@ -434,7 +402,7 @@
+ (cd $${d} && $(MAKE) $@); \
+ done
+ -@rm -f stamp-R Makedeps Rplot* Rprof.out data dumpdata.R \
+- reg-plot-latin1.ps reg-plot.ps reg-tests-?.ps \
++ reg-plot.ps reg-tests-?.ps \
+ R-exts.* R-intro.R R-intro.Rout \
+ FALSE.R FALSE.tex mirrors.html
+ -@rm -f testit.txt testit.html testit.tex testit-Ex.R
diff --git a/dev-lang/R/files/R-javareconf.patch b/dev-lang/R/files/R-javareconf.patch
new file mode 100644
index 000000000000..229dbb293ecb
--- /dev/null
+++ b/dev-lang/R/files/R-javareconf.patch
@@ -0,0 +1,32 @@
+# this patch fixes the insecure tempfile usage reported in bug #235822
+# it was extracted from Debian's r-base_2.7.2-1.diff patch
+
+diff -Naur R-2.7.2/src/scripts/javareconf R-2.7.2.new/src/scripts/javareconf
+--- R-2.7.2/src/scripts/javareconf 2008-03-25 08:26:44.000000000 -0400
++++ R-2.7.2.new/src/scripts/javareconf 2008-08-27 16:49:04.000000000 -0400
+@@ -125,16 +125,19 @@
+ javac_works='not present'
+ if test -n "$JAVAC"; then
+ javac_works='not functional'
+- rm -rf /tmp/A.java /tmp/A.class
+- echo "public class A { }" > /tmp/A.java
+- if test -e /tmp/A.java; then
+- if "${JAVAC}" /tmp/A.java >/dev/null; then
+- if test -e /tmp/A.class; then
++ # edd 25 Aug 2008 use mktemp -t -d
++ #rm -rf /tmp/A.java /tmp/A.class
++ jctmpdir=`mktemp -t -d`
++ echo "public class A { }" > ${jctmpdir}/A.java
++ if test -e ${jctmpdir}/A.java; then
++ if "${JAVAC}" ${jctmpdir}/A.java >/dev/null; then
++ if test -e ${jctmpdir}/A.class; then
+ javac_works=yes
+ fi
+ fi
+ fi
+- rm -rf /tmp/A.java /tmp/A.class
++ # rm -rf /tmp/A.java /tmp/A.class
++ rm -rf ${jctmpdir}
+ fi
+ if test "${javac_works}" = yes; then
+ echo "Java compiler : ${JAVAC}"