Bizarrely, the freetypecheck build tool in OpenJDK 7 and below converts the FreeType major, minor and patch version numbers from its header files and library into a dotted string, before comparing it with REQUIRED_FREETYPE_VERSION (currently 2.3.0) using strcmp.
While this works when all the version numbers are single digits, it fails as soon as we run into comparisons with numbers of 10 and up.
With FreeType 2.10.0 released in March 2019, the version check now fails, believing 2.10.0 to be older than 2.3.0, because the character '1' is smaller than the character '3'.
We can fix this by instead converting "2.3.0" into its component version numbers and comparing them numerically with those obtained from FreeType.
While this works when all the version numbers are single digits, it fails as soon as we run into comparisons with numbers of 10 and up.
With FreeType 2.10.0 released in March 2019, the version check now fails, believing 2.10.0 to be older than 2.3.0, because the character '1' is smaller than the character '3'.
We can fix this by instead converting "2.3.0" into its component version numbers and comparing them numerically with those obtained from FreeType.