Alien-SDL3_ttf

 view release on metacpan or  search on metacpan

lib/Alien/SDL3_ttf.pm  view on Meta::CPAN

    sub libdir {    # only valid in shared dir
        sdldir->child('lib');
    }

    sub dynamic_libs {
        my $files = libdir->visit(
            sub {
                my ( $path, $state ) = @_;
                $state->{$path}++ if $path =~ m[\.$Config{so}([-\.][\d\.]+)?$];
            },
            { recurse => 1 }
        );
        keys %$files;
    }

    sub features ( $self, $feature //= () ) {
        CORE::state $config //= sub {
            my %h;
            my $section = '';
            for ( $base->child('.config')->lines ) {
                s/^\s+|\s+$//g;
                next if m/^;|^$/;
                if (m/^\[(.+)\]$/) { $section = $1 }
                elsif (m/^(.+?)\s*=\s*(.*)$/) { $h{$section}{$1} = $2 }
            }
            \%h;
            }
            ->();
        return $config->{$feature} if defined $feature;
        $config;
    }
}
1;

=encoding utf-8

=head1 NAME

Alien::SDL3_ttf - Build and install SDL3_ttf

=head1 SYNOPSIS

    use Alien::SDL3_ttf; # Don't.

=head1 DESCRIPTION

Alien::SDL3_ttf builds and installs L<SDL3_ttf|https://github.com/libsdl-org/SDL_ttf/>.

It is not meant for direct use. Just ignore it for now.

=head1 METHODS

=head2 C<dynamic_libs( )>

    my @libs = Alien::SDL3_ttf->dynamic_libs;

Returns a list of the dynamic library or shared object files.

=head1 Prerequisites

Depending on your platform, certain development dependencies must be for TrueType font support:

Linux (Debian/Ubuntu):

    $ sudo apt-get install libfreetype-dev

macOS (using Homebrew):

    $ brew install freetype

=head1 LICENSE

Copyright (C) Sanko Robinson.

This library is free software; you can redistribute it and/or modify it under the terms found in the Artistic License
2. Other copyrights, terms, and conditions may apply to data transmitted through this module.

=head1 AUTHOR

Sanko Robinson E<lt>sanko@cpan.orgE<gt>

=cut



( run in 2.030 seconds using v1.01-cache-2.11-cpan-ceb78f64989 )