Skip to content

Commit

Permalink
propagate Devel::CheckLib changes to the subdirectories that need them
Browse files Browse the repository at this point in the history
and bump versions
  • Loading branch information
tonycoz committed Jan 25, 2025
1 parent 60206b3 commit fc77a05
Show file tree
Hide file tree
Showing 21 changed files with 133 additions and 21 deletions.
5 changes: 5 additions & 0 deletions FT2/Changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
Imager-Font-FT2 1.002
=====================

- update bundled Devel::CheckLib from CPAN with backported changes

Imager-Font-FT2 1.001
=====================

Expand Down
2 changes: 1 addition & 1 deletion FT2/FT2.pm
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ our @ISA = qw(Imager::Font);
our $VERSION;

BEGIN {
$VERSION = "1.001";
$VERSION = "1.002";

require XSLoader;
XSLoader::load('Imager::Font::FT2', $VERSION);
Expand Down
15 changes: 13 additions & 2 deletions FT2/inc/Devel/CheckLib.pm
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ use Text::ParseWords qw(quotewords shellwords);

use File::Spec;
use File::Temp;
use File::Path qw(rmtree);

require Exporter;
@ISA = qw(Exporter);
Expand Down Expand Up @@ -79,6 +80,9 @@ In that case, it will fail to build if either foo() or libversion() don't
exist, and main() will return the wrong value if libversion()'s return
value isn't what you want.
You can also use the C<prologue> parameter to add extra supporting
code between the headers and the definition of C<main>.
=head1 FUNCTIONS
All of these take the same named parameters and are exported by default.
Expand Down Expand Up @@ -307,9 +311,10 @@ sub _compile_cmd {
}

sub _make_cfile {
my ($use_headers, $function, $debug) = @_;
my ($use_headers, $function, $debug, $prologue) = @_;
my $code = '';
$code .= qq{#include <$_>\n} for @$use_headers;
$code .= "$prologue\n" if defined $prologue;
$code .= "int main(int argc, char *argv[]) { ".($function || 'return 0;')." }\n";
if ($debug) {
(my $c = $code) =~ s:^:# :gm;
Expand Down Expand Up @@ -384,7 +389,7 @@ sub assert_lib {
}

# now do each library in turn with headers
my ($cfile, $ofile) = _make_cfile(\@use_headers, @args{qw(function debug)});
my ($cfile, $ofile) = _make_cfile(\@use_headers, @args{qw(function debug prologue)});
for my $lib ( @libs ) {
last if $Config{cc} eq 'CC/DECC'; # VMS
my $exefile = File::Temp::mktemp( 'assertlibXXXXXXXX' ) . $Config{_exe};
Expand Down Expand Up @@ -439,6 +444,12 @@ sub _cleanup_exe {
foreach (grep -f, @rmfiles) {
unlink $_ or warn "Could not remove $_: $!";
}
if ($^O eq "darwin") {
# created by clang on darwin
my $dsym_dir = $exefile;
$dsym_dir =~ s/\Q$Config{_exe}\E$/.dSYM/;
rmtree $dsym_dir if -d $dsym_dir;
}
return
}

Expand Down
5 changes: 5 additions & 0 deletions GIF/Changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
Imager-File-GIF 1.000
=====================

- update bundled Devel::CheckLib from CPAN with backported changes

Imager-File-GIF 0.98
====================

Expand Down
2 changes: 1 addition & 1 deletion GIF/GIF.pm
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use strict;
use Imager;

BEGIN {
our $VERSION = "0.98";
our $VERSION = "1.000";

require XSLoader;
XSLoader::load('Imager::File::GIF', $VERSION);
Expand Down
15 changes: 13 additions & 2 deletions GIF/inc/Devel/CheckLib.pm
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ use Text::ParseWords qw(quotewords shellwords);

use File::Spec;
use File::Temp;
use File::Path qw(rmtree);

require Exporter;
@ISA = qw(Exporter);
Expand Down Expand Up @@ -79,6 +80,9 @@ In that case, it will fail to build if either foo() or libversion() don't
exist, and main() will return the wrong value if libversion()'s return
value isn't what you want.
You can also use the C<prologue> parameter to add extra supporting
code between the headers and the definition of C<main>.
=head1 FUNCTIONS
All of these take the same named parameters and are exported by default.
Expand Down Expand Up @@ -307,9 +311,10 @@ sub _compile_cmd {
}

sub _make_cfile {
my ($use_headers, $function, $debug) = @_;
my ($use_headers, $function, $debug, $prologue) = @_;
my $code = '';
$code .= qq{#include <$_>\n} for @$use_headers;
$code .= "$prologue\n" if defined $prologue;
$code .= "int main(int argc, char *argv[]) { ".($function || 'return 0;')." }\n";
if ($debug) {
(my $c = $code) =~ s:^:# :gm;
Expand Down Expand Up @@ -384,7 +389,7 @@ sub assert_lib {
}

# now do each library in turn with headers
my ($cfile, $ofile) = _make_cfile(\@use_headers, @args{qw(function debug)});
my ($cfile, $ofile) = _make_cfile(\@use_headers, @args{qw(function debug prologue)});
for my $lib ( @libs ) {
last if $Config{cc} eq 'CC/DECC'; # VMS
my $exefile = File::Temp::mktemp( 'assertlibXXXXXXXX' ) . $Config{_exe};
Expand Down Expand Up @@ -439,6 +444,12 @@ sub _cleanup_exe {
foreach (grep -f, @rmfiles) {
unlink $_ or warn "Could not remove $_: $!";
}
if ($^O eq "darwin") {
# created by clang on darwin
my $dsym_dir = $exefile;
$dsym_dir =~ s/\Q$Config{_exe}\E$/.dSYM/;
rmtree $dsym_dir if -d $dsym_dir;
}
return
}

Expand Down
5 changes: 5 additions & 0 deletions JPEG/Changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
Imager-File-JPEG 1.000
======================

- update bundled Devel::CheckLib from CPAN with backported changes

Imager-File-JPEG 0.98
=====================

Expand Down
2 changes: 1 addition & 1 deletion JPEG/JPEG.pm
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use strict;
use Imager;

BEGIN {
our $VERSION = "0.98";
our $VERSION = "1.000";

require XSLoader;
XSLoader::load('Imager::File::JPEG', $VERSION);
Expand Down
15 changes: 13 additions & 2 deletions JPEG/inc/Devel/CheckLib.pm
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ use Text::ParseWords qw(quotewords shellwords);

use File::Spec;
use File::Temp;
use File::Path qw(rmtree);

require Exporter;
@ISA = qw(Exporter);
Expand Down Expand Up @@ -79,6 +80,9 @@ In that case, it will fail to build if either foo() or libversion() don't
exist, and main() will return the wrong value if libversion()'s return
value isn't what you want.
You can also use the C<prologue> parameter to add extra supporting
code between the headers and the definition of C<main>.
=head1 FUNCTIONS
All of these take the same named parameters and are exported by default.
Expand Down Expand Up @@ -307,9 +311,10 @@ sub _compile_cmd {
}

sub _make_cfile {
my ($use_headers, $function, $debug) = @_;
my ($use_headers, $function, $debug, $prologue) = @_;
my $code = '';
$code .= qq{#include <$_>\n} for @$use_headers;
$code .= "$prologue\n" if defined $prologue;
$code .= "int main(int argc, char *argv[]) { ".($function || 'return 0;')." }\n";
if ($debug) {
(my $c = $code) =~ s:^:# :gm;
Expand Down Expand Up @@ -384,7 +389,7 @@ sub assert_lib {
}

# now do each library in turn with headers
my ($cfile, $ofile) = _make_cfile(\@use_headers, @args{qw(function debug)});
my ($cfile, $ofile) = _make_cfile(\@use_headers, @args{qw(function debug prologue)});
for my $lib ( @libs ) {
last if $Config{cc} eq 'CC/DECC'; # VMS
my $exefile = File::Temp::mktemp( 'assertlibXXXXXXXX' ) . $Config{_exe};
Expand Down Expand Up @@ -439,6 +444,12 @@ sub _cleanup_exe {
foreach (grep -f, @rmfiles) {
unlink $_ or warn "Could not remove $_: $!";
}
if ($^O eq "darwin") {
# created by clang on darwin
my $dsym_dir = $exefile;
$dsym_dir =~ s/\Q$Config{_exe}\E$/.dSYM/;
rmtree $dsym_dir if -d $dsym_dir;
}
return
}

Expand Down
5 changes: 5 additions & 0 deletions PNG/Changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
Imager-File-PNG 1.000
=====================

- update bundled Devel::CheckLib from CPAN with backported changes

Imager-File-PNG 0.99
====================

Expand Down
2 changes: 1 addition & 1 deletion PNG/PNG.pm
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use strict;
use Imager;

BEGIN {
our $VERSION = "0.99";
our $VERSION = "1.000";

require XSLoader;
XSLoader::load('Imager::File::PNG', $VERSION);
Expand Down
15 changes: 13 additions & 2 deletions PNG/inc/Devel/CheckLib.pm
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ use Text::ParseWords qw(quotewords shellwords);

use File::Spec;
use File::Temp;
use File::Path qw(rmtree);

require Exporter;
@ISA = qw(Exporter);
Expand Down Expand Up @@ -79,6 +80,9 @@ In that case, it will fail to build if either foo() or libversion() don't
exist, and main() will return the wrong value if libversion()'s return
value isn't what you want.
You can also use the C<prologue> parameter to add extra supporting
code between the headers and the definition of C<main>.
=head1 FUNCTIONS
All of these take the same named parameters and are exported by default.
Expand Down Expand Up @@ -307,9 +311,10 @@ sub _compile_cmd {
}

sub _make_cfile {
my ($use_headers, $function, $debug) = @_;
my ($use_headers, $function, $debug, $prologue) = @_;
my $code = '';
$code .= qq{#include <$_>\n} for @$use_headers;
$code .= "$prologue\n" if defined $prologue;
$code .= "int main(int argc, char *argv[]) { ".($function || 'return 0;')." }\n";
if ($debug) {
(my $c = $code) =~ s:^:# :gm;
Expand Down Expand Up @@ -384,7 +389,7 @@ sub assert_lib {
}

# now do each library in turn with headers
my ($cfile, $ofile) = _make_cfile(\@use_headers, @args{qw(function debug)});
my ($cfile, $ofile) = _make_cfile(\@use_headers, @args{qw(function debug prologue)});
for my $lib ( @libs ) {
last if $Config{cc} eq 'CC/DECC'; # VMS
my $exefile = File::Temp::mktemp( 'assertlibXXXXXXXX' ) . $Config{_exe};
Expand Down Expand Up @@ -439,6 +444,12 @@ sub _cleanup_exe {
foreach (grep -f, @rmfiles) {
unlink $_ or warn "Could not remove $_: $!";
}
if ($^O eq "darwin") {
# created by clang on darwin
my $dsym_dir = $exefile;
$dsym_dir =~ s/\Q$Config{_exe}\E$/.dSYM/;
rmtree $dsym_dir if -d $dsym_dir;
}
return
}

Expand Down
5 changes: 5 additions & 0 deletions T1/Changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
Imager::Font::T1 1.032
======================

- update bundled Devel::CheckLib from CPAN with backported changes

Imager::Font::T1 1.031
======================

Expand Down
2 changes: 1 addition & 1 deletion T1/T1.pm
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ our @ISA = qw(Imager::Font);
use Scalar::Util ();

BEGIN {
our $VERSION = "1.031";
our $VERSION = "1.032";

require XSLoader;
XSLoader::load('Imager::Font::T1', $VERSION);
Expand Down
15 changes: 13 additions & 2 deletions T1/inc/Devel/CheckLib.pm
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ use Text::ParseWords qw(quotewords shellwords);

use File::Spec;
use File::Temp;
use File::Path qw(rmtree);

require Exporter;
@ISA = qw(Exporter);
Expand Down Expand Up @@ -79,6 +80,9 @@ In that case, it will fail to build if either foo() or libversion() don't
exist, and main() will return the wrong value if libversion()'s return
value isn't what you want.
You can also use the C<prologue> parameter to add extra supporting
code between the headers and the definition of C<main>.
=head1 FUNCTIONS
All of these take the same named parameters and are exported by default.
Expand Down Expand Up @@ -307,9 +311,10 @@ sub _compile_cmd {
}

sub _make_cfile {
my ($use_headers, $function, $debug) = @_;
my ($use_headers, $function, $debug, $prologue) = @_;
my $code = '';
$code .= qq{#include <$_>\n} for @$use_headers;
$code .= "$prologue\n" if defined $prologue;
$code .= "int main(int argc, char *argv[]) { ".($function || 'return 0;')." }\n";
if ($debug) {
(my $c = $code) =~ s:^:# :gm;
Expand Down Expand Up @@ -384,7 +389,7 @@ sub assert_lib {
}

# now do each library in turn with headers
my ($cfile, $ofile) = _make_cfile(\@use_headers, @args{qw(function debug)});
my ($cfile, $ofile) = _make_cfile(\@use_headers, @args{qw(function debug prologue)});
for my $lib ( @libs ) {
last if $Config{cc} eq 'CC/DECC'; # VMS
my $exefile = File::Temp::mktemp( 'assertlibXXXXXXXX' ) . $Config{_exe};
Expand Down Expand Up @@ -439,6 +444,12 @@ sub _cleanup_exe {
foreach (grep -f, @rmfiles) {
unlink $_ or warn "Could not remove $_: $!";
}
if ($^O eq "darwin") {
# created by clang on darwin
my $dsym_dir = $exefile;
$dsym_dir =~ s/\Q$Config{_exe}\E$/.dSYM/;
rmtree $dsym_dir if -d $dsym_dir;
}
return
}

Expand Down
5 changes: 5 additions & 0 deletions TIFF/Changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
Imager-File-TIFF 1.000
======================

- update bundled Devel::CheckLib from CPAN with backported changes

Imager-File-TIFF 0.99
=====================

Expand Down
2 changes: 1 addition & 1 deletion TIFF/TIFF.pm
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use strict;
use Imager;

BEGIN {
our $VERSION = "0.99";
our $VERSION = "1.000";

require XSLoader;
XSLoader::load('Imager::File::TIFF', $VERSION);
Expand Down
Loading

0 comments on commit fc77a05

Please sign in to comment.