Bump up the soname and version used when building GTK before the 4.0 release
The current shared library for GTK 4 is called:
libgtk-4.0.so.0.xxxx.y
Where xxxx.y
is computed as:
interface_age = micro_version.is_odd() ? 0 : micro_version
binary_age = minor_version × 100 + micro_version
xxxx = binary_age - interface_age
y = interface_age
This is pretty typical for GNOME projects, and it makes sense on long term stable branches to ensure that new micro releases have the same shared library name—as they expose the same ABI—and new minor releases bump up the shared library name in a predictable, monotonically incremental way.
Of course, this falls apart as soon as we deal with new major versions.
Since we released 3.9x snapshots under the libgtk-4.0.so.0
shared library name, once we release 4.0.0 we're going to find ourselves in the situation where we have:
libgtk-4.0.so.0.0.0
which can be interpreted by various tooling as "older" than GTK 3.99.5:
libgtk-4.0.so.0.9905.0
To counteract this issue, we are going to need to release 4.0.0 with the following changes:
gtk_soname = '1'
gtk_lib_version = '1.@0@.@1@'.format(binary_age - interface_age, interface_age)
in our meson.build
file.