Confused by freetype versions (pkg-config)

Viewed 789

I have freetype2 installed on my system but I am also trying to install it from source, as well.

My installed version is here: /usr/lib64/pkgconfig/freetype2.pc. That file is listed as version 20.0.14.

To compile another tool, namely fontconfig, I need freetype2 >= 21.0.15.

So I downloaded freetype2 from its source git repo.

The trouble I'm having is that repository doesn't list any version even close to 21.0.15+. All of the tags in that repository are listed as VER-2-6-2, VER-2-9, VER-2-9-1, etc. And the generated freetype.pc file which is created after compilation are also listed as 2.6.2, 2.9, 2.9.1, etc. The version number is not 21.0.15 or even 20.0.14, which my CentOS 7.6 already has.

What determines the listed version in the freetype.pc file? Where can I find the version of freetype that will create a .pc file of >= 21.0.15+? Any clarification would be greatly appreciated.

1 Answers

Apparently the reason is because I was building freetype using CMake. And in the CMakeLists.txt, it's defining a version based on the version of freetype.

# . `CMakeLists.txt' is provided as-is since it is normally not used by the
#   developer team.

So it's unsupported. That's why the version number doesn't match.

In reality, the version number actually comes from libtool. See this table. e.g. I was building 2.10.0 freetype, so the freetype.pc should have been written with a version of 23.0.17

And if you build using configure, instead of cmake, you can find that exact same version 23.0.17 listed as "23:0:17" in the builds/unix/configure.raw file.

Related