perl: Setup File::Spec->tmpdir correctly
authorFredrik Fornwall <fredrik@fornwall.net>
Tue, 19 Apr 2016 21:22:22 +0000 (17:22 -0400)
committerFredrik Fornwall <fredrik@fornwall.net>
Tue, 19 Apr 2016 21:22:36 +0000 (17:22 -0400)
packages/perl/build.sh
packages/perl/file-spec-unix.pm.patch [new file with mode: 0644]

index 3326372..11ed872 100644 (file)
@@ -4,7 +4,7 @@ TERMUX_PKG_DESCRIPTION="Capable, feature-rich programming language"
 # cpan modules will require make:
 TERMUX_PKG_DEPENDS="make"
 TERMUX_PKG_VERSION=5.22.1
-TERMUX_PKG_BUILD_REVISION=1
+TERMUX_PKG_BUILD_REVISION=2
 TERMUX_PKG_SRCURL=http://www.cpan.org/src/5.0/perl-${TERMUX_PKG_VERSION}.tar.gz
 # Does not work with parallell builds:
 TERMUX_MAKE_PROCESSES=1
diff --git a/packages/perl/file-spec-unix.pm.patch b/packages/perl/file-spec-unix.pm.patch
new file mode 100644 (file)
index 0000000..81161be
--- /dev/null
@@ -0,0 +1,12 @@
+diff -u -r ../perl-5.22.1/dist/PathTools/lib/File/Spec/Unix.pm ./dist/PathTools/lib/File/Spec/Unix.pm
+--- ../perl-5.22.1/dist/PathTools/lib/File/Spec/Unix.pm        2015-10-17 08:38:37.000000000 -0400
++++ ./dist/PathTools/lib/File/Spec/Unix.pm     2016-04-19 16:46:41.651532097 -0400
+@@ -210,7 +210,7 @@
+ sub tmpdir {
+     my $cached = $_[0]->_cached_tmpdir('TMPDIR');
+     return $cached if defined $cached;
+-    $_[0]->_cache_tmpdir($_[0]->_tmpdir( $ENV{TMPDIR}, "/tmp" ), 'TMPDIR');
++    $_[0]->_cache_tmpdir($_[0]->_tmpdir( $ENV{TMPDIR}, "@TERMUX_PREFIX@/tmp" ), 'TMPDIR');
+ }
+ =item updir