perl: Link against libper.so in modules

Fixes #229.
This commit is contained in:
Fredrik Fornwall 2016-04-22 19:18:50 -04:00
parent a938a96437
commit a02b038331
2 changed files with 22 additions and 1 deletions

View File

@ -0,0 +1,16 @@
diff -u -r ../perl-5.22.1/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist/Kid.pm ./cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist/Kid.pm
--- ../perl-5.22.1/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist/Kid.pm 2015-10-17 08:38:37.000000000 -0400
+++ ./cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist/Kid.pm 2016-04-22 18:38:59.367520265 -0400
@@ -19,9 +19,9 @@
use File::Spec;
sub ext {
- if ( $^O eq 'VMS' ) { return &_vms_ext; }
- elsif ( $^O eq 'MSWin32' ) { return &_win32_ext; }
- else { return &_unix_os2_ext; }
+ # Termux modification to work with android linker.
+ my $res = $Config{perllibs} . " -L" . $ENV{'TERMUX_PKG_SRCDIR'} . " -lperl";
+ return ( $res, '', $res, '' );
}
sub _unix_os2_ext {

View 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=3
TERMUX_PKG_BUILD_REVISION=4
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
@ -24,6 +24,11 @@ termux_step_post_extract_package () {
# Remove old installation to force fresh:
rm -rf $TERMUX_PREFIX/lib/perl5
# Remove patch from perl-cross for file we patch ourselves:
rm $TERMUX_PKG_SRCDIR/cnf/diffs/liblist.patch
# Export variable used by Kid.pm.patch:
export TERMUX_PKG_SRCDIR
}
termux_step_configure () {