Skip Menu |

This queue is for tickets about the Imager CPAN distribution.

Report information
The Basics
Id: 63223
Status: resolved
Priority: 0/
Queue: Imager

People
Owner: Nobody in particular
Requestors: tokuhirom+cpan [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Imager::Probe should parse -D option from pkgconfig
On my machine(ubuntu hardy), pkg-config libpng --cflags returns "-DPNG_NO_MMX_CODE -I/usr/include/libpng12". It breaks the distribution. The result of Makefile.PL is: {{{ % perl Makefile.PL PNG: building independently PNG: Found via pkg-config libpng12 PNG: Test code failed: INC argument badly-formed: -DPNG_NO_MMX_CODE OS unsupported: PNG libraries or headers not found }}} I think this is a issue in Imager::Probe. The patch is here: {{{ diff --git a/perlbrew/perls/perl-5.12.2/lib/site_perl/5.12.2/x86_64- linux/Imager/Probe.pm b/perlbrew/perls/perl-5 index fe160f9..37b3460 100644 --- a/perlbrew/perls/perl-5.12.2/lib/site_perl/5.12.2/x86_64-linux/Imager/Probe.pm +++ b/perlbrew/perls/perl-5.12.2/lib/site_perl/5.12.2/x86_64-linux/Imager/Probe.pm @@ -106,6 +106,8 @@ sub _probe_pkg { # broken to be useful my $cflags = `pkg-config $pkg --cflags` and !$? or return; + my $ccflags = ''; + $cflags =~ s/(-D\S+)/$ccflags .= " $1"; ''/ge; my $lflags = `pkg-config $pkg --libs` and !$? or return; @@ -117,6 +119,7 @@ sub _probe_pkg { { INC => $cflags, LIBS => $lflags, + CCFLAGS => $ccflags, }; } } }}}
On Mon Nov 22 01:28:52 2010, TOKUHIROM wrote: Show quoted text
> On my machine(ubuntu hardy), pkg-config libpng --cflags returns "- > DPNG_NO_MMX_CODE > -I/usr/include/libpng12". It breaks the distribution.
Thanks for your report. This has been fixed in Imager 0.79. Tony