Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
  • 2 commits
  • 3 files changed
  • 0 commit comments
  • 1 contributor
View
BIN  examples/Alien-DontPanic/inc/dontpanic-1.01.tar.gz
Binary file not shown
View
2  lib/Alien/Base/ModuleBuild.pm
@@ -431,7 +431,7 @@ sub alien_generate_manual_pkgconfig {
#if no provides_libs then generate -l list from found files
unless ($provides_libs) {
- my @files = map { "-l$_" } @{$paths->{files}};
+ my @files = map { "-l$_" } @{$paths->{so_files}};
$provides_libs = join( ' ', @files );
}
View
17 t/find_lib.t
@@ -25,13 +25,26 @@ my $builder = Alien::Base::ModuleBuild->new(
$builder->config( so => 'so' );
-{
+{ # Find from file structure
local $expected->{so_files} = [qw/mylib otherlib/];
my $paths = $builder->alien_find_lib_paths($dir);
is_deeply( $paths, $expected, "found paths from extensions only" );
+
+ my $pc = $builder->alien_generate_manual_pkgconfig($dir);
+ isa_ok($pc, 'Alien::Base::PkgConfig');
+
+ my $libs = $pc->keyword('Libs');
+
+ like( $libs, qr/-lmylib/, "->keyword('Libs') returns mylib" );
+
+ my ($L) = $libs =~ /-L(\S*)/g;
+ ok( -d $L, "->keyword('Libs') finds mylib directory");
+ opendir(my $dh, $L);
+ my @files = grep { /mylib/ } readdir $dh;
+ ok( @files, "->keyword('Libs') finds mylib" );
}
-{
+{ # Find using alien_provides_libs
$builder->alien_provides_libs('-lmylib');
my $paths = $builder->alien_find_lib_paths($dir);
is_deeply( $paths, $expected, "found paths from provides" );

No commit comments for this range

Something went wrong with that request. Please try again.