use alienfile;

#our $VERSION = 0.003_000;

plugin 'Probe::CommandLine' => (
    command => 'makeinfo',
    args    => ['--version'],
    match   => qr/texi2any \(GNU texinfo\)/,
    version => qr/^texi2any \(GNU texinfo\) ([0-9\.]+)$/,  # EXAMPLE: texi2any (GNU texinfo) 6.1
);
 
share {
    plugin Download => (
        url => 'https://wbraswell.github.io/texinfo-mirror/',  # GitHub mirror server
        filter => qr/^texinfo-.*\.tar\.gz$/,
        version => qr/^texinfo-([0-9\.]+)/,
    );
    plugin Extract => 'tar.gz';
    plugin 'Build::Autoconf' => ();
    build [
        '%{configure} --disable-perl-xs',  # fix segfault on Perl v5.8
        '%{gmake}',
        '%{gmake} install',
    ];
};
