Alien-autoconf
view release on metacpan or search on metacpan
" \$ENV{AC_MACRODIR} ||= File::Spec->catdir(\$dist_dir, 'share/autoconf');\n",
" \$ENV{AUTOCONF} ||= File::Spec->catfile(\$dist_dir, 'bin/autoconf');\n",
" \$ENV{AUTOHEADER} ||= File::Spec->catfile(\$dist_dir, 'bin/autoheader');\n",
" \$ENV{AUTOM4TE_CFG} ||= File::Spec->catfile(\$dist_dir, 'share/autoconf/autom4te.blib.cfg')\n",
" if \$d[-5] eq 'lib' && \$d[-6] eq 'blib';\n",
" \$ENV{trailer_m4} ||= File::Spec->catdir(\$dist_dir, 'share/autoconf/autoconf/trailer.m4');\n",
"}\n",
@lines
);
$exe->spew($shebang, @lines);
$exe->chmod("0755");
}
elsif($shebang =~ /^#!.*sh/)
{
@lines = (
": \${AUTOM4TE=`alien_autoconf_root`'/bin/autom4te'}\n",
": \${trailer_m4=`alien_autoconf_root`'/share/autoconf/autoconf/trailer.m4'}\n",
@lines
);
$exe->spew($shebang, @lines);
$exe->chmod("0755");
}
}
# patch autom4te config
{
my $orig = Path::Tiny->new('share/autoconf/autom4te.cfg');
my $new = Path::Tiny->new('share/autoconf/autom4te.blib.cfg');
my $stage = Path::Tiny->new($build->install_prop->{stage})->child('share/autoconf')->stringify;
$orig->copy($new);
$new->edit_lines(sub {
my $perl = $ENV{PERL} || '/usr/bin/perl';
$exe->spew(
"#!$perl\n",
"use File::Spec;\n",
"my(\$v,\$d) = File::Spec->splitpath(File::Spec->rel2abs(__FILE__));\n",
"my \@d = File::Spec->splitdir(\$d);\n",
"pop \@d for 1..2;\n",
"my \$dist_dir = File::Spec->catpath(\$v,File::Spec->catdir(\@d), '');\n",
"print \$dist_dir\n",
);
$exe->chmod('0700');
}
},
);
};
#sys {
#
# gather sub {
# my($build) = @_;
# $build->runtime_prop->{version} = $build->install_prop->{my_version};
( run in 0.592 second using v1.01-cache-2.11-cpan-496ff517765 )