Alien-LibUSB
view release on metacpan or search on metacpan
carp 'Could not determine FreeBSD major version';
0
}
if (isAtLeastFreeBSDv8) {
probe sub { 1 };
gather sub {
my ($build) = @_;
$build->runtime_prop->{version} = '1.0.9';
$build->runtime_prop->{cflags} = '-I/usr/include';
$build->runtime_prop->{libs} = '-L/usr/lib -lusb';
$build->runtime_prop->{libs_static} = '-L/usr/lib -lusb';
};
}
plugin 'PkgConfig' => 'libusb-1.0';
my ($cppflags, $ldflags) = ('', '');
share {
requires 'Alien::autoconf' => '0.03';
requires 'Alien::automake' => '0.05';
requires 'Alien::libtool' => '0.02';
requires 'Alien::m4' => '0.11';
if ($^O eq 'linux') {
plugin 'Build::SearchDep' => (
aliens => { 'Alien::libudev' => '0.1' },
t/00-load.t view on Meta::CPAN
use Test::More tests => 4;
BEGIN { require_ok('Alien::LibUSB'); }
diag("Testing Alien::LibUSB $Alien::LibUSB::VERSION, Perl $], $^X, OS $^O ($Config{'archname'})");
my $alien = new_ok('Alien::LibUSB');
isa_ok($alien, 'Alien::Base');
can_ok($alien, qw/cflags libs install_type/);
t/99-postinstall.t view on Meta::CPAN
#else
sv = newSVpvf("unknown");
#endif
libusb_exit(NULL);
}
return sv;
}
END
my $cflags = $libusb->cflags;
my $libs = $libusb->libs;
diag "Using CFLAGS=$cflags, LIBS=$libs\n";
Inline->bind(C => $c, CCFLAGS => $cflags, LIBS => $libs);
my $version = version();
unlike($version, qr/^Error:/, 'Initialize libusb-1.0');
isnt($version, '', 'Nonempty version string');
isnt($version, undef, 'Defined version string');
my $type = $libusb->install_type;
diag "Initialized libusb-1.0, version $version, install type $type\n";
( run in 1.661 second using v1.01-cache-2.11-cpan-94b05bcf43c )