graphics/p5-GD doesn't detect libgd > 2.0.33
Felix J. Ogrs
fjo-lists at ogris.de
Sun Dec 25 15:46:15 UTC 2016
Hi,
both Build.PL and Makefile.PL of p5-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.
BR,
Felix
-------------- next part --------------
--- Build.PL.orig 2016-12-13 20:22:30.348550000 +0100
+++ Build.PL 2016-12-13 20:23:01.820955000 +0100
@@ -280,8 +280,8 @@
($$lib_gd_path = $libdir) =~ s!/[^/]+$!!;
$$options = $features;
- my ($minor) = $version =~ /^2\.\d+\.(\d+)$/;
- $$options .= " GD_UNCLOSEDPOLY GD_ANIMGIF GD_FTCIRCLE VERSION_33" if defined($minor) && $minor >= 33;
+ 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));
my @correct_inc = map {s/^-I// && $_} split /\s+/,$cflags;
check_for_stray_headers($includedir, at correct_inc);
More information about the freebsd-perl
mailing list