pax_global_header00006660000000000000000000000064114351601520014510gustar00rootroot0000000000000052 comment=d59e18a4b1727647fe638948574fbbd9db0328dd perl-Module-Install-CheckLib-0.08/000075500000000000000000000000001143516015200166705ustar00rootroot00000000000000perl-Module-Install-CheckLib-0.08/Changes000064400000000000000000000004521143516015200201640ustar00rootroot00000000000000Changelog for Module-Install-CheckLib ===================================== 0.06 Thu Apr 29 13:07:43 BST 2010 - tests runnable in parallel now, reported by Florian Ragwitz 0.04 Mon Jan 18 11:31:12 GMT 2010 - Added assertlibs 0.02 Mon Apr 27 21:43:50 BST 2009 - Initial public release perl-Module-Install-CheckLib-0.08/MANIFEST000064400000000000000000000007701143516015200200250ustar00rootroot00000000000000Changes inc/Module/Install.pm inc/Module/Install/AutoLicense.pm inc/Module/Install/Base.pm inc/Module/Install/Can.pm inc/Module/Install/Fetch.pm inc/Module/Install/GithubMeta.pm inc/Module/Install/Makefile.pm inc/Module/Install/Metadata.pm inc/Module/Install/ReadmeFromPod.pm inc/Module/Install/Win32.pm inc/Module/Install/WriteAll.pm lib/Module/Install/CheckLib.pm LICENSE Makefile.PL MANIFEST This list of files META.yml README t/00_compile.t t/01_dist.t t/02_assert.t t/99_pod.t t/99_pod_coverage.t perl-Module-Install-CheckLib-0.08/Makefile.PL000064400000000000000000000011041143516015200206360ustar00rootroot00000000000000use strict; use inc::Module::Install; name 'Module-Install-CheckLib'; author 'Chris Williams '; version_from 'lib/Module/Install/CheckLib.pm'; abstract_from 'lib/Module/Install/CheckLib.pm'; readme_from 'lib/Module/Install/CheckLib.pm'; license 'perl'; auto_license holder => 'Chris Williams'; perl_version '5.006'; build_requires 'Test::More' => 0.47; build_requires 'File::Temp' => 0; build_requires 'Capture::Tiny' => 0.05; requires 'Module::Install' => 0.99; requires 'Devel::CheckLib' => 0.7; auto_provides; githubmeta; clean_files 'dist'; WriteAll(); perl-Module-Install-CheckLib-0.08/README000064400000000000000000000036341143516015200175560ustar00rootroot00000000000000NAME Module::Install::CheckLib - A Module::Install extension to check that a library is available SYNOPSIS # In Makefile.PL use inc::Module::Install; checklibs lib => 'jpeg', header => 'jpeglib.h'; The Makefile.PL will exit unless library or header is found. DESCRIPTION Module::Install::CheckLib is a Module::Install extension that integrates Devel::CheckLib so that CPAN authors may stipulate which particular C library and its headers they want available and to exit the "Makefile.PL" gracefully if they aren't. The author specifies which C libraries, etc, they want available. Devel::CheckLib is copied to the "inc/" directory along with the Module::Install files. On the module user side, the bundled "inc/" Devel::CheckLib determines whether the current environment is supported or not and will exit accordingly. COMMANDS This plugin adds the following Module::Install command: "checklibs" Requires a list of parameters. These are passed directly to Devel::CheckLib "check_lib_or_exit" function. Please consult the documentation for Devel::CheckLib for more details on what these parameters are. This is generally the function one should use in Makefile.PL, as it exits gracefully and plays nice with CPAN Testers. "assertlibs" The same as "checklibs" but uses Devel::CheckLib "assert_lib" instead. "assert_lib" dies instead of exiting gracefully. It is provided for completeness, please use "checklibs". AUTHOR Chris "BinGOs" Williams Based on use-devel-checklib by David Cantrell LICENSE Copyright © Chris Williams and David Cantrell This module may be used, modified, and distributed under the same terms as Perl itself. Please see the license that came with your Perl distribution for details. SEE ALSO Module::Install Devel::CheckLib perl-Module-Install-CheckLib-0.08/lib/000075500000000000000000000000001143516015200174365ustar00rootroot00000000000000perl-Module-Install-CheckLib-0.08/lib/Module/000075500000000000000000000000001143516015200206635ustar00rootroot00000000000000perl-Module-Install-CheckLib-0.08/lib/Module/Install/000075500000000000000000000000001143516015200222715ustar00rootroot00000000000000perl-Module-Install-CheckLib-0.08/lib/Module/Install/CheckLib.pm000064400000000000000000000062101143516015200242720ustar00rootroot00000000000000package Module::Install::CheckLib; use strict; use warnings; use File::Spec; use base qw(Module::Install::Base); use vars qw($VERSION); $VERSION = '0.08'; sub checklibs { my $self = shift; my @parms = @_; return unless scalar @parms; unless ( $Module::Install::AUTHOR ) { require Devel::CheckLib; Devel::CheckLib::check_lib_or_exit( @parms ); return; } _author_side(); } sub assertlibs { my $self = shift; my @parms = @_; return unless scalar @parms; unless ( $Module::Install::AUTHOR ) { require Devel::CheckLib; Devel::CheckLib::assert_lib( @parms ); return; } _author_side(); } sub _author_side { mkdir 'inc'; mkdir 'inc/Devel'; print "Extra directories created under inc/\n"; require Devel::CheckLib; local $/ = undef; open(CHECKLIBPM, $INC{'Devel/CheckLib.pm'}) || die("Can't read $INC{'Devel/CheckLib.pm'}: $!"); (my $checklibpm = ) =~ s/package Devel::CheckLib/package #\nDevel::CheckLib/; close(CHECKLIBPM); open(CHECKLIBPM, '>'.File::Spec->catfile(qw(inc Devel CheckLib.pm))) || die("Can't write inc/Devel/CheckLib.pm: $!"); print CHECKLIBPM $checklibpm; close(CHECKLIBPM); print "Copied Devel::CheckLib to inc/ directory\n"; return 1; } 'All your libs are belong'; __END__ =head1 NAME Module::Install::CheckLib - A Module::Install extension to check that a library is available =head1 SYNOPSIS # In Makefile.PL use inc::Module::Install; checklibs lib => 'jpeg', header => 'jpeglib.h'; The Makefile.PL will exit unless library or header is found. =head1 DESCRIPTION Module::Install::CheckLib is a L extension that integrates L so that CPAN authors may stipulate which particular C library and its headers they want available and to exit the C gracefully if they aren't. The author specifies which C libraries, etc, they want available. L is copied to the C directory along with the L files. On the module user side, the bundled C L determines whether the current environment is supported or not and will exit accordingly. =head1 COMMANDS This plugin adds the following Module::Install command: =over =item C Requires a list of parameters. These are passed directly to L C function. Please consult the documentation for L for more details on what these parameters are. This is generally the function one should use in L, as it exits gracefully and plays nice with CPAN Testers. =item C The same as C but uses L C instead. C dies instead of exiting gracefully. It is provided for completeness, please use C. =back =head1 AUTHOR Chris C Williams Based on L by David Cantrell =head1 LICENSE Copyright E Chris Williams and David Cantrell This module may be used, modified, and distributed under the same terms as Perl itself. Please see the license that came with your Perl distribution for details. =head1 SEE ALSO L L =cut perl-Module-Install-CheckLib-0.08/t/000075500000000000000000000000001143516015200171335ustar00rootroot00000000000000perl-Module-Install-CheckLib-0.08/t/00_compile.t000064400000000000000000000002511143516015200212450ustar00rootroot00000000000000use Test::More tests => 1; BEGIN { use_ok('Module::Install::CheckLib') }; diag( "Testing Module::Install::CheckLib $Module::Install::CheckLib::VERSION, Perl $], $^X" ); perl-Module-Install-CheckLib-0.08/t/01_dist.t000064400000000000000000000016751143516015200205740ustar00rootroot00000000000000use strict; use warnings; use Test::More tests => 1; use File::Temp qw[tempdir]; use File::Path qw[rmtree]; use Capture::Tiny qw[capture_merged]; { mkdir 'dist'; my $tmpdir = tempdir( DIR => 'dist', CLEANUP => 1 ); chdir $tmpdir or die "$!\n"; open MFPL, '>Makefile.PL' or die "$!\n"; print MFPL < 'jpeg'; WriteAll; EOF close MFPL; my $merged = capture_merged { system "$^X Makefile.PL" }; diag("$merged"); # Copied /usr/lib/perl5/site_perl/5.8.8/Devel/CheckOS.pm to # inc/Devel/CheckOS.pm # Copied /usr/lib/perl5/site_perl/5.8.8/Devel/AssertOS.pm to # inc/Devel/AssertOS.pm # Copied /usr/lib/perl5/site_perl/5.8.8/Devel/AssertOS/NetBSD.pm to # inc/Devel/AssertOS/NetBSD.pm my @tests = ( 'inc/Devel/CheckLib.pm', ); ok( -e $_, "Exists: '$_'" ) for @tests; } perl-Module-Install-CheckLib-0.08/t/02_assert.t000064400000000000000000000017041143516015200211240ustar00rootroot00000000000000use strict; use warnings; use Test::More tests => 1; use File::Temp qw[tempdir]; use File::Path qw[rmtree]; use Capture::Tiny qw[capture_merged]; { mkdir 'dist'; my $tmpdir = tempdir( DIR => 'dist', CLEANUP => 1 ); chdir $tmpdir or die "$!\n"; open MFPL, '>Makefile.PL' or die "$!\n"; print MFPL < 'foobarbing'; WriteAll; EOF close MFPL; my $merged = capture_merged { system "$^X Makefile.PL" }; diag("$merged"); # Copied /usr/lib/perl5/site_perl/5.8.8/Devel/CheckOS.pm to # inc/Devel/CheckOS.pm # Copied /usr/lib/perl5/site_perl/5.8.8/Devel/AssertOS.pm to # inc/Devel/AssertOS.pm # Copied /usr/lib/perl5/site_perl/5.8.8/Devel/AssertOS/NetBSD.pm to # inc/Devel/AssertOS/NetBSD.pm my @tests = ( 'inc/Devel/CheckLib.pm', ); ok( -e $_, "Exists: '$_'" ) for @tests; } perl-Module-Install-CheckLib-0.08/t/99_pod.t000064400000000000000000000002011143516015200204140ustar00rootroot00000000000000use Test::More; eval "use Test::Pod 1.00"; plan skip_all => "Test::Pod 1.00 required for testing POD" if $@; all_pod_files_ok(); perl-Module-Install-CheckLib-0.08/t/99_pod_coverage.t000064400000000000000000000002411143516015200222730ustar00rootroot00000000000000use Test::More; eval "use Test::Pod::Coverage 1.00"; plan skip_all => "Test::Pod::Coverage 1.00 required for testing POD coverage" if $@; all_pod_coverage_ok();