PkgConfig-0.11026/0000755000175000017500000000000012651526264013107 5ustar ollisgollisgPkgConfig-0.11026/.appveyor.yml0000644000175000017500000000062412643524116015552 0ustar ollisgollisg--- install: - choco install strawberryperl - SET PATH=C:\Perl5\bin;C:\strawberry\c\bin;C:\strawberry\perl\site\bin;C:\strawberry\perl\bin;%PATH% - perl -v - del /q script\* - cp lib\PkgConfig.pm script\pkg-config - cp lib\PkgConfig.pm script\pkg-config.pl - cp lib\PkgConfig.pm script\ppkg-config - perl gen_multi_tests.pl build: off test_script: - prove -lv t shallow_clone: true PkgConfig-0.11026/gen_multi_tests.pl0000644000175000017500000000107412643523315016646 0ustar ollisgollisguse strict; use warnings; use File::Find; my @list = ([]); my $count = 1; find(sub { /\.pc$/ && do { push @{ $list[-1] }, $File::Find::name; push @list, [] if @{ $list[-1] } == 50; } }, 't/data/usr'); my $template = do { open my $fh, '<', 't/data/iterfiles_template'; local $/; <$fh>; }; my $i = 0; foreach my $list (@list) { my $fn = sprintf "t/02-iterfiles-FLISTa%s.t", chr(ord('a')+$i++); print "$fn\n"; my $content = "$template"; $content =~ s{#LIST}{join("\n", @$list)}e; open my $fh, '>', $fn; print $fh $content; close $fh; } PkgConfig-0.11026/win32/0000755000175000017500000000000012651526264014051 5ustar ollisgollisgPkgConfig-0.11026/win32/fix_old_strawberry.pl0000644000175000017500000000316712643520341020314 0ustar ollisgollisguse strict; use warnings; use Config; use File::Spec; use File::Copy qw( copy ); if($^O eq 'cygwin') { print "this script is for native build version of Perl (Strawberry)\n"; exit 2; } unless($^O eq 'MSWin32') { print "this does not appear to be Windows Perl\n"; exit 2; } my $uname = $Config{myuname}; print "myuname = $uname\n"; unless(defined $uname && $uname =~ /strawberry-perl/) { print "this does not appear to be Strawberry Perl\n"; exit 2; } if($uname =~ /strawberry-perl 5\.(\d+)\.(\d+)\.(\d+)/) { my($major,$minor,$patch) = ($1,$2,$3); if( ($major == 20 && !($minor == 0 && $patch == 1)) || ($major > 20)) { print "this version of Perl doesn't need to be patched\n"; exit 2; } my($vol, $dir, $file) = File::Spec->splitpath($^X); my @dirs = File::Spec->splitdir($dir); splice @dirs, -3; my $path = (File::Spec->catdir($vol, @dirs, qw( c lib pkgconfig ))); my $dh; opendir $dh, $path; my @pcfiles = grep !/^\./, grep /\.pc$/, readdir $dh; closedir $dh; foreach my $pcfile (@pcfiles) { my $bak = File::Spec->catfile($path, "$pcfile.bak"); my $pc = File::Spec->catfile($path, $pcfile); if(-e $bak) { print "already exists: $bak\n"; print "patch has probably already been applied\n"; next; } print "copy $pc => $bak\n"; copy($pc, $bak) || die "Copy failed: $!"; print "read $bak\n"; open my $fh, '<', $bak; my @content = map { s{/mingw}{"\${pcfiledir}/../.."}eg; $_ } <$fh>; close $fh; print "write $pc\n"; open $fh, '>', $pc; binmode $fh; print $fh @content; close $fh; } } PkgConfig-0.11026/win32/fix_links.pl0000644000175000017500000000164512643520341016371 0ustar ollisgollisguse strict; use warnings; use File::Spec; # this script requires administrator privileges warn "this script requires admin privilages, which you don't appear to have" unless eval { require Win32; Win32::IsAdminUser() }; my @list = map { chomp; [split /\t/]->[1] } grep /^120000/, `git ls-files -s `; foreach my $link (@list) { # in case we ran this before system "git checkout $link"; my $target = do { open my $fh, '<', $link; local $/; <$fh> }; unlink $link; my $cmd = "mklink " . File::Spec->catfile($link) . " " . File::Spec->catfile($target); print "> $cmd\n"; system $cmd; if($?) { warn "failed"; # revert on failure system "git checkout $link"; next; } # ignore change so that it won't be comitted back print "> git update-index --assume-unchanged $link\n"; system 'git', 'update-index', '--assume-unchanged', $link; } print "press to continue.\n"; ; PkgConfig-0.11026/MANIFEST.SKIP0000644000175000017500000000010112643520341014764 0ustar ollisgollisg\.git.+ ^Makefile$ ^MANIFEST\.bak$ ^MYMETA\. ^blib/ ^pm_to_blib$ PkgConfig-0.11026/META.json0000644000175000017500000000301112651526264014523 0ustar ollisgollisg{ "abstract" : "Pure-Perl Core-Only replacement for pkg-config", "author" : [ "M. Nunberg " ], "dynamic_config" : 1, "generated_by" : "ExtUtils::MakeMaker version 7.1, CPAN::Meta::Converter version 2.150005", "license" : [ "perl_5" ], "meta-spec" : { "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", "version" : "2" }, "name" : "PkgConfig", "no_index" : { "directory" : [ "t", "inc" ] }, "prereqs" : { "build" : { "requires" : { "ExtUtils::MakeMaker" : "6.56" } }, "configure" : { "requires" : { "ExtUtils::MakeMaker" : "0" } }, "runtime" : { "requires" : { "Test::More" : "0.94", "perl" : "5.006000" } } }, "provides" : { "PkgConfig" : { "file" : "lib/PkgConfig.pm", "version" : "0.11026" } }, "release_status" : "stable", "resources" : { "bugtracker" : { "web" : "https://github.com/PerlPkgConfig/perl-PkgConfig/issues" }, "homepage" : "https://metacpan.org/pod/PkgConfig", "repository" : { "type" : "git", "url" : "https://github.com/PerlPkgConfig/perl-PkgConfig.git", "web" : "https://github.com/PerlPkgConfig/perl-PkgConfig" }, "x_IRC" : "irc://irc.perl.org/#native" }, "version" : "0.11026", "x_serialization_backend" : "JSON::PP version 2.27300" } PkgConfig-0.11026/run_test.pl0000644000175000017500000000143512643520341015301 0ustar ollisgollisguse strict; use warnings; use blib; use Test::Harness; use File::Spec; use File::Glob qw( bsd_glob ); use lib map { File::Spec->rel2abs($_) } qw( blib/lib blib/arch ); eval { require PkgConfig; print "\nTesting PkgConfig $PkgConfig::VERSION, Perl $], $^X\n"; }; my $cpu_count; if(defined $ENV{NUMBER_OF_PROCESSORS}) { $cpu_count = $ENV{NUMBER_OF_PROCESSORS}; } elsif(-r "/proc/cpuinfo") { my $fh; open $fh, '<', '/proc/cpuinfo'; $cpu_count = scalar grep /^processor\s/, <$fh>; close $fh; } elsif($^O eq 'darwin') { $cpu_count = `sysctl -n hw.ncpu`; chomp $cpu_count; } if(defined $cpu_count && $cpu_count > 0) { $cpu_count = 8 if $cpu_count > 8; print "Testing on $cpu_count CPUS\n"; $ENV{HARNESS_OPTIONS} = "j$cpu_count"; } Test::Harness::runtests(bsd_glob 't/*.t'); PkgConfig-0.11026/README0000644000175000017500000000377012643520341013765 0ustar ollisgollisgPkgConfig This module provides a pure perl version of pkg-config, a program that provides compiler and linker flags for installed packages. See: http://www.freedesktop.org/wiki/Software/pkg-config/ for the original. The POD for the module contains a more detailed description of how it works and the differences from the original. You can view it before installing using perldoc: % perldoc lib/PkgConfig.pm INSTALLATION To install this module, run the following commands: perl Makefile.PL make make test make install You may change the scripts that get installed by using the --script option one or more times. For example, if you prefer not to install pkg-config.pl you could do this: % perl Makefile.PL --script=ppkg-config Or if you want to use ppkg-config and pkg-config (say you are on a platform that does not provide it): % perl Makefile.PL --script=pkg-config --script=ppkg-config Or if you don't want any scripts installed at all: % perl Makefile.PL --script=none The default is "--script=ppkg-config --script=pkg-config.pl" except for Windows, where the default is just "--script=ppkg-config". SUPPORT AND DOCUMENTATION After installing, you can find documentation for this module with the perldoc command. perldoc PkgConfig You can also look for information at: GitHub, which hosts the projects official repository http://github.com/mnunberg/perl-PkgConfig Project's issue tracker on GitHub https://github.com/mnunberg/perl-PkgConfig/issues AnnoCPAN, Annotated CPAN documentation http://annocpan.org/dist/PkgConfig CPAN Ratings http://cpanratings.perl.org/d/PkgConfig MetaCpan https://metacpan.org/pod/PkgConfig LICENSE AND COPYRIGHT Copyright (C) 2012 M. Nunberg This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License. See http://dev.perl.org/licenses/ for more information. PkgConfig-0.11026/README.win320000644000175000017500000000651712651523153014733 0ustar ollisgollisg=head1 DESCRIPTION This file contains some tips for using and developing PkgConfig on the Microsoft Windows platform (without Cygwin). =head1 STRAWBERRY PERL Starting with Strawberry Perl 5.20.0.1, PkgConfig is included as part of Strawberry. It can be run from the command line as pkg-config, just as the c version works on Unix style platforms. Unfortunately, the version included with 5.20.0.1 is incompatible with the version on CPAN. This was fixed in the next version of Strawberry. You may optionally patch the .pc files that come with Strawberry Perl 5.20.0.1 or earlier to either get the same pkg-config capability which will come with future versions of Strawberry (if you are using 5.18 or earlier) or to fix the incompatibility that was introduced in Strawberry 5.20.0.1. Simply follow these steps: =over 4 =item 1. install PkgConfig You will need to tell it to install the script as pkg-config: C:\> cpanm PkgConfig --configure-args=--script=pkg-config You may optionally install the script as ppkg-config as well to match the behavior on Unix style platforms, though the main reason for that named version is simply to avoid replacing the "real" pkg-config commonly available on Unix style platforms. C:\> rem alternatively C:\> cpanm PkgConfig --configure--args=--script=pkg-config,ppkg-config =item 2. patch the .pc files that come with Strawberry The .pc files that come with older versions of Strawberry include references to C. These need to be changes to C<${pcfiledir}/../..>. To make this easy, I have written a script to automate the task. C:\PkgConfig\> perl win32\fix_old_strawberry.pl This is not done automatically as part of the install of PkgConfig because the current maintainer of PkgConfig feels that these files are the domain of the Strawberry team and the user of Strawberry. This script will make backups of the .pc files with a .bak extension. This script will refuse to run on newer versions of Strawberry that do not need to be patched. =back =head1 SYMLINKS This distribution contains symbolic links for historical reasons, which may be inconvenient if you are trying to run one of the scripts in the C