Skip Menu |

This queue is for tickets about the Socket6 CPAN distribution.

Report information
The Basics
Id: 98181
Status: resolved
Priority: 0/
Queue: Socket6

People
Owner: ume [...] mahoroba.org
Requestors: fraserbn [...] gmail.com
Cc:
AdminCc:

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



Subject: [PATCH] Handle Android in Makefile.PL
Howdy! The attached patch modifies Makefile.PL so that it will run on Android. With the patch applied, Socket6 builds and tests cleanly on the OS.
Subject: 0001-Handle-Android-in-Makefile.PL.patch
From 3ca976be595992f99f830dec35db29f4378c2594 Mon Sep 17 00:00:00 2001 From: Brian Fraser <fraserbn@gmail.com> Date: Tue, 19 Aug 2014 20:45:07 +0200 Subject: [PATCH] Handle Android in Makefile.PL --- Makefile.PL | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/Makefile.PL b/Makefile.PL index 7b0a3d9..91fdc4f 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -34,7 +34,19 @@ if ($^O eq 'MSWin32') { configure_mswin32(); } else { my $path_perl = ($^X =~ m!^/!o) ? $^X : `which $^X`; - my $cmd = "CC='$Config{cc}' CFLAGS='$Config{ccflags}' ./configure"; + local $ENV{TMPDIR} = $ENV{TMPDIR}; + my $cmd = "CC='$Config{cc}' CFLAGS='$Config{ccflags}'"; + if ( $^O eq 'android' ) { + # Work around a bug in Android's sh: + # http://stackoverflow.com/questions/15283220/android-shell-eof + $ENV{TMPDIR} ||= File::Spec->tmpdir(); + # /bin/sh doesn't exist on Android, point it to + # the right location for sh + $cmd .= " CONFIG_SHELL='$Config{sh}'"; + # Call './configure' as 'sh ./configure' + $cmd .= " $Config{sh}"; + } + $cmd .= " ./configure"; $cmd .= " --with-perl=$path_perl" if ($path_perl); system($cmd); } -- 1.7.12.4 (Apple Git-37)
It should be fixed by 0.26. Thank you for your report.