name             = FFI-Platypus
author           = Graham Ollis <plicease@cpan.org>
license          = Perl_5
copyright_holder = Graham Ollis
copyright_year   = 2015-2022
version          = 1.58

; authordep ExtUtils::MakeMaker

[@Author::Plicease]
:version = 2.69
release_tests = 1
installer     = Author::Plicease::MakeMaker
copy_mm       = 1
allow_dirty   = Makefile.PL
diag          = +Alien::Base
diag          = +PkgConfig
diag          = +Math::LongDouble
diag          = +Devel::Hide
diag          = +forks
test2_v0      = 1
irc           = irc://irc.perl.org/#native
github_user   = PerlFFI
github_repo   = FFI-Platypus

workflow = static
workflow = linux
workflow = windows
workflow = macos
workflow = cygwin
workflow = msys2-mingw


underscore_eval_version = 0

diag_preamble = | $post_diag = sub {
diag_preamble = |   eval {
diag_preamble = |     require lib;
diag_preamble = |     lib->import('inc');
diag_preamble = |     require FFI::Platypus::ShareConfig;
diag_preamble = |     require My::BuildConfig;
diag_preamble = |     my $build_config = My::BuildConfig->new;
diag_preamble = |     my $share_config = 'FFI::Platypus::ShareConfig';
diag_preamble = |     my $class = $build_config->get('alien')->{class};
diag_preamble = |     my $pm = "$class.pm";
diag_preamble = |     $pm =~ s/::/\//g;
diag_preamble = |     require $pm;
diag_preamble = |     $Alien::FFI::pkgconfig::VERBOSE =
diag_preamble = |     $Alien::FFI::pkgconfig::VERBOSE = 0;
diag_preamble = |     require FFI::Platypus;
diag_preamble = |     require FFI::Platypus::Memory;
diag_preamble = |     diag "mode : ", $build_config->get('alien')->{mode};
diag_preamble = |     diag "$class->VERSION      = ", $class->VERSION;
diag_preamble = |     diag "$class->install_type = ", $class->install_type;
diag_preamble = |     diag "$class->cflags       = ", $class->cflags;
diag_preamble = |     diag "$class->libs         = ", $class->libs;
diag_preamble = |     diag "$class->version      = ", $class->config('version');
diag_preamble = |     diag "my_configure             = ", $class->runtime_prop->{my_configure} if defined $class->runtime_prop->{my_configure};
diag_preamble = |     spacer();
diag_preamble = |     my %type_map = %{ $share_config->get('type_map') };
diag_preamble = |     my $diag = $build_config->get('diag');
diag_preamble = |     foreach my $key (sort keys %{ $diag->{args} })
diag_preamble = |     {
diag_preamble = |       diag "mb.args.$key=", $diag->{args}->{$key};
diag_preamble = |     }
diag_preamble = |     foreach my $key (sort keys %{ $diag->{config} })
diag_preamble = |     {
diag_preamble = |       diag "config.$key=", $diag->{config}->{$key};
diag_preamble = |     }
diag_preamble = |     diag "ffi.platypus.memory.strdup_impl =@{[ FFI::Platypus::Memory->_strdup_impl ]}";
diag_preamble = |     diag "ffi.platypus.memory.strndup_impl=@{[ FFI::Platypus::Memory->_strndup_impl ]}";
diag_preamble = |     spacer();
diag_preamble = |     my %r;
diag_preamble = |     foreach my $k (keys %type_map)
diag_preamble = |     {
diag_preamble = |       my $v = $type_map{$k};
diag_preamble = |       push @{ $r{$v} }, $k;
diag_preamble = |     }
diag_preamble = |     diag "Types:";
diag_preamble = |     foreach my $type (sort keys %r)
diag_preamble = |     {
diag_preamble = |       diag sprintf("  %-8s : %s", $type, join(', ', sort @{ $r{$type} }));
diag_preamble = |     }
diag_preamble = |     spacer();
diag_preamble = |     my $abi = FFI::Platypus->abis;
diag_preamble = |     diag "ABIs:";
diag_preamble = |     foreach my $key (sort keys %$abi)
diag_preamble = |     {
diag_preamble = |       diag sprintf("  %-20s %s", $key, $abi->{$key});
diag_preamble = |     }
diag_preamble = |     spacer();
diag_preamble = |     diag "Probes:";
diag_preamble = |     my $probe = $share_config->get("probe");
diag_preamble = |     diag sprintf("  %-20s %s", $_, $probe->{$_}) for keys %$probe;
diag_preamble = |   };
diag_preamble = |   diag "extended diagnostic failed: $@" if $@;

diag_preamble = |   if(-f "/proc/cpuinfo")
diag_preamble = |   {
diag_preamble = |     open my $fh, '<', '/proc/cpuinfo';
diag_preamble = |     my @lines = <$fh>;
diag_preamble = |     close $fh;
diag_preamble = |     my($model_name)    = grep /^model name/, @lines;
diag_preamble = |     my($flags)         = grep /^flags/, @lines;
diag_preamble = |     my($address_sizes) = grep /^address sizes/, @lines;
diag_preamble = |     spacer();
diag_preamble = |     diag "CPU Info:";
diag_preamble = |     diag "  $model_name";
diag_preamble = |     diag "  $flags" if $flags;;
diag_preamble = |     diag "  $address_sizes" if $address_sizes;
diag_preamble = |   }

diag_preamble = |   require IPC::Cmd;
diag_preamble = |   require Capture::Tiny;
diag_preamble = |   if(IPC::Cmd::can_run('lsb_release'))
diag_preamble = |   {
diag_preamble = |     spacer();
diag_preamble = |     diag Capture::Tiny::capture_merged(sub {
diag_preamble = |       system 'lsb_release', '-a';
diag_preamble = |       ();
diag_preamble = |     });
diag_preamble = |   }

diag_preamble = |   require FFI::Build::Platform;
diag_preamble = |   spacer();
diag_preamble = |   diag "[PLATFORM]\n";
diag_preamble = |   diag(FFI::Build::Platform->diag);

diag_preamble = | };

[RemovePrereqs]

; comes with Perl 5.8.1 or better
remove = strict
remove = warnings
remove = overload
remove = open
remove = bytes
remove = utf8
remove = if
remove = lib
remove = B
remove = Cwd
remove = Env
remove = XSLoader
remove = File::Spec
remove = File::Copy
remove = Scalar::Util
remove = Exporter
remove = Carp
remove = Encode
remove = File::Glob
remove = File::Path
remove = File::Temp
remove = Text::ParseWords
remove = Data::Dumper
remove = File::Basename

; comes with Strawberry (only place we use it)
remove = Win32
remove = Win32::Process
remove = Win32API::File

; optional for testing
remove = Acme::Alien::DontPanic
remove = Sub::Identify
remove = Devel::Hide
remove = forks

; optional !!
remove = Alien::FFI
remove = Alien::FFI::pkgconfig

; internal
remove = My::BuildConfig

[Prereqs / ConfigurePrereqs]
-phase = configure
ExtUtils::MakeMaker = 7.12
IPC::Cmd = 0
Capture::Tiny = 0
JSON::PP = 0
parent = 0

; 3.30 is actually pretty recent.  If Parse is upgraded
; after running `perl Makefile.PL` but before running `make`
; depending on the versions, you may see an error like
;
;   Undefined subroutine &ExtUtils::ParseXS::errors called at
;
; because the .pm file and the xsubpp do not match.  Bump
; the ParseXS to a relatively recent version as a configure
; requires works around this most of the time.
ExtUtils::ParseXS = 3.30

[Prereqs / BuildPrereqs]
-phase = build
ExtUtils::CBuilder = 0

[Prereqs / TestPrereqs]
-phase = test
Capture::Tiny = 0

[Prereqs]
constant = 1.32
FFI::CheckLib = 0.05

[Prereqs / DevPrereqs]
-phase = develop
Devel::PPPort = 3.28
Devel::Hide = 0

[Author::Plicease::Upload]
cpan = 1

[PPPort]
filename = include/ppport.h

[Meta::Dynamic::Config]
[MetaNoIndex]
directory = examples

[InsertExample]
:version = 0.10
remove_boiler = 1

[Author::Plicease::Thanks]
current = Graham Ollis <plicease@cpan.org>

; if you have a preference for how to display your name
; feel free send a PR.  I don't use the git hisory.
contributor = Bakkiaraj Murugesan (bakkiaraj)
contributor = Dylan Cali (calid)
contributor = pipcet
contributor = Zaki Mughal (zmughal)
contributor = Fitz Elliott (felliott)
contributor = Vickenty Fesunov (vyf)
contributor = Gregor Herrmann (gregoa)
contributor = Shlomi Fish (shlomif)
contributor = Damyan Ivanov
contributor = Ilya Pavlov (Ilya33)
contributor = Petr Písař (ppisar)
contributor = Mohammad S Anwar (MANWAR)
contributor = Håkon Hægland (hakonhagland, HAKONH)
contributor = Meredith (merrilymeredith, MHOWARD)
contributor = Diab Jerius (DJERIUS)
contributor = Eric Brine (IKEGAMI)
contributor = szTheory
contributor = José Joaquín Atria (JJATRIA)
contributor = Pete Houston (openstrike, HOUSTON)

[PruneFiles]
match = /tmpbuild\.
match = \.o$
match = \.obj$
match = \.so$
match = \.dll$
match = \.dylib$
match = ^.tmp/
match = ^corpus/ffi_build_mm/project1/blib

filename = xt/author/pod_spelling_common.t

[AlienBase::Wrapper::Bundle]
:version = 0.26

[CopyFilesFromBuild / CopyAlienBaseWrapper]
copy = inc/Alien/Base/Wrapper.pm