Subject: | [PATCH] On Android, set TMPDIR before calling configure |
See the attached patch for an explanation -- I couldn't find Makefile.PL in the git repo, so this patch is against the latest tarball.
Subject: | 0001-On-Android-set-TMPDIR-before-calling-configure.patch |
From 184517c315a35e28796d5817d278d59e354475ef Mon Sep 17 00:00:00 2001
From: Brian Fraser <fraserbn@gmail.com>
Date: Fri, 1 Aug 2014 21:48:30 +0200
Subject: [PATCH] On Android, set TMPDIR before calling configure
The full explanation for this is here:
http://stackoverflow.com/questions/15283220/android-shell-eof
In short, Android's sh has a bug in that writing
cat <<EOF
...
EOF
will try creating a temporary file in /sqlite_stmt_journals,
which may or may not exist, and may or may not be writeable
by the current user.
So instead do the right thing and set TMPDIR to whatever the
current File::Spec->tmpdir returns.
---
Makefile.PL | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/Makefile.PL b/Makefile.PL
index f35c97e..fdf7076 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -139,6 +139,11 @@ if ($sys eq "win32") {
print "Please read configure.readme for information on how to run it yourself\n";
$ENV{'CC'} = $Config{'cc'};
+ if ( $^O eq 'android' && !$ENV{'TMPDIR'} ) {
+ # See http://stackoverflow.com/a/15417261
+ require File::Spec;
+ $ENV{'TMPDIR'} = File::Spec->tmpdir();
+ }
system("$Config{sh} configure");
}
--
1.7.12.4 (Apple Git-37)