view release on metacpan or search on metacpan
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
Appendix: How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to humanity, the best way to achieve this is to make it
free software which everyone can redistribute and change under these
terms.
To do so, attach the following notices to the program. It is safest to
attach them to the start of each source file to most effectively convey
the exclusion of warranty; and each file should have at least the
"copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) 19yy <name of author>
Alien::Build responds to these environment variables:
ALIEN_BUILD_LOG
The default log class used. See Alien::Build::Log and
Alien::Build::Log::Default.
ALIEN_BUILD_PKG_CONFIG
Override the logic in Alien::Build::Plugin::PkgConfig::Negotiate
which chooses the best pkg-config plugin.
ALIEN_BUILD_POSTLOAD
semicolon separated list of plugins to automatically load after
parsing your alienfile.
ALIEN_BUILD_PRELOAD
semicolon separated list of plugins to automatically load before
parsing your alienfile.
SUPPORT
The intent of the "Alien-Build" team is to support as best as possible
all Perls from 5.8.4 to the latest production version. So long as they
are also supported by the Perl toolchain.
Please feel encouraged to report issues that you encounter to the
project GitHub Issue tracker:
<https://github.com/PerlAlien/Alien-Build/issues>
Better if you can fix the issue yourself, please feel encouraged to open
pull-request on the project GitHub:
corpus/cmake-libpalindrome/LICENSE view on Meta::CPAN
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
Appendix: How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to humanity, the best way to achieve this is to make it
free software which everyone can redistribute and change under these
terms.
To do so, attach the following notices to the program. It is safest to
attach them to the start of each source file to most effectively convey
the exclusion of warranty; and each file should have at least the
"copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) 19yy <name of author>
corpus/vcpkg/r2/installed/vcpkg/status view on Meta::CPAN
Multi-Arch: same
Description: OpenSSL support
Type: Port
Status: install ok installed
Package: libressl
Version: 2.9.1-2
Architecture: x64-windows
Multi-Arch: same
Abi: faa3fe00496397545d489c14b1a14c25143d91bd
Description: LibreSSL is a version of the TLS/crypto stack forked from OpenSSL in 2014, with goals of modernizing the codebase, improving security, and applying best practice development processes.
Type: Port
Status: install ok installed
Package: libffi
Version: 3.3
Architecture: x86-windows
Multi-Arch: same
Abi: 26fac73eca7ab28cad695055b44f461dace1fc39
Description: Portable, high level programming interface to various calling conventions
Type: Port
example/bzip2.alienfile view on Meta::CPAN
# items in the share block relate to building the package
# from source. It is called share because it will be
# installed into a dist level share directory in your
# perl lib.
# The Build::MSYS plugin just makes sure that Alien::MSYS
# is used to provide the necessary tools on Windows. It
# doesn't do anything on other platforms.
plugin 'Build::MSYS';
# The Download negotiator picks the best method for
# downloading the package.
plugin 'Download' => (
url => 'https://sourceforge.net/projects/bzip2/files/latest/download',
);
# The Extract negotiator picks the best method for
# extracting from the tarball. We give it a hint
# here that we expect the tarball to be .gz compressed
# in case it needs to load extra modules to
# decompress.
plugin Extract => 'tar.gz';
# The build stage here is specified as a series of commands.
# bzip2 uses make to build and install. It is vital that we
# include cccdlflags in the compiler flags, because this will
# include any flags necessary for making the library relocatable
example/curl.alienfile view on Meta::CPAN
use alienfile;
# PkgConfig uses the pkg-config negotiator to pick the best
# available implementation (as of this writing, in order:
# libpkgconf, pkg-config, PkgConfig,pm), to determine
# if the system already provides the library. In addition,
# it gets the version, cflags and libs during either a
# "system" or "share" install.
plugin 'PkgConfig' => 'libcurl';
# in addition to the library, we require that the xz command
# is also available.
plugin 'Probe::CommandLine' => (
example/curl.alienfile view on Meta::CPAN
secondary => 1,
);
share {
# items in the share block relate to building the package
# from source. It is called share because it will be
# installed into a dist level share directory in your
# perl lib.
# The Download negotiator picks the best method for
# downloading the package. It uses the version
# regex to parse out the version number from the
# tarball so that it can pick the most recent
# version.
start_url 'https://curl.haxx.se/download/';
plugin Download => (
version => qr/^curl-([0-9\.]+)\.tar\.gz$/,
);
# The Extract negotiator picks the best method for
# extracting from the tarball. We give it a hint
# here that we expect the tarball to be .gz compressed
# in case it needs to load extra modules to
# decompress.
plugin Extract => 'tar.gz';
# The Autoconf plugin builds using the standard
# configure and make tools. It uses a DESTDIR
# ( https://www.gnu.org/prep/standards/html_node/DESTDIR.html )
# to ensure that the prefix during the build
example/gmake.alienfile view on Meta::CPAN
match => qr/GNU Make/,
) for qw( gmake make );
share {
# items in the share block relate to building the package
# from source. It is called share because it will be
# installed into a dist level share directory in your
# perl lib.
# The Download negotiator picks the best method for
# downloading the package. It uses the version
# regex to parse out the version number from the
# tarball so that it can pick the most recent
# version.
start_url 'http://ftp.gnu.org/gnu/make';
plugin 'Download' => (
version => qr/^make-([0-9\.]+)\.tar\.gz$/,
);
# The Extract negotiator picks the best method for
# extracting from the tarball. We give it a hint
# here that we expect the tarball to be .gz compressed
# in case it needs to load extra modules to
# decompress.
plugin 'Extract' => 'tar.gz';
# The Autoconf plugin builds using the standard
# configure and make tools. It uses a DESTDIR
# ( https://www.gnu.org/prep/standards/html_node/DESTDIR.html )
example/xz.alienfile view on Meta::CPAN
use alienfile;
# PkgConfig uses the pkg-config negotiator to pick the best
# available implementation (as of this writing, in order:
# libpkgconf, pkg-config, PkgConfig,pm), to determine
# if the system already provides the library. In addition,
# it gets the version, cflags and libs during either a
# "system" or "share" install.
plugin 'PkgConfig' => 'liblzma';
# in addition to the library, we require that the xz command
# is also available.
plugin 'Probe::CommandLine' => (
example/xz.alienfile view on Meta::CPAN
secondary => 1,
);
share {
# items in the share block relate to building the package
# from source. It is called share because it will be
# installed into a dist level share directory in your
# perl lib.
# The Download negotiator picks the best method for
# downloading the package. It uses the version
# regex to parse out the version number from the
# tarball so that it can pick the most recent
# version.
start_url 'http://tukaani.org/xz/';
plugin Download => (
version => qr/^xz-([0-9\.]+)\.tar\.gz$/,
);
# The Extract negotiator picks the best method for
# extracting from the tarball. We give it a hint
# here that we expect the tarball to be .gz compressed
# in case it needs to load extra modules to
# decompress.
plugin Extract => 'tar.gz';
# The Autoconf plugin builds using the standard
# configure and make tools. It uses a DESTDIR
# ( https://www.gnu.org/prep/standards/html_node/DESTDIR.html )
# to ensure that the prefix during the build
lib/Alien/Build.pm view on Meta::CPAN
=over 4
=item ALIEN_BUILD_LOG
The default log class used. See L<Alien::Build::Log> and L<Alien::Build::Log::Default>.
=item ALIEN_BUILD_PKG_CONFIG
Override the logic in L<Alien::Build::Plugin::PkgConfig::Negotiate> which
chooses the best C<pkg-config> plugin.
=item ALIEN_BUILD_POSTLOAD
semicolon separated list of plugins to automatically load after parsing
your L<alienfile>.
=item ALIEN_BUILD_PRELOAD
semicolon separated list of plugins to automatically load before parsing
your L<alienfile>.
lib/Alien/Build/Manual/AlienAuthor.pod view on Meta::CPAN
plugin 'Build::Autoconf';
build [
'%{configure} --disable-shared',
'%{make}',
'%{make} install',
];
};
The first plugin that we use is the C<pkg-config> negotiation plugin. A
negotiation plugin is one which doesn't do the actual work but selects
the best one from a set of plugins depending on your platform and
environment. (In the case of
L<Alien::Build::Plugin::PkgConfig::Negotiate>, it may choose to use
command line tools, a pure Perl implementation (L<PkgConfig>), or
libpkgconf, depending on what is available). When using negotiation
plugins you may omit the C<::Negotiate> suffix. So as you can see using
the plugin here is an advantage because it is more reliable than just
specifying a command which may not be installed!
Next we use the download negotiation plugin. This is also better than
the version above, because again, C<wget> my not be installed on the
lib/Alien/Build/Manual/AlienAuthor.pod view on Meta::CPAN
Once installed the first C<pkg_name> will be used by default (in this
example C<foo>), and you can retrieve any other C<pkg_name> using
the L<Alien::Base alt method|Alien::Base/alt>.
=head2 A note about dynamic vs. static libraries
If you are using your L<Alien> to build an XS module, it is important
that you use static libraries if possible. If you have a package that
refuses to build a static library, then you can use L<Alien::Role::Dino>.
Actually let me back up a minute. For a C<share> install it is best
to use static libraries to build your XS extension. This is because
if your L<Alien> is ever upgraded to a new version it can break your
existing XS modules. For a C<system> install shared libraries are
usually best because you can often get security patches without having
to re-build anything in perl land.
If you looked closely at the "Using commands" and "Using plugins"
sections above, you may notice that we went out of our way where
possible to tell Autotools to build only static libraries using the
C<--disable-shared> command. The Autoconf plugin also does this by
default.
Sometimes though you will have a package that builds both, or maybe
you I<want> both static and dynamic libraries to work with XS and FFI.
lib/Alien/Build/Manual/AlienUser.pod view on Meta::CPAN
Full working examples of how to use an L<Alien> module are also bundled
with L<Alien::Build> in the distribution's C<example/user> directory.
Those examples use L<Alien::xz>, which uses L<alienfile> + L<Alien::Build>
+ L<Alien::Base>.
The following documentation will assume you are trying to use an L<Alien>
called C<Alien::Foo> which provides the library C<libfoo> and the command
line tool C<foo>. Many L<Alien>s will only provide one or the other.
The best interface to use for using L<Alien::Base> based aliens is
L<Alien::Base::Wrapper>. This allows you to combine multiple aliens together
and handles a number of corner obscure corner cases that using L<Alien>s
directly does not. Also as of 0.64, L<Alien::Base::Wrapper> comes bundled
with L<Alien::Build> and L<Alien::Base> anyway, so it is not an extra
dependency.
What follows are the main use cases.
=head2 ExtUtils::MakeMaker
lib/Alien/Build/Manual/Contributing.pod view on Meta::CPAN
version 2.84
=head1 SYNOPSIS
perldoc Alien::Build::Manual::Contributing
=head1 DESCRIPTION
Thank you for considering to contribute to my open source project! If
you have a small patch please consider just submitting it. Doing so
through the project GitHub is probably the best way:
L<https://github.com/plicease/Alien-Build/issues>
If you have a more invasive enhancement or bugfix to contribute, please
take the time to review these guidelines. In general it is good idea to
work closely with the L<Alien::Build> developers, and the best way to
contact them is on the C<#native> IRC channel on irc.perl.org.
=head2 History
Joel Berger wrote the original L<Alien::Base>. This distribution
included the runtime code L<Alien::Base> and an installer class
L<Alien::Base::ModuleBuild>. The significant thing about L<Alien::Base>
was that it provided tools to make it relatively easy for people to roll
their own L<Alien> distributions. Over time, the PerlAlien (github
organization) or "Alien::Base team" has taken over development of
lib/Alien/Build/Manual/Contributing.pod view on Meta::CPAN
logic works, and which hooks need to be tweaked.
L<Alien::Build> has plugins for C<autoconf>, C<pkgconf> (successor of
C<pkg-config>), vanilla Makefiles, and CMake. If your build system
doesn't have a plugin, then all you have to do is write one! Plugins
that prove their worth may be merged into the L<Alien::Build> core.
Plugins that after a while feel like maybe not such a good idea may be
removed from the core, or even from CPAN itself.
In addition, L<Alien::Build> has a special type of plugin, called a
negotiator which picks the best plugin for the particular environment
that it is running in. This way, as development of the negotiator and
plugins develop over time modules that use L<Alien::Build> will benefit,
without having to change the way they interface with L<Alien::Build>
=head1 ACKNOWLEDGEMENT
I would like to that Joel Berger for getting things running in the first
place. Also important to thank other members of the "Alien::Base team":
Zaki Mughal (SIVOAIS)
lib/Alien/Build/Manual/PluginAuthor.pod view on Meta::CPAN
# around hooks are useful for setting environment variables
local $ENV{CPPFLAGS} = '-I/foo/include';
$orig->(@_);
},
);
}
=head2 Testing plugins
You can and should write tests for your plugin. The best way to do
this is using L<Test::Alien::Build>, which allows you to write an
inline L<alienfile> in your test. Here is an example:
use Test::V0;
use Test::Alien::Build;
my $build = alienfile_ok q{
use alienfile;
plugin 'Build::MyPlugin' => (
arg1 => 'override for arg1',
lib/Alien/Build/Manual/PluginAuthor.pod view on Meta::CPAN
# you can interrogate $build, it is an instance of L<Alien::Build>.
my $alien = alien_build_ok;
# you can interrogate $alien, it is an instance of L<Alien::Base>.
=head2 Negotiator plugins
A Negotiator plugin doesn't itself typically implement anything on
its own, but picks the best plugin to achieve a particular goal.
The "best" plugin can in some cases vary depending on the platform
or tools that are available. For example The
L<download negotiator|Alien::Build::Plugin::Download::Negotiate>
might choose to use the fetch plugin that relies on the command line
C<curl>, or it might choose the fetch plugin that relies on the Perl
module L<HTTP::Tiny> depending on the platform and what is already
installed. (For either to be useful they have to support SSL).
The Negotiator plugin is by convention named something like
C<Alien::Build::Plugin::*::Negotiate>, but is typically invoked
without the C<::Negotiate> suffix. For example:
lib/Alien/Build/Manual/PluginAuthor.pod view on Meta::CPAN
$meta->register_hook( prefer => sub {
my($build, $res) = @_;
return {
type => 'list',
list => [sort @{ $res->{list} }],
};
}
This hook sorts candidates from a listing generated from either the C<fetch>
or C<decode> hooks. It should return a new list hash reference with the
candidates sorted from best to worst. It may also remove candidates
that are totally unacceptable.
=head2 probe hook
$meta->register_hook( probe => sub {
my($build) = @_;
return 'system' if ...; # system install
return 'share'; # otherwise
});
lib/Alien/Build/Manual/Security.pod view on Meta::CPAN
You are rightly concerned that an L<Alien> might be downloading something random
off the internet. This manual will describe some of the real risks and go over
how you can mitigate them.
=head2 no warranty
L<Alien::Build> provides L<Alien> authors with tools to add external non-Perl
dependencies to CPAN modules. It is open source software that is entirely
volunteer driven, meaning the people writing this software are not getting
compensated monetarily for the work. As such, we do our best not to
intentionally introduce security vulnerabilities into our modules, or their
dependencies. But it is also not our responsibility either. If you are
operating in an environment where you need absolute security, you need to
carefully audit I<all> of the software that you use.
=head2 L<Alien::Build> vs. L<CPAN>
I suppose you could argue that L<Alien::Build> based L<Alien>s and L<Alien>s
in general are inherently less secure than the the Perl modules on L<CPAN>
that don't download random stuff off the internet. Worse yet, L<Alien>s
lib/Alien/Build/Manual/Security.pod view on Meta::CPAN
Setting C<ALIEN_INSTALL_TYPE> to C<system> is similar to setting
C<ALIEN_INSTALL_NETWORK> to false, except that bundled alienized
packages will also be rejected. This environment variable is really
intended for use by operating system vendors packaging L<Alien>s,
or for L<Alien> developer testing (in CI for example). For some
who want to restrict how L<Alien>s install this might be the right
tool to reach for.
=back
Note that this is definitely best effort. If the L<Alien> author makes
a mistake or is malicious they could override these environment variables
inside the C<Makefile.PL>, so you still need to audit any software to
ensure that it doesn't fetch source off the internet.
=head2 Security Related Plugins
There are a number of plugins that give the user or installer control
over how L<Alien::Build> behaves, and may be useful for rudimentary
security.
lib/Alien/Build/Plugin/Download/Negotiate.pm view on Meta::CPAN
start_url 'http://ftp.gnu.org/gnu/make';
plugin 'Download' => (
filter => qr/^make-.*\.tar\.gz$/,
version => qr/([0-9\.]+)/,
);
};
=head1 DESCRIPTION
This is a negotiator plugin for downloading packages from the internet. This
plugin picks the best Fetch, Decode and Prefer plugins to do the actual work.
Which plugins are picked depend on the properties you specify, your platform
and environment. It is usually preferable to use a negotiator plugin rather
than the Fetch, Decode and Prefer plugins directly from your L<alienfile>.
=head1 PROPERTIES
=head2 url
[DEPRECATED] use C<start_url> instead.
lib/Alien/Build/Plugin/Extract.pod view on Meta::CPAN
use alienfile
share {
plugin 'Extract' => 'tar.gz';
};
=head1 DESCRIPTION
Extract plugins extract packages that have been downloaded from the internet.
Unless you are doing something unusual you will likely want to use the
L<Alien::Build::Plugin::Extract::Negotiate> plugin to select the best
Extract plugin available.
=over 4
=item L<Alien::Build::Plugin::Extract::ArchiveTar>
Extract using C<tar>. Typically also works with compressed tarballs like C<tar.gz>.
=item L<Alien::Build::Plugin::Extract::ArchiveZip>
lib/Alien/Build/Plugin/Extract.pod view on Meta::CPAN
=item L<Alien::Build::Plugin::Extract::Directory>
Extract a local directory.
=item L<Alien::Build::Plugin::Extract::File>
"Extract" a single file.
=item L<Alien::Build::Plugin::Extract::Negotiate>
Pick the best extract plugin based on the extension of the package archive.
=back
=head1 SEE ALSO
L<Alien::Build>, L<Alien::Build::Plugin>
=head1 AUTHOR
Author: Graham Ollis E<lt>plicease@cpan.orgE<gt>
lib/Alien/Build/Plugin/Extract/Negotiate.pm view on Meta::CPAN
=head1 SYNOPSIS
use alienfile;
plugin 'Extract' => (
format => 'tar.gz',
);
=head1 DESCRIPTION
This is a negotiator plugin for extracting packages downloaded from the internet.
This plugin picks the best Extract plugin to do the actual work. Which plugins are
picked depend on the properties you specify, your platform and environment. It is
usually preferable to use a negotiator plugin rather than using a specific Extract
Plugin from your L<alienfile>.
=head1 PROPERTIES
=head2 format
The expected format for the download. Possible values include:
C<tar>, C<tar.gz>, C<tar.bz2>, C<tar.xz>, C<zip>, C<d>.
=head1 METHODS
=head2 pick
my $name = Alien::Build::Plugin::Extract::Negotiate->pick($format);
Returns the name of the best plugin for the given format.
=head1 SEE ALSO
L<Alien::Build>, L<alienfile>, L<Alien::Build::MM>, L<Alien>
=head1 AUTHOR
Author: Graham Ollis E<lt>plicease@cpan.orgE<gt>
Contributors:
lib/Alien/Build/Plugin/Fetch.pod view on Meta::CPAN
};
=head1 DESCRIPTION
Fetch plugins retrieve single resources from the internet. The difference
between a Fetch plugin and a Download plugin is that Download
plugin may fetch several resources from the internet (usually using
a Fetch plugin), before finding the final archive. Normally you
will not need to use Fetch plugins directly but should instead
use the L<Alien::Build::Plugin::Download::Negotiate> plugin, which
will pick the best plugins for your given URL.
=over 4
=item L<Alien::Build::Plugin::Fetch::CurlCommand>
Fetch using the C<curl> command.
=item L<Alien::Build::Plugin::Fetch::HTTPTiny>
Fetch using L<HTTP::Tiny>.
lib/Alien/Build/Plugin/Fetch/CurlCommand.pm view on Meta::CPAN
use alienfile;
share {
start_url 'https://www.openssl.org/source/';
plugin 'Fetch::CurlCommand';
};
=head1 DESCRIPTION
This plugin provides a fetch based on the C<curl> command. It works with other fetch
plugins (that is, the first one which succeeds will be used). Most of the time the best plugin
to use will be L<Alien::Build::Plugin::Download::Negotiate>, but for some SSL bootstrapping
it may be desirable to try C<curl> first.
Protocols supported: C<http>, C<https>
C<https> support requires that curl was built with SSL support.
=head1 PROPERTIES
=head2 curl_command
lib/Alien/Build/Plugin/Fetch/Wget.pm view on Meta::CPAN
share {
start_url 'https://www.openssl.org/source/';
plugin 'Fetch::Wget';
};
=head1 DESCRIPTION
B<WARNING>: This plugin is somewhat experimental at this time.
This plugin provides a fetch based on the C<wget> command. It works with other fetch
plugins (that is, the first one which succeeds will be used). Most of the time the best plugin
to use will be L<Alien::Build::Plugin::Download::Negotiate>, but for some SSL bootstrapping
it may be desirable to try C<wget> first.
Protocols supported: C<http>, C<https>
=head1 PROPERTIES
=head2 wget_command
The full path to the C<wget> command. The default is usually correct.
lib/Alien/Build/Plugin/PkgConfig.pod view on Meta::CPAN
=item L<Alien::Build::Plugin::PkgConfig::LibPkgConf>
Use the XS L<PkgConfig::LibPkgConf> to get compiler and linker flags.
=item L<Alien::Build::Plugin::PkgConfig::MakeStatic>
Convert .pc file to use static linkage by default.
=item L<Alien::Build::Plugin::PkgConfig::MakeStatic>
Choose the best plugin to do C<pkg-config> work. The best choice is typically
platform and configuration dependent.
=item L<Alien::Build::Plugin::PkgConfig::PP>
Use the pure-perl L<PkgConfig> to get compiler and linker flags.
=back
=head1 SEE ALSO
lib/Alien/Build/Plugin/PkgConfig/CommandLine.pm view on Meta::CPAN
pkg_name => 'libfoo',
);
=head1 DESCRIPTION
Note: in most case you will want to use L<Alien::Build::Plugin::PkgConfig::Negotiate>
instead. It picks the appropriate fetch plugin based on your platform and environment.
In some cases you may need to use this plugin directly instead.
This plugin provides Probe and Gather steps for pkg-config based packages. It uses
the best command line tools to accomplish this task.
=head1 PROPERTIES
=head2 pkg_name
The package name. If this is a list reference then .pc files with all those package
names must be present. The first name will be the primary and used by default once
installed. For the subsequent C<.pc> files you can use the
L<Alien::Base alt method|Alien::Base/alt> to retrieve the alternate configurations
once the L<Alien> is installed.
lib/Alien/Build/Plugin/PkgConfig/Negotiate.pm view on Meta::CPAN
=head1 SYNOPSIS
use alienfile;
plugin 'PkgConfig' => (
pkg_name => 'libfoo',
);
=head1 DESCRIPTION
This plugin provides Probe and Gather steps for pkg-config based packages. It picks
the best C<PkgConfig> plugin depending your platform and environment.
=head1 PROPERTIES
=head2 pkg_name
The package name. If this is a list reference then .pc files with all those package
names must be present. The first name will be the primary and used by default once
installed. For the subsequent C<.pc> files you can use the
L<Alien::Base alt method|Alien::Base/alt> to retrieve the alternate configurations
once the L<Alien> is installed.
lib/Alien/Build/Plugin/PkgConfig/Negotiate.pm view on Meta::CPAN
Returns the name of the negotiated plugin.
=head1 ENVIRONMENT
=over 4
=item ALIEN_BUILD_PKG_CONFIG
If set, this plugin will be used instead of the build in logic
which attempts to automatically pick the best plugin.
=back
=head1 SEE ALSO
L<Alien::Build>, L<alienfile>, L<Alien::Build::MM>, L<Alien>
=head1 AUTHOR
Author: Graham Ollis E<lt>plicease@cpan.orgE<gt>
lib/Alien/Build/Version/Basic.pm view on Meta::CPAN
my @sorted = sort map { version($_) } qw( 2.1 1.2.3 1.2.2 );
# will come out in the order 1.2.2, 1.2.3, 2.1
=head1 DESCRIPTION
This module provides a very basic class for comparing versions.
This is already a crowded space on CPAN. Parts of L<Alien::Build>
already use L<Sort::Versions>, which is fine for sorting versions.
Sometimes you need to compare to see if versions match exact I<values>,
and the best candidates (such as L<Sort::Versions> on CPAN compare
C<1.2.3.0> and C<1.2.3> as being different. This class compares
those two as the same.
This class is also quite limited, in that it only works with version
schemes using a doted version numbers or real numbers with a fixed
number of digits. Versions with: dashes, letters, hex digits, or
anything else are not supported.
This class overloads both C<E<lt>=E<gt>> and C<cmp> to compare the version in
the way that you would expect for version numbers. This way you can
lib/Test/Alien.pm view on Meta::CPAN
done_testing;
=head1 DESCRIPTION
This module provides tools for testing L<Alien> modules. It has hooks
to work easily with L<Alien::Base> based modules, but can also be used
via the synthetic interface to test non L<Alien::Base> based L<Alien>
modules. It has very modest prerequisites.
Prior to this module the best way to test a L<Alien> module was via L<Test::CChecker>.
The main downside to that module is that it is heavily influenced by and uses
L<ExtUtils::CChecker>, which is a tool for checking at install time various things
about your compiler. It was also written before L<Alien::Base> became as stable as it
is today. In particular, L<Test::CChecker> does its testing by creating an executable
and running it. Unfortunately Perl uses extensions by creating dynamic libraries
and linking them into the Perl process, which is different in subtle and error prone
ways. This module attempts to test the libraries in the way that they will actually
be used, via either C<XS> or L<FFI::Platypus>. It also provides a mechanism for
testing binaries that are provided by the various L<Alien> modules (for example
L<Alien::gmake> and L<Alien::patch>).
lib/alienfile.pm view on Meta::CPAN
plugin $name => (%args);
plugin $name => $arg;
Load the given plugin. If you prefix the plugin name with an C<=> sign,
then it will be assumed to be a fully qualified path name. Otherwise the
plugin will be assumed to live in the C<Alien::Build::Plugin> namespace.
If there is an appropriate negotiate plugin, that one will be loaded.
Examples:
# Loads Alien::Build::Plugin::Fetch::Negotiate
# which will pick the best Alien::Build::Plugin::Fetch
# plugin based on the URL, and system configuration
plugin 'Fetch' => 'http://ftp.gnu.org/gnu/gcc';
# loads the plugin with the badly named class!
plugin '=Badly::Named::Plugin::Not::In::Alien::Build::Namespace';
# explicitly loads Alien::Build::Plugin::Prefer::SortVersions
plugin 'Prefer::SortVersions' => (
filter => qr/^gcc-.*\.tar\.gz$/,
version => qr/([0-9\.]+)/,
t/alien_build_plugin_extract_negotiate.t view on Meta::CPAN
'Extract::CommandLine',
);
};
subtest 'both' => sub {
$have_archive_zip = 1;
$have_info_zip = 1;
# Not 100% sure this is the best choice now that I think of it.
is(
Alien::Build::Plugin::Extract::Negotiate->pick('zip'),
'Extract::ArchiveZip',
);
};
};