<commit_before>package Pakket::Builder::Native::Makefile;
# ABSTRACT: Build Native Pakket packages that use Makefile

use Moose;
use MooseX::StrictConstructor;
use Log::Any   qw< $log >;
use Path::Tiny qw< path >;
use Pakket::Log;

with qw<Pakket::Role::Builder>;

sub build_package {
    my ( $self, $package, $build_dir, $prefix, $flags ) = @_;

    $log->info("Building Native library: $package");

    my $opts = {
        'env' => {
            $self->generate_env_vars($prefix),
        },
    };

    my $configurator;
    if ( -x $build_dir->child('configure') ) {
        $configurator = './configure';
    } elsif ( -x $build_dir->child('config') ) {
        $configurator = './config';
    } else {
        $log->critical( "Don't know how to configure $package"
                . " (Cannot find executale 'configure' or 'config')" );
        exit 1;
    }
<commit_msg>fix configure checking<commit_after>package Pakket::Builder::Native::Makefile;
# ABSTRACT: Build Native Pakket packages that use Makefile

use Moose;
use MooseX::StrictConstructor;
use Log::Any   qw< $log >;
use Path::Tiny qw< path >;
use Pakket::Log;

with qw<Pakket::Role::Builder>;

sub build_package {
    my ( $self, $package, $build_dir, $prefix, $flags ) = @_;

    $log->info("Building Native library: $package");

    my $opts = {
        'env' => {
            $self->generate_env_vars($prefix),
        },
    };

    my $configurator;
    if ( -f $build_dir->child('configure') ) {
        $configurator = './configure';
    } elsif ( -f $build_dir->child('config') ) {
        $configurator = './config';
    } elsif ( -f $build_dir->child('Configure') ) {
        $configurator = './Configure';
    } else {
        $log->critical( "Don't know how to configure $package"
                . " (Cannot find executale 'configure' or 'config')" );
        exit 1;
    }

{'fraction_non_alphanumeric': 0.16415500538213132, 'fraction_numerical': 0.001076426264800861, 'mean_word_length': 2.786150712830957, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 22, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1197118', 'n_tokens_mistral': 624, 'n_tokens_neox': 608, 'n_words': 149}