Skip Menu |

This queue is for tickets about the NetAddr-IP CPAN distribution.

Report information
The Basics
Id: 97769
Status: resolved
Worked: 20 min
Priority: 0/
Queue: NetAddr-IP

People
Owner: Nobody in particular
Requestors: fraserbn [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: [PATCH] Android support
With this applied, the module builds and tests cleanly on Android :D The commit message in the attached patch has the rationale for the change. On a related tangent, it's still a bit up in the air whether this should be fixed on the modules suffering from this, which this patch does, or somewhere higher up in the toolchain, like in ExtUtils::MakeMaker. Currently, out of ~1000 distros I've managed to install on Android, NetAddr::IP and FCGI are the only two suffering from this, so it seems obscure enough to merit solving on a case-by-case basis.
Subject: 0001-On-Android-set-TMPDIR-before-calling-configure.patch
From 8310bec72c0aa710ea6a2e58a0bdc5ece2dbaf12 Mon Sep 17 00:00:00 2001 From: Brian Fraser <fraserbn@gmail.com> Date: Wed, 6 Aug 2014 00:47:43 +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. --- Lite/Util/Makefile.PL | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Lite/Util/Makefile.PL b/Lite/Util/Makefile.PL index 894e9f0..4ade39c 100644 --- a/Lite/Util/Makefile.PL +++ b/Lite/Util/Makefile.PL @@ -4,6 +4,7 @@ use ExtUtils::MakeMaker qw( ); use Config; use Cwd; +use File::Spec; use Getopt::Long qw( GetOptions ); @@ -86,6 +87,8 @@ while ($useXS) { delete $makeparms{'XS'}; delete $makeparms{'C'}; + local $ENV{TMPDIR} = File::Spec->tmpdir() if $^O eq 'android'; + unless (-e './config.h') { system $Config{sh}, 'configure.gcc'; } -- 1.7.12.4 (Apple Git-37)
fixed in 4.076 On Tue Aug 05 18:56:51 2014, Hugmeir wrote: Show quoted text
> With this applied, the module builds and tests cleanly on Android :D > The commit message in the attached patch has the rationale for the > change. > > On a related tangent, it's still a bit up in the air whether this > should be fixed on the modules suffering from this, which this patch > does, or somewhere higher up in the toolchain, like in > ExtUtils::MakeMaker. Currently, out of ~1000 distros I've managed to > install on Android, NetAddr::IP and FCGI are the only two suffering > from this, so it seems obscure enough to merit solving on a case-by- > case basis.