view release on metacpan or search on metacpan
2.43_01 2021-09-30 10:10:07 -0600
- Fix test for Decode::DirListingFtpCopy which was incorrectly testing
Decode::DirListing (gh#285, gh#286)
2.42 2021-09-29 09:54:26 -0600
- Improved documentation relating to the Alien::Base alt methods and
the PkgConfig plugins use of pkg_name property (gh#234, gh#284)
2.41 2021-06-21 22:50:57 -0600
- Documentation fixes (gh#266, gh#267)
- Use parent instead of base in code and documentation (gh#268)
2.40 2021-05-13 06:44:37 -0600
- Test::Alien tests will issue a diagnostic if you call them without
alien_ok which is probably a mistake (gh#262, gh#263)
2.39_01 2021-05-12 04:14:06 -0600
- Add support for HTTP request headers on all appropriate core fetch plugins
(gh#256, gh#259)
- The fetch method on Alien::Build now has a http_headers option
(gh#256, gh#259)
2.24_01 2020-06-07 18:13:55 -0600
- Disable parallel build when clean install is enabled
(gh#197, gh#198, shawnlaffan++)
- Dropping support for Perl 5.8.1, 5.8.2 and 5.8.3. For now AB will install
on these versions of Perl, but a warning will be issued, along with a 3
minute sleep at configure time. Please upgrade to 5.8.4 (or preferrably
5.32). Starting July 1st, AB will refuse to install on these elderly Perls.
(gh#200, gh#201)
2.23 2020-05-15 18:36:59 -0400
- Workaround apparent bug in pkgconf + arm64 (gh#196)
2.22 2020-05-05 07:02:49 -0600
- Added dynamic_dir method to Alien::Base (gh#191, shawnlaffan++)
2.21 2020-04-11 08:27:21 -0600
- Fix the handling of version regular expression for the Prefer::SortVersions
plugin to handle regular expressions with multiple capture groups (gh#189)
2.20 2020-04-10 06:21:54 -0600
- xs_ok does a better workaround for faux fork on cygwin (gh#153, gh#187, gh#188)
"ExtUtils::MakeMaker" : "6.64",
"ExtUtils::ParseXS" : "3.30",
"FFI::CheckLib" : "0.11",
"File::Which" : "1.10",
"File::chdir" : "0",
"JSON::PP" : "0",
"List::Util" : "1.33",
"Path::Tiny" : "0.077",
"Test2::API" : "1.302096",
"Text::ParseWords" : "3.26",
"parent" : "0",
"perl" : "5.008004"
},
"suggests" : {
"Archive::Tar" : "0"
}
},
"test" : {
"requires" : {
"Test2::API" : "1.302096",
"Test2::V0" : "0.000121",
ExtUtils::MakeMaker: '6.64'
ExtUtils::ParseXS: '3.30'
FFI::CheckLib: '0.11'
File::Which: '1.10'
File::chdir: '0'
JSON::PP: '0'
List::Util: '1.33'
Path::Tiny: '0.077'
Test2::API: '1.302096'
Text::ParseWords: '3.26'
parent: '0'
perl: '5.008004'
resources:
IRC: irc://irc.perl.org/#native
bugtracker: https://github.com/PerlAlien/Alien-Build/issues
homepage: https://metacpan.org/pod/Alien::Build
repository: git://github.com/PerlAlien/Alien-Build.git
version: '2.84'
x_contributors:
- 'Graham Ollis <plicease@cpan.org>'
- 'Diab Jerius (DJERIUS)'
Makefile.PL view on Meta::CPAN
"ExtUtils::MakeMaker" => "6.64",
"ExtUtils::ParseXS" => "3.30",
"FFI::CheckLib" => "0.11",
"File::Which" => "1.10",
"File::chdir" => 0,
"JSON::PP" => 0,
"List::Util" => "1.33",
"Path::Tiny" => "0.077",
"Test2::API" => "1.302096",
"Text::ParseWords" => "3.26",
"parent" => 0
},
"TEST_REQUIRES" => {
"Test2::API" => "1.302096",
"Test2::V0" => "0.000121"
},
"VERSION" => "2.84",
"test" => {
"TESTS" => "t/*.t"
}
);
Makefile.PL view on Meta::CPAN
"ExtUtils::ParseXS" => "3.30",
"FFI::CheckLib" => "0.11",
"File::Which" => "1.10",
"File::chdir" => 0,
"JSON::PP" => 0,
"List::Util" => "1.33",
"Path::Tiny" => "0.077",
"Test2::API" => "1.302096",
"Test2::V0" => "0.000121",
"Text::ParseWords" => "3.26",
"parent" => 0
);
# inserted by Dist::Zilla::Plugin::DynamicPrereqs 0.040
if ( !do { require File::Which; ( $ENV{PKG_CONFIG} && File::Which::which( $ENV{PKG_CONFIG} ) ) || File::Which::which('pkgconf') || File::Which::which('pkg-config') } ) {
requires( 'PkgConfig' => '0.14026' ); # for static cflags support
}
# inserted by Dist::Zilla::Plugin::DynamicPrereqs 0.040
if ( do { use Config; ( $^O eq 'solaris' && $Config{ptrsize} == 8 ) || $^O eq 'MSWin32' } ) {
requires( 'PkgConfig' => '0.14026' ); # for using the wrong libraries support
corpus/alien_build_plugin_fetch_wget/record/old.json view on Meta::CPAN
{"-k --content-disposition -S http://localhost/corpus/alien_build_plugin_fetch_wget/dir/foo-1.01.tar":{"stderr":"--2021-05-12 00:10:35-- http://localhost/corpus/alien_build_plugin_fetch_wget/dir/foo-1.01.tar\nResolving localhost (localhost)... ::1, ...
corpus/alien_build_plugin_fetch_wget/record/old.yml view on Meta::CPAN
--exclude-domains=LIST comma-separated list of rejected domains
--follow-ftp follow FTP links from HTML documents
--follow-tags=LIST comma-separated list of followed HTML tags
--ignore-tags=LIST comma-separated list of ignored HTML tags
-H, --span-hosts go to foreign hosts when recursive
-L, --relative follow relative links only
-I, --include-directories=LIST list of allowed directories
--trust-server-names use the name specified by the redirection
URL's last component
-X, --exclude-directories=LIST list of excluded directories
-np, --no-parent don't ascend to the parent directory
Email bug reports, questions, discussions to <bug-wget@gnu.org>
and/or open issues at https://savannah.gnu.org/bugs/?func=additem&group=wget.
-k --content-disposition -S http://localhost/corpus/alien_build_plugin_fetch_wget/dir/bogus.html:
exit: 8
files: {}
stderr: |
--2021-05-12 00:10:35-- http://localhost/corpus/alien_build_plugin_fetch_wget/dir/bogus.html
Resolving localhost (localhost)... ::1, 127.0.0.1
Connecting to localhost (localhost)|::1|:42643... failed: Connection refused.
corpus/lib/Alien/Foo1.pm view on Meta::CPAN
package Alien::Foo1;
use strict;
use warnings;
use parent qw( Alien::Base );
1;
corpus/lib/Alien/Foo2.pm view on Meta::CPAN
package Alien::Foo2;
use strict;
use warnings;
use parent qw( Alien::Base );
1;
corpus/lib/Alien/SansShare.pm view on Meta::CPAN
package Alien::SansShare;
use strict;
use warnings;
use parent qw( Alien::Base );
1;
corpus/lib/Alien/libfoo1.pm view on Meta::CPAN
package Alien::libfoo1;
use strict;
use warnings;
use parent qw( Alien::Base );
sub alien_helper
{
return {
foo1 => sub { 'bar' . (1+2) },
foo2 => '"baz" . (3+4)',
};
}
1;
corpus/lib/Alien/libfoo2.pm view on Meta::CPAN
package Alien::libfoo2;
use strict;
use warnings;
use parent qw( Alien::Base );
sub alien_helper
{
return {
foo1 => sub { 'bar' . (1+2) },
foo2 => '"baz" . (3+4)',
};
}
1;
corpus/lib/Alien/libfoo3.pm view on Meta::CPAN
package Alien::libfoo3;
use strict;
use warnings;
use parent qw( Alien::Base );
1;
corpus/lib/Alien/perlhelp.pm view on Meta::CPAN
package Alien::perlhelp;
use strict;
use warnings;
use parent qw( Alien::Base );
our $VERSION = '0.25';
sub exe { $^X }
sub alien_helper
{
return {
perlhelp => sub { __PACKAGE__->exe },
};
corpus/vcpkg/r2/installed/vcpkg/info/openssl-windows_1.1.1d-1_x64-windows.list view on Meta::CPAN
x64-windows/debug/html/man3/OPENSSL_VERSION_TEXT.html
x64-windows/debug/html/man3/OPENSSL_atexit.html
x64-windows/debug/html/man3/OPENSSL_buf2hexstr.html
x64-windows/debug/html/man3/OPENSSL_cipher_name.html
x64-windows/debug/html/man3/OPENSSL_cleanse.html
x64-windows/debug/html/man3/OPENSSL_cleanup.html
x64-windows/debug/html/man3/OPENSSL_clear_free.html
x64-windows/debug/html/man3/OPENSSL_clear_realloc.html
x64-windows/debug/html/man3/OPENSSL_config.html
x64-windows/debug/html/man3/OPENSSL_fork_child.html
x64-windows/debug/html/man3/OPENSSL_fork_parent.html
x64-windows/debug/html/man3/OPENSSL_fork_prepare.html
x64-windows/debug/html/man3/OPENSSL_free.html
x64-windows/debug/html/man3/OPENSSL_hexchar2int.html
x64-windows/debug/html/man3/OPENSSL_hexstr2buf.html
x64-windows/debug/html/man3/OPENSSL_ia32cap.html
x64-windows/debug/html/man3/OPENSSL_init_crypto.html
x64-windows/debug/html/man3/OPENSSL_init_ssl.html
x64-windows/debug/html/man3/OPENSSL_instrument_bus.html
x64-windows/debug/html/man3/OPENSSL_instrument_bus2.html
x64-windows/debug/html/man3/OPENSSL_load_builtin_modules.html
corpus/vcpkg/r2/installed/vcpkg/info/openssl-windows_1.1.1d-1_x64-windows.list view on Meta::CPAN
x64-windows/html/man3/OPENSSL_VERSION_TEXT.html
x64-windows/html/man3/OPENSSL_atexit.html
x64-windows/html/man3/OPENSSL_buf2hexstr.html
x64-windows/html/man3/OPENSSL_cipher_name.html
x64-windows/html/man3/OPENSSL_cleanse.html
x64-windows/html/man3/OPENSSL_cleanup.html
x64-windows/html/man3/OPENSSL_clear_free.html
x64-windows/html/man3/OPENSSL_clear_realloc.html
x64-windows/html/man3/OPENSSL_config.html
x64-windows/html/man3/OPENSSL_fork_child.html
x64-windows/html/man3/OPENSSL_fork_parent.html
x64-windows/html/man3/OPENSSL_fork_prepare.html
x64-windows/html/man3/OPENSSL_free.html
x64-windows/html/man3/OPENSSL_hexchar2int.html
x64-windows/html/man3/OPENSSL_hexstr2buf.html
x64-windows/html/man3/OPENSSL_ia32cap.html
x64-windows/html/man3/OPENSSL_init_crypto.html
x64-windows/html/man3/OPENSSL_init_ssl.html
x64-windows/html/man3/OPENSSL_instrument_bus.html
x64-windows/html/man3/OPENSSL_instrument_bus2.html
x64-windows/html/man3/OPENSSL_load_builtin_modules.html
remove = Env::ShellWords
remove = Readonly
[Prereqs]
Capture::Tiny = 0.17
Path::Tiny = 0.077
FFI::CheckLib = 0.11
Text::ParseWords = 3.26
ExtUtils::ParseXS = 3.30
ExtUtils::MakeMaker = 6.64
parent = 0
[Prereqs / ConfigureRequires]
-phase = configure
ExtUtils::CBuilder = 0
ExtUtils::ParseXS = 3.30
File::Which = 0
ExtUtils::MakeMaker = 6.64
[Prereqs / BuildRequires]
-phase = build
lib/Alien/Base.pm view on Meta::CPAN
version 2.84
=head1 SYNOPSIS
package Alien::MyLibrary;
use strict;
use warnings;
use parent 'Alien::Base';
1;
(for details on the C<Makefile.PL> or C<Build.PL> and L<alienfile>
that should be bundled with your L<Alien::Base> subclass, please see
L<Alien::Build::Manual::AlienAuthor>).
Then a C<MyLibrary::XS> can use C<Alien::MyLibrary> in its C<Makefile.PL>:
use Alien::MyLibrary
lib/Alien/Base.pm view on Meta::CPAN
use alienfile;
plugin 'PkgConfig' => (
pkg_name => [ 'libfoo', 'libbar', ],
);
Then in your base class works like normal:
package Alien::MyLibrary;
use parent qw( Alien::Base );
1;
Then you can use it:
use Alien::MyLibrary;
my $cflags = Alien::MyLibrary->alt('foo1')->cflags;
my $libs = Alien::MyLibrary->alt('foo1')->libs;
lib/Alien/Base/PkgConfig.pm view on Meta::CPAN
my ($path) = @_;
croak "Must specify a file" unless defined $path;
$path = path( $path )->absolute;
my($name) = $path->basename =~ /^(.*)\.pc$/;
my $self = {
package => $name,
vars => { pcfiledir => $path->parent->stringify },
keywords => {},
};
bless $self, $class;
$self->read($path);
return $self;
}
lib/Alien/Build.pm view on Meta::CPAN
package Alien::Build::rc;
require $rcfile;
}
unless(-r $alienfile)
{
Carp::croak "Unable to read alienfile: $alienfile";
}
my $file = _path $alienfile;
my $name = $file->parent->basename;
$name =~ s/^alien-//i;
$name =~ s/[^a-z]//g;
$name = 'x' if $name eq '';
$name = ucfirst $name;
my $class = "Alien::Build::Auto::$name@{[ $count++ ]}";
{ no strict 'refs';
@{ "${class}::ISA" } = ('Alien::Build');
*{ "${class}::Alienfile::meta" } = sub {
lib/Alien/Build/Interpolate/Default.pm view on Meta::CPAN
package Alien::Build::Interpolate::Default;
use strict;
use warnings;
use 5.008004;
use parent qw( Alien::Build::Interpolate );
use File::chdir;
use File::Which qw( which );
use Capture::Tiny qw( capture );
# ABSTRACT: Default interpolator for Alien::Build
our $VERSION = '2.84'; # VERSION
sub _config
{
$Config::Config{$_[0]};
lib/Alien/Build/Interpolate/Default.pm view on Meta::CPAN
%{make}
Make. On Unix this will be the same make used by Perl. On Windows this will be
C<gmake> or C<nmake> if those are available, and only C<dmake> if the first two
are not available.
=head2 make_path
%{make_path}
Make directory, including all parent directories as needed. This is usually C<mkdir -p>
on Unix and simply C<md> on windows.
=head2 nasm
%{nasm}
Requires: L<Alien::nasm> 0.11 if not already in the C<PATH>.
=head2 patch
lib/Alien/Build/Log.pm view on Meta::CPAN
=head1 VERSION
version 2.84
=head1 SYNOPSIS
Create your custom log class:
package Alien::Build::Log::MyLog;
use parent qw( Alien::Build::Log );
sub log
{
my(undef, %opt) = @_;
my($package, $filename, $line) = @{ $opt{caller} };
my $message = $opt{message};
...;
}
lib/Alien/Build/Log/Abbreviate.pm view on Meta::CPAN
package Alien::Build::Log::Abbreviate;
use strict;
use warnings;
use 5.008004;
use Term::ANSIColor ();
use Path::Tiny qw( path );
use File::chdir;
use parent qw( Alien::Build::Log );
# ABSTRACT: Log class for Alien::Build which is less verbose
our $VERSION = '2.84'; # VERSION
sub _colored
{
my($code, @out) = @_;
-t STDOUT ? Term::ANSIColor::colored($code, @out) : @out;
}
lib/Alien/Build/Log/Default.pm view on Meta::CPAN
package Alien::Build::Log::Default;
use strict;
use warnings;
use 5.008004;
use parent qw( Alien::Build::Log );
# ABSTRACT: Default Alien::Build log class
our $VERSION = '2.84'; # VERSION
sub log
{
my(undef, %args) = @_;
my($message) = $args{message};
my ($package, $filename, $line) = @{ $args{caller} };
lib/Alien/Build/MM.pm view on Meta::CPAN
{
my $build = Alien::Build->resume('alienfile', '_alien');
$build->load_requires('configure');
$build->load_requires($build->install_type);
($build, @ARGV)
};
*_touch = sub {
my($name) = @_;
my $path = Path::Tiny->new("_alien/mm/$name");
$path->parent->mkpath;
$path->touch;
};
*prefix = sub
{
my($build, $type, $perl, $site, $vendor) = _args();
my $distname = $build->install_prop->{mm}->{distname};
my $prefix = $type eq 'perl'
lib/Alien/Build/MM.pm view on Meta::CPAN
}
my $cflags = $build->runtime_prop->{cflags};
my $libs = $build->runtime_prop->{libs};
if(($cflags && $cflags !~ /^\s*$/)
|| ($libs && $libs !~ /^\s*$/))
{
my $mod = join '::', split /-/, $distname;
my $install_files_pm = Path::Tiny->new("blib/lib/@{[ join '/', split /-/, $distname ]}/Install/Files.pm");
$install_files_pm->parent->mkpath;
$install_files_pm->spew(
"package ${mod}::Install::Files;\n",
"use strict;\n",
"use warnings;\n",
"require ${mod};\n",
"sub Inline { shift; ${mod}->Inline(\@_) }\n",
"1;\n",
"\n",
"=begin Pod::Coverage\n",
"\n",
lib/Alien/Build/MM.pm view on Meta::CPAN
$abmm->mm_postamble(@_);
}
sub MY::install {
$abmm->mm_install(@_);
}
In your C<lib/Alien/Libfoo.pm>:
package Alien::Libfoo;
use parent qw( Alien::Base );
1;
In your alienfile (needs to be named C<alienfile> and should be in the root of your dist):
use alienfile;
plugin 'PkgConfig' => 'libfoo';
share {
start_url 'http://libfoo.org';
lib/Alien/Build/Manual/AlienAuthor.pod view on Meta::CPAN
sub MY::postamble {
$abmm->mm_postamble;
}
The C<lib/Alien/Libfoo.pm> that goes along with it is very simple:
package Alien::Libfoo;
use strict;
use warnings;
use parent qw( Alien::Base );
1;
You are done and can install it normally:
% perl Makefile.PL
% make
% make test
% make install
lib/Alien/Build/Manual/AlienAuthor.pod view on Meta::CPAN
# non-standard
[ 'foo-config --bar-baz libfoo', \'%{.runtime.bar_baz}' ],
];
then you can expose them in your L<Alien::Base> subclass:
package Alien::Libfoo;
use strict;
use warnings;
use parent qw( Alien::Base );
sub bar_baz {
my($self) = @_;
$self->runtime_prop->{bar_baz},
};
1;
=head2 Testing
lib/Alien/Build/Manual/Contributing.pod view on Meta::CPAN
=head2 Philosophy
=head3 Alien runtime should be as config-only as possible.
Ideally the code for an L<Alien::Base> based L<Alien> should simply
inherit from L<Alien::Base>, like so:
package Alien::libfoo;
use parent qw( Alien::Base );
1;
The detection logic should be done by the installer code (L<alienfile>
and L<Alien::Build>) and saved into runtime properties (see
L<Alien::Build/runtime_prop>). And as much as
possible the runtime should be implemented in the base class (L<Alien::Base>).
Where reasonable, the base class should be expanded to meet the needs
of this arrangement.
lib/Alien/Build/Manual/PluginAuthor.pod view on Meta::CPAN
=head2 Writing plugins
Plugins use L<Alien::Build::Plugin>, which sets the appropriate base
class, and provides you with the C<has> property builder. C<has> takes
two arguments, the name of the property and the default value. (As
with L<Moose> and L<Moo>, you should use a code reference to specify
default values for non-string defaults). No B<not> set this as your
plugin's base class directly:
use parent qw( Alien::Build::Plugin ); # wrong
use Alien::Build::Plugin; # right
The only method that you need to implement is C<init>. From this method
you can add hooks to change the behavior of the L<alienfile> recipe.
This is a very simple example of a probe hook, with the actual probe
logic removed:
sub init
{
my($self, $meta) = @_;
lib/Alien/Build/Plugin/Extract/CommandLine.pm view on Meta::CPAN
die "unable to decompress $src";
}
# if we have already decompressed, then keep it.
unless(-f $dcon_name)
{
# we don't use pipes, because that may not work on Windows.
# keep the original archive, in case another extract
# plugin needs it. keep the decompressed archive
# in case WE need it again.
my $src_tmp = Path::Tiny::path($src)
->parent
->child('x'.Path::Tiny::path($src)->basename);
my $dcon_tmp = Path::Tiny::path($dcon_name)
->parent
->child('x'.Path::Tiny::path($dcon_name)->basename);
$self->_cp($build, $src, $src_tmp);
$self->_run($build, $dcon_cmd, "-d", $src_tmp);
$self->_mv($build, $dcon_tmp, $dcon_name);
}
$src = $dcon_name;
}
if($src =~ /\.zip$/i)
{
lib/Alien/Build/Plugin/Extract/File.pm view on Meta::CPAN
sub init
{
my($self, $meta) = @_;
$meta->register_hook(
extract => sub {
my($build, $src) = @_;
die "not a file: $src" unless -f $src;
$src = Path::Tiny->new($src)->absolute->parent;;
my $dst = Path::Tiny->new('.')->absolute;
# Please note: _mirror and Alien::Build::Util are ONLY
# allowed to be used by core plugins. If you are writing
# a non-core plugin it may be removed. That is why it
# is private.
$build->log("extracting $src => $dst");
_mirror $src => $dst, { verbose => 1 };
}
lib/Alien/Build/Plugin/Fetch/CurlCommand.pm view on Meta::CPAN
my($out, $err, $exit) = capture {
system $curl, '--version';
};
{
# make sure curl supports the -J option.
# CentOS 6 for example is recent enough
# that it does not. gh#147, gh#148, gh#149
local $CWD = tempdir( CLEANUP => 1 );
my $file1 = path('foo/foo.txt');
$file1->parent->mkpath;
$file1->spew("hello world\n");
my $url = 'file://' . $file1->absolute;
my($out, $err, $exit) = capture {
system $curl, '-O', '-J', $url;
};
my $file2 = $file1->parent->child($file1->basename);
unlink "$file1";
unlink "$file2";
rmdir($file1->parent);
return 0 if $exit;
}
foreach my $line (split /\n/, $out)
{
if($line =~ /^Protocols:\s*(.*)\s*$/)
{
my %proto = map { $_ => 1 } split /\s+/, $1;
return $proto{$protocol} if $proto{$protocol};
}
lib/Alien/Build/Plugin/Gather/IsolateDynamic.pm view on Meta::CPAN
}
foreach my $dir (map { $install_root->child($_) } qw( bin lib ))
{
next unless -d $dir;
foreach my $from ($dir->children)
{
next unless $from->basename =~ /\.so/
|| $from->basename =~ /\.(dylib|bundle|la|dll|dll\.a)$/;
my $to = $install_root->child('dynamic', $from->basename);
$to->parent->mkpath;
unlink "$to" if -e $to;
$build->log("move @{[ $from->parent->basename ]}/@{[ $from->basename ]} => dynamic/@{[ $to->basename ]}");
File::Copy::move("$from", "$to") || die "unable to move $from => $to $!";
}
}
$build->log(" Done!");
},
);
}
1;