use alienfile;

#our $VERSION = 0.014_000;
 
plugin 'PkgConfig' => 'libpcre2';
 
share {
    plugin Download => (
        url => 'ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/',
        filter => qr/^pcre2-.*\.tar\.gz$/,
#        version => qr/([0-9\.]+)/,  # error, prefers 10.21 over 10.23
        version => qr/^pcre2-([0-9\.]+)/,
    );
    plugin Extract => 'tar.gz';
    plugin 'Build::Autoconf' => ();
    build [
#        '%{configure} --enable-pcre2-16 --enable-pcre2-32',
        '%{configure} --enable-pcre2-16 --enable-pcre2-32 --enable-jit',  # NEED ANSWER: what hardware is not supported for JIT???
#        '%{make}',
#        '%{make} install',
#        '%{dmake}',
#        '%{dmake} install',
        '%{gmake}',
        '%{gmake} install',
    ];
};
