1 --- libgd-2.1.1/config/getver.pl.orig 1970-01-01 01:00:00.000000000 +0100
2 +++ libgd-2.1.1/config/getver.pl 2015-06-19 20:37:05.518385651 +0200
6 +# Simple script to extract the version number parts from src/gd.h. If
7 +# called with the middle word of the version macro, it prints the
8 +# value of that macro. If called with no argument, it outputs a
9 +# human-readable version string. This must be run in the project
10 +# root. It is used by configure.ac and docs/naturaldocs/run_docs.sh.
15 +my @version_parts = ();
17 +open FH, "<src/gd.h" # old-style filehandle for max. portability
18 + or die "Unable to open 'version.h' for reading.\n";
21 + next unless m{version605b5d1778};
22 + next unless /^#define\s+GD_([A-Z0-9]+)_VERSION+\s+(\S+)/;
23 + my ($lk, $lv) = ($1, $2);
28 + print $lv; # no newline
32 + push @version_parts, $lv if (!$key);
37 +if (scalar @version_parts == 4) {
38 + my $result = join(".", @version_parts[0..2]);
39 + $result .= $version_parts[3];