Alien-Libarchive-Installer
view release on metacpan or search on metacpan
use test_ffi to verify
both
use both test_compile_run and test_ffi to verify
alien
If true (the default) then an existing Alien::Libarchive will be used
if version 0.21 or better is found. Usually this is what you want.
build_install
my $installer = Alien::Libarchive::Installer->build_install( '/usr/local', %options );
NOTE: using this method may (and probably does) require modules
returned by the build_requires method.
Build and install libarchive into the given directory. If there is an
error an exception will be thrown. On a successful build, an instance
of Alien::Libarchive::Installer will be returned.
These options may be passed into build_install:
tar
Filename where the libarchive source tar is located. If not specified
the latest version will be downloaded from the Internet.
dir
Empty directory to be used to extract the libarchive source and to
build from.
test
Specifies the test type that should be used to verify the integrity
of the build after it has been installed. Generally this should be
set according to the needs of your module. Should be one of:
compile
use test_compile_run to verify. This is the default.
ffi
use test_ffi to verify
both
use both test_compile_run and test_ffi to verify
ATTRIBUTES
Attributes of an Alien::Libarchive::Installer provide the information
needed to use an existing libarchive (which may either be provided by
the system, or have just been built using build_install.
cflags
The compiler flags required to use libarchive.
libs
The linker flags and libraries required to use libarchive.
dlls
List of DLL or .so (or other dynamic library) files that can be used by
FFI::Raw or similar.
version
The version of libarchive
INSTANCE METHODS
test_compile_run
if($installer->test_compile_run(%options))
{
# You have a working Alien::Libarchive as
# specified by %options
}
else
{
die $installer->error;
}
Tests the compiler to see if you can build and run a simple libarchive
program. On success it will return the libarchive version. Other
options include
cbuilder
The ExtUtils::CBuilder instance that you want to use. If not
specified, then a new one will be created.
dir
Directory to use for building the executable. If not specified, a
temporary directory will be created and removed when Perl terminates.
quiet
Passed into ExtUtils::CBuilder if you do not provide your own
instance. The default is true (unlike ExtUtils::CBuilder itself).
test_ffi
if($installer->test_ffi(%options))
{
# You have a working Alien::Libarchive as
# specified by %options
}
else
{
die $installer->error;
}
Test libarchive to see if it can be used with FFI::Raw (or similar). On
success it will return the libarchive version.
error
( run in 0.797 second using v1.01-cache-2.11-cpan-8644d7adfcd )