Alien-Libarchive
view release on metacpan or search on metacpan
lib/Alien/Libarchive.pm view on Meta::CPAN
if($line =~ /^#define ((AE|ARCHIVE)_\S+)/)
{
push @list, $1;
}
}
sort @list;
}
1;
__END__
=pod
=encoding UTF-8
=head1 NAME
Alien::Libarchive - Build and make available libarchive
=head1 VERSION
version 0.28
=head1 SYNOPSIS
Build.PL
use Alien::Libarchive;
use Module::Build;
my $alien = Alien::Libarchive->new;
my $build = Module::Build->new(
...
extra_compiler_flags => [$alien->cflags],
extra_linker_flags => [$alien->libs],
...
);
$build->create_build_script;
Makefile.PL
use Alien::Libarchive;
use ExtUtils::MakeMaker;
my $alien = Alien::Libarchive;
WriteMakefile(
...
CCFLAGS => scalar $alien->cflags,
LIBS => [$alien->libs],
);
FFI::Platypus
use Alien::Libarchive;
use FFI::Platypus;
my $ffi = FFI::Platypus->new(lib => [Alien::Libarchive->new->dlls]);
$ffi->attach( archive_read_new => [] => 'opaque' );
=head1 DESCRIPTION
This distribution installs libarchive so that it can be used by other Perl
distributions. If already installed for your operating system, and it can
be found, this distribution will use the libarchive that comes with your
operating system, otherwise it will download it from the Internet, build
and install it.
If you set the environment variable C<ALIEN_LIBARCHIVE> to 'share', this
distribution will ignore any system libarchive found, and build from
source instead. This may be desirable if your operating system comes
with a very old version of libarchive and an upgrade path for the
system libarchive is not possible.
For partial compatibility with L<Alien::Base>, this distribution will also
honor the C<ALIEN_FORCE> environment variable. Setting C<ALIEN_BASE> to a
true value is the same as setting C<ALIEN_LIBARCHIVE> to 'share'.
=head2 Requirements
=head3 operating system install
The development headers and libraries for libarchive
=over 4
=item Debian
On Debian you can install these with this command:
% sudo apt-get install libarchive-dev
=item Cygwin
On Cygwin, make sure that this package is installed
libarchive-devel
=item FreeBSD
libarchive comes with FreeBSD as of version 5.3.
=back
=head3 from source install
A C compiler and any prerequisites for building libarchive.
=over 4
=item Debian
On Debian build-essential should be good enough:
% sudo apt-get install build-essential
=item Cygwin
On Cygwin, I couldn't get libarchive to build without making a
( run in 1.072 second using v1.01-cache-2.11-cpan-13bb782fe5a )