Subject: | GD doesn't detect libgd > 2.0.33 |
Date: | Sun, 25 Dec 2016 16:57:40 +0100 |
To: | bug-GD [...] rt.cpan.org |
From: | "Felix J. Ogris" <fjo-lists [...] ogris.de> |
Hi,
both Build.PL and Makefile.PL of GD-2.56 do not correctly parse the version of libgd as returned by gdlib-config. Excerpt from Makefile.PL line 302:
my ($minor) = $version =~ /^2\.\d+\.(\d+)$/;
$$options .= " GD_UNCLOSEDPOLY GD_ANIMGIF GD_FTCIRCLE VERSION_33" if defined($minor) && $minor >= 33;
The above options GD_* were introduced as of libgd 2.0.33. But, current version is 2.2.3. Thus, the check fails. I'm proposing a trivial fix:
my ($release, $major, $minor) = $version =~ /^(\d+)\.(\d+)\.(\d+)$/;
$$options .= " GD_UNCLOSEDPOLY GD_ANIMGIF GD_FTCIRCLE VERSION_33" if defined($minor) && ($release > 2 || ($release == 2 && $major > 0) || ($release == 2 && $major == 0 && $minor >= 33));
Patches are attached. See also https://lists.freebsd.org/pipermail/freebsd-perl/2016-December/012391.html
BR,
Felix
Message body is not shown because sender requested not to inline it.
Message body is not shown because sender requested not to inline it.