summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@gnome.org>2017-03-14 10:48:55 +0000
committerEmmanuele Bassi <ebassi@gnome.org>2017-03-14 10:52:21 +0000
commit1447d8b527864c10899dab3733068407b82fb19b (patch)
tree903ddb8ae0f1f9e47485e1e7c296ef502c8b495f
parent82438b38ec955057b314126b5a7d044b2675a34d (diff)
downloadjson-glib-1447d8b527864c10899dab3733068407b82fb19b.tar.gz
build: Fix soversion for Meson builds
During stable cycles we want the interface age to match the micro version, as there are no symbol additions if the minor version is an even number. Conversely, we want the interface age to reset to 0, as there are no expectations of ABI compatibility for newly added symbols. The current check uses the micro version, instead of the odd version, which breaks the logic above. This ensures that the soname generated via the Meson build is the same as the one generated by the Autotools one.
-rw-r--r--meson.build12
1 files changed, 6 insertions, 6 deletions
diff --git a/meson.build b/meson.build
index 7890add..3192d4c 100644
--- a/meson.build
+++ b/meson.build
@@ -10,24 +10,24 @@ project('json-glib', 'c', version: '1.2.7',
# Versionning
json_version = meson.project_version()
version_arr = json_version.split('.')
-json_version_major = version_arr[0]
-json_version_minor = version_arr[1]
-json_version_micro = version_arr[2]
+json_version_major = version_arr[0].to_int()
+json_version_minor = version_arr[1].to_int()
+json_version_micro = version_arr[2].to_int()
apiversion = '1.0'
soversion = 0
-if json_version_micro.to_int().is_odd()
+if json_version_minor.is_odd()
json_interface_age = 0
else
- json_interface_age = json_version_micro.to_int()
+ json_interface_age = json_version_micro
endif
# maintaining compatibility with the previous libtool versioning
# current = minor * 100 + micro - interface
# revision = interface
soversion = 0
-current = json_version_minor.to_int() * 100 + json_version_micro.to_int() - json_interface_age
+current = json_version_minor * 100 + json_version_micro - json_interface_age
revision = json_interface_age
libversion = '@0@.@1@.@2@'.format(soversion, current, revision)