Install git perl files to a local git-specific folder and be sure to bring the private Error.pm copy with it. diff -u -r ../git-2.7.4/perl/Makefile.PL ./perl/Makefile.PL --- ../git-2.7.4/perl/Makefile.PL 2016-03-17 16:47:59.000000000 -0400 +++ ./perl/Makefile.PL 2016-03-24 22:38:12.222059955 -0400 @@ -38,15 +38,13 @@ my $pm_path = $File::Find::name; $pm_path =~ s{^\./}{}; - $pm{$pm_path} = '$(INST_LIBDIR)/'.$pm_path; + $pm{$pm_path} = '@TERMUX_PREFIX@/share/git-perl/'.$pm_path; }, "Git", "Git.pm"; # We come with our own bundled Error.pm. It's not in the set of default # Perl modules so install it if it's not available on the system yet. -if ( !eval { require Error } || $Error::VERSION < 0.15009) { - $pm{'private-Error.pm'} = '$(INST_LIBDIR)/Error.pm'; -} + $pm{'private-Error.pm'} = '@TERMUX_PREFIX@/share/git-perl/Error.pm'; # redirect stdout, otherwise the message "Writing perl.mak for Git" # disrupts the output for the target 'instlibdir'