diff options
author | markd <markd@pkgsrc.org> | 2008-08-31 12:33:53 +0000 |
---|---|---|
committer | markd <markd@pkgsrc.org> | 2008-08-31 12:33:53 +0000 |
commit | 634a54d2a2a763ec6043f6082fe64e938b581154 (patch) | |
tree | b605c5910195bf5bd7eacf4f2cdec657152316f5 /math/R/patches | |
parent | 2d7adcbe9603592ae85620a7981480a7b421c7ae (diff) | |
download | pkgsrc-634a54d2a2a763ec6043f6082fe64e938b581154.tar.gz |
Fix for http://secunia.com/advisories/31647/ from R svn.
Diffstat (limited to 'math/R/patches')
-rw-r--r-- | math/R/patches/patch-ae | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/math/R/patches/patch-ae b/math/R/patches/patch-ae new file mode 100644 index 00000000000..efe5d61b26b --- /dev/null +++ b/math/R/patches/patch-ae @@ -0,0 +1,41 @@ +$NetBSD: patch-ae,v 1.15 2008/08/31 12:33:53 markd Exp $ + +From SVN revision r46461 + +--- src/scripts/javareconf.orig 2008-03-26 01:26:44.000000000 +1300 ++++ src/scripts/javareconf +@@ -125,16 +125,28 @@ fi + 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 ++# tempdir=`mktemp -d` ++ ++ : ${TMPDIR=/tmp} ++ { tempdir=`(mktemp -d -q "${TMPDIR}/RJRECONF.XXXXXX") 2>/dev/null` \ ++ && test -n "${tempdir}" && test -d "${tempdir}" ; } || ++ { test -n "${RANDOM}" && tempdir=${TMPDIR}/RJRECONF$$-${RANDOM} \ ++ && (mkdir "${tempdir}") ; } || ++ { tempdir=${TMPDIR}/RJRECONF.$$-`date +%m%d%H%M%S` \ ++ && (mkdir "${tempdir}"); } || ++ { tempdir=${TMPDIR}/RJRECONF.$$ && (mkdir "${tempdir}") ; } || ++ (error "cannot create temporary directory" && exit 1) ++ ++ echo "public class A { }" > ${tempdir}/A.java ++ if test -e ${tempdir}/A.java; then ++ if "${JAVAC}" ${tempdir}/A.java >/dev/null; then ++ if test -e ${tempdir}/A.class; then + javac_works=yes + fi + fi + fi +- rm -rf /tmp/A.java /tmp/A.class ++ rm -rf ${tempdir} ++ + fi + if test "${javac_works}" = yes; then + echo "Java compiler : ${JAVAC}" |